Skip to content

Commit

Permalink
Merge pull request #22882 from mattip/freebsd
Browse files Browse the repository at this point in the history
MAINT: restore npymath implementations needed for freebsd
  • Loading branch information
charris committed Dec 25, 2022
2 parents 2b9851b + c29b0e0 commit c64e171
Show file tree
Hide file tree
Showing 5 changed files with 470 additions and 19 deletions.
19 changes: 19 additions & 0 deletions numpy/core/config.h.in
Expand Up @@ -90,6 +90,25 @@
#mesondefine HAVE_CLOGL
#mesondefine HAVE_CPOWL
#mesondefine HAVE_CSQRTL
/* FreeBSD */
#mesondefine HAVE_CSINF
#mesondefine HAVE_CSINHF
#mesondefine HAVE_CCOSF
#mesondefine HAVE_CCOSHF
#mesondefine HAVE_CTANF
#mesondefine HAVE_CTANHF
#mesondefine HAVE_CSIN
#mesondefine HAVE_CSINH
#mesondefine HAVE_CCOS
#mesondefine HAVE_CCOSH
#mesondefine HAVE_CTAN
#mesondefine HAVE_CTANH
#mesondefine HAVE_CSINL
#mesondefine HAVE_CSINHL
#mesondefine HAVE_CCOSL
#mesondefine HAVE_CCOSHL
#mesondefine HAVE_CTANL
#mesondefine HAVE_CTANHL

#mesondefine NPY_CAN_LINK_SVML
#mesondefine NPY_RELAXED_STRIDES_DEBUG
Expand Down
6 changes: 5 additions & 1 deletion numpy/core/meson.build
Expand Up @@ -147,7 +147,11 @@ endforeach

c99_complex_funcs = [
'cabs', 'cacos', 'cacosh', 'carg', 'casin', 'casinh', 'catan',
'catanh', 'cexp', 'clog', 'cpow', 'csqrt'
'catanh', 'cexp', 'clog', 'cpow', 'csqrt',
# The long double variants (like csinl) should be mandatory on C11,
# but are missing in FreeBSD. Issue gh-22850
'csin', 'csinh', 'ccos', 'ccosh', 'ctan', 'ctanh',

]
foreach func: c99_complex_funcs
func_single = func + 'f'
Expand Down
4 changes: 3 additions & 1 deletion numpy/core/setup_common.py
Expand Up @@ -132,7 +132,6 @@ def set_sig(sig):
"rint", "trunc", "exp2",
"copysign", "nextafter", "strtoll", "strtoull", "cbrt",
"log2", "pow", "hypot", "atan2",
"csin", "csinh", "ccos", "ccosh", "ctan", "ctanh",
"creal", "cimag", "conj"
]

Expand All @@ -154,6 +153,9 @@ def set_sig(sig):
C99_COMPLEX_FUNCS = [
"cabs", "cacos", "cacosh", "carg", "casin", "casinh", "catan",
"catanh", "cexp", "clog", "cpow", "csqrt",
# The long double variants (like csinl) should be mandatory on C11,
# but are missing in FreeBSD. Issue gh-22850
"csin", "csinh", "ccos", "ccosh", "ctan", "ctanh",
]

OPTIONAL_HEADERS = [
Expand Down

0 comments on commit c64e171

Please sign in to comment.