summaryrefslogtreecommitdiff
path: root/gnulib-m4/isnanf.m4
diff options
context:
space:
mode:
authorJörg Frings-Fürst <debian@jff.email>2022-01-08 11:51:39 +0100
committerJörg Frings-Fürst <debian@jff.email>2022-01-08 11:51:39 +0100
commit2959e59fab3bab834368adefd90bd4b1b094366b (patch)
tree7d0ae09775ea950056193eaa2ca93844299d46f1 /gnulib-m4/isnanf.m4
parentc78359d9542c86b972aac373efcf7bc7a8a560e5 (diff)
parentbe8efac78d067c138ad8dda03df4336e73f94887 (diff)
Update upstream source from tag 'upstream/1.0'
Update to upstream version '1.0' with Debian dir 4875e7dc9f7277205f0086a63ee21ccdb1d54593
Diffstat (limited to 'gnulib-m4/isnanf.m4')
-rw-r--r--gnulib-m4/isnanf.m418
1 files changed, 9 insertions, 9 deletions
diff --git a/gnulib-m4/isnanf.m4 b/gnulib-m4/isnanf.m4
index c0dcdb7..44c825a 100644
--- a/gnulib-m4/isnanf.m4
+++ b/gnulib-m4/isnanf.m4
@@ -1,5 +1,5 @@
-# isnanf.m4 serial 15
-dnl Copyright (C) 2007-2018 Free Software Foundation, Inc.
+# isnanf.m4 serial 18
+dnl Copyright (C) 2007-2022 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;
}