summaryrefslogtreecommitdiff
path: root/numpy
diff options
context:
space:
mode:
authorDavid Cournapeau <cournape@gmail.com>2009-11-27 19:01:21 +0000
committerDavid Cournapeau <cournape@gmail.com>2009-11-27 19:01:21 +0000
commitf962cfd94bd547edac39112657661a704c587907 (patch)
treed051e8110ba2aa87f8943e62c509725e95d49a33 /numpy
parent4e632a32de64f0d197a87519736713f3920dc0fb (diff)
downloadnumpy-f962cfd94bd547edac39112657661a704c587907.tar.gz
BUG: fix arch-dependent SIZEOF in npy_config.h for mac os x.
Diffstat (limited to 'numpy')
-rw-r--r--numpy/core/src/private/npy_config.h17
1 files changed, 17 insertions, 0 deletions
diff --git a/numpy/core/src/private/npy_config.h b/numpy/core/src/private/npy_config.h
index adbd9cc7e..e16401496 100644
--- a/numpy/core/src/private/npy_config.h
+++ b/numpy/core/src/private/npy_config.h
@@ -14,4 +14,21 @@
#undef HAVE_ATAN2
#endif
+/*
+ * On Mac OS X, because there is only one configuration stage for all the archs
+ * in universal builds, any macro which depends on the arch needs to be
+ * harcoded
+ */
+#ifdef __APPLE__
+ #undef SIZEOF_LONG
+ #undef SIZEOF_PY_INTPTR_T
+
+ #ifdef __LP64__
+ #define SIZEOF_LONG 8
+ #define SIZEOF_PY_INTPTR_T 8
+ #else
+ #define SIZEOF_LONG 4
+ #define SIZEOF_PY_INTPTR_T 4
+ #endif
+#endif
#endif