diff options
author | Bruno Haible <bruno@clisp.org> | 2017-10-29 10:49:55 +0100 |
---|---|---|
committer | Bruno Haible <bruno@clisp.org> | 2017-10-29 21:27:45 +0100 |
commit | 5beeeb81c77cbcf72a7b9635fbad87e69432e6fd (patch) | |
tree | ba8fe283742a1b12479efb7ec13722d40269f7e2 /m4 | |
parent | cf6bbbf90f411995637fd45e81816b2d7007bbba (diff) | |
download | gnulib-5beeeb81c77cbcf72a7b9635fbad87e69432e6fd.tar.gz |
math: Fix test failure on Haiku.
Diffstat (limited to 'm4')
-rw-r--r-- | m4/ilogb.m4 | 12 | ||||
-rw-r--r-- | m4/ilogbf.m4 | 12 |
2 files changed, 20 insertions, 4 deletions
diff --git a/m4/ilogb.m4 b/m4/ilogb.m4 index 1d56ecbf44..a73d7ad6f3 100644 --- a/m4/ilogb.m4 +++ b/m4/ilogb.m4 @@ -1,4 +1,4 @@ -# ilogb.m4 serial 2 +# ilogb.m4 serial 3 dnl Copyright (C) 2010-2017 Free Software Foundation, Inc. dnl This file is free software; the Free Software Foundation dnl gives unlimited permission to copy and/or distribute it, @@ -57,7 +57,15 @@ AC_DEFUN([gl_FUNC_ILOGB_WORKS], #include <limits.h> #include <math.h> /* Provide FP_ILOGB0, FP_ILOGBNAN, like in math.in.h. */ -#if !(defined FP_ILOGB0 && defined FP_ILOGBNAN) +#if defined FP_ILOGB0 && defined FP_ILOGBNAN +# 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 __NetBSD__ || defined __sgi /* NetBSD, IRIX 6.5: match what ilogb() does */ # define FP_ILOGB0 INT_MIN diff --git a/m4/ilogbf.m4 b/m4/ilogbf.m4 index 4e16e07aab..a660108dcc 100644 --- a/m4/ilogbf.m4 +++ b/m4/ilogbf.m4 @@ -1,4 +1,4 @@ -# ilogbf.m4 serial 2 +# ilogbf.m4 serial 3 dnl Copyright (C) 2010-2017 Free Software Foundation, Inc. dnl This file is free software; the Free Software Foundation dnl gives unlimited permission to copy and/or distribute it, @@ -59,7 +59,15 @@ AC_DEFUN([gl_FUNC_ILOGBF_WORKS], #include <limits.h> #include <math.h> /* Provide FP_ILOGB0, FP_ILOGBNAN, like in math.in.h. */ -#if !(defined FP_ILOGB0 && defined FP_ILOGBNAN) +#if defined FP_ILOGB0 && defined FP_ILOGBNAN +# 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 __NetBSD__ || defined __sgi /* NetBSD, IRIX 6.5: match what ilogbf() does */ # define FP_ILOGB0 INT_MIN |