summaryrefslogtreecommitdiff
path: root/gnulib/import/isnanl-nolibm.h
diff options
context:
space:
mode:
Diffstat (limited to 'gnulib/import/isnanl-nolibm.h')
-rw-r--r--gnulib/import/isnanl-nolibm.h12
1 files changed, 5 insertions, 7 deletions
diff --git a/gnulib/import/isnanl-nolibm.h b/gnulib/import/isnanl-nolibm.h
index 103d31a7066..f9f5efd7860 100644
--- a/gnulib/import/isnanl-nolibm.h
+++ b/gnulib/import/isnanl-nolibm.h
@@ -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
@@ -17,13 +17,11 @@
#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))