Mercurial > hg > octave-nkf > gnulib-hg
changeset 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 | c900cc84cf3f |
children | faa68f81fc91 |
files | lib/c-strtod.c |
diffstat | 1 files changed, 3 insertions(+), 3 deletions(-) [+] |
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); }