From: Bruno Haible Date: Sun, 9 Oct 2011 10:08:25 +0000 (+0200) Subject: isfinite: Fix for platforms where 'long double' == 'double'. X-Git-Tag: v0.1~1624 X-Git-Url: http://erislabs.org.uk/gitweb/?a=commitdiff_plain;h=e8ed2e7ddefb834cecd84c10d7b02697631cbb0a;p=gnulib.git 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'. --- diff --git a/ChangeLog b/ChangeLog index b36d2e78a..56e8802e7 100644 --- a/ChangeLog +++ b/ChangeLog @@ -1,5 +1,9 @@ 2011-10-09 Bruno Haible + 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'. + isfinite, isinf, isnan tests: Avoid syntax error on MSVC 9. * m4/math_h.m4 (gl_LONG_DOUBLE_VS_DOUBLE): New macro. * modules/isfinite-tests (configure.ac): Require diff --git a/m4/isfinite.m4 b/m4/isfinite.m4 index 9bc8c4dcd..661a3cab5 100644 --- a/m4/isfinite.m4 +++ b/m4/isfinite.m4 @@ -1,4 +1,4 @@ -# isfinite.m4 serial 12 +# isfinite.m4 serial 13 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, @@ -45,6 +45,7 @@ AC_DEFUN([gl_ISFINITEL_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 isfinite(long double) works], [gl_cv_func_isfinitel_works], [ @@ -87,7 +88,7 @@ int main () result |= 1; } -#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