summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorCharles Harris <charlesr.harris@gmail.com>2013-01-05 15:01:45 -0700
committerCharles Harris <charlesr.harris@gmail.com>2013-01-05 15:01:45 -0700
commitd2122ea1f458e9429b692111238f7b9f4a852db2 (patch)
tree5d7db0b455016e20fe1db5ac8ae6956775aaf3cb
parente6d6042b471cd84b6c4428a4085c58608bff99a7 (diff)
downloadnumpy-d2122ea1f458e9429b692111238f7b9f4a852db2.tar.gz
BUG: Fixup use of undefined macros and remove redundant code.
The npy_config.h file used SIZEOF_DOUBLE and SIZEOF_LONG_DOUBLE, neither of which was defined in the included config.h file. That was fixed by including numpyconfig.h. Doing so made the code dealing with Apple type sizes redundant as it is already present in numpyconfig.h, so it was removed.
-rw-r--r--numpy/core/src/private/npy_config.h20
1 files changed, 2 insertions, 18 deletions
diff --git a/numpy/core/src/private/npy_config.h b/numpy/core/src/private/npy_config.h
index 237dc94ab..4ccaae517 100644
--- a/numpy/core/src/private/npy_config.h
+++ b/numpy/core/src/private/npy_config.h
@@ -2,6 +2,7 @@
#define _NPY_NPY_CONFIG_H_
#include "config.h"
+#include "_numpyconfig.h"
/* Disable broken MS math functions */
#if defined(_MSC_VER) || defined(__MINGW32_VERSION)
@@ -10,7 +11,7 @@
#endif
/* Safe to use ldexp and frexp for long double for MSVC builds */
-#if (SIZEOF_LONG_DOUBLE == SIZEOF_DOUBLE) || defined(_MSC_VER)
+#if (NPY_SIZEOF_LONGDOUBLE == NPY_SIZEOF_DOUBLE) || defined(_MSC_VER)
#ifdef HAVE_LDEXP
#define HAVE_LDEXPL 1
#endif
@@ -24,21 +25,4 @@
#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