summaryrefslogtreecommitdiff
path: root/gl
diff options
context:
space:
mode:
authorPádraig Brady <P@draigBrady.com>2019-01-29 22:10:49 -0800
committerPádraig Brady <P@draigBrady.com>2019-01-30 17:49:05 -0800
commit001897e7e28b82723a795fb930d2496b69180d93 (patch)
tree23c8bee97fb400434f93ee2130f045e9d04c6504 /gl
parentca803394540b7c00194a2554a62d63425bf53c13 (diff)
downloadcoreutils-001897e7e28b82723a795fb930d2496b69180d93.tar.gz
build: fix recent build failure on systems without strtold
Recently introduced in commit v8.30-50-geb73e23 * gl/lib/cl-strtod.c: Fall back to strtod() on systems without strtold() (like we already do in sort).
Diffstat (limited to 'gl')
-rw-r--r--gl/lib/cl-strtod.c9
1 files changed, 7 insertions, 2 deletions
diff --git a/gl/lib/cl-strtod.c b/gl/lib/cl-strtod.c
index dd6eef825..998c2ef67 100644
--- a/gl/lib/cl-strtod.c
+++ b/gl/lib/cl-strtod.c
@@ -29,15 +29,20 @@
#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
+/* fall back on strtod if strtold doesn't conform to C99. */
+#if LONG && HAVE_C99_STRTOLD
+# define STRTOD strtold
+#else
+# define STRTOD strtod
+#endif
+
/* This function acts like strtod or strtold, except that it falls
back on the C locale if the initial prefix is not parsable in
the current locale. If the prefix is parsable in both locales,