From: Paul Eggert Date: Tue, 13 Jul 2004 00:07:26 +0000 (+0000) Subject: Prefer c_strtod to setlocale when scanning floating point. X-Git-Tag: v5.3.0~1114 X-Git-Url: http://git.ipfire.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=e5d9694985fdc0a3b462ae9ae1f9e85474744210;p=thirdparty%2Fcoreutils.git Prefer c_strtod to setlocale when scanning floating point. --- diff --git a/ChangeLog b/ChangeLog index 61dd15e110..39eec6a8f5 100644 --- a/ChangeLog +++ b/ChangeLog @@ -1,3 +1,10 @@ +2004-07-12 Paul Eggert + + * src/uptime.c: Include c-strtod.h. + (print_uptime): Use c_strtod instead of setlocale and sscanf. + Use long int rather than int to count days (for 64-bit hosts), + and check for arithmetic overflow when converting double to time_t. + 2004-07-11 Paul Eggert * src/printf.c (vstrtold): Renamed from vstrtod. diff --git a/lib/ChangeLog b/lib/ChangeLog index 5505bbac9f..68138d128b 100644 --- a/lib/ChangeLog +++ b/lib/ChangeLog @@ -1,3 +1,21 @@ +2004-07-12 Paul Eggert + + * c-strtod.c (STRTOD_L): New macro. + (C_STRTOD) [defined LC_ALL_MASK]: Use it, so that the + code is reentrant on platforms that have strtod_l. + + * getloadavg.c: Include , , even + if HAVE_GETLOADAVG is defined, so that the test program can work. + (errno): Remove declaration; not needed in C89 or later. + Include "c-strtod.h". + Do not include locale.h or define setlocale; no longer needed. + Include . + (INT_STRLEN_BOUND): New macro. + (getloadavg): Use it to compute buffer size. + Don't assume that buffer will be properly terminated by 'read'. + Use c_strtod instead of setlocale. + (main) [defined TEST]: Return int, not void. + 2004-07-11 Paul Eggert * Makefile.am (libfetish_a_SOURCES): Add c-strtold.c. diff --git a/m4/ChangeLog b/m4/ChangeLog index 5c96960ae5..96f0a13613 100644 --- a/m4/ChangeLog +++ b/m4/ChangeLog @@ -1,3 +1,7 @@ +2004-07-12 Paul Eggert + + * c-strtod.m4 (gl_C_STRTOD): Add gl_USE_SYSTEM_EXTENSIONS. + 2004-07-11 Paul Eggert * c-strtod.m4: New file.