]> git.ipfire.org Git - thirdparty/Python/cpython.git/commitdiff
gh-144309: Build Python with POSIX 2024 (#144310)
authorVictor Stinner <vstinner@python.org>
Thu, 29 Jan 2026 12:50:07 +0000 (13:50 +0100)
committerGitHub <noreply@github.com>
Thu, 29 Jan 2026 12:50:07 +0000 (13:50 +0100)
On FreeBSD, the ppoll() function is only visible if the POSIX version
is 2024 or newer.

Misc/NEWS.d/next/Build/2026-01-28-19-04-12.gh-issue-144309.3sMFOh.rst [new file with mode: 0644]
configure
configure.ac
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 (file)
index 0000000..c64ef49
--- /dev/null
@@ -0,0 +1 @@
+Build Python with POSIX 2024, instead of POSIX 2008. Patch by Victor Stinner.
index 30e35a0f55292ad35dd9da3072983c29fd4d9655..cd8983683333cd12301ba62c30ab476ddb71487f 100755 (executable)
--- 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
 
index bc63d651f580659278537f9ecab91eb0dfee1a2a..e9b45d459fee2adc8a68ede4cc5a7bb46e73bc22 100644 (file)
@@ -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
index 3d901e01fe03c835c1ff6d83703d117fe910fc1e..e2009b2d9ee57ea13144b34574d519b85e488d0b 100644 (file)
 /* 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. */