summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorPeter S. Mazinger <ps.m@gmx.net>2005-12-08 19:08:43 +0000
committerPeter S. Mazinger <ps.m@gmx.net>2005-12-08 19:08:43 +0000
commit9fda32a9dd08c5289baa3ae275467a66094f8522 (patch)
treea8fe25e48e555d4d22f6f5fdf5fd7ba9f6fe8364
parentfb60c3098abd4d2b3f5235590276daf1e33930df (diff)
Use __strtod
-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)