diff options
Diffstat (limited to 'newlib/libc/stdlib/strtod.c')
-rw-r--r-- | newlib/libc/stdlib/strtod.c | 10 |
1 files changed, 2 insertions, 8 deletions
diff --git a/newlib/libc/stdlib/strtod.c b/newlib/libc/stdlib/strtod.c index fb4caf86f..aca40a6a8 100644 --- a/newlib/libc/stdlib/strtod.c +++ b/newlib/libc/stdlib/strtod.c @@ -122,9 +122,7 @@ THIS SOFTWARE. /* #include <fenv.h> */ /* #endif */ -#ifdef USE_LOCALE #include "locale.h" -#endif #ifdef IEEE_Arith #ifndef NO_IEEE_Scale @@ -307,14 +305,10 @@ _DEFUN (_strtod_r, (ptr, s00, se), else if (nd < 16) z = 10*z + c - '0'; nd0 = nd; -#ifdef USE_LOCALE - if (c == *localeconv()->decimal_point) -#else - if (c == '.') -#endif + if (strcmp (s, localeconv()->decimal_point) == 0) { decpt = 1; - c = *++s; + c = *(s += strlen (localeconv()->decimal_point)); if (!nd) { for(; c == '0'; c = *++s) nz++; |