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. --- mingw-w64-headers/crt/stdio.h | 23 ----------------------- mingw-w64-headers/crt/wchar.h | 26 -------------------------- 2 files changed, 49 deletions(-)
diff --git a/mingw-w64-headers/crt/stdio.h b/mingw-w64-headers/crt/stdio.h index ff9a36373d70..721b68463351 100644 --- a/mingw-w64-headers/crt/stdio.h +++ b/mingw-w64-headers/crt/stdio.h @@ -1080,8 +1080,6 @@ int vsnwprintf (wchar_t *__stream, size_t __n, const wchar_t *__format, __builti #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 vsnwprintf (wchar_t *__stream, size_t __n, const wchar_t *__format, __builti 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 5007968de03f..f6605720c4e2 100644 --- a/mingw-w64-headers/crt/wchar.h +++ b/mingw-w64-headers/crt/wchar.h @@ -460,8 +460,6 @@ __MINGW_ASM_CALL(__mingw_vsnwprintf); #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 @@ __MINGW_ASM_CALL(__mingw_vsnwprintf); 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 */ -- 2.20.1 _______________________________________________ Mingw-w64-public mailing list Mingw-w64-public@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/mingw-w64-public