X-Git-Url: https://erislabs.net/gitweb/?a=blobdiff_plain;f=lib%2Fisnanl-nolibm.h;h=fa29f54af7aff825d6c76801b5368925b275779c;hb=ec60d8959e16a743f09704c397931f2621f511ae;hp=1eac3c65f50ae88421988aa03e27e8b5036c4916;hpb=ffc2a288efdfed4e78e17086a9c63198c7dc9828;p=gnulib.git
diff --git a/lib/isnanl-nolibm.h b/lib/isnanl-nolibm.h
index 1eac3c65f..fa29f54af 100644
--- a/lib/isnanl-nolibm.h
+++ b/lib/isnanl-nolibm.h
@@ -1,24 +1,27 @@
/* Test for NaN that does not need libm.
- Copyright (C) 2007 Free Software Foundation, Inc.
+ Copyright (C) 2007-2008 Free Software Foundation, Inc.
- This program is free software; you can redistribute it and/or modify
+ 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
- the Free Software Foundation; either version 2, or (at your option)
- any later version.
+ the Free Software Foundation; either version 3 of the License, or
+ (at your option) any later version.
This program is distributed in the hope that it will be useful,
but WITHOUT ANY WARRANTY; without even the implied warranty of
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
GNU General Public License for more details.
- You should have received a copy of the GNU General Public License along
- with this program; if not, write to the Free Software Foundation,
- Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. */
+ You should have received a copy of the GNU General Public License
+ along with this program. If not, see . */
#if HAVE_ISNANL_IN_LIBC
/* Get declaration of isnan macro or (older) isnanl function. */
# include
-# ifdef isnan
+# if __GNUC__ >= 4
+ /* GCC 4.0 and newer provides three built-ins for isnan. */
+# undef isnanl
+# define isnanl(x) __builtin_isnanl ((long double)(x))
+# elif defined isnan
# undef isnanl
# define isnanl(x) isnan ((long double)(x))
# endif