10000 Merge pull request #25093 from mbargull/1.26.x-fix-meson-HAVE_FEATURES_H · numpy/numpy@249b5be · GitHub
[go: up one dir, main page]

Skip to content

Commit 249b5be

Browse files
authored
Merge pull request #25093 from mbargull/1.26.x-fix-meson-HAVE_FEATURES_H
BLD: Fix features.h detection for Meson builds [1.26.x Backport]
2 parents a7552b2 + aadc2c7 commit 249b5be

File tree

3 files changed

+26
-1
lines changed

3 files changed

+26
-1
lines changed

numpy/core/config.h.in

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -12,6 +12,7 @@
1212
#mesondefine HAVE___DECLSPEC_THREAD_
1313

1414
/* Optional headers */
15+
#mesondefine HAVE_FEATURES_H
1516
#mesondefine HAVE_XLOCALE_H
1617
#mesondefine HAVE_DLFCN_H
1718
#mesondefine HAVE_EXECINFO_H

numpy/core/src/common/npy_config.h

Lines changed: 22 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -160,8 +160,29 @@
160160
#undef HAVE_CACOSHL
161161

162162
#endif /* __GLIBC_PREREQ(2, 18) */
163-
#endif /* defined(__GLIBC_PREREQ) */
163+
#else /* defined(__GLIBC) */
164+
/* musl linux?, see issue #25092 */
164165

166+
#undef HAVE_CASIN
167+
#undef HAVE_CASINF
168+
#undef HAVE_CASINL
169+
#undef HAVE_CASINH
170+
#undef HAVE_CASINHF
171+
#undef HAVE_CASINHL
172+
#undef HAVE_CATAN
173+
#undef HAVE_CATANF
174+
#undef HAVE_CATANL
175+
#undef HAVE_CATANH
176+
#undef HAVE_CATANHF
177+
#undef HAVE_CATANHL
178+
#undef HAVE_CACOS
179+
#undef HAVE_CACOSF
180+
#undef HAVE_CACOSL
181+
#undef HAVE_CACOSH
182+
#undef HAVE_CACOSHF
183+
#undef HAVE_CACOSHL
184+
185+
#endif /* defined(__GLIBC) */
165186
#endif /* defined(HAVE_FEATURES_H) */
166187

167188
#endif /* NUMPY_CORE_SRC_COMMON_NPY_CONFIG_H_ */

numpy/core/tests/test_umath.py

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1712,6 +1712,9 @@ def test_arctanh(self):
17121712
assert_raises(FloatingPointError, np.arctanh,
17131713
np.array(value, dtype=dt))
17141714

1715+
# Make sure glibc < 2.18 atanh is not used, issue 25087
1716+
assert np.signbit(np.arctanh(-1j).real)
1717+
17151718
# See: https://github.com/numpy/numpy/issues/20448
17161719
@pytest.mark.xfail(
17171720
_glibc_older_than("2.17"),

0 commit comments

Comments
 (0)
0