From 9fda32a9dd08c5289baa3ae275467a66094f8522 Mon Sep 17 00:00:00 2001 From: "Peter S. Mazinger" Date: Thu, 8 Dec 2005 19:08:43 +0000 Subject: Use __strtod --- libc/stdlib/stdlib.c | 6 +++++- libc/stdlib/strtof.c | 2 ++ libc/stdlib/strtold.c | 2 ++ 3 files changed, 9 insertions(+), 1 deletion(-) diff --git a/libc/stdlib/stdlib.c b/libc/stdlib/stdlib.c index b1dd98068..3b7d37ccb 100644 --- a/libc/stdlib/stdlib.c +++ b/libc/stdlib/stdlib.c @@ -201,9 +201,13 @@ _stdlib_wcsto_ll(register const wchar_t * __restrict str, /**********************************************************************/ #ifdef L_atof +extern double __strtod (__const char *__restrict __nptr, + char **__restrict __endptr) + __THROW __nonnull ((1)) __wur attribute_hidden; + double atof(const char *nptr) { - return strtod(nptr, (char **) NULL); + return __strtod(nptr, (char **) NULL); } #endif diff --git a/libc/stdlib/strtof.c b/libc/stdlib/strtof.c index a5180677c..d25a67d05 100644 --- a/libc/stdlib/strtof.c +++ b/libc/stdlib/strtof.c @@ -23,6 +23,8 @@ * to an internal conversion from a double to a float, thereby wasting a bunch * of precision. But this is small, and works for now... */ +#define strtod __strtod + #include float strtof (const char *str, char **endptr) diff --git a/libc/stdlib/strtold.c b/libc/stdlib/strtold.c index 3848b782a..3ef1fc491 100644 --- a/libc/stdlib/strtold.c +++ b/libc/stdlib/strtold.c @@ -23,6 +23,8 @@ * to an internal conversion from a double to a long double, thereby losing * tons of precision. But this is small, and works for now... */ +#define strtod __strtod + #include long double strtold (const char *str, char **endptr) -- cgit v1.2.3