]> granicus.if.org Git - python/commitdiff
Oops. Need to check not only that HAVE_DECL_ISINF is defined, but also
authorMark Dickinson <dickinsm@gmail.com>
Sun, 4 Jan 2009 16:06:40 +0000 (16:06 +0000)
committerMark Dickinson <dickinsm@gmail.com>
Sun, 4 Jan 2009 16:06:40 +0000 (16:06 +0000)
that it's equal to 1.  (If isinf isn't defined, HAVE_DECL_ISINF is
defined to be 0, rather than being undefined.)

Include/pymath.h

index 13f95b4ff1d1f04beafb3d279079ec40e5f5d501..9e0f46f9ba9f38ad2ddab849aed3333c3c6e6321 100644 (file)
@@ -87,7 +87,7 @@ extern double copysign(double, double);
  * Note: PC/pyconfig.h defines Py_IS_NAN as _isnan
  */
 #ifndef Py_IS_NAN
-#ifdef HAVE_DECL_ISNAN
+#ifdef HAVE_DECL_ISNAN && HAVE_DECL_ISNAN == 1
 #define Py_IS_NAN(X) isnan(X)
 #else
 #define Py_IS_NAN(X) ((X) != (X))
@@ -104,7 +104,7 @@ extern double copysign(double, double);
  * Note: PC/pyconfig.h defines Py_IS_INFINITY as _isinf
  */
 #ifndef Py_IS_INFINITY
-#ifdef HAVE_DECL_ISINF
+#ifdef HAVE_DECL_ISINF && HAVE_DECL_ISINF == 1
 #define Py_IS_INFINITY(X) isinf(X)
 #else
 #define Py_IS_INFINITY(X) ((X) && (X)*0.5 == (X))