diff options
author | Pauli Virtanen <pav@iki.fi> | 2010-10-06 01:15:15 +0200 |
---|---|---|
committer | Pauli Virtanen <pav@iki.fi> | 2010-10-06 21:11:15 +0200 |
commit | 5a0ab023d8f81ccf83fe6adf7983d7631021cb62 (patch) | |
tree | a3f14bd68f0daca98b5018d84b98e436f0eb6eb1 /numpy/core | |
parent | 8b0d65986dad4b4d17a51ea272bf17afc5dd7031 (diff) | |
download | numpy-5a0ab023d8f81ccf83fe6adf7983d7631021cb62.tar.gz |
BUG: core: use #if check instead of #ifdef in checking HAVE_DECL_ISFINITE (ticket #1625)
Python #defines HAVE_DECL_ISFINITE 0 when the function is not available,
so the proper check to do is #if.
Diffstat (limited to 'numpy/core')
-rw-r--r-- | numpy/core/setup.py | 7 |
1 files changed, 5 insertions, 2 deletions
diff --git a/numpy/core/setup.py b/numpy/core/setup.py index ad8d5cb3b..f71ec108a 100644 --- a/numpy/core/setup.py +++ b/numpy/core/setup.py @@ -215,10 +215,13 @@ def check_ieee_macros(config): _macros = ["isnan", "isinf", "signbit", "isfinite"] if sys.version_info[:2] >= (2, 6): for f in _macros: - already_declared = config.check_decl(fname2def("decl_%s" % f), + py_symbol = fname2def("decl_%s" % f) + already_declared = config.check_decl(py_symbol, headers=["Python.h", "math.h"]) if already_declared: - pub.append('NPY_%s' % fname2def("decl_%s" % f)) + if config.check_macro_true(py_symbol, + headers=["Python.h", "math.h"]): + pub.append('NPY_%s' % fname2def("decl_%s" % f)) else: macros.append(f) else: |