[Numpy-svn] r5855 - branches/clean_math_config/numpy/distutils/command

numpy-svn@scip... numpy-svn@scip...
Sun Sep 21 06:39:17 CDT 2008


Author: cdavid
Date: 2008-09-21 06:39:08 -0500 (Sun, 21 Sep 2008)
New Revision: 5855

Modified:
   branches/clean_math_config/numpy/distutils/command/config.py
Log:
Handle msvc intrisincs in check_func.

Modified: branches/clean_math_config/numpy/distutils/command/config.py
===================================================================
--- branches/clean_math_config/numpy/distutils/command/config.py	2008-09-21 07:10:49 UTC (rev 5854)
+++ branches/clean_math_config/numpy/distutils/command/config.py	2008-09-21 11:39:08 UTC (rev 5855)
@@ -126,6 +126,13 @@
         body = []
         if decl:
             body.append("int %s ();" % func)
+        # Handle MSVC intrisincs: force MS compiler to make a function call.
+        # Useful to test for some functions when built with optimization on, to
+        # avoid build error because the intrisinc and our 'fake' test
+        # declaration do not match.
+        body.append("#ifdef _MSC_VER")
+        body.append("#define function(%s)" % func)
+        body.append("#endif")
         body.append("int main (void) {")
         if call:
             if call_args is None:



More information about the Numpy-svn mailing list