headers: Sync changes from stdlib.h to wchar.h from a2feff99e4f

This define machinery is duplicated betwen the headers, and should
stay in sync.

Also sync the ifdef surrounding the wcstof and wcstod functions.

This fixes building the crt for arm platforms.

On x86 platforms, the intrin headers end up including mm_malloc.h,
which includes stdlib.h implcitly - which makes stdlib.h end up
included before wchar.h, even if stdlib.h isn't explicitly included.
That explains why the build succeeded on one architecture but not
others.

Signed-off-by: Martin Storsjö <martin@martin.st>
diff --git a/mingw-w64-headers/crt/wchar.h b/mingw-w64-headers/crt/wchar.h
index 18e618d..d9227ef 100644
--- a/mingw-w64-headers/crt/wchar.h
+++ b/mingw-w64-headers/crt/wchar.h
@@ -9,7 +9,7 @@
 #include <corecrt.h>
 #include <corecrt_wstdlib.h>
 
-#if __USE_MINGW_ANSI_STDIO && !defined (__USE_MINGW_STRTOX)
+#if __USE_MINGW_ANSI_STDIO && !defined (__USE_MINGW_STRTOX) && !defined(_CRTBLD)
 #define __USE_MINGW_STRTOX 1
 #endif
 
@@ -1251,7 +1251,7 @@
   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 __USE_MINGW_ANSI_STDIO
+#if __USE_MINGW_STRTOX
   __mingw_ovr
   double __cdecl wcstod(const wchar_t * __restrict__ _Str,wchar_t ** __restrict__ _EndPtr){
     return __mingw_wcstod(_Str,_EndPtr);