summaryrefslogtreecommitdiff
path: root/numpy
diff options
context:
space:
mode:
authorDavid Cournapeau <cournape@gmail.com>2008-12-29 03:22:35 +0000
committerDavid Cournapeau <cournape@gmail.com>2008-12-29 03:22:35 +0000
commitaf03484647c47d37378ffa7b213bd438f79b0e21 (patch)
treecddfa3956dca9f8a259834b9fb9907ad0d1b61e0 /numpy
parentc2c210a6599c50c958564d4bd4eeb6b67dfe551b (diff)
downloadnumpy-af03484647c47d37378ffa7b213bd438f79b0e21.tar.gz
Define FORCE_NO_LONG_DOUBLE_FORMATTING on win32.
Diffstat (limited to 'numpy')
-rw-r--r--numpy/core/SConscript4
-rw-r--r--numpy/core/setup.py8
2 files changed, 12 insertions, 0 deletions
diff --git a/numpy/core/SConscript b/numpy/core/SConscript
index 70d56c902..b611c04c9 100644
--- a/numpy/core/SConscript
+++ b/numpy/core/SConscript
@@ -211,6 +211,10 @@ if sys.platform=='win32' or os.name=='nt':
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
#--------------
diff --git a/numpy/core/setup.py b/numpy/core/setup.py
index b037af1b6..02814c43a 100644
--- a/numpy/core/setup.py
+++ b/numpy/core/setup.py
@@ -187,6 +187,14 @@ def configuration(parent_package='',top_path=None):
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):