[Numpy-svn] r6229 - branches/fix_float_format/numpy/core

numpy-svn@scip... numpy-svn@scip...
Sun Dec 28 21:22:39 CST 2008


Author: cdavid
Date: 2008-12-28 21:22:35 -0600 (Sun, 28 Dec 2008)
New Revision: 6229

Modified:
   branches/fix_float_format/numpy/core/SConscript
   branches/fix_float_format/numpy/core/setup.py
Log:
    Define FORCE_NO_LONG_DOUBLE_FORMATTING on win32.


Modified: branches/fix_float_format/numpy/core/SConscript
===================================================================
--- branches/fix_float_format/numpy/core/SConscript	2008-12-29 03:22:02 UTC (rev 6228)
+++ branches/fix_float_format/numpy/core/SConscript	2008-12-29 03:22:35 UTC (rev 6229)
@@ -211,6 +211,10 @@
         config.Define('DISTUTILS_USE_SDK', distutils_use_sdk,
                       "define to 1 to disable SMP support ")
 
+    if a == "Intel":
+        config.Define('FORCE_NO_LONG_DOUBLE_FORMATTING', 1,
+                      "define to 1 to force long double format string to the" \
+                      " same as double (Lg -> g)")
 #--------------
 # Checking Blas
 #--------------

Modified: branches/fix_float_format/numpy/core/setup.py
===================================================================
--- branches/fix_float_format/numpy/core/setup.py	2008-12-29 03:22:02 UTC (rev 6228)
+++ branches/fix_float_format/numpy/core/setup.py	2008-12-29 03:22:35 UTC (rev 6229)
@@ -187,6 +187,14 @@
                                          headers=['stdlib.h']):
                     moredefs.append(('PyOS_ascii_strtod', 'strtod'))
 
+            if sys.platform == "win32":
+                from numpy.distutils.misc_util import get_build_architecture
+                # On win32, force long double format string to be 'g', not
+                # 'Lg', since the MS runtime does not support long double whose
+                # size is > sizeof(double)
+                if get_build_architecture()=="Intel":
+                    moredefs.append('FORCE_NO_LONG_DOUBLE_FORMATTING')
+
             target_f = open(target,'a')
             for d in moredefs:
                 if isinstance(d,str):



More information about the Numpy-svn mailing list