[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
MSVC compiler support [patch 8]: isnan, finite and copysign
From: |
Michael Goffioul |
Subject: |
MSVC compiler support [patch 8]: isnan, finite and copysign |
Date: |
Tue, 17 Oct 2006 21:44:45 +0200 |
User-agent: |
Thunderbird 1.5.0.7 (Windows/20060909) |
isnan, finite and copysign are underscored under MSVC.
Index: configure.in
===================================================================
RCS file: /cvs/octave/configure.in,v
retrieving revision 1.526
diff -p -c -r1.526 configure.in
*** configure.in 13 Oct 2006 18:11:26 -0000 1.526
--- configure.in 17 Oct 2006 11:07:41 -0000
*************** case "$canonical_host_type" in
*** 1450,1455 ****
--- 1542,1550 ----
AC_MSG_NOTICE([forcing HAVE_ISNAN for SCO])
AC_DEFINE(HAVE_ISNAN, 1, [Define if you have isnan().])
;;
+ *-*-msdos)
+ AC_CHECK_FUNCS(_finite _isnan _copysign)
+ ;;
*)
AC_CHECK_FUNCS(finite isnan isinf copysign signbit)
AC_CHECK_DECLS(signbit, , , [#include <math.h>])
Index: liboctave/lo-cieee.c
===================================================================
RCS file: /cvs/octave/liboctave/lo-cieee.c,v
retrieving revision 1.9
diff -p -c -r1.9 lo-cieee.c
*** liboctave/lo-cieee.c 15 Jun 2005 03:45:48 -0000 1.9
--- liboctave/lo-cieee.c 17 Oct 2006 11:07:42 -0000
*************** lo_ieee_isnan (double x)
*** 86,91 ****
--- 86,93 ----
{
#if defined (HAVE_ISNAN)
return isnan (x);
+ #elif defined(HAVE__ISNAN)
+ return _isnan (x);
#else
return 0;
#endif
*************** lo_ieee_finite (double x)
*** 96,101 ****
--- 98,105 ----
{
#if defined (HAVE_FINITE)
return finite (x) != 0 && ! lo_ieee_isnan (x);
+ #elif defined (HAVE__FINITE)
+ return _finite (x) != 0 && ! lo_ieee_isnan (x);
#elif defined (HAVE_ISINF)
return (! isinf (x) && ! lo_ieee_isnan (x));
#else
*************** lo_ieee_isinf (double x)
*** 110,115 ****
--- 114,121 ----
return isinf (x);
#elif defined (HAVE_FINITE)
return (! (finite (x) || lo_ieee_isnan (x)));
+ #elif defined (HAVE__FINITE)
+ return (! (_finite (x) || lo_ieee_isnan (x)));
#else
return 0;
#endif
*************** lo_ieee_is_NA (double x)
*** 122,127 ****
--- 128,137 ----
lo_ieee_double t;
t.value = x;
return (isnan (x) && t.word[lo_ieee_lw] == LO_IEEE_NA_LW) ? 1 : 0;
+ #elif defined HAVE__ISNAN
+ lo_ieee_double t;
+ t.value = x;
+ return (_isnan (x) && t.word[lo_ieee_lw] == LO_IEEE_NA_LW) ? 1 : 0;
#else
return 0;
#endif
*************** lo_ieee_signbit (double x)
*** 170,175 ****
--- 180,187 ----
return (copysign (1.0, x) < 0);
#elif defined (HAVE_COPYSIGN)
return (x < 0 || copysign (1.0, x) < 0);
+ #elif defined (HAVE__COPYSIGN)
+ return (x < 0 || _copysign (1.0, x) < 0);
#else
return x < 0;
#endif
- MSVC compiler support [patch 5]: Additional required definition, (continued)
- MSVC compiler support [patch 6]: Default program definition, Michael Goffioul, 2006/10/17
- MSVC compiler support [patch 6]: Default program definition, John W. Eaton, 2006/10/17
- Re: MSVC compiler support [patch 6]: Default program definition, Michael Goffioul, 2006/10/18
- Re: MSVC compiler support [patch 6]: Default program definition, John W. Eaton, 2006/10/26
- MSVC compiler support [patch 7]: mkdir number of arguments, Michael Goffioul, 2006/10/17
- MSVC compiler support [patch 7]: mkdir number of arguments, John W. Eaton, 2006/10/17
- Re: MSVC compiler support [patch 7]: mkdir number of arguments, Michael Goffioul, 2006/10/18
- Re: MSVC compiler support [patch 7]: mkdir number of arguments, John W. Eaton, 2006/10/26
- MSVC compiler support [patch 8]: isnan, finite and copysign,
Michael Goffioul <=
- MSVC compiler support [patch 8]: isnan, finite and copysign, John W. Eaton, 2006/10/17
- Re: MSVC compiler support [patch 8]: isnan, finite and copysign, Michael Goffioul, 2006/10/18
- MSVC compiler support [patch 9]: Default object suffix, Michael Goffioul, 2006/10/17
- MSVC compiler support [patch 9]: Default object suffix, John W. Eaton, 2006/10/17
- MSVC compiler support [patch 10]: .oct file compilation, Michael Goffioul, 2006/10/17
- MSVC compiler support [patch 10]: .oct file compilation, John W. Eaton, 2006/10/17
- Re: MSVC compiler support [patch 10]: .oct file compilation, Michael Goffioul, 2006/10/18
- Re: MSVC compiler support [patch 10]: .oct file compilation, John W. Eaton, 2006/10/24
- MSVC compiler support [patch 11]: CRUFT.DLL exported symbols (Fortran), Michael Goffioul, 2006/10/17
- MSVC compiler support [patch 11]: CRUFT.DLL exported symbols (Fortran), John W. Eaton, 2006/10/25