The UCRT provided versions should be fully C99 compliant.

This matches what was done for strtod/strtof for the initial
configuration for UCRT in 265d0a5e3f087ed6bd68412cceed5e27e3ef62ae.

Also clarify the endif comment, and make the condition in wchar.h
consistent with the one in stdlib.h.

Signed-off-by: Martin Storsjö <[email protected]>
---
 mingw-w64-headers/crt/stdlib.h | 4 ++--
 mingw-w64-headers/crt/wchar.h  | 4 ++--
 2 files changed, 4 insertions(+), 4 deletions(-)

diff --git a/mingw-w64-headers/crt/stdlib.h b/mingw-w64-headers/crt/stdlib.h
index 128f3bf97..63aea7bfe 100644
--- a/mingw-w64-headers/crt/stdlib.h
+++ b/mingw-w64-headers/crt/stdlib.h
@@ -560,7 +560,7 @@ float __cdecl __MINGW_NOTHROW strtof(const char * 
__restrict__ _Str,char ** __re
   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_STRTOX)
+#if defined(__USE_MINGW_STRTOX) && !defined(_UCRT)
   __mingw_ovr
   double __cdecl wcstod(const wchar_t * __restrict__ _Str,wchar_t ** 
__restrict__ _EndPtr){
     return __mingw_wcstod(_Str,_EndPtr);
@@ -573,7 +573,7 @@ float __cdecl __MINGW_NOTHROW strtof(const char * 
__restrict__ _Str,char ** __re
 #else
   double __cdecl wcstod(const wchar_t * __restrict__ _Str,wchar_t ** 
__restrict__ _EndPtr);
   float __cdecl wcstof(const wchar_t * __restrict__ nptr, wchar_t ** 
__restrict__ endptr);
-#endif /* defined(__USE_MINGW_STRTOX) */
+#endif /* !defined(__USE_MINGW_STRTOX) || defined(_UCRT) */
 #if !defined __NO_ISOCEXT /* in libmingwex.a */
   long double __cdecl wcstold(const wchar_t * __restrict__, wchar_t ** 
__restrict__);
 #endif /* __NO_ISOCEXT */
diff --git a/mingw-w64-headers/crt/wchar.h b/mingw-w64-headers/crt/wchar.h
index e40b81298..4d2b4f5c8 100644
--- a/mingw-w64-headers/crt/wchar.h
+++ b/mingw-w64-headers/crt/wchar.h
@@ -1259,7 +1259,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 __USE_MINGW_STRTOX
+#if defined(__USE_MINGW_STRTOX) && !defined(_UCRT)
   __mingw_ovr
   double __cdecl wcstod(const wchar_t * __restrict__ _Str,wchar_t ** 
__restrict__ _EndPtr){
     return __mingw_wcstod(_Str,_EndPtr);
@@ -1272,7 +1272,7 @@ int vsnwprintf (wchar_t *__stream, size_t __n, const 
wchar_t *__format, __builti
 #else
   double __cdecl wcstod(const wchar_t * __restrict__ _Str,wchar_t ** 
__restrict__ _EndPtr);
   float __cdecl wcstof(const wchar_t * __restrict__ nptr, wchar_t ** 
__restrict__ endptr);
-#endif /* defined(__USE_MINGW_STRTOX) */
+#endif /* !defined(__USE_MINGW_STRTOX) || defined(_UCRT) */
 #if !defined __NO_ISOCEXT /* in libmingwex.a */
   long double __cdecl wcstold (const wchar_t * __restrict__, wchar_t ** 
__restrict__);
 #endif /* __NO_ISOCEXT */
-- 
2.34.1



_______________________________________________
Mingw-w64-public mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/mingw-w64-public

Reply via email to