summaryrefslogtreecommitdiff
path: root/numpy
diff options
context:
space:
mode:
authorDavid Cournapeau <cournape@gmail.com>2008-10-03 07:22:18 +0000
committerDavid Cournapeau <cournape@gmail.com>2008-10-03 07:22:18 +0000
commit7bfd6f18f18be91f0cd9122c13afea89b8e2fcdd (patch)
tree3939e145f95e9f573cd6bc5baa72c550910c438e /numpy
parent26dc21128a94b1d1d49d081c8079f4c71d52f618 (diff)
downloadnumpy-7bfd6f18f18be91f0cd9122c13afea89b8e2fcdd.tar.gz
Add check for C99 macros related IEEE-754.
Diffstat (limited to 'numpy')
-rw-r--r--numpy/core/SConscript12
1 files changed, 12 insertions, 0 deletions
diff --git a/numpy/core/SConscript b/numpy/core/SConscript
index 71cee7023..986963846 100644
--- a/numpy/core/SConscript
+++ b/numpy/core/SConscript
@@ -174,6 +174,18 @@ for prec in ['l', 'f']:
fns = [f + prec for f in c99_funcs]
check_funcs(fns)
+# Normally, isnan and isinf are macro (C99), but some platforms only have
+# func, or both func and macro version. Check for macro only, and define
+# replacement ones if not found.
+# Note: including Python.h is necessary because it modifies some math.h
+# definitions
+for f in ["isnan", "isinf", "signbit", "isfinite"]:
+ includes = """\
+#include <Python.h>
+#include <math.h>
+"""
+ config.CheckDeclaration(f, includes=includes)
+
def check_func(f):
"""Check that f is available in mlib, and add the symbol appropriately. """
st = config.CheckDeclaration(f, language = 'C', includes = "#include <math.h>")