]> Savannah Git Hosting - gnulib.git/commitdiff
c-strtold: Use strtold_l when available (regr. 2019-01-31).
authorBruno Haible <bruno@clisp.org>
Thu, 22 Feb 2024 00:49:44 +0000 (01:49 +0100)
committerBruno Haible <bruno@clisp.org>
Sat, 16 Mar 2024 10:21:07 +0000 (11:21 +0100)
* lib/c-strtod.c: Fix typo: HAVE_GOOD_STRTOLD_L was never defined.

ChangeLog
lib/c-strtod.c

index 03e37c96073a882f75f48a4793595a4decc0ceb2..8334a52a639fc7ea5292c7f0adb02c7cf2e9a764 100644 (file)
--- a/ChangeLog
+++ b/ChangeLog
@@ -1,3 +1,8 @@
+2024-02-21  Bruno Haible  <bruno@clisp.org>
+
+       c-strtold: Use strtold_l when available (regr. 2019-01-31).
+       * lib/c-strtod.c: Fix typo: HAVE_GOOD_STRTOLD_L was never defined.
+
 2024-02-21  Bruno Haible  <bruno@clisp.org>
 
        strtod, strtold tests: Avoid a test failure on native Windows.
index 72a76e209b9b71d86244628a3cb3adfd14a26791..f955434eaa94e3315e3619fc1ba282bfa5fa1bf9 100644 (file)
@@ -40,9 +40,7 @@
 # define STRTOD strtod
 #endif
 
-#if defined LC_ALL_MASK \
-    && ((LONG ? HAVE_GOOD_STRTOLD_L : HAVE_GOOD_STRTOD_L) \
-        || HAVE_WORKING_USELOCALE)
+#if defined LC_ALL_MASK && (HAVE_GOOD_STRTOD_L || HAVE_WORKING_USELOCALE)
 
 /* Cache for the C locale object.
    Marked volatile so that different threads see the same value
@@ -66,9 +64,7 @@ C_STRTOD (char const *nptr, char **endptr)
 {
   DOUBLE r;
 
-#if defined LC_ALL_MASK \
-    && ((LONG ? HAVE_GOOD_STRTOLD_L : HAVE_GOOD_STRTOD_L) \
-        || HAVE_WORKING_USELOCALE)
+#if defined LC_ALL_MASK && (HAVE_GOOD_STRTOD_L || HAVE_WORKING_USELOCALE)
 
   locale_t locale = c_locale ();
   if (!locale)
@@ -78,7 +74,7 @@ C_STRTOD (char const *nptr, char **endptr)
       return 0; /* errno is set here */
     }
 
-# if (LONG ? HAVE_GOOD_STRTOLD_L : HAVE_GOOD_STRTOD_L)
+# if HAVE_GOOD_STRTOD_L
 
   r = STRTOD_L (nptr, endptr, locale);