Skip to content
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
Original file line number Diff line number Diff line change
@@ -0,0 +1,3 @@
Fix building the :mod:`math` module on FreeBSD.
Define ``_ISOC23_SOURCE`` to make the C23 library declarations
(such as ``sinpi()`` in ``math.h``) visible.
7 changes: 7 additions & 0 deletions configure

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

6 changes: 6 additions & 0 deletions configure.ac
Original file line number Diff line number Diff line change
Expand Up @@ -935,6 +935,12 @@ then

AC_DEFINE([_POSIX_C_SOURCE], [202405L],
[Define to activate features from IEEE Std 1003.1-2024])

# Defining _POSIX_C_SOURCE and _XOPEN_SOURCE hides C23 library
# declarations on FreeBSD (e.g. sinpi() in math.h) when compiling
# with -std=c11. Defining _ISOC23_SOURCE makes them visible again.
AC_DEFINE([_ISOC23_SOURCE], [1],
[Define to activate ISO C23 library declarations])
fi

# On HP-UX mbstate_t requires _INCLUDE__STDC_A1_SOURCE
Expand Down
3 changes: 3 additions & 0 deletions pyconfig.h.in
Original file line number Diff line number Diff line change
Expand Up @@ -2143,6 +2143,9 @@
/* Define to include mbstate_t for mbrtowc */
#undef _INCLUDE__STDC_A1_SOURCE

/* Define to activate ISO C23 library declarations */
#undef _ISOC23_SOURCE

/* This must be defined on some systems to enable large file support. */
#undef _LARGEFILE_SOURCE

Expand Down
Loading