8000 Merge pull request #7092 from xdmiodz/glibc-check · numpy/numpy@d5cef01 · GitHub
[go: up one dir, main page]

Skip to content

Commit d5cef01

Browse files
committed
Merge pull request #7092 from xdmiodz/glibc-check
BLD: fix compilation on non glibc-Linuxes
2 parents 5e2f1a3 + f189e2a commit d5cef01

File tree

1 file changed

+8
-11
lines changed

1 file changed

+8
-11
lines changed

numpy/core/src/private/npy_config.h

Lines changed: 8 additions & 11 deletions
Original file line numberDiff line numberDiff line change
@@ -70,17 +70,13 @@
7070
< 8000 span class=pl-k>#endif /* defined(_MSC_VER) && defined(__INTEL_COMPILER) */
7171

7272

73-
/* Disable broken gnu trig functions on linux */
74-
#if defined(__linux__) && defined(__GNUC__)
75-
73+
/* Disable broken gnu trig functions */
7674
#if defined(HAVE_FEATURES_H)
7775
#include <features.h>
78-
#define TRIG_OK __GLIBC_PREREQ(2, 16)
79-
#else
80-
#define TRIG_OK 0
81-
#endif
8276

83-
#if !TRIG_OK
77+
#if defined(__GLIBC__)
78+
#if !__GLIBC_PREREQ(2, 16)
79+
8480
#undef HAVE_CASIN
8581
#undef HAVE_CASINF
8682
#undef HAVE_CASINL
@@ -99,9 +95,10 @@
9995
#undef HAVE_CACOSH
10096
#undef HAVE_CACOSHF
10197
#undef HAVE_CACOSHL
102-
#endif
103-
#undef TRIG_OK
10498

105-
#endif /* defined(__linux__) && defined(__GNUC__) */
99+
#endif /* __GLIBC_PREREQ(2, 16) */
100+
#endif /* defined(__GLIBC_PREREQ) */
101+
102+
#endif /* defined(HAVE_FEATURES_H) */
106103

107104
#endif

0 commit comments

Comments
 (0)
0