]> git.ipfire.org Git - thirdparty/coreutils.git/commitdiff
build: fix recent build failure on systems without strtold
authorPádraig Brady <P@draigBrady.com>
Wed, 30 Jan 2019 06:10:49 +0000 (22:10 -0800)
committerPádraig Brady <P@draigBrady.com>
Thu, 31 Jan 2019 01:49:05 +0000 (17:49 -0800)
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).

gl/lib/cl-strtod.c

index dd6eef82560597606853b27bd7703d07a2db88b3..998c2ef67891ade1c51b7350a197062212ecfce7 100644 (file)
 #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,