The attached tiny patch fixes incorrect __USE_MINGW_ANSI_STDIO check in
wchar.h and stdlib.h: The check must be against the value, not against
the existence of the macro. (c.f. _mingw_print_push.h, etc. headers.)
OK for trunk and v3.x?
--
O.S.
diff --git a/mingw-w64-headers/crt/stdlib.h b/mingw-w64-headers/crt/stdlib.h
index 268ab84..e38d481 100644
--- a/mingw-w64-headers/crt/stdlib.h
+++ b/mingw-w64-headers/crt/stdlib.h
@@ -9,7 +9,7 @@
#include <crtdefs.h>
#include <limits.h>
-#if defined (__USE_MINGW_ANSI_STDIO) && !defined (__USE_MINGW_STRTOX)
+#if defined (__USE_MINGW_ANSI_STDIO) && ((__USE_MINGW_ANSI_STDIO + 0)
!= 0) && !defined (__USE_MINGW_STRTOX)
#define __USE_MINGW_STRTOX 1
#endif
diff --git a/mingw-w64-headers/crt/wchar.h b/mingw-w64-headers/crt/wchar.h
index 0ba6131..3fbd17f 100644
--- a/mingw-w64-headers/crt/wchar.h
+++ b/mingw-w64-headers/crt/wchar.h
@@ -9,7 +9,7 @@
#include <crtdefs.h>
#include <_mingw_print_push.h>
-#if defined (__USE_MINGW_ANSI_STDIO) && !defined (__USE_MINGW_STRTOX)
+#if defined (__USE_MINGW_ANSI_STDIO) && ((__USE_MINGW_ANSI_STDIO + 0)
!= 0) && !defined (__USE_MINGW_STRTOX)
#define __USE_MINGW_STRTOX 1
#endif
@@ -775,7 +775,7 @@ int vsnwprintf (wchar_t *__stream, size_t __n,
const wchar_t *__format, __builti
float __cdecl __mingw_wcstof(const wchar_t * __restrict__ nptr,
wchar_t ** __restrict__ endptr);
long double __cdecl __mingw_wcstold(const wchar_t * __restrict__,
wchar_t ** __restrict__);
-#if defined(__USE_MINGW_ANSI_STDIO)
+#if __USE_MINGW_ANSI_STDIO
__mingw_ovr
double __cdecl wcstod(const wchar_t * __restrict__ _Str,wchar_t **
__restrict__ _EndPtr){
return __mingw_wcstod(_Str,_EndPtr);
diff --git a/mingw-w64-headers/crt/stdlib.h b/mingw-w64-headers/crt/stdlib.h
index 268ab84..e38d481 100644
--- a/mingw-w64-headers/crt/stdlib.h
+++ b/mingw-w64-headers/crt/stdlib.h
@@ -9,7 +9,7 @@
#include <crtdefs.h>
#include <limits.h>
-#if defined (__USE_MINGW_ANSI_STDIO) && !defined (__USE_MINGW_STRTOX)
+#if defined (__USE_MINGW_ANSI_STDIO) && ((__USE_MINGW_ANSI_STDIO + 0) != 0) &&
!defined (__USE_MINGW_STRTOX)
#define __USE_MINGW_STRTOX 1
#endif
diff --git a/mingw-w64-headers/crt/wchar.h b/mingw-w64-headers/crt/wchar.h
index 0ba6131..3fbd17f 100644
--- a/mingw-w64-headers/crt/wchar.h
+++ b/mingw-w64-headers/crt/wchar.h
@@ -9,7 +9,7 @@
#include <crtdefs.h>
#include <_mingw_print_push.h>
-#if defined (__USE_MINGW_ANSI_STDIO) && !defined (__USE_MINGW_STRTOX)
+#if defined (__USE_MINGW_ANSI_STDIO) && ((__USE_MINGW_ANSI_STDIO + 0) != 0) &&
!defined (__USE_MINGW_STRTOX)
#define __USE_MINGW_STRTOX 1
#endif
@@ -775,7 +775,7 @@ int vsnwprintf (wchar_t *__stream, size_t __n, const
wchar_t *__format, __builti
float __cdecl __mingw_wcstof(const wchar_t * __restrict__ nptr, wchar_t **
__restrict__ endptr);
long double __cdecl __mingw_wcstold(const wchar_t * __restrict__, wchar_t **
__restrict__);
-#if defined(__USE_MINGW_ANSI_STDIO)
+#if __USE_MINGW_ANSI_STDIO
__mingw_ovr
double __cdecl wcstod(const wchar_t * __restrict__ _Str,wchar_t **
__restrict__ _EndPtr){
return __mingw_wcstod(_Str,_EndPtr);
------------------------------------------------------------------------------
Open source business process management suite built on Java and Eclipse
Turn processes into business applications with Bonita BPM Community Edition
Quickly connect people, data, and systems into organized workflows
Winner of BOSSIE, CODIE, OW2 and Gartner awards
http://p.sf.net/sfu/Bonitasoft
_______________________________________________
Mingw-w64-public mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/mingw-w64-public