summaryrefslogtreecommitdiff
path: root/gl
diff options
context:
space:
mode:
authorPaul Eggert <eggert@cs.ucla.edu>2019-01-26 23:11:22 -0800
committerPaul Eggert <eggert@cs.ucla.edu>2019-01-26 23:19:47 -0800
commiteb73e23f31f4ce363b1505cc77424832d5c39063 (patch)
treea9078b08392d728e00868b4c0482d7ab15d3501d /gl
parent3fe8bc09be53d9160073abf09d8ec0fa39740fa6 (diff)
downloadcoreutils-eb73e23f31f4ce363b1505cc77424832d5c39063.tar.gz
printf,seq: improve long double accuracy
This fixes a thinko in the previous patch. * gl/lib/cl-strtod.c (STRTOD): New macro. (CL_STRTOD): Use it.
Diffstat (limited to 'gl')
-rw-r--r--gl/lib/cl-strtod.c4
1 files changed, 3 insertions, 1 deletions
diff --git a/gl/lib/cl-strtod.c b/gl/lib/cl-strtod.c
index fa77235ba..dd6eef825 100644
--- a/gl/lib/cl-strtod.c
+++ b/gl/lib/cl-strtod.c
@@ -29,10 +29,12 @@
#if LONG
# define CL_STRTOD cl_strtold
# define DOUBLE long double
+# define STRTOD strtold
# define C_STRTOD c_strtold
#else
# define CL_STRTOD cl_strtod
# define DOUBLE double
+# define STRTOD strtod
# define C_STRTOD c_strtod
#endif
@@ -57,7 +59,7 @@ DOUBLE
CL_STRTOD (char const *nptr, char **restrict endptr)
{
char *end;
- DOUBLE d = strtod (nptr, &end);
+ DOUBLE d = STRTOD (nptr, &end);
if (*end)
{
int strtod_errno = errno;