+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.
/* Convert string to double, using the C locale.
- Copyright (C) 2003-2004, 2006, 2009-2023 Free Software Foundation, Inc.
+ Copyright (C) 2003-2004, 2006, 2009-2024 Free Software Foundation, Inc.
This program is free software: you can redistribute it and/or modify
it under the terms of the GNU General Public License as published by
# 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
{
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)
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);