diff options
author | Andy Wingo <wingo@pobox.com> | 2021-01-20 21:52:54 +0100 |
---|---|---|
committer | Andy Wingo <wingo@pobox.com> | 2021-01-20 23:03:56 +0100 |
commit | a91b95cca2d397c84f8b9bbd602d40209a7092ce (patch) | |
tree | 2c286a291f5a2b812d6e216be10936f2709d59cf /m4/isnanf.m4 | |
parent | 758b31994cff582c7e8785b4cc2240dbf3573837 (diff) | |
download | guile-a91b95cca2d397c84f8b9bbd602d40209a7092ce.tar.gz |
Update Gnulib to v0.1-4379-g2ef5a9b4b
Also bump required autoconf version to 2.64, as required by Gnulib.
Diffstat (limited to 'm4/isnanf.m4')
-rw-r--r-- | m4/isnanf.m4 | 31 |
1 files changed, 20 insertions, 11 deletions
diff --git a/m4/isnanf.m4 b/m4/isnanf.m4 index 1a0d03e63..d0f6a5623 100644 --- a/m4/isnanf.m4 +++ b/m4/isnanf.m4 @@ -1,5 +1,5 @@ -# isnanf.m4 serial 14 -dnl Copyright (C) 2007-2017 Free Software Foundation, Inc. +# isnanf.m4 serial 18 +dnl Copyright (C) 2007-2021 Free Software Foundation, Inc. dnl This file is free software; the Free Software Foundation dnl gives unlimited permission to copy and/or distribute it, dnl with or without modifications, as long as this notice is preserved. @@ -74,9 +74,9 @@ AC_DEFUN([gl_HAVE_ISNANF_NO_LIBM], AC_LINK_IFELSE( [AC_LANG_PROGRAM( [[#include <math.h> - #if __GNUC__ >= 4 + #if (__GNUC__ >= 4) || (__clang_major__ >= 4) # undef isnanf - # define isnanf(x) __builtin_isnanf ((float)(x)) + # define isnanf(x) __builtin_isnan ((float)(x)) #elif defined isnan # undef isnanf # define isnanf(x) isnan ((float)(x)) @@ -99,9 +99,9 @@ AC_DEFUN([gl_HAVE_ISNANF_IN_LIBM], AC_LINK_IFELSE( [AC_LANG_PROGRAM( [[#include <math.h> - #if __GNUC__ >= 4 + #if (__GNUC__ >= 4) || (__clang_major__ >= 4) # undef isnanf - # define isnanf(x) __builtin_isnanf ((float)(x)) + # define isnanf(x) __builtin_isnan ((float)(x)) #elif defined isnan # undef isnanf # define isnanf(x) isnan ((float)(x)) @@ -127,9 +127,9 @@ AC_DEFUN([gl_ISNANF_WORKS], AC_RUN_IFELSE( [AC_LANG_SOURCE([[ #include <math.h> -#if __GNUC__ >= 4 +#if (__GNUC__ >= 4) || (__clang_major__ >= 4) # undef isnanf -# define isnanf(x) __builtin_isnanf ((float)(x)) +# define isnanf(x) __builtin_isnan ((float)(x)) #elif defined isnan # undef isnanf # define isnanf(x) isnan ((float)(x)) @@ -169,7 +169,7 @@ int main() m.value = NaN (); /* Set the bits below the exponent to 01111...111. */ m.word[0] &= -1U << FLT_EXPBIT0_BIT; - m.word[0] |= 1U << (FLT_EXPBIT0_BIT - 1) - 1; + m.word[0] |= (1U << (FLT_EXPBIT0_BIT - 1)) - 1; if (!isnanf (m.value)) result |= 4; } @@ -180,8 +180,17 @@ int main() [gl_cv_func_isnanf_works=yes], [gl_cv_func_isnanf_works=no], [case "$host_os" in - irix* | solaris*) gl_cv_func_isnanf_works="guessing no";; - *) gl_cv_func_isnanf_works="guessing yes";; + irix* | solaris*) gl_cv_func_isnanf_works="guessing no" ;; + mingw*) # Guess yes on mingw, no on MSVC. + AC_EGREP_CPP([Known], [ +#ifdef __MINGW32__ + Known +#endif + ], + [gl_cv_func_isnanf_works="guessing yes"], + [gl_cv_func_isnanf_works="guessing no"]) + ;; + *) gl_cv_func_isnanf_works="guessing yes" ;; esac ]) ]) |