From 4f3fad23669400274508c781eefd67ee09281f87 Mon Sep 17 00:00:00 2001 From: Chris Sutcliffe Date: Sat, 3 May 2008 02:13:48 +0000 Subject: [PATCH] 2008-04-02 Ramiro Polla Make strtod() conform to C99. * include/stdlib.h (strtod): Declare this mingwex function, and... (_strtod): rename this MSVCRT counterpart. * mingwex/gdtoa/strtodnrp.c (strtod): Alias to __strtod. --- winsup/mingw/ChangeLog | 9 +++++++++ winsup/mingw/include/stdlib.h | 3 ++- winsup/mingw/mingwex/gdtoa/strtodnrp.c | 3 +++ 3 files changed, 14 insertions(+), 1 deletion(-) diff --git a/winsup/mingw/ChangeLog b/winsup/mingw/ChangeLog index ccb5e0017..504797d2c 100644 --- a/winsup/mingw/ChangeLog +++ b/winsup/mingw/ChangeLog @@ -1,3 +1,12 @@ +2008-04-02 Ramiro Polla + + Make strtod() conform to C99. + + * include/stdlib.h (strtod): Declare this mingwex function, and... + (_strtod): rename this MSVCRT counterpart. + + * mingwex/gdtoa/strtodnrp.c (strtod): Alias to __strtod. + 2008-04-26 Chuck Wilson * Makefile.in: correct issues with mingw10.dll having multiple relocs. diff --git a/winsup/mingw/include/stdlib.h b/winsup/mingw/include/stdlib.h index ac82edecf..0d6cf60be 100644 --- a/winsup/mingw/include/stdlib.h +++ b/winsup/mingw/include/stdlib.h @@ -307,8 +307,9 @@ _CRTIMP long __cdecl __MINGW_NOTHROW atol (const char*); _CRTIMP int __cdecl __MINGW_NOTHROW _wtoi (const wchar_t *); _CRTIMP long __cdecl __MINGW_NOTHROW _wtol (const wchar_t *); #endif -_CRTIMP double __cdecl __MINGW_NOTHROW strtod (const char*, char**); +_CRTIMP double __cdecl __MINGW_NOTHROW _strtod (const char*, char**); #if !defined __NO_ISOCEXT /* in libmingwex.a */ +double __cdecl __MINGW_NOTHROW strtod (const char*, char**); float __cdecl __MINGW_NOTHROW strtof (const char * __restrict__, char ** __restrict__); long double __cdecl __MINGW_NOTHROW strtold (const char * __restrict__, char ** __restrict__); #endif /* __NO_ISOCEXT */ diff --git a/winsup/mingw/mingwex/gdtoa/strtodnrp.c b/winsup/mingw/mingwex/gdtoa/strtodnrp.c index ac81b2bbd..26d0fc3cc 100755 --- a/winsup/mingw/mingwex/gdtoa/strtodnrp.c +++ b/winsup/mingw/mingwex/gdtoa/strtodnrp.c @@ -85,3 +85,6 @@ __strtod(CONST char *s, char **sp) u.L[_0] |= 0x80000000L; return u.d; } + +double __cdecl strtod(const char *s, char **sp) + __attribute__((alias("__strtod")));