octave-maintainers
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: cquad.cc compilation error: INFINITY undefined


From: John W. Eaton
Subject: Re: cquad.cc compilation error: INFINITY undefined
Date: Wed, 3 Nov 2010 03:29:28 -0400

On  3-Nov-2010, Michael Goffioul wrote:

| On Tue, Nov 2, 2010 at 11:15 PM, John W. Eaton <address@hidden> wrote:
| > On  2-Nov-2010, Michael Goffioul wrote:
| >
| > | I reached a compilation error with MSVC in cquad.cc, because INFINITY is
| > | not defined. Looking on the web, it seems that something like
| > |
| > | #ifndef INFINITY
| > | #define INFINITY octave_Float_Inf
| > | #endif
| > |
| > | Could anybody confirm this is functionally equivalent?
| >
| > Yes, except that I don't see any float values in cquad, only doubles
| > so I think you want octave_Inf, not octave_Float_Inf.
| >
| > I checked in the following change.
| >
| >  http://hg.savannah.gnu.org/hgweb/octave/rev/c08e9d4e54c7
| 
| While you're at it, you might also want to add
| 
| #ifdef HAVE__COPYSIGN
| #define copysign _copysign
| #endif
| 
| at the beginning of cquad.cc, as it uses copysign unconditionally.

Hmm.  There is a copysign module in gnulib, but from looking at it, I
can't tell for sure whether it will actually provide copysign if it is
not available (it doesn't look like it does).  And in any case, we
aren't using it.  But I would rather use it (and fix gnulib if
necessary) than use a define as above, even though I see we already
have at least one source file that uses a define for copysign.

To be consistent, I checked in the following change:

  http://hg.savannah.gnu.org/hgweb/octave/rev/a512c537b38e

But I would rather use the copysign module from gnulib and if that
isn't sufficient, then we should fix gnulib to provide copysign if it
doesn't exist.

jwe



reply via email to

[Prev in Thread] Current Thread [Next in Thread]