From: David B. <ad...@us...> - 2004-05-27 09:50:04
|
Update of /cvsroot/octave/octave-forge/main/fixed/int In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv22861/int Modified Files: fixed.cc Log Message: Alternate fix for OS X build problem Index: fixed.cc =================================================================== RCS file: /cvsroot/octave/octave-forge/main/fixed/int/fixed.cc,v retrieving revision 1.4 retrieving revision 1.5 diff -u -d -r1.4 -r1.5 --- fixed.cc 26 May 2004 20:06:37 -0000 1.4 +++ fixed.cc 27 May 2004 09:49:54 -0000 1.5 @@ -32,12 +32,22 @@ #endif #include <iostream> + +#if !defined(OCTAVE_FORGE) #include <cmath> + #if defined(__APPLE__) && defined(__MACH__) extern "C" int isnan (double); extern "C" int isinf (double); #endif +#define lo_ieee_isnan(x) isnan(x) +#define lo_ieee_isinf(x) isinf(x) + +#else +#include <octave/lo-ieee.h> +#endif + #include "fixed.h" // Various tables of power 5. @@ -339,17 +349,17 @@ double posclip = double(one<<is) - 1./(one<<ds); /* Check for erreur */ - if (isnan(x)) { + if (lo_ieee_isnan(x)) { /* Not a number */ x = 0; if (Fixed::FP_Overflow) fixed_warning(Fixed::NAN_CONST); - } else if (isinf(x)) { + } else if (lo_ieee_isinf(x)) { /* Infinity */ - x = (isinf(x) > 0) ? posclip : negclip; + x = (lo_ieee_isinf(x) > 0) ? posclip : negclip; if (Fixed::FP_Overflow) fixed_warning(Fixed::INF_CONST); |