]> Savannah Git Hosting - gnulib.git/commitdiff
strtold: Work around a Haiku bug.
authorBruno Haible <bruno@clisp.org>
Sun, 1 Sep 2024 21:25:42 +0000 (23:25 +0200)
committerBruno Haible <bruno@clisp.org>
Tue, 17 Sep 2024 13:52:27 +0000 (15:52 +0200)
* lib/strtod.c (HAVE_UNDERLYING_STRTOD): Set to 0 for 'long double'
parsing on Haiku.
* doc/posix-functions/strtold.texi: Mention the bug.

ChangeLog
doc/posix-functions/strtold.texi
lib/strtod.c

index f6fab69fb81967120ec8ee272170a35391a9717d..cf5c09ded911e9e5b9661b4e1dd712aa417aa725 100644 (file)
--- a/ChangeLog
+++ b/ChangeLog
@@ -1,3 +1,10 @@
+2024-09-01  Bruno Haible  <bruno@clisp.org>
+
+       strtold: Work around a Haiku bug.
+       * lib/strtod.c (HAVE_UNDERLYING_STRTOD): Set to 0 for 'long double'
+       parsing on Haiku.
+       * doc/posix-functions/strtold.texi: Mention the bug.
+
 2024-09-01  Bruno Haible  <bruno@clisp.org>
 
        math: Remove workaround for an older Haiku bug.
index 7b13b2dd9376e885b8d5ad4e1c502a428a3053e0..b3bd208f02d344257048644b1bf0a73005a15b9f 100644 (file)
@@ -68,6 +68,11 @@ This function fails to set @code{errno} upon underflow on some platforms:
 @c https://cygwin.com/ml/cygwin/2019-12/msg00072.html
 Cygwin 2.9.
 
+@item
+This function maps denormalized numbers to zero on some platforms:
+@c https://dev.haiku-os.org/ticket/19040
+Haiku 2024.
+
 @item
 This function leaks memory on mingw 5.0
 and allocates an unbounded amount of stack on mingw 9.0.
index 9504f2945b4db65a769b69e4a9fe7e2fb5add299..fed43a05f8ff11be425b955b0d215c79072fe0fd 100644 (file)
       See <https://github.com/mingw-w64/mingw-w64/commit/450309b97b2e839ea02887dfaf0f1d10fb5d40cc>
       and <https://github.com/mingw-w64/mingw-w64/commit/73806c0709b7e6c0f6587f11a955743670e85470>.  */
 #  define HAVE_UNDERLYING_STRTOD 0
+# elif defined __HAIKU__
+   /* Haiku's strtold maps denormalized numbers to zero.
+      <https://dev.haiku-os.org/ticket/19040>  */
+#  define HAVE_UNDERLYING_STRTOD 0
 # else
 #  define HAVE_UNDERLYING_STRTOD HAVE_STRTOLD
 # endif