https://github.com/python/cpython/commit/927eb448aad6436d794ec9f55780013e25609600
commit: 927eb448aad6436d794ec9f55780013e25609600
branch: main
author: Victor Stinner <[email protected]>
committer: vstinner <[email protected]>
date: 2026-01-29T13:50:07+01:00
summary:
gh-144309: Build Python with POSIX 2024 (#144310)
On FreeBSD, the ppoll() function is only visible if the POSIX version
is 2024 or newer.
files:
A Misc/NEWS.d/next/Build/2026-01-28-19-04-12.gh-issue-144309.3sMFOh.rst
M configure
M configure.ac
M pyconfig.h.in
diff --git
a/Misc/NEWS.d/next/Build/2026-01-28-19-04-12.gh-issue-144309.3sMFOh.rst
b/Misc/NEWS.d/next/Build/2026-01-28-19-04-12.gh-issue-144309.3sMFOh.rst
new file mode 100644
index 00000000000000..c64ef494d27380
--- /dev/null
+++ b/Misc/NEWS.d/next/Build/2026-01-28-19-04-12.gh-issue-144309.3sMFOh.rst
@@ -0,0 +1 @@
+Build Python with POSIX 2024, instead of POSIX 2008. Patch by Victor Stinner.
diff --git a/configure b/configure
index 30e35a0f55292a..cd8983683333cd 100755
--- a/configure
+++ b/configure
@@ -4757,9 +4757,9 @@ esac
if test $define_xopen_source = yes
then
- # X/Open 7, incorporating POSIX.1-2008
+ # X/Open 8, incorporating POSIX.1-2024
-printf "%s\n" "#define _XOPEN_SOURCE 700" >>confdefs.h
+printf "%s\n" "#define _XOPEN_SOURCE 800" >>confdefs.h
# On Tru64 Unix 4.0F, defining _XOPEN_SOURCE also requires
@@ -4771,7 +4771,7 @@ printf "%s\n" "#define _XOPEN_SOURCE_EXTENDED 1"
>>confdefs.h
-printf "%s\n" "#define _POSIX_C_SOURCE 200809L" >>confdefs.h
+printf "%s\n" "#define _POSIX_C_SOURCE 202405L" >>confdefs.h
fi
diff --git a/configure.ac b/configure.ac
index bc63d651f58065..e9b45d459fee2a 100644
--- a/configure.ac
+++ b/configure.ac
@@ -916,8 +916,8 @@ esac
if test $define_xopen_source = yes
then
- # X/Open 7, incorporating POSIX.1-2008
- AC_DEFINE([_XOPEN_SOURCE], [700],
+ # X/Open 8, incorporating POSIX.1-2024
+ AC_DEFINE([_XOPEN_SOURCE], [800],
[Define to the level of X/Open that your system supports])
# On Tru64 Unix 4.0F, defining _XOPEN_SOURCE also requires
@@ -927,8 +927,8 @@ then
AC_DEFINE([_XOPEN_SOURCE_EXTENDED], [1],
[Define to activate Unix95-and-earlier features])
- AC_DEFINE([_POSIX_C_SOURCE], [200809L],
- [Define to activate features from IEEE Stds 1003.1-2008])
+ AC_DEFINE([_POSIX_C_SOURCE], [202405L],
+ [Define to activate features from IEEE Std 1003.1-2024])
fi
# On HP-UX mbstate_t requires _INCLUDE__STDC_A1_SOURCE
diff --git a/pyconfig.h.in b/pyconfig.h.in
index 3d901e01fe03c8..e2009b2d9ee57e 100644
--- a/pyconfig.h.in
+++ b/pyconfig.h.in
@@ -2042,7 +2042,7 @@
/* Define on NetBSD to activate all library features */
#undef _NETBSD_SOURCE
-/* Define to activate features from IEEE Stds 1003.1-2008 */
+/* Define to activate features from IEEE Std 1003.1-2024 */
#undef _POSIX_C_SOURCE
/* Define if you have POSIX threads, and your system does not define that. */
_______________________________________________
Python-checkins mailing list -- [email protected]
To unsubscribe send an email to [email protected]
https://mail.python.org/mailman3//lists/python-checkins.python.org
Member address: [email protected]