mbsrtowcs: Work around bug on native Windows.
[gnulib.git] / m4 / isnand.m4
index cd91628..fb2c0f9 100644 (file)
@@ -1,5 +1,5 @@
-# isnand.m4 serial 6
-dnl Copyright (C) 2007-2010 Free Software Foundation, Inc.
+# isnand.m4 serial 8
+dnl Copyright (C) 2007-2011 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.
@@ -58,16 +58,18 @@ AC_DEFUN([gl_HAVE_ISNAND_IN_LIBM],
     [
       save_LIBS="$LIBS"
       LIBS="$LIBS -lm"
-      AC_TRY_LINK([#include <math.h>
-                   #if __GNUC__ >= 4
-                   # undef isnand
-                   # define isnand(x) __builtin_isnand ((double)(x))
-                   #elif defined isnan
-                   # undef isnand
-                   # define isnand(x) isnan ((double)(x))
-                   #endif
-                   double x;],
-                  [return isnand (x);],
+      AC_LINK_IFELSE(
+        [AC_LANG_PROGRAM(
+           [[#include <math.h>
+             #if __GNUC__ >= 4
+             # undef isnand
+             # define isnand(x) __builtin_isnan ((double)(x))
+             #elif defined isnan
+             # undef isnand
+             # define isnand(x) isnan ((double)(x))
+             #endif
+             double x;]],
+           [[return isnand (x);]])],
         [gl_cv_func_isnand_in_libm=yes],
         [gl_cv_func_isnand_in_libm=no])
       LIBS="$save_LIBS"
@@ -79,16 +81,18 @@ AC_DEFUN([gl_HAVE_ISNAND_NO_LIBM],
   AC_CACHE_CHECK([whether isnan(double) can be used without linking with libm],
     [gl_cv_func_isnand_no_libm],
     [
-      AC_TRY_LINK([#include <math.h>
-                   #if __GNUC__ >= 4
-                   # undef isnand
-                   # define isnand(x) __builtin_isnan ((double)(x))
-                   #else
-                   # undef isnand
-                   # define isnand(x) isnan ((double)(x))
-                   #endif
-                   double x;],
-                  [return isnand (x);],
+      AC_LINK_IFELSE(
+        [AC_LANG_PROGRAM(
+           [[#include <math.h>
+             #if __GNUC__ >= 4
+             # undef isnand
+             # define isnand(x) __builtin_isnan ((double)(x))
+             #else
+             # undef isnand
+             # define isnand(x) isnan ((double)(x))
+             #endif
+             double x;]],
+           [[return isnand (x);]])],
         [gl_cv_func_isnand_no_libm=yes],
         [gl_cv_func_isnand_no_libm=no])
     ])