From: Bruno Haible <bruno@clisp.org>
To: bug-gnulib@gnu.org
Subject: c-strtold: Use strtold_l when available
Date: Thu, 22 Feb 2024 02:00:37 +0100 [thread overview]
Message-ID: <5404623.NQBDW4tYnK@nimes> (raw)
This patch fixes a typo that had the effect that the function strtold_l
was not used, even if available.
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.
diff --git a/lib/c-strtod.c b/lib/c-strtod.c
index 72a76e209b..f955434eaa 100644
--- a/lib/c-strtod.c
+++ b/lib/c-strtod.c
@@ -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);
reply other threads:[~2024-02-22 1:00 UTC|newest]
Thread overview: [no followups] expand[flat|nested] mbox.gz Atom feed
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
List information: https://lists.gnu.org/mailman/listinfo/bug-gnulib
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=5404623.NQBDW4tYnK@nimes \
--to=bruno@clisp.org \
--cc=bug-gnulib@gnu.org \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).