summaryrefslogtreecommitdiff
path: root/lib/math.in.h
diff options
context:
space:
mode:
authorBruno Haible <bruno@clisp.org>2017-10-29 10:49:55 +0100
committerBruno Haible <bruno@clisp.org>2017-10-29 21:27:45 +0100
commit5beeeb81c77cbcf72a7b9635fbad87e69432e6fd (patch)
treeba8fe283742a1b12479efb7ec13722d40269f7e2 /lib/math.in.h
parentcf6bbbf90f411995637fd45e81816b2d7007bbba (diff)
downloadgnulib-5beeeb81c77cbcf72a7b9635fbad87e69432e6fd.tar.gz
math: Fix test failure on Haiku.
Diffstat (limited to 'lib/math.in.h')
-rw-r--r--lib/math.in.h13
1 files changed, 11 insertions, 2 deletions
diff --git a/lib/math.in.h b/lib/math.in.h
index f220151602..09f822aa5e 100644
--- a/lib/math.in.h
+++ b/lib/math.in.h
@@ -194,8 +194,17 @@ _NaN ()
#endif
-/* Ensure FP_ILOGB0 and FP_ILOGBNAN are defined. */
-#if !(defined FP_ILOGB0 && defined FP_ILOGBNAN)
+#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
+ /* Ensure FP_ILOGB0 and FP_ILOGBNAN are defined. */
# if defined __NetBSD__ || defined __sgi
/* NetBSD, IRIX 6.5: match what ilogb() does */
# define FP_ILOGB0 (- 2147483647 - 1) /* INT_MIN */