On 6/29/14, Ozkan Sezer <seze...@gmail.com> wrote:
> 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.

No one replied. Went ahead and applied this to trunk and v3.x.


>
> 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);
>

--
O.S.

------------------------------------------------------------------------------
Want fast and easy access to all the code in your enterprise? Index and
search up to 200,000 lines of code with a free copy of Black Duck&#174;
Code Sight&#153; - the same software that powers the world's largest code
search on Ohloh, the Black Duck Open Hub! Try it now.
http://p.sf.net/sfu/bds
_______________________________________________
Mingw-w64-public mailing list
Mingw-w64-public@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/mingw-w64-public

Reply via email to