summaryrefslogtreecommitdiff
path: root/libc
diff options
context:
space:
mode:
Diffstat (limited to 'libc')
-rw-r--r--libc/stdlib/stdlib.c6
-rw-r--r--libc/stdlib/strtof.c2
-rw-r--r--libc/stdlib/strtold.c2
3 files changed, 9 insertions, 1 deletions
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 <stdlib.h>
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 <stdlib.h>
long double strtold (const char *str, char **endptr)