summaryrefslogtreecommitdiff
path: root/numpy
diff options
context:
space:
mode:
Diffstat (limited to 'numpy')
-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