diff options
author | Corinna Vinschen <corinna@vinschen.de> | 2009-06-16 17:44:20 +0000 |
---|---|---|
committer | Corinna Vinschen <corinna@vinschen.de> | 2009-06-16 17:44:20 +0000 |
commit | 1c5e84dd0870cd463d97f2b9183a807c3f711f2f (patch) | |
tree | d85b95c8902bcc48be771c159884be1e4e154713 /newlib/libc/stdlib/strtod.c | |
parent | 1a99b6f85a123a1430ef41a3b2ae79eef7c0f768 (diff) | |
download | cygnal-1c5e84dd0870cd463d97f2b9183a807c3f711f2f.tar.gz cygnal-1c5e84dd0870cd463d97f2b9183a807c3f711f2f.tar.bz2 cygnal-1c5e84dd0870cd463d97f2b9183a807c3f711f2f.zip |
* libc/stdio/vfprintf.c (_VFPRINTF_R): Use actual length of
radix char instead of assuming length 1.
* libc/stdlib/gdtoa-gethex.c: Remove use of USE_LOCALE.
(gethex): Allow multibyte decimal point.
Fix compiler warnings due to different signedness of pointer types.
* libc/stdlib/strtod.c: Remove use of USE_LOCALE.
(_strtod_r): Allow multibyte decimal point.
* libc/stdlib/wcstod.c (_wcstod_r): Evaluate correct wide char
endptr position if the decimal point is a multibyte char.
Diffstat (limited to 'newlib/libc/stdlib/strtod.c')
-rw-r--r-- | newlib/libc/stdlib/strtod.c | 11 |
1 files changed, 3 insertions, 8 deletions
diff --git a/newlib/libc/stdlib/strtod.c b/newlib/libc/stdlib/strtod.c index fb4caf86f..755e6ec3c 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,11 @@ _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 (strncmp (s, _localeconv_r (ptr)->decimal_point, + strlen (_localeconv_r (ptr)->decimal_point)) == 0) { decpt = 1; - c = *++s; + c = *(s += strlen (_localeconv_r (ptr)->decimal_point)); if (!nd) { for(; c == '0'; c = *++s) nz++; |