summaryrefslogtreecommitdiff
path: root/PC/pyconfig.h
diff options
context:
space:
mode:
authorTim Peters <tim.peters@gmail.com>2004-09-23 19:11:32 +0000
committerTim Peters <tim.peters@gmail.com>2004-09-23 19:11:32 +0000
commit980958e773fe003a69a66366cba78625ec30b78e (patch)
tree09074269f5d014d66e80226618f0acd68a390dc9 /PC/pyconfig.h
parent62b158b44db18cf8d620fa6e3032f344cc826a01 (diff)
downloadcpython-980958e773fe003a69a66366cba78625ec30b78e.tar.gz
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/pyconfig.h')
-rw-r--r--PC/pyconfig.h4
1 files changed, 4 insertions, 0 deletions
diff --git a/PC/pyconfig.h b/PC/pyconfig.h
index 495d90cfbf..4d1872ce0b 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 */