* _mingw_print_push.h: Remove wscanf-defines.
* _mingw_print_pop.h: Likewise.
* stdio.h: Replace macro-wscanf override via alias.
---
 trunk/mingw-w64-headers/crt/_mingw_print_pop.h  |   18 -----
 trunk/mingw-w64-headers/crt/_mingw_print_push.h |    7 --
 trunk/mingw-w64-headers/crt/stdio.h             |   84 +++++++++++++++++++----
 trunk/mingw-w64-headers/crt/wchar.h             |   84 +++++++++++++++++++---
 4 files changed, 143 insertions(+), 50 deletions(-)

diff --git a/trunk/mingw-w64-headers/crt/_mingw_print_pop.h 
b/trunk/mingw-w64-headers/crt/_mingw_print_pop.h
index 56aa8b0..c40042e 100644
--- a/trunk/mingw-w64-headers/crt/_mingw_print_pop.h
+++ b/trunk/mingw-w64-headers/crt/_mingw_print_pop.h
@@ -7,24 +7,6 @@
 /* Define __mingw_<printf> macros.  */
 #if defined(__USE_MINGW_ANSI_STDIO) && (defined(_INC_STDIO) || 
defined(_WSTDIO_DEFINED)) && ((__USE_MINGW_ANSI_STDIO + 0) != 0)
 
-#ifdef _WSTDIO_DEFINED
-
-#undef swscanf
-#undef vswscanf
-#undef wscanf
-#undef vwscanf
-#undef fwscanf
-#undef vfwscanf
-
-#define swscanf __mingw_swscanf
-#define vswscanf __mingw_vswscanf
-#define wscanf __mingw_wscanf
-#define vwscanf __mingw_vwscanf
-#define fwscanf __mingw_fwscanf
-#define vfwscanf __mingw_vfwscanf
-
-#endif
-
 /* Redefine to GNU specific PRI... and SCN... macros.  */
 #if defined(_INTTYPES_H_) && defined(PRId64)
 #undef PRId64
diff --git a/trunk/mingw-w64-headers/crt/_mingw_print_push.h 
b/trunk/mingw-w64-headers/crt/_mingw_print_push.h
index 29db3a8..25a229d 100644
--- a/trunk/mingw-w64-headers/crt/_mingw_print_push.h
+++ b/trunk/mingw-w64-headers/crt/_mingw_print_push.h
@@ -7,13 +7,6 @@
 /* Undefine __mingw_<printf> macros.  */
 #if defined(__USE_MINGW_ANSI_STDIO) && ((__USE_MINGW_ANSI_STDIO + 0) != 0)
 
-#undef swscanf
-#undef vswscanf
-#undef wscanf
-#undef vwscanf
-#undef fwscanf
-#undef vfwscanf
-
 /* Redefine to MS specific PRI... and SCN... macros.  */
 #if defined(_INTTYPES_H_) && defined(PRId64)
 #undef PRId64
