From mboxrd@z Thu Jan 1 00:00:00 1970 Path: main.gmane.org!not-for-mail From: Kevin Ryde Newsgroups: gmane.lisp.guile.devel Subject: Re: DINFINITY alpha not gnu/linux Date: Sun, 22 Feb 2004 08:08:31 +1000 Sender: guile-devel-bounces+guile-devel=m.gmane.org@gnu.org Message-ID: <878yiwkrvk.fsf@zip.com.au> References: <877jymwt2b.fsf@zip.com.au> <16433.18814.653327.782668@devzero.bogus.domain> <87y8r2vd2u.fsf@zip.com.au> <16433.21827.391742.744436@devzero.bogus.domain> NNTP-Posting-Host: deer.gmane.org Mime-Version: 1.0 Content-Type: multipart/mixed; boundary="=-=-=" X-Trace: sea.gmane.org 1077401782 13054 80.91.224.253 (21 Feb 2004 22:16:22 GMT) X-Complaints-To: usenet@sea.gmane.org NNTP-Posting-Date: Sat, 21 Feb 2004 22:16:22 +0000 (UTC) Cc: guile-devel@gnu.org Original-X-From: guile-devel-bounces+guile-devel=m.gmane.org@gnu.org Sat Feb 21 23:16:13 2004 Return-path: Original-Received: from monty-python.gnu.org ([199.232.76.173]) by deer.gmane.org with esmtp (Exim 3.35 #1 (Debian)) id 1AufPx-0000dO-00 for ; Sat, 21 Feb 2004 23:16:13 +0100 Original-Received: from localhost ([127.0.0.1] helo=monty-python.gnu.org) by monty-python.gnu.org with esmtp (Exim 4.30) id 1AufO5-0006mC-RF for guile-devel@m.gmane.org; Sat, 21 Feb 2004 17:14:17 -0500 Original-Received: from list by monty-python.gnu.org with tmda-scanned (Exim 4.30) id 1AufNo-0006jc-Qy for guile-devel@gnu.org; Sat, 21 Feb 2004 17:14:00 -0500 Original-Received: from mail by monty-python.gnu.org with spam-scanned (Exim 4.30) id 1AufNH-0006J0-UT for guile-devel@gnu.org; Sat, 21 Feb 2004 17:13:59 -0500 Original-Received: from [199.232.41.8] (helo=mx20.gnu.org) by monty-python.gnu.org with esmtp (TLSv1:DES-CBC3-SHA:168) (Exim 4.30) id 1AufNH-0006FW-Kz for guile-devel@gnu.org; Sat, 21 Feb 2004 17:13:27 -0500 Original-Received: from [61.8.0.85] (helo=mailout2.pacific.net.au) by mx20.gnu.org with esmtp (Exim 4.30) id 1AufIj-0003bg-6M for guile-devel@gnu.org; Sat, 21 Feb 2004 17:08:45 -0500 Original-Received: from mailproxy2.pacific.net.au (mailproxy2.pacific.net.au [61.8.0.87]) by mailout2.pacific.net.au (8.12.3/8.12.3/Debian-6.6) with ESMTP id i1LM8d5O004060; Sun, 22 Feb 2004 09:08:39 +1100 Original-Received: from localhost (ppp198.dyn10.pacific.net.au [61.8.10.198]) by mailproxy2.pacific.net.au (8.12.3/8.12.3/Debian-6.6) with ESMTP id i1LM8bcg029744; Sun, 22 Feb 2004 09:08:38 +1100 Original-Received: from gg by localhost with local (Exim 3.36 #1 (Debian)) id 1AufIV-0005eH-00; Sun, 22 Feb 2004 08:08:31 +1000 Original-To: "John W. Eaton" Mail-Copies-To: never In-Reply-To: <16433.21827.391742.744436@devzero.bogus.domain> (John W. Eaton's message of "Mon, 16 Feb 2004 17:41:55 -0600") User-Agent: Gnus/5.110002 (No Gnus v0.2) Emacs/21.3 (gnu/linux) X-BeenThere: guile-devel@gnu.org X-Mailman-Version: 2.1.2 Precedence: list List-Id: Developers list for Guile, the GNU extensibility library List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: guile-devel-bounces+guile-devel=m.gmane.org@gnu.org Xref: main.gmane.org gmane.lisp.guile.devel:3427 X-Report-Spam: http://spam.gmane.org/gmane.lisp.guile.devel:3427 --=-=-= 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. --=-=-= Content-Disposition: inline; filename=numbers.c.inf.diff --- 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 --=-=-= Content-Type: text/plain; charset="us-ascii" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit Content-Disposition: inline _______________________________________________ Guile-devel mailing list Guile-devel@gnu.org http://mail.gnu.org/mailman/listinfo/guile-devel --=-=-=--