[Numpy-svn] r5813 - branches/clean_math_config/numpy/core

numpy-svn@scip... numpy-svn@scip...
Sat Sep 13 02:16:35 CDT 2008


Author: cdavid
Date: 2008-09-13 02:16:32 -0500 (Sat, 13 Sep 2008)
New Revision: 5813

Modified:
   branches/clean_math_config/numpy/core/setup.py
Log:
Detect declaration of isnan and co only.

Modified: branches/clean_math_config/numpy/core/setup.py
===================================================================
--- branches/clean_math_config/numpy/core/setup.py	2008-09-13 07:04:41 UTC (rev 5812)
+++ branches/clean_math_config/numpy/core/setup.py	2008-09-13 07:16:32 UTC (rev 5813)
@@ -91,8 +91,14 @@
         fns = [f + prec for f in c99_funcs]
         check_funcs(fns)
 
-    # IEEE754 handling
-    check_funcs(["isnan", "isinf"])
+    # 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.
+    for f in ["isnan", "isinf", "signbit", "isfinite"]:
+        st = config.check_decl(f, headers = ["math.h"])
+        if st:
+            moredefs.append(name_to_symb("decl_%s" % f))
+ 
 
 def configuration(parent_package='',top_path=None):
     from numpy.distutils.misc_util import Configuration,dot_join



More information about the Numpy-svn mailing list