diff --git a/trunk/mingw-w64-headers/crt/stdio.h 
b/trunk/mingw-w64-headers/crt/stdio.h
index 5873b48..3ac21b5 100644
--- a/trunk/mingw-w64-headers/crt/stdio.h
+++ b/trunk/mingw-w64-headers/crt/stdio.h
@@ -522,6 +522,19 @@ int vsnprintf (char *__stream, size_t __n, const char 
*__format, __builtin_va_li
 #define _WSTDIO_DEFINED
 
 __attribute__((__format__ (gnu_printf, 2, 3))) __MINGW_ATTRIB_NONNULL(2)
+  int __cdecl __mingw_swscanf(const wchar_t * __restrict__ _Src,const wchar_t 
* __restrict__ _Format,...);
+__attribute__((__format__ (gnu_printf, 2, 0))) __MINGW_ATTRIB_NONNULL(2)
+  int __cdecl __mingw_vswscanf (const wchar_t * __restrict__ _Str,const 
wchar_t * __restrict__ Format,va_list argp);
+__attribute__((__format__ (gnu_printf, 1, 2))) __MINGW_ATTRIB_NONNULL(1)
+  int __cdecl __mingw_wscanf(const wchar_t * __restrict__ _Format,...);
+__attribute__((__format__ (gnu_printf, 1, 0))) __MINGW_ATTRIB_NONNULL(1)
+  int __cdecl __mingw_vwscanf(const wchar_t * __restrict__ Format, va_list 
argp);
+__attribute__((__format__ (gnu_printf, 2, 3))) __MINGW_ATTRIB_NONNULL(2)
+  int __cdecl __mingw_fwscanf(FILE * __restrict__ _File,const wchar_t * 
__restrict__ _Format,...);
+__attribute__((__format__ (gnu_printf, 2, 0))) __MINGW_ATTRIB_NONNULL(2)
+  int __cdecl __mingw_vfwscanf (FILE * __restrict__ fp, const wchar_t * 
__restrict__ Format,va_list argp);
+
+__attribute__((__format__ (gnu_printf, 2, 3))) __MINGW_ATTRIB_NONNULL(2)
   int __cdecl __mingw_fwprintf(FILE * __restrict__ _File,const wchar_t * 
__restrict__ _Format,...);
 __attribute__((__format__ (gnu_printf, 1, 2))) __MINGW_ATTRIB_NONNULL(1)
   int __cdecl __mingw_wprintf(const wchar_t * __restrict__ _Format,...);
@@ -544,6 +557,64 @@ __attribute__((__format__ (gnu_printf, 3, 0))) 
__MINGW_ATTRIB_NONNULL(3)
  */
 __forceinline
 __attribute__((__format__ (gnu_printf, 2, 3))) __MINGW_ATTRIB_NONNULL(2)
+int swscanf(const wchar_t *__source, const wchar_t *__format, ...)
+{
+  register int __retval;
+  __builtin_va_list __local_argv; __builtin_va_start( __local_argv, __format );
+  __retval = __mingw_vswscanf( __source, __format, __local_argv );
+  __builtin_va_end( __local_argv );
+  return __retval;
+}
+
+__forceinline
+__attribute__((__format__ (gnu_printf, 1, 2))) __MINGW_ATTRIB_NONNULL(1)
+int wscanf(const wchar_t *__format, ...)
+{
+  register int __retval;
+  __builtin_va_list __local_argv; __builtin_va_start( __local_argv, __format );
+  __retval = __mingw_vwscanf( __format, __local_argv );
+  __builtin_va_end( __local_argv );
+  return __retval;
+}
+
+__forceinline
+__attribute__((__format__ (gnu_printf, 2, 3))) __MINGW_ATTRIB_NONNULL(2)
+int fwscanf(FILE *__stream, const wchar_t *__format, ...)
+{
+  register int __retval;
+  __builtin_va_list __local_argv; __builtin_va_start( __local_argv, __format );
+  __retval = __mingw_vfwscanf( __stream, __format, __local_argv );
+  __builtin_va_end( __local_argv );
+  return __retval;
+}
+
+#ifndef __NO_ISOCEXT  /* externs in libmingwex.a */
+__forceinline
+__attribute__((__format__ (gnu_printf, 2, 0))) __MINGW_ATTRIB_NONNULL(2)
+int vswscanf (const wchar_t *__source, const wchar_t *__format, 
__builtin_va_list __local_argv)
+{
+  return __mingw_vswscanf( __source, __format, __local_argv );
+}
+
+__forceinline
+__attribute__((__format__ (gnu_printf, 1, 0))) __MINGW_ATTRIB_NONNULL(1)
+int vwscanf(const wchar_t *__format,  __builtin_va_list __local_argv)
+{
+  return __mingw_vwscanf( __format, __local_argv );
+}
+
+__forceinline
+__attribute__((__format__ (gnu_printf, 2, 0))) __MINGW_ATTRIB_NONNULL(2)
+int vfwscanf (FILE *__stream,  const wchar_t *__format, __builtin_va_list 
__local_argv)
+{
+  return __mingw_vfwscanf( __stream, __format, __local_argv );
+}
+#endif /* __NO_ISOCEXT */
+
+
+
+__forceinline
+__attribute__((__format__ (gnu_printf, 2, 3))) __MINGW_ATTRIB_NONNULL(2)
 int fwprintf (FILE *__stream, const wchar_t *__format, ...)
 {
   register int __retval;
@@ -675,16 +746,6 @@ int vsnwprintf (wchar_t *__stream, size_t __n, const 
wchar_t *__format, __builti
 #pragma pop_macro ("snwprintf")
 #endif
 
-  int __cdecl __mingw_swscanf(const wchar_t * __restrict__ _Src,const wchar_t 
* __restrict__ _Format,...);
-  int __cdecl __mingw_vswscanf (const wchar_t * __restrict__ _Str,const 
wchar_t * __restrict__ Format,va_list argp);
-  int __cdecl __mingw_wscanf(const wchar_t * __restrict__ _Format,...);
-  int __cdecl __mingw_vwscanf(const wchar_t * __restrict__ Format, va_list 
argp);
-  int __cdecl __mingw_fwscanf(FILE * __restrict__ _File,const wchar_t * 
__restrict__ _Format,...);
-  int __cdecl __mingw_vfwscanf (FILE * __restrict__ fp, const wchar_t * 
__restrict__ Format,va_list argp);
-
-  int __cdecl vwscanf (const wchar_t * __restrict__ , va_list);
-  int __cdecl vfwscanf (FILE * __restrict__ ,const wchar_t * __restrict__ 
,va_list);
-  int __cdecl vswscanf (const wchar_t * __restrict__ ,const wchar_t * 
__restrict__ ,va_list);
 #endif /* ! __NO_ISOCEXT */
   _CRTIMP int __cdecl _fwprintf_p(FILE * __restrict__ _File,const wchar_t * 
__restrict__ _Format,...);
   _CRTIMP int __cdecl _wprintf_p(const wchar_t * __restrict__ _Format,...);
@@ -729,13 +790,10 @@ int vsnwprintf (wchar_t *__stream, size_t __n, const 
wchar_t *__format, __builti
   _CRTIMP wchar_t *__cdecl _wtempnam(const wchar_t *_Directory,const wchar_t 
*_FilePrefix);
   _CRTIMP int __cdecl _vscwprintf(const wchar_t * __restrict__ _Format,va_list 
_ArgList);
   _CRTIMP int __cdecl _vscwprintf_l(const wchar_t * __restrict__ 
_Format,_locale_t _Locale,va_list _ArgList);
-  int __cdecl fwscanf(FILE * __restrict__ _File,const wchar_t * __restrict__ 
_Format,...) __MINGW_ATTRIB_DEPRECATED_SEC_WARN;
   _CRTIMP int __cdecl _fwscanf_l(FILE * __restrict__ _File,const wchar_t * 
__restrict__ _Format,_locale_t _Locale,...) __MINGW_ATTRIB_DEPRECATED_SEC_WARN;
-  int __cdecl swscanf(const wchar_t * __restrict__ _Src,const wchar_t * 
__restrict__ _Format,...) __MINGW_ATTRIB_DEPRECATED_SEC_WARN;
   _CRTIMP int __cdecl _swscanf_l(const wchar_t * __restrict__ _Src,const 
wchar_t * __restrict__ _Format,_locale_t _Locale,...) 
__MINGW_ATTRIB_DEPRECATED_SEC_WARN;
   _CRTIMP int __cdecl _snwscanf(const wchar_t * __restrict__ _Src,size_t 
_MaxCount,const wchar_t * __restrict__ _Format,...);
   _CRTIMP int __cdecl _snwscanf_l(const wchar_t * __restrict__ _Src,size_t 
_MaxCount,const wchar_t * __restrict__ _Format,_locale_t _Locale,...);
-  int __cdecl wscanf(const wchar_t * __restrict__ _Format,...) 
__MINGW_ATTRIB_DEPRECATED_SEC_WARN;
   _CRTIMP int __cdecl _wscanf_l(const wchar_t * __restrict__ _Format,_locale_t 
_Locale,...) __MINGW_ATTRIB_DEPRECATED_SEC_WARN;
   _CRTIMP FILE *__cdecl _wfdopen(int _FileHandle ,const wchar_t *_Mode);
   _CRTIMP FILE *__cdecl _wfopen(const wchar_t * __restrict__ _Filename,const 
wchar_t *__restrict__  _Mode) __MINGW_ATTRIB_DEPRECATED_SEC_WARN;
diff --git a/trunk/mingw-w64-headers/crt/wchar.h 
b/trunk/mingw-w64-headers/crt/wchar.h
index 8034b6e..9d43399 100644
--- a/trunk/mingw-w64-headers/crt/wchar.h
+++ b/trunk/mingw-w64-headers/crt/wchar.h
@@ -419,6 +419,20 @@ extern FILE (* __MINGW_IMP_SYMBOL(_iob))[];        /* A 
pointer to an array of FILE */
 #define _WSTDIO_DEFINED
 
 __attribute__((__format__ (gnu_printf, 2, 3))) __MINGW_ATTRIB_NONNULL(2)
+  int __cdecl __mingw_swscanf(const wchar_t * __restrict__ _Src,const wchar_t 
* __restrict__ _Format,...);
+__attribute__((__format__ (gnu_printf, 2, 0))) __MINGW_ATTRIB_NONNULL(2)
+  int __cdecl __mingw_vswscanf (const wchar_t * __restrict__ _Str,const 
wchar_t * __restrict__ Format,va_list argp);
+__attribute__((__format__ (gnu_printf, 1, 2))) __MINGW_ATTRIB_NONNULL(1)
+  int __cdecl __mingw_wscanf(const wchar_t * __restrict__ _Format,...);
+__attribute__((__format__ (gnu_printf, 1, 0))) __MINGW_ATTRIB_NONNULL(1)
+  int __cdecl __mingw_vwscanf(const wchar_t * __restrict__ Format, va_list 
argp);
+__attribute__((__format__ (gnu_printf, 2, 3))) __MINGW_ATTRIB_NONNULL(2)
+  int __cdecl __mingw_fwscanf(FILE * __restrict__ _File,const wchar_t * 
__restrict__ _Format,...);
+__attribute__((__format__ (gnu_printf, 2, 0))) __MINGW_ATTRIB_NONNULL(2)
+  int __cdecl __mingw_vfwscanf (FILE * __restrict__ fp, const wchar_t * 
__restrict__ Format,va_list argp);
+
+
+__attribute__((__format__ (gnu_printf, 2, 3))) __MINGW_ATTRIB_NONNULL(2)
   int __cdecl __mingw_fwprintf(FILE * __restrict__ _File,const wchar_t * 
__restrict__ _Format,...);
 __attribute__((__format__ (gnu_printf, 1, 2))) __MINGW_ATTRIB_NONNULL(1)
   int __cdecl __mingw_wprintf(const wchar_t * __restrict__ _Format,...);
@@ -441,6 +455,64 @@ __attribute__((__format__ (gnu_printf, 3, 0))) 
__MINGW_ATTRIB_NONNULL(3)
  */
 __forceinline
 __attribute__((__format__ (gnu_printf, 2, 3))) __MINGW_ATTRIB_NONNULL(2)
+int swscanf(const wchar_t *__source, const wchar_t *__format, ...)
+{
+  register int __retval;
+  __builtin_va_list __local_argv; __builtin_va_start( __local_argv, __format );
+  __retval = __mingw_vswscanf( __source, __format, __local_argv );
+  __builtin_va_end( __local_argv );
+  return __retval;
+}
+
+__forceinline
+__attribute__((__format__ (gnu_printf, 1, 2))) __MINGW_ATTRIB_NONNULL(1)
+int wscanf(const wchar_t *__format, ...)
+{
+  register int __retval;
+  __builtin_va_list __local_argv; __builtin_va_start( __local_argv, __format );
+  __retval = __mingw_vwscanf( __format, __local_argv );
+  __builtin_va_end( __local_argv );
+  return __retval;
+}
+
+__forceinline
+__attribute__((__format__ (gnu_printf, 2, 3))) __MINGW_ATTRIB_NONNULL(2)
+int fwscanf(FILE *__stream, const wchar_t *__format, ...)
+{
+  register int __retval;
+  __builtin_va_list __local_argv; __builtin_va_start( __local_argv, __format );
+  __retval = __mingw_vfwscanf( __stream, __format, __local_argv );
+  __builtin_va_end( __local_argv );
+  return __retval;
+}
+
+#ifndef __NO_ISOCEXT  /* externs in libmingwex.a */
+__forceinline
+__attribute__((__format__ (gnu_printf, 2, 0))) __MINGW_ATTRIB_NONNULL(2)
+int vswscanf (const wchar_t *__source, const wchar_t *__format, 
__builtin_va_list __local_argv)
+{
+  return __mingw_vswscanf( __source, __format, __local_argv );
+}
+
+__forceinline
+__attribute__((__format__ (gnu_printf, 1, 0))) __MINGW_ATTRIB_NONNULL(1)
+int vwscanf(const wchar_t *__format,  __builtin_va_list __local_argv)
+{
+  return __mingw_vwscanf( __format, __local_argv );
+}
+
+__forceinline
+__attribute__((__format__ (gnu_printf, 2, 0))) __MINGW_ATTRIB_NONNULL(2)
+int vfwscanf (FILE *__stream,  const wchar_t *__format, __builtin_va_list 
__local_argv)
+{
+  return __mingw_vfwscanf( __stream, __format, __local_argv );
+}
+#endif /* __NO_ISOCEXT */
+
+
+
+__forceinline
+__attribute__((__format__ (gnu_printf, 2, 3))) __MINGW_ATTRIB_NONNULL(2)
 int fwprintf (FILE *__stream, const wchar_t *__format, ...)
 {
   register int __retval;
@@ -572,17 +644,8 @@ int vsnwprintf (wchar_t *__stream, size_t __n, const 
wchar_t *__format, __builti
 #pragma pop_macro ("snwprintf")
 #endif
 
-  int __cdecl vwscanf (const wchar_t * __restrict__ , va_list);
-  int __cdecl vfwscanf (FILE * __restrict__ ,const wchar_t * __restrict__ 
,va_list);
-  int __cdecl vswscanf (const wchar_t * __restrict__ ,const wchar_t * 
__restrict__ ,va_list);
 #endif
 
-  int __cdecl __mingw_swscanf(const wchar_t * __restrict__ _Src,const wchar_t 
* __restrict__ _Format,...);
-  int __cdecl __mingw_vswscanf (const wchar_t * __restrict__ _Str,const 
wchar_t * __restrict__ Format,va_list argp);
-  int __cdecl __mingw_wscanf(const wchar_t * __restrict__ _Format,...);
-  int __cdecl __mingw_vwscanf(const wchar_t * __restrict__ Format, va_list 
argp);
-  int __cdecl __mingw_fwscanf(FILE * __restrict__ _File,const wchar_t * 
__restrict__ _Format,...);
-  int __cdecl __mingw_vfwscanf (FILE * __restrict__ fp, const wchar_t * 
__restrict__ Format,va_list argp);
   _CRTIMP int __cdecl _fwprintf_p(FILE * __restrict__ _File,const wchar_t * 
__restrict__ _Format,...);
   _CRTIMP int __cdecl _wprintf_p(const wchar_t * __restrict__ _Format,...);
   _CRTIMP int __cdecl _vfwprintf_p(FILE * __restrict__ _File,const wchar_t * 
__restrict__ _Format,va_list _ArgList);
@@ -626,13 +689,10 @@ int vsnwprintf (wchar_t *__stream, size_t __n, const 
wchar_t *__format, __builti
   _CRTIMP wchar_t *__cdecl _wtempnam(const wchar_t *_Directory,const wchar_t 
*_FilePrefix);
   _CRTIMP int __cdecl _vscwprintf(const wchar_t * __restrict__ _Format,va_list 
_ArgList);
   _CRTIMP int __cdecl _vscwprintf_l(const wchar_t * __restrict__ 
_Format,_locale_t _Locale,va_list _ArgList);
-  int __cdecl fwscanf(FILE * __restrict__ _File,const wchar_t * __restrict__ 
_Format,...) __MINGW_ATTRIB_DEPRECATED_SEC_WARN;
   _CRTIMP int __cdecl _fwscanf_l(FILE * __restrict__ _File,const wchar_t * 
__restrict__ _Format,_locale_t _Locale,...) __MINGW_ATTRIB_DEPRECATED_SEC_WARN;
-  int __cdecl swscanf(const wchar_t * __restrict__ _Src,const wchar_t * 
__restrict__ _Format,...) __MINGW_ATTRIB_DEPRECATED_SEC_WARN;
   _CRTIMP int __cdecl _swscanf_l(const wchar_t * __restrict__ _Src,const 
wchar_t * __restrict__ _Format,_locale_t _Locale,...) 
__MINGW_ATTRIB_DEPRECATED_SEC_WARN;
   _CRTIMP int __cdecl _snwscanf(const wchar_t * __restrict__ _Src,size_t 
_MaxCount,const wchar_t * __restrict__ _Format,...);
   _CRTIMP int __cdecl _snwscanf_l(const wchar_t * __restrict__ _Src,size_t 
_MaxCount,const wchar_t * __restrict__ _Format,_locale_t _Locale,...);
-  int __cdecl wscanf(const wchar_t * __restrict__ _Format,...) 
__MINGW_ATTRIB_DEPRECATED_SEC_WARN;
   _CRTIMP int __cdecl _wscanf_l(const wchar_t * __restrict__ _Format,_locale_t 
_Locale,...) __MINGW_ATTRIB_DEPRECATED_SEC_WARN;
   _CRTIMP FILE *__cdecl _wfdopen(int _FileHandle ,const wchar_t *_Mode);
   _CRTIMP FILE *__cdecl _wfopen(const wchar_t * __restrict__ _Filename,const 
wchar_t * __restrict__ _Mode) __MINGW_ATTRIB_DEPRECATED_SEC_WARN;
-- 
1.7.5.4

------------------------------------------------------------------------------
RSA(R) Conference 2012
Save $700 by Nov 18
Register now
http://p.sf.net/sfu/rsa-sfdev2dev1
_______________________________________________
Mingw-w64-public mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/mingw-w64-public

Reply via email to