summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-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):