Mercurial > hg > octave-lojdl > gnulib-hg
diff lib/c-strtod.c @ 5221:2478b4759f97
(C_STRTOD) [!defined LC_ALL_MASK]: Set LC_ALL to "C",
not just LC_NUMERIC, to avoid the unlikely possibility of mixed
locales screwing things up. This removes an inconsistency with
the LC_ALL_MASK case.
author | Paul Eggert <eggert@cs.ucla.edu> |
---|---|
date | Wed, 08 Sep 2004 17:16:57 +0000 |
parents | e0eddd7ceb40 |
children | eceaa40c3485 |
line wrap: on
line diff
--- a/lib/c-strtod.c +++ b/lib/c-strtod.c @@ -59,19 +59,19 @@ #else - char *saved_locale = setlocale (LC_NUMERIC, NULL); + char *saved_locale = setlocale (LC_ALL, NULL); if (saved_locale) { saved_locale = xstrdup (saved_locale); - setlocale (LC_NUMERIC, "C"); + setlocale (LC_ALL, "C"); } r = STRTOD (nptr, endptr); if (saved_locale) { - setlocale (LC_NUMERIC, saved_locale); + setlocale (LC_ALL, saved_locale); free (saved_locale); }