[Numpy-svn] r5903 - branches/clean_math_config/numpy/core
numpy-svn at scipy.org
numpy-svn at scipy.org
Fri Oct 3 03:22:25 EDT 2008
Author: cdavid
Date: 2008-10-03 02:22:18 -0500 (Fri, 03 Oct 2008)
New Revision: 5903
Modified:
branches/clean_math_config/numpy/core/SConscript
Log:
Add check for C99 macros related IEEE-754.
Modified: branches/clean_math_config/numpy/core/SConscript
===================================================================
--- branches/clean_math_config/numpy/core/SConscript 2008-10-03 07:22:02 UTC (rev 5902)
+++ branches/clean_math_config/numpy/core/SConscript 2008-10-03 07:22:18 UTC (rev 5903)
@@ -174,6 +174,18 @@
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>")
More information about the Numpy-svn
mailing list