[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
math: Remove workaround for an older Haiku bug
From: |
Bruno Haible |
Subject: |
math: Remove workaround for an older Haiku bug |
Date: |
Sun, 01 Sep 2024 19:37:48 +0200 |
Two test failures that I see on Haiku:
FAIL: test-ilogbf
=================
../../gltests/test-ilogb.h:68: assertion 'ILOGB (NAN) == FP_ILOGBNAN' failed
Abort
FAIL test-ilogbf (exit status: 149)
FAIL: test-ilogbl
=================
../../gltests/test-ilogb.h:68: assertion 'ILOGB (NAN) == FP_ILOGBNAN' failed
Abort
FAIL test-ilogbl (exit status: 149)
are caused by a workaround that I added, for a bug that is now fixed for
more than a year. Time to revert this workaround.
2024-09-01 Bruno Haible <bruno@clisp.org>
math: Remove workaround for an older Haiku bug.
* lib/math.in.h (FP_ILOGB0, FP_ILOGBNAN): Don't override on Haiku.
* doc/posix-headers/math.texi: Update.
diff --git a/doc/posix-headers/math.texi b/doc/posix-headers/math.texi
index fb72b94a08..4df637d737 100644
--- a/doc/posix-headers/math.texi
+++ b/doc/posix-headers/math.texi
@@ -36,12 +36,6 @@
platforms:
NetBSD 5.1, AIX 5.1, Solaris 9, MSVC 9.
-@item
-The macros @code{FP_ILOGB0} and @code{FP_ILOGBNAN} have wrong values on some
-platforms:
-@c https://dev.haiku-os.org/ticket/18351
-Haiku 2022.
-
@item
@code{HUGE_VAL}, @code{HUGE_VALF}, @code{HUGE_VALL} are not compile time
constants on some platforms:
@@ -71,4 +65,9 @@
@item
The macro or variable @code{math_errhandling} is not defined on some platforms:
glibc 2.11, OpenBSD 4.9, NetBSD 5.1, UP-UX 11, Cygwin 1.7.9, mingw, MSVC 9.
+@item
+The macros @code{FP_ILOGB0} and @code{FP_ILOGBNAN} have wrong values on some
+platforms:
+@c https://dev.haiku-os.org/ticket/18351
+Haiku before 2023-04-08.
@end itemize
diff --git a/lib/math.in.h b/lib/math.in.h
index 2fcba31c76..89bd9ae643 100644
--- a/lib/math.in.h
+++ b/lib/math.in.h
@@ -249,16 +249,7 @@ _NaN ()
#endif
-#if defined FP_ILOGB0 && defined FP_ILOGBNAN
- /* Ensure FP_ILOGB0 and FP_ILOGBNAN are correct. */
-# if defined __HAIKU__
- /* Haiku: match what ilogb() does */
-# undef FP_ILOGB0
-# undef FP_ILOGBNAN
-# define FP_ILOGB0 (- 2147483647 - 1) /* INT_MIN */
-# define FP_ILOGBNAN (- 2147483647 - 1) /* INT_MIN */
-# endif
-#else
+#if !(defined FP_ILOGB0 && defined FP_ILOGBNAN)
/* Ensure FP_ILOGB0 and FP_ILOGBNAN are defined. */
# if defined __NetBSD__ || defined __sgi
/* NetBSD, IRIX 6.5: match what ilogb() does */
[Prev in Thread] |
Current Thread |
[Next in Thread] |
- math: Remove workaround for an older Haiku bug,
Bruno Haible <=