summaryrefslogtreecommitdiff
path: root/numpy/f2py
diff options
context:
space:
mode:
authorDavid Cournapeau <cournape@gmail.com>2009-09-21 07:51:46 +0000
committerDavid Cournapeau <cournape@gmail.com>2009-09-21 07:51:46 +0000
commit576582863a390fed3d48f5a1e5fb9e0b47cadf68 (patch)
treecf1936ba0cb522b645e97879b49f3c6e9b7021d7 /numpy/f2py
parent13bcd67d4dc01ddc9788fc252d1d8752c30c2ed8 (diff)
downloadnumpy-576582863a390fed3d48f5a1e5fb9e0b47cadf68.tar.gz
BUG: fix f2py generated code for MSVC 9.
MSVC already define min/max macros in standard headers, which causes trouble when f2py redefines them.
Diffstat (limited to 'numpy/f2py')
-rw-r--r--numpy/f2py/cfuncs.py4
1 files changed, 4 insertions, 0 deletions
diff --git a/numpy/f2py/cfuncs.py b/numpy/f2py/cfuncs.py
index 5312b0ec5..3e0adbd8b 100644
--- a/numpy/f2py/cfuncs.py
+++ b/numpy/f2py/cfuncs.py
@@ -230,8 +230,12 @@ cppmacros['PRINTPYOBJERR']="""\
\tfprintf(stderr,\"\\n\");
"""
cppmacros['MINMAX']="""\
+#ifndef max
#define max(a,b) ((a > b) ? (a) : (b))
+#endif
+#ifndef min
#define min(a,b) ((a < b) ? (a) : (b))
+#endif
#ifndef MAX
#define MAX(a,b) ((a > b) ? (a) : (b))
#endif