isinf: Fix for platforms where 'long double' == 'double'.
authorBruno Haible <bruno@clisp.org>
Sun, 9 Oct 2011 10:09:21 +0000 (12:09 +0200)
committerBruno Haible <bruno@clisp.org>
Sun, 9 Oct 2011 10:09:21 +0000 (12:09 +0200)
* m4/isinf.m4 (gl_ISINFL_WORKS): Require gl_LONG_DOUBLE_VS_DOUBLE.
Don't blindly assume 80-bit 'long double'.

ChangeLog
m4/isinf.m4

index 56e8802..1851d72 100644 (file)
--- a/ChangeLog
+++ b/ChangeLog
@@ -1,5 +1,9 @@
 2011-10-09  Bruno Haible  <bruno@clisp.org>
 
+       isinf: Fix for platforms where 'long double' == 'double'.
+       * m4/isinf.m4 (gl_ISINFL_WORKS): Require gl_LONG_DOUBLE_VS_DOUBLE.
+       Don't blindly assume 80-bit 'long double'.
+
        isfinite: Fix for platforms where 'long double' == 'double'.
        * m4/isfinite.m4 (gl_ISFINITEL_WORKS): Require gl_LONG_DOUBLE_VS_DOUBLE.
        Don't blindly assume 80-bit 'long double'.
index 4c819a4..570dd23 100644 (file)
@@ -1,4 +1,4 @@
-# isinf.m4 serial 7
+# isinf.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,
@@ -43,6 +43,7 @@ AC_DEFUN([gl_ISINFL_WORKS],
 [
   AC_REQUIRE([AC_PROG_CC])
   AC_REQUIRE([gl_BIGENDIAN])
+  AC_REQUIRE([gl_LONG_DOUBLE_VS_DOUBLE])
   AC_REQUIRE([AC_CANONICAL_HOST]) dnl for cross-compiles
   AC_CACHE_CHECK([whether isinf(long double) works], [gl_cv_func_isinfl_works],
     [
@@ -89,7 +90,7 @@ int main ()
       result |= 2;
   }
 
-#if ((defined __ia64 && LDBL_MANT_DIG == 64) || (defined __x86_64__ || defined __amd64__) || (defined __i386 || defined __i386__ || defined _I386 || defined _M_IX86 || defined _X86_))
+#if ((defined __ia64 && LDBL_MANT_DIG == 64) || (defined __x86_64__ || defined __amd64__) || (defined __i386 || defined __i386__ || defined _I386 || defined _M_IX86 || defined _X86_)) && !HAVE_SAME_LONG_DOUBLE_AS_DOUBLE
 /* Representation of an 80-bit 'long double' as an initializer for a sequence
    of 'unsigned int' words.  */
 # ifdef WORDS_BIGENDIAN