From 3fe8bc09be53d9160073abf09d8ec0fa39740fa6 Mon Sep 17 00:00:00 2001 From: Paul Eggert Date: Sat, 26 Jan 2019 16:37:01 -0800 Subject: printf,seq,sleep,tail,timeout: accept current-locale floats These commands now accept floating-point numbers in the current locale, as well as in the C locale. Compatibility problem reported by Robert Elz. * NEWS: Document this. * bootstrap.conf (gnulib_modules): Add cl-strtod, cl-strtold. Remove c-strtold. * doc/coreutils.texi (Floating point, tail invocation) (printf invocation, timeout invocation, sleep invocation) (seq invocation): Document this. * gl/lib/cl-strtod.c, gl/lib/cl-strtod.h, gl/lib/cl-strtold.c: * gl/modules/cl-strtod, gl/modules/cl-strtold: New files. * src/printf.c, src/seq.c, src/sleep.c, src/tail.c, src/timeout.c: Include cl-strtod.h instead of c-strtod. * src/printf.c (vstrtold): * src/seq.c (scan_arg, print_numbers): * src/sleep.c (main): * src/tail.c (parse_options): * src/timeout.c (parse_duration): Use cl_strtold instead of c_strtold. --- src/printf.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) (limited to 'src/printf.c') diff --git a/src/printf.c b/src/printf.c index 28e058f50..3260868cb 100644 --- a/src/printf.c +++ b/src/printf.c @@ -55,7 +55,7 @@ #include #include "system.h" -#include "c-strtod.h" +#include "cl-strtod.h" #include "die.h" #include "error.h" #include "quote.h" @@ -188,7 +188,7 @@ FUNC_NAME (char const *s) \ STRTOX (intmax_t, vstrtoimax, strtoimax (s, &end, 0)) STRTOX (uintmax_t, vstrtoumax, strtoumax (s, &end, 0)) -STRTOX (long double, vstrtold, c_strtold (s, &end)) +STRTOX (long double, vstrtold, cl_strtold (s, &end)) /* Output a single-character \ escape. */ -- cgit v1.2.3