[Top][All Lists]
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: AC_C_LONG_DOUBLE is wrong on IRIX 5.3
From: |
Oliver Kiddle |
Subject: |
Re: AC_C_LONG_DOUBLE is wrong on IRIX 5.3 |
Date: |
Fri, 16 Nov 2001 17:26:06 +0000 |
Paul Eggert wrote:
>
> Thanks. I have some further remarks:
I've attached the patch reflecting these remarks.
Hopefully that issue I mentioned with gcc 2.95.2's float.h doesn't
apply to any compiler that lacks long double or has a small long
double. If it does we'll have to think again.
> Reword to 'Define if long double has greater range or precision than double.'
> Then it'll fit on a line.
Not with out reducing the indentation.
> Can you please test and resubmit a patch along those lines?
I've not been able to test this on IRIX 5.3 or any machine lacking a
long double but I will do that in a couple of weeks when I return.
Oliver
--- lib/autoconf/c.m4 Sat Sep 22 16:28:27 2001
+++ lib/autoconf/c.m4 Fri Nov 16 17:07:16 2001
@@ -828,25 +828,26 @@
# AC_C_LONG_DOUBLE
# ----------------
AC_DEFUN([AC_C_LONG_DOUBLE],
-[AC_CACHE_CHECK(for long double, ac_cv_c_long_double,
+[AC_CACHE_CHECK(for long double with greater range or precision than double,
+ac_cv_c_long_double,
[if test "$GCC" = yes; then
ac_cv_c_long_double=yes
else
-AC_TRY_RUN(
-[int
+AC_TRY_COMPILE(
+[#include <float.h>
+int
main ()
{
/* The Stardent Vistra knows sizeof(long double), but does not
support it. */
long double foo = 0.0;
- /* On Ultrix 4.3 cc, long double is 4 and double is 8. */
- exit (sizeof (long double) < sizeof (double));
+ int a[DBL_MAX < LDBL_MAX || LDBL_EPSILON < DBL_EPSILON ? 1 : -1];
}],
ac_cv_c_long_double=yes, ac_cv_c_long_double=no)
fi])
if test $ac_cv_c_long_double = yes; then
AC_DEFINE(HAVE_LONG_DOUBLE, 1,
- [Define if the `long double' type works.])
+ [Define if the long double has greater range or precision than double.])
fi
])# AC_C_LONG_DOUBLE
--- doc/autoconf.texi Fri Nov 2 16:10:56 2001
+++ doc/autoconf.texi Fri Nov 16 16:52:47 2001
@@ -4775,7 +4775,8 @@
@defmac AC_C_LONG_DOUBLE
@acindex C_LONG_DOUBLE
@cvindex HAVE_LONG_DOUBLE
-If the C compiler supports the @code{long double} type, define
+If the C compiler supports a @code{long double} type with greater
+range or precision than the @code{double} type, define
@code{HAVE_LONG_DOUBLE}. Some C compilers that do not define
@code{__STDC__} do support the @code{long double} type; some compilers
that define @code{__STDC__} do not support @code{long double}.
_____________________________________________________________________
This message has been checked for all known viruses by the
MessageLabs Virus Scanning Service. For further information visit
http://www.messagelabs.com/stats.asp
- AC_C_LONG_DOUBLE is wrong on IRIX 5.3, Oliver Kiddle, 2001/11/07
- Re: AC_C_LONG_DOUBLE is wrong on IRIX 5.3, Paul Eggert, 2001/11/07
- Re: AC_C_LONG_DOUBLE is wrong on IRIX 5.3, Oliver Kiddle, 2001/11/09
- Re: AC_C_LONG_DOUBLE is wrong on IRIX 5.3, Oliver Kiddle, 2001/11/15
- Re: AC_C_LONG_DOUBLE is wrong on IRIX 5.3, Paul Eggert, 2001/11/15
- Re: AC_C_LONG_DOUBLE is wrong on IRIX 5.3, Oliver Kiddle, 2001/11/16
- Re: AC_C_LONG_DOUBLE is wrong on IRIX 5.3,
Oliver Kiddle <=
- FYI: AC_LONG_DOUBLE patch for IRIX 5.3, and for GCC 2.95.2, Paul Eggert, 2001/11/16