summaryrefslogtreecommitdiffstats
path: root/Include
diff options
context:
space:
mode:
authorMark Dickinson <dickinsm@gmail.com>2009-01-04 19:53:00 (GMT)
committerMark Dickinson <dickinsm@gmail.com>2009-01-04 19:53:00 (GMT)
commit1bf6401ab27f902dde94848e5868a8482bef35f0 (patch)
tree5177dce9dc979c4a38b28710d16df859453eb572 /Include
parent0ebfedf38e0979aec50e6f99fcc5468a5679fd5b (diff)
downloadcpython-1bf6401ab27f902dde94848e5868a8482bef35f0.zip
cpython-1bf6401ab27f902dde94848e5868a8482bef35f0.tar.gz
cpython-1bf6401ab27f902dde94848e5868a8482bef35f0.tar.bz2
Use C99 'isfinite' macro in preference to BSD-derived 'finite' function.
Diffstat (limited to 'Include')
-rw-r--r--Include/pymath.h4
1 files changed, 3 insertions, 1 deletions
diff --git a/Include/pymath.h b/Include/pymath.h
index ca84dd9..0631b93 100644
--- a/Include/pymath.h
+++ b/Include/pymath.h
@@ -118,7 +118,9 @@ extern double copysign(double, double);
* Note: PC/pyconfig.h defines Py_IS_FINITE as _finite
*/
#ifndef Py_IS_FINITE
-#ifdef HAVE_FINITE
+#if defined HAVE_DECL_ISFINITE && HAVE_DECL_ISFINITE == 1
+#define Py_IS_FINITE(X) isfinite(X)
+#elif defined HAVE_FINITE
#define Py_IS_FINITE(X) finite(X)
#else
#define Py_IS_FINITE(X) (!Py_IS_INFINITY(X) && !Py_IS_NAN(X))