summaryrefslogtreecommitdiff
path: root/numpy
diff options
context:
space:
mode:
Diffstat (limited to 'numpy')
-rw-r--r--numpy/core/include/numpy/numpyconfig.h8
-rw-r--r--numpy/core/setup.py4
2 files changed, 12 insertions, 0 deletions
diff --git a/numpy/core/include/numpy/numpyconfig.h b/numpy/core/include/numpy/numpyconfig.h
index 6be87b774..164fcbdbe 100644
--- a/numpy/core/include/numpy/numpyconfig.h
+++ b/numpy/core/include/numpy/numpyconfig.h
@@ -22,13 +22,21 @@
#undef NPY_SIZEOF_LONGDOUBLE
#undef NPY_SIZEOF_COMPLEX_LONGDOUBLE
+ #ifdef HAVE_LDOUBLE_IEEE_DOUBLE_LE
+ #undef HAVE_LDOUBLE_IEEE_DOUBLE_LE
+ #endif
+ #ifdef HAVE_LDOUBLE_INTEL_EXTENDED_16_BYTES_LE
+ #undef HAVE_LDOUBLE_INTEL_EXTENDED_16_BYTES_LE
+ #endif
#if defined(__arm64__)
#define NPY_SIZEOF_LONGDOUBLE 8
#define NPY_SIZEOF_COMPLEX_LONGDOUBLE 16
+ #define HAVE_LDOUBLE_IEEE_DOUBLE_LE 1
#elif defined(__x86_64)
#define NPY_SIZEOF_LONGDOUBLE 16
#define NPY_SIZEOF_COMPLEX_LONGDOUBLE 32
+ #define HAVE_LDOUBLE_INTEL_EXTENDED_16_BYTES_LE 1
#elif defined (__i386)
#define NPY_SIZEOF_LONGDOUBLE 12
#define NPY_SIZEOF_COMPLEX_LONGDOUBLE 24
diff --git a/numpy/core/setup.py b/numpy/core/setup.py
index 65aacfdad..fc09dba8b 100644
--- a/numpy/core/setup.py
+++ b/numpy/core/setup.py
@@ -530,6 +530,10 @@ def configuration(parent_package='',top_path=None):
# Generate the config.h file from moredefs
with open(target, 'w') as target_f:
+ if sys.platform == 'darwin':
+ target_f.write(
+ "/* may be overridden by numpyconfig.h on darwin */\n"
+ )
for d in moredefs:
if isinstance(d, str):
target_f.write('#define %s\n' % (d))