summaryrefslogtreecommitdiff
path: root/numpy
diff options
context:
space:
mode:
authorCharles Harris <charlesr.harris@gmail.com>2016-01-21 21:57:44 -0700
committerCharles Harris <charlesr.harris@gmail.com>2016-01-21 21:57:44 -0700
commitd5cef016b336659a2288cefe8aa6f60cf340d35c (patch)
tree010c3ef6e656c4615aae0a6c6488a569b82876f6 /numpy
parent5e2f1a3619d033f77f982679f8b2128e1696e771 (diff)
parentf189e2adcdd05596a6f65b4097e2f12f9c0d9ce9 (diff)
downloadnumpy-d5cef016b336659a2288cefe8aa6f60cf340d35c.tar.gz
Merge pull request #7092 from xdmiodz/glibc-check
BLD: fix compilation on non glibc-Linuxes
Diffstat (limited to 'numpy')
-rw-r--r--numpy/core/src/private/npy_config.h19
1 files changed, 8 insertions, 11 deletions
diff --git a/numpy/core/src/private/npy_config.h b/numpy/core/src/private/npy_config.h
index eb9c1e19d..3d1470609 100644
--- a/numpy/core/src/private/npy_config.h
+++ b/numpy/core/src/private/npy_config.h
@@ -70,17 +70,13 @@
#endif /* defined(_MSC_VER) && defined(__INTEL_COMPILER) */
-/* Disable broken gnu trig functions on linux */
-#if defined(__linux__) && defined(__GNUC__)
-
+/* Disable broken gnu trig functions */
#if defined(HAVE_FEATURES_H)
#include <features.h>
-#define TRIG_OK __GLIBC_PREREQ(2, 16)
-#else
-#define TRIG_OK 0
-#endif
-#if !TRIG_OK
+#if defined(__GLIBC__)
+#if !__GLIBC_PREREQ(2, 16)
+
#undef HAVE_CASIN
#undef HAVE_CASINF
#undef HAVE_CASINL
@@ -99,9 +95,10 @@
#undef HAVE_CACOSH
#undef HAVE_CACOSHF
#undef HAVE_CACOSHL
-#endif
-#undef TRIG_OK
-#endif /* defined(__linux__) && defined(__GNUC__) */
+#endif /* __GLIBC_PREREQ(2, 16) */
+#endif /* defined(__GLIBC_PREREQ) */
+
+#endif /* defined(HAVE_FEATURES_H) */
#endif