Add isnanf module.
[pspp] / lib / isnand.h
index c58697f1762e571ceadce0f5c9ad991c5c065760..d809aaa688f97425c49eb34a0b6e85299b73f9f1 100644 (file)
@@ -1,4 +1,4 @@
-/* Test for NaN that does not need libm.
+/* Test for NaN.
    Copyright (C) 2007-2008 Free Software Foundation, Inc.
 
    This program is free software: you can redistribute it and/or modify
    You should have received a copy of the GNU General Public License
    along with this program.  If not, see <http://www.gnu.org/licenses/>.  */
 
-#if HAVE_ISNAND_IN_LIBC
+#if HAVE_ISNAND
 /* Get declaration of isnan macro.  */
 # include <math.h>
-# ifdef isnan
+# if __GNUC__ >= 4
+   /* GCC 4.0 and newer provides three built-ins for isnan.  */
+#  undef isnand
+#  define isnand(x) __builtin_isnan ((double)(x))
+# else
 #  undef isnand
 #  define isnand(x) isnan ((double)(x))
 # endif