summaryrefslogtreecommitdiffstats
path: root/PC
diff options
context:
space:
mode:
authorTim Peters <tim.peters@gmail.com>2004-09-23 19:11:32 (GMT)
committerTim Peters <tim.peters@gmail.com>2004-09-23 19:11:32 (GMT)
commit862f0593d8e8c7cd510b598296c73b25168d0472 (patch)
treeb08e666ab49cab220687ec84959a37301dc076ae /PC
parent307fa78107c39ffda1eb4ad18201d25650354c4e (diff)
downloadcpython-862f0593d8e8c7cd510b598296c73b25168d0472.zip
cpython-862f0593d8e8c7cd510b598296c73b25168d0472.tar.gz
cpython-862f0593d8e8c7cd510b598296c73b25168d0472.tar.bz2
Introduced a Py_IS_NAN macro, which probably works on the major platforms
today. pyconfig.h can override it if not, and can also override Py_IS_INFINITY now. Py_IS_NAN and Py_IS_INFINITY are overridden now for Microsoft compilers, using efficient MS-specific spellings.
Diffstat (limited to 'PC')
-rw-r--r--PC/pyconfig.h4
1 files changed, 4 insertions, 0 deletions
diff --git a/PC/pyconfig.h b/PC/pyconfig.h
index 495d90c..4d1872c 100644
--- a/PC/pyconfig.h
+++ b/PC/pyconfig.h
@@ -118,6 +118,10 @@ MS_CORE_DLL.
typedef int pid_t;
#define hypot _hypot
+#include <float.h>
+#define Py_IS_NAN _isnan
+#define Py_IS_INFINITY(X) (!_finite(X) && !_isnan(X))
+
#endif /* _MSC_VER */
/* define some ANSI types that are not defined in earlier Win headers */