From d05f6dfedaaa44ab5dfb8c0b6f4fa0c114bd4f6a Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Nikola=20Forr=C3=B3?= Date: Wed, 6 Apr 2016 14:28:01 +0200 Subject: [PATCH] Extend glibc complex trig functions blacklist to glibc < 2.18 --- numpy/core/src/private/npy_config.h | 25 ++++++++++++++----------- 1 file changed, 14 insertions(+), 11 deletions(-) diff --git a/numpy/core/src/private/npy_config.h b/numpy/core/src/private/npy_config.h index fa20eb4..5f8aa3b 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 -#define TRIG_OK __GLIBC_PREREQ(2, 16) -#else -#define TRIG_OK 0 -#endif -#if !TRIG_OK +#if defined(__GLIBC__) +#if !__GLIBC_PREREQ(2, 18) + #undef HAVE_CASIN #undef HAVE_CASINF #undef HAVE_CASINL @@ -93,9 +89,16 @@ #undef HAVE_CATANH #undef HAVE_CATANHF #undef HAVE_CATANHL -#endif -#undef TRIG_OK +#undef HAVE_CACOS +#undef HAVE_CACOSF +#undef HAVE_CACOSL +#undef HAVE_CACOSH +#undef HAVE_CACOSHF +#undef HAVE_CACOSHL + +#endif /* __GLIBC_PREREQ(2, 18) */ +#endif /* defined(__GLIBC_PREREQ) */ -#endif /* defined(__linux__) && defined(__GNUC__) */ +#endif /* defined(HAVE_FEATURES_H) */ #endif -- 2.4.11