headers: Deduplicate *wprintf/*wscanf functions across UCRT/msvcrt builds
All these functions have same declarations in #ifdef _UCRT and #else
blocks. The only difference is that in non-UCRT block functions vfwscanf,
vswscanf and vwscanf are declared without __cdecl. As all those functions
are with __cdecl calling convenion, they should be declared with __cdecl.
Signed-off-by: Martin Storsjö <martin@martin.st>
diff --git a/mingw-w64-headers/crt/stdio.h b/mingw-w64-headers/crt/stdio.h
index ff9a363..721b684 100644
--- a/mingw-w64-headers/crt/stdio.h
+++ b/mingw-w64-headers/crt/stdio.h
@@ -1080,8 +1080,6 @@
#endif /* __NO_ISOCEXT */
#else /* !__USE_MINGW_ANSI_STDIO */
-
-#ifdef _UCRT
__MINGW_ATTRIB_DEPRECATED_SEC_WARN
int __cdecl fwscanf(FILE * __restrict__ _File,const wchar_t * __restrict__ _Format,...);
@@ -1104,27 +1102,6 @@
int __cdecl wprintf(const wchar_t * __restrict__ _Format,...);
int __cdecl vfwprintf(FILE * __restrict__ _File,const wchar_t * __restrict__ _Format,va_list _ArgList);
int __cdecl vwprintf(const wchar_t * __restrict__ _Format,va_list _ArgList);
-#else
-
- int __cdecl fwscanf(FILE * __restrict__ _File,const wchar_t * __restrict__ _Format,...) __MINGW_ATTRIB_DEPRECATED_SEC_WARN;
- int __cdecl swscanf(const wchar_t * __restrict__ _Src,const wchar_t * __restrict__ _Format,...) __MINGW_ATTRIB_DEPRECATED_SEC_WARN;
- int __cdecl wscanf(const wchar_t * __restrict__ _Format,...) __MINGW_ATTRIB_DEPRECATED_SEC_WARN;
-#ifndef __NO_ISOCEXT /* externs in libmingwex.a */
- __MINGW_ATTRIB_NONNULL(2)
- int vfwscanf (FILE *__stream, const wchar_t *__format, __builtin_va_list __local_argv);
-
- __MINGW_ATTRIB_NONNULL(2)
- int vswscanf (const wchar_t * __restrict__ __source, const wchar_t * __restrict__ __format, __builtin_va_list __local_argv);
-
- __MINGW_ATTRIB_NONNULL(1)
- int vwscanf(const wchar_t *__format, __builtin_va_list __local_argv);
-#endif /* __NO_ISOCEXT */
-
- int __cdecl fwprintf(FILE * __restrict__ _File,const wchar_t * __restrict__ _Format,...);
- int __cdecl wprintf(const wchar_t * __restrict__ _Format,...);
- int __cdecl vfwprintf(FILE * __restrict__ _File,const wchar_t * __restrict__ _Format,va_list _ArgList);
- int __cdecl vwprintf(const wchar_t * __restrict__ _Format,va_list _ArgList);
-#endif /* _UCRT */
int __cdecl swprintf(wchar_t * __restrict__ _Dest,size_t _Count,const wchar_t * __restrict__ _Format,...);
int __cdecl vswprintf(wchar_t * __restrict__ _Dest,size_t _Count,const wchar_t * __restrict__ _Format,va_list _Args);
diff --git a/mingw-w64-headers/crt/wchar.h b/mingw-w64-headers/crt/wchar.h
index 5007968..f660572 100644
--- a/mingw-w64-headers/crt/wchar.h
+++ b/mingw-w64-headers/crt/wchar.h
@@ -460,8 +460,6 @@
#endif /* __NO_ISOCEXT */
#else /* !__USE_MINGW_ANSI_STDIO */
-
-#ifdef _UCRT
__MINGW_ATTRIB_DEPRECATED_SEC_WARN
int __cdecl fwscanf(FILE * __restrict__ _File,const wchar_t * __restrict__ _Format,...);
@@ -486,30 +484,6 @@
int __cdecl vwprintf(const wchar_t * __restrict__ _Format,va_list _ArgList);
int __cdecl swprintf(wchar_t * __restrict__ _Dest,size_t _Count,const wchar_t * __restrict__ _Format,...);
int __cdecl vswprintf(wchar_t * __restrict__ _Dest,size_t _Count,const wchar_t * __restrict__ _Format,va_list _Args);
-#else
-
- int __cdecl fwscanf(FILE * __restrict__ _File,const wchar_t * __restrict__ _Format,...) __MINGW_ATTRIB_DEPRECATED_SEC_WARN;
- int __cdecl swscanf(const wchar_t * __restrict__ _Src,const wchar_t * __restrict__ _Format,...) __MINGW_ATTRIB_DEPRECATED_SEC_WARN;
- int __cdecl wscanf(const wchar_t * __restrict__ _Format,...) __MINGW_ATTRIB_DEPRECATED_SEC_WARN;
-#ifndef __NO_ISOCEXT /* externs in libmingwex.a */
- __MINGW_ATTRIB_NONNULL(2)
- int vfwscanf (FILE *__stream, const wchar_t *__format, __builtin_va_list __local_argv);
-
- __MINGW_ATTRIB_NONNULL(2)
- int vswscanf (const wchar_t * __restrict__ __source, const wchar_t * __restrict__ __format, __builtin_va_list __local_argv);
-
- __MINGW_ATTRIB_NONNULL(1)
- int vwscanf(const wchar_t *__format, __builtin_va_list __local_argv);
-#endif /* __NO_ISOCEXT */
-
- int __cdecl fwprintf(FILE * __restrict__ _File,const wchar_t * __restrict__ _Format,...);
- int __cdecl wprintf(const wchar_t * __restrict__ _Format,...);
- int __cdecl vfwprintf(FILE * __restrict__ _File,const wchar_t * __restrict__ _Format,va_list _ArgList);
- int __cdecl vwprintf(const wchar_t * __restrict__ _Format,va_list _ArgList);
-
- int __cdecl swprintf(wchar_t * __restrict__ _Dest,size_t _Count,const wchar_t * __restrict__ _Format,...);
- int __cdecl vswprintf(wchar_t * __restrict__ _Dest,size_t _Count,const wchar_t * __restrict__ _Format,va_list _Args);
-#endif /* _UCRT */
#endif /* __USE_MINGW_ANSI_STDIO */