summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorDavid Cournapeau <cournape@gmail.com>2010-06-03 03:00:28 +0000
committerDavid Cournapeau <cournape@gmail.com>2010-06-03 03:00:28 +0000
commit5e4cd5706e7ad8cb405574fd23c2651ff4bc11b8 (patch)
treef1e31d708ae3601a1f649acd2cf80ae416bda905
parentbc9cb91dc463673516b488935399d2f429c0e016 (diff)
downloadnumpy-5e4cd5706e7ad8cb405574fd23c2651ff4bc11b8.tar.gz
BUG: fix missing macros definition for IEEE macros.
-rw-r--r--numpy/core/setup.py9
1 files changed, 7 insertions, 2 deletions
diff --git a/numpy/core/setup.py b/numpy/core/setup.py
index aa4b03915..586be1226 100644
--- a/numpy/core/setup.py
+++ b/numpy/core/setup.py
@@ -204,6 +204,10 @@ def check_ieee_macros(config):
macros = []
+ def _add_decl(f):
+ priv.append(fname2def("decl_%s" % f))
+ pub.append('NPY_%s' % fname2def("decl_%s" % f))
+
# XXX: hack to circumvent cpp pollution from python: python put its
# config.h in the public namespace, so we have a clash for the common
# functions we test. We remove every function tested by python's
@@ -215,6 +219,8 @@ def check_ieee_macros(config):
headers=["Python.h", "math.h"])
if not st:
macros.append(f)
+ else:
+ _add_decl(f)
else:
macros = _macros[:]
# Normally, isnan and isinf are macro (C99), but some platforms only have
@@ -225,8 +231,7 @@ def check_ieee_macros(config):
for f in macros:
st = config.check_decl(f, headers = ["Python.h", "math.h"])
if st:
- priv.append(fname2def("decl_%s" % f))
- pub.append('NPY_%s' % fname2def("decl_%s" % f))
+ _add_decl(f)
return priv, pub