Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Sync npy_math_complex with numpy main & minor meson improvements #2

Merged
merged 1 commit into from
Feb 2, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
1 change: 1 addition & 0 deletions src/include/numpy/npymath/_config.h.in
Original file line number Diff line number Diff line change
@@ -1,4 +1,5 @@
#mesondefine NPYMATH_HAVE_ENDIAN_H
#mesondefine NPYMATH_HAVE_SYS_ENDIAN_H

#mesondefine NPYMATH_SIZEOF_SHORT
#mesondefine NPYMATH_SIZEOF_INT
Expand Down
9 changes: 0 additions & 9 deletions src/meson.build
Original file line number Diff line number Diff line change
Expand Up @@ -120,15 +120,6 @@ foreach func: c99_complex_funcs
endif
endforeach

# We require C99 so these should always be found at build time. But for
# libnpymath as a C99 compat layer, these may still be relevant.
c99_macros = ['isfinite', 'isinf', 'isnan', 'signbit']
foreach macro: c99_macros
if cc.has_function(macro, prefix: '#include <math.h>', dependencies: m_dep)
cdata.set10('NPYMATH_HAVE_DECL_' + macro.to_upper(), true)
endif
endforeach

if cc.has_header('features.h')
cdata.set10('NPYMATH_HAVE_FEATURES_H', true)
endif
Expand Down
4 changes: 3 additions & 1 deletion src/npy_math_complex.c.src
Original file line number Diff line number Diff line change
Expand Up @@ -196,7 +196,9 @@ npy_carg@c@(@ctype@ z)
#define SCALED_CEXP_LOWERL 11357.216553474703895L
#define SCALED_CEXP_UPPERL 22756.021937783004509L

#if !defined(NPYMATH_HAVE_CEXP@C@)
#if !defined(NPYMATH_HAVE_CSINH@C@) || \
!defined(NPYMATH_HAVE_CCOSH@C@) || \
!defined(NPYMATH_HAVE_CEXP@C@)

static
@ctype@
Expand Down
Loading