[Top][All Lists]
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: DINFINITY alpha not gnu/linux
From: |
Kevin Ryde |
Subject: |
Re: DINFINITY alpha not gnu/linux |
Date: |
Sun, 22 Feb 2004 08:08:31 +1000 |
User-agent: |
Gnus/5.110002 (No Gnus v0.2) Emacs/21.3 (gnu/linux) |
I'm looking at
* numbers.c (guile_ieee_init): Use C99 INFINITY and NAN when
available. Test HAVE_DINFINITY and HAVE_DQNAN for those globals, in
particular don't assume "defined (__alpha__) && ! defined (linux)"
means OSF. Remove "SCO" code, which was not really SCO specific and
which John W. Eaton advises should be long past being needed.
--- numbers.c.~1.223.~ 2004-02-21 14:02:45.000000000 +1000
+++ numbers.c 2004-02-22 08:02:53.000000000 +1000
@@ -560,10 +560,15 @@
/* Some version of gcc on some old version of Linux used to crash when
trying to make Inf and NaN. */
-#if defined (SCO)
- double tmp = 1.0;
- guile_Inf = 1.0 / (tmp - tmp);
-#elif defined (__alpha__) && ! defined (linux)
+#ifdef INFINITY
+ /* C99 INFINITY, when available.
+ FIXME: The standard allows for INFINITY to be something that overflows
+ at compile time. We ought to have a configure test to check for that
+ before trying to use it. (But in practice we believe this is not a
+ problem on any system guile is likely to target.) */
+ guile_Inf = INFINITY;
+#elif HAVE_DINFINITY
+ /* OSF */
extern unsigned int DINFINITY[2];
guile_Inf = (*(X_CAST(double *, DINFINITY)));
#else
@@ -582,7 +587,11 @@
#if defined (HAVE_ISNAN)
-#if defined (__alpha__) && ! defined (linux)
+#ifdef NAN
+ /* C99 NAN, when available */
+ guile_NaN = NAN;
+#elif HAVE_DQNAN
+ /* OSF */
extern unsigned int DQNAN[2];
guile_NaN = (*(X_CAST(double *, DQNAN)));
#else