gnulib: update to 776af40e0
[deliverable/binutils-gdb.git] / gnulib / import / isnanl-nolibm.h
index 103d31a7066c987d05d27c54052757e29bd331c2..f9f5efd7860ddcb5efbf626e58c3e43670f406b4 100644 (file)
@@ -1,5 +1,5 @@
 /* Test for NaN that does not need libm.
-   Copyright (C) 2007-2020 Free Software Foundation, Inc.
+   Copyright (C) 2007-2021 Free Software Foundation, Inc.
 
    This program is free software: you can redistribute it and/or modify
    it under the terms of the GNU General Public License as published by
 #if HAVE_ISNANL_IN_LIBC
 /* Get declaration of isnan macro or (older) isnanl function.  */
 # include <math.h>
-# ifndef __has_builtin
-#  define __has_builtin(name) 0
-# endif
-# if __GNUC__ >= 4 && (!defined __clang__ || __has_builtin (__builtin_isnanl))
-   /* GCC 4.0 and newer provides three built-ins for isnan.  */
+# if (__GNUC__ >= 4) || (__clang_major__ >= 4)
+   /* GCC >= 4.0 and clang provide a type-generic built-in for isnan.
+      GCC >= 4.0 also provides __builtin_isnanl, but clang doesn't.  */
 #  undef isnanl
-#  define isnanl(x) __builtin_isnanl ((long double)(x))
+#  define isnanl(x) __builtin_isnan ((long double)(x))
 # elif defined isnan
 #  undef isnanl
 #  define isnanl(x) isnan ((long double)(x))
This page took 0.032231 seconds and 4 git commands to generate.