From: Bruno Haible Date: Sun, 1 Sep 2024 16:09:28 +0000 (+0200) Subject: math: Remove workaround for an older Haiku bug. X-Git-Url: https://gitweb.git.savannah.gnu.org/gitweb/?a=commitdiff_plain;h=126217441ad2ab6561ea454c1015862a31f372df;p=gnulib.git 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/ChangeLog b/ChangeLog index 537d05ad7e..2e9a9b39f3 100644 --- a/ChangeLog +++ b/ChangeLog @@ -1,3 +1,9 @@ +2024-09-01 Bruno Haible + + 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. + 2024-09-01 Simon Josefsson Avoid using postal address in license 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 @@ The macros @code{FP_ILOGB0} and @code{FP_ILOGBNAN} are not defined on some 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 @@ OpenVMS. @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 */