mirror of
https://github.com/pyenv/pyenv.git
synced 2026-10-02 23:41:06 +09:00
Backport XCode 27 support to 3.12 (#3547)
* Adapted upstream fix (3.13.15):e86913423band dependency patch (3.13.14):7d265b6013
This commit is contained in:
parent
6c97017989
commit
3d66ee1fdb
@ -0,0 +1,119 @@
|
||||
From ac12d63bf188f9497f8453c0447b9bc599acbf22 Mon Sep 17 00:00:00 2001
|
||||
From: Ned Deily <nad@python.org>
|
||||
Date: Wed, 5 Aug 2026 10:30:17 +0300
|
||||
Subject: [PATCH] (downstream) [3.12] gh-153711: Avoid use of dup3 and pipe2
|
||||
calls introduced in macOS 27 (#155211)
|
||||
|
||||
---
|
||||
...-08-05-02-02-33.gh-issue-153711.pO9fFb.rst | 3 ++
|
||||
configure | 33 +++++++++++--------
|
||||
configure.ac | 11 +++++--
|
||||
3 files changed, 32 insertions(+), 15 deletions(-)
|
||||
create mode 100644 Misc/NEWS.d/next/macOS/2026-08-05-02-02-33.gh-issue-153711.pO9fFb.rst
|
||||
|
||||
diff --git a/Misc/NEWS.d/next/macOS/2026-08-05-02-02-33.gh-issue-153711.pO9fFb.rst b/Misc/NEWS.d/next/macOS/2026-08-05-02-02-33.gh-issue-153711.pO9fFb.rst
|
||||
new file mode 100644
|
||||
index 00000000000..90804c179a4
|
||||
--- /dev/null
|
||||
+++ b/Misc/NEWS.d/next/macOS/2026-08-05-02-02-33.gh-issue-153711.pO9fFb.rst
|
||||
@@ -0,0 +1,3 @@
|
||||
+On macOS, do not attempt to use the :manpage:`dup3(2)` and
|
||||
+:manpage:`pipe2(2)` system calls introduced in
|
||||
+macOS 27 to prevent problems when running on older systems.
|
||||
diff --git a/configure b/configure
|
||||
index b6f90bcd8c7..b93aab935ce 100755
|
||||
--- a/configure
|
||||
+++ b/configure
|
||||
@@ -17552,13 +17552,7 @@ fi
|
||||
ac_fn_c_check_func "$LINENO" "dup" "ac_cv_func_dup"
|
||||
if test "x$ac_cv_func_dup" = xyes
|
||||
then :
|
||||
- printf "%s\n" "#define HAVE_DUP 1" >>confdefs.h
|
||||
-
|
||||
-fi
|
||||
-ac_fn_c_check_func "$LINENO" "dup3" "ac_cv_func_dup3"
|
||||
-if test "x$ac_cv_func_dup3" = xyes
|
||||
-then :
|
||||
- printf "%s\n" "#define HAVE_DUP3 1" >>confdefs.h
|
||||
+ printf '%s\n' "#define HAVE_DUP 1" >>confdefs.h
|
||||
|
||||
fi
|
||||
ac_fn_c_check_func "$LINENO" "execv" "ac_cv_func_execv"
|
||||
@@ -18028,12 +18022,6 @@ if test "x$ac_cv_func_pipe" = xyes
|
||||
then :
|
||||
printf "%s\n" "#define HAVE_PIPE 1" >>confdefs.h
|
||||
|
||||
-fi
|
||||
-ac_fn_c_check_func "$LINENO" "pipe2" "ac_cv_func_pipe2"
|
||||
-if test "x$ac_cv_func_pipe2" = xyes
|
||||
-then :
|
||||
- printf "%s\n" "#define HAVE_PIPE2 1" >>confdefs.h
|
||||
-
|
||||
fi
|
||||
ac_fn_c_check_func "$LINENO" "plock" "ac_cv_func_plock"
|
||||
if test "x$ac_cv_func_plock" = xyes
|
||||
@@ -18608,6 +18596,25 @@ fi
|
||||
|
||||
fi
|
||||
|
||||
+# macOS introduced dup3 and pipe2 in macOS 27, late in the
|
||||
+# lifetime of this version of Python. Rather than adding weaklinking
|
||||
+# support for them, just continue to ignore them.
|
||||
+if test "$ac_sys_system" != "Darwin"; then
|
||||
+ ac_fn_c_check_func "$LINENO" "dup3" "ac_cv_func_dup3"
|
||||
+if test "x$ac_cv_func_dup3" = xyes
|
||||
+then :
|
||||
+ printf '%s\n' "#define HAVE_DUP3 1" >>confdefs.h
|
||||
+
|
||||
+fi
|
||||
+ac_fn_c_check_func "$LINENO" "pipe2" "ac_cv_func_pipe2"
|
||||
+if test "x$ac_cv_func_pipe2" = xyes
|
||||
+then :
|
||||
+ printf '%s\n' "#define HAVE_PIPE2 1" >>confdefs.h
|
||||
+
|
||||
+fi
|
||||
+
|
||||
+fi
|
||||
+
|
||||
{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for $CC options needed to detect all undeclared functions" >&5
|
||||
printf %s "checking for $CC options needed to detect all undeclared functions... " >&6; }
|
||||
if test ${ac_cv_c_undeclared_builtin_options+y}
|
||||
diff --git a/configure.ac b/configure.ac
|
||||
index ba768aea930..92049fb2889 100644
|
||||
--- a/configure.ac
|
||||
+++ b/configure.ac
|
||||
@@ -4860,7 +4860,7 @@ fi
|
||||
# checks for library functions
|
||||
AC_CHECK_FUNCS([ \
|
||||
accept4 alarm bind_textdomain_codeset chmod chown clock close_range confstr \
|
||||
- copy_file_range ctermid dup dup3 execv explicit_bzero explicit_memset \
|
||||
+ copy_file_range ctermid dup execv explicit_bzero explicit_memset \
|
||||
faccessat fchmod fchmodat fchown fchownat fdopendir fdwalk fexecve \
|
||||
fork fork1 fpathconf fstatat ftime ftruncate futimens futimes futimesat \
|
||||
gai_strerror getegid getentropy geteuid getgid getgrgid getgrgid_r \
|
||||
@@ -4870,7 +4870,7 @@ AC_CHECK_FUNCS([ \
|
||||
getspnam getuid getwd if_nameindex initgroups kill killpg lchown linkat \
|
||||
lockf lstat lutimes madvise mbrtowc memrchr mkdirat mkfifo mkfifoat \
|
||||
mknod mknodat mktime mmap mremap nice openat opendir pathconf pause pipe \
|
||||
- pipe2 plock poll posix_fadvise posix_fallocate posix_spawn posix_spawnp \
|
||||
+ plock poll posix_fadvise posix_fallocate posix_spawn posix_spawnp \
|
||||
pread preadv preadv2 pthread_condattr_setclock pthread_init pthread_kill \
|
||||
pwrite pwritev pwritev2 readlink readlinkat readv realpath renameat \
|
||||
rtpSpawn sched_get_priority_max sched_rr_get_interval sched_setaffinity \
|
||||
@@ -4892,6 +4892,13 @@ if test "$MACHDEP" != linux; then
|
||||
AC_CHECK_FUNCS([lchmod])
|
||||
fi
|
||||
|
||||
+# macOS introduced dup3 and pipe2 in macOS 27, late in the
|
||||
+# lifetime of this version of Python. Rather than adding weaklinking
|
||||
+# support for them, just continue to ignore them.
|
||||
+if test "$ac_sys_system" != "Darwin"; then
|
||||
+ AC_CHECK_FUNCS([dup3 pipe2])
|
||||
+fi
|
||||
+
|
||||
AC_CHECK_DECL([dirfd],
|
||||
[AC_DEFINE([HAVE_DIRFD], [1],
|
||||
[Define if you have the 'dirfd' function or macro.])],
|
||||
--
|
||||
2.55.0.windows.3
|
||||
|
||||
@ -0,0 +1,119 @@
|
||||
From a4b6c2946c6be5b732a3a3d30b8ac75673bc71e6 Mon Sep 17 00:00:00 2001
|
||||
From: Ned Deily <nad@python.org>
|
||||
Date: Wed, 5 Aug 2026 10:30:17 +0300
|
||||
Subject: [PATCH] (downstream) [3.12] gh-153711: Avoid use of dup3 and pipe2
|
||||
calls introduced in macOS 27 (#155211)
|
||||
|
||||
---
|
||||
...-08-05-02-02-33.gh-issue-153711.pO9fFb.rst | 3 ++
|
||||
configure | 33 +++++++++++--------
|
||||
configure.ac | 11 +++++--
|
||||
3 files changed, 32 insertions(+), 15 deletions(-)
|
||||
create mode 100644 Misc/NEWS.d/next/macOS/2026-08-05-02-02-33.gh-issue-153711.pO9fFb.rst
|
||||
|
||||
diff --git a/Misc/NEWS.d/next/macOS/2026-08-05-02-02-33.gh-issue-153711.pO9fFb.rst b/Misc/NEWS.d/next/macOS/2026-08-05-02-02-33.gh-issue-153711.pO9fFb.rst
|
||||
new file mode 100644
|
||||
index 00000000000..90804c179a4
|
||||
--- /dev/null
|
||||
+++ b/Misc/NEWS.d/next/macOS/2026-08-05-02-02-33.gh-issue-153711.pO9fFb.rst
|
||||
@@ -0,0 +1,3 @@
|
||||
+On macOS, do not attempt to use the :manpage:`dup3(2)` and
|
||||
+:manpage:`pipe2(2)` system calls introduced in
|
||||
+macOS 27 to prevent problems when running on older systems.
|
||||
diff --git a/configure b/configure
|
||||
index 99dd1fe5958..52c4790ac74 100755
|
||||
--- a/configure
|
||||
+++ b/configure
|
||||
@@ -17566,13 +17566,7 @@ fi
|
||||
ac_fn_c_check_func "$LINENO" "dup" "ac_cv_func_dup"
|
||||
if test "x$ac_cv_func_dup" = xyes
|
||||
then :
|
||||
- printf "%s\n" "#define HAVE_DUP 1" >>confdefs.h
|
||||
-
|
||||
-fi
|
||||
-ac_fn_c_check_func "$LINENO" "dup3" "ac_cv_func_dup3"
|
||||
-if test "x$ac_cv_func_dup3" = xyes
|
||||
-then :
|
||||
- printf "%s\n" "#define HAVE_DUP3 1" >>confdefs.h
|
||||
+ printf '%s\n' "#define HAVE_DUP 1" >>confdefs.h
|
||||
|
||||
fi
|
||||
ac_fn_c_check_func "$LINENO" "execv" "ac_cv_func_execv"
|
||||
@@ -18042,12 +18036,6 @@ if test "x$ac_cv_func_pipe" = xyes
|
||||
then :
|
||||
printf "%s\n" "#define HAVE_PIPE 1" >>confdefs.h
|
||||
|
||||
-fi
|
||||
-ac_fn_c_check_func "$LINENO" "pipe2" "ac_cv_func_pipe2"
|
||||
-if test "x$ac_cv_func_pipe2" = xyes
|
||||
-then :
|
||||
- printf "%s\n" "#define HAVE_PIPE2 1" >>confdefs.h
|
||||
-
|
||||
fi
|
||||
ac_fn_c_check_func "$LINENO" "plock" "ac_cv_func_plock"
|
||||
if test "x$ac_cv_func_plock" = xyes
|
||||
@@ -18622,6 +18610,25 @@ fi
|
||||
|
||||
fi
|
||||
|
||||
+# macOS introduced dup3 and pipe2 in macOS 27, late in the
|
||||
+# lifetime of this version of Python. Rather than adding weaklinking
|
||||
+# support for them, just continue to ignore them.
|
||||
+if test "$ac_sys_system" != "Darwin"; then
|
||||
+ ac_fn_c_check_func "$LINENO" "dup3" "ac_cv_func_dup3"
|
||||
+if test "x$ac_cv_func_dup3" = xyes
|
||||
+then :
|
||||
+ printf '%s\n' "#define HAVE_DUP3 1" >>confdefs.h
|
||||
+
|
||||
+fi
|
||||
+ac_fn_c_check_func "$LINENO" "pipe2" "ac_cv_func_pipe2"
|
||||
+if test "x$ac_cv_func_pipe2" = xyes
|
||||
+then :
|
||||
+ printf '%s\n' "#define HAVE_PIPE2 1" >>confdefs.h
|
||||
+
|
||||
+fi
|
||||
+
|
||||
+fi
|
||||
+
|
||||
{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for $CC options needed to detect all undeclared functions" >&5
|
||||
printf %s "checking for $CC options needed to detect all undeclared functions... " >&6; }
|
||||
if test ${ac_cv_c_undeclared_builtin_options+y}
|
||||
diff --git a/configure.ac b/configure.ac
|
||||
index bd2be94b47c..45212bd6040 100644
|
||||
--- a/configure.ac
|
||||
+++ b/configure.ac
|
||||
@@ -4870,7 +4870,7 @@ fi
|
||||
# checks for library functions
|
||||
AC_CHECK_FUNCS([ \
|
||||
accept4 alarm bind_textdomain_codeset chmod chown clock close_range confstr \
|
||||
- copy_file_range ctermid dup dup3 execv explicit_bzero explicit_memset \
|
||||
+ copy_file_range ctermid dup execv explicit_bzero explicit_memset \
|
||||
faccessat fchmod fchmodat fchown fchownat fdopendir fdwalk fexecve \
|
||||
fork fork1 fpathconf fstatat ftime ftruncate futimens futimes futimesat \
|
||||
gai_strerror getegid getentropy geteuid getgid getgrgid getgrgid_r \
|
||||
@@ -4880,7 +4880,7 @@ AC_CHECK_FUNCS([ \
|
||||
getspnam getuid getwd if_nameindex initgroups kill killpg lchown linkat \
|
||||
lockf lstat lutimes madvise mbrtowc memrchr mkdirat mkfifo mkfifoat \
|
||||
mknod mknodat mktime mmap mremap nice openat opendir pathconf pause pipe \
|
||||
- pipe2 plock poll posix_fadvise posix_fallocate posix_spawn posix_spawnp \
|
||||
+ plock poll posix_fadvise posix_fallocate posix_spawn posix_spawnp \
|
||||
pread preadv preadv2 pthread_condattr_setclock pthread_init pthread_kill \
|
||||
pwrite pwritev pwritev2 readlink readlinkat readv realpath renameat \
|
||||
rtpSpawn sched_get_priority_max sched_rr_get_interval sched_setaffinity \
|
||||
@@ -4902,6 +4902,13 @@ if test "$MACHDEP" != linux; then
|
||||
AC_CHECK_FUNCS([lchmod])
|
||||
fi
|
||||
|
||||
+# macOS introduced dup3 and pipe2 in macOS 27, late in the
|
||||
+# lifetime of this version of Python. Rather than adding weaklinking
|
||||
+# support for them, just continue to ignore them.
|
||||
+if test "$ac_sys_system" != "Darwin"; then
|
||||
+ AC_CHECK_FUNCS([dup3 pipe2])
|
||||
+fi
|
||||
+
|
||||
AC_CHECK_DECL([dirfd],
|
||||
[AC_DEFINE([HAVE_DIRFD], [1],
|
||||
[Define if you have the 'dirfd' function or macro.])],
|
||||
--
|
||||
2.55.0.windows.3
|
||||
|
||||
@ -0,0 +1,119 @@
|
||||
From 0e76b1b0219d61d389ddc4516fceb339608c6bf5 Mon Sep 17 00:00:00 2001
|
||||
From: Ned Deily <nad@python.org>
|
||||
Date: Wed, 5 Aug 2026 10:30:17 +0300
|
||||
Subject: [PATCH] (downstream) [3.12] gh-153711: Avoid use of dup3 and pipe2
|
||||
calls introduced in macOS 27 (#155211)
|
||||
|
||||
---
|
||||
...-08-05-02-02-33.gh-issue-153711.pO9fFb.rst | 3 ++
|
||||
configure | 33 +++++++++++--------
|
||||
configure.ac | 11 +++++--
|
||||
3 files changed, 32 insertions(+), 15 deletions(-)
|
||||
create mode 100644 Misc/NEWS.d/next/macOS/2026-08-05-02-02-33.gh-issue-153711.pO9fFb.rst
|
||||
|
||||
diff --git a/Misc/NEWS.d/next/macOS/2026-08-05-02-02-33.gh-issue-153711.pO9fFb.rst b/Misc/NEWS.d/next/macOS/2026-08-05-02-02-33.gh-issue-153711.pO9fFb.rst
|
||||
new file mode 100644
|
||||
index 00000000000..90804c179a4
|
||||
--- /dev/null
|
||||
+++ b/Misc/NEWS.d/next/macOS/2026-08-05-02-02-33.gh-issue-153711.pO9fFb.rst
|
||||
@@ -0,0 +1,3 @@
|
||||
+On macOS, do not attempt to use the :manpage:`dup3(2)` and
|
||||
+:manpage:`pipe2(2)` system calls introduced in
|
||||
+macOS 27 to prevent problems when running on older systems.
|
||||
diff --git a/configure b/configure
|
||||
index 89edc42f45c..e099c5ad55a 100755
|
||||
--- a/configure
|
||||
+++ b/configure
|
||||
@@ -17614,13 +17614,7 @@ fi
|
||||
ac_fn_c_check_func "$LINENO" "dup" "ac_cv_func_dup"
|
||||
if test "x$ac_cv_func_dup" = xyes
|
||||
then :
|
||||
- printf "%s\n" "#define HAVE_DUP 1" >>confdefs.h
|
||||
-
|
||||
-fi
|
||||
-ac_fn_c_check_func "$LINENO" "dup3" "ac_cv_func_dup3"
|
||||
-if test "x$ac_cv_func_dup3" = xyes
|
||||
-then :
|
||||
- printf "%s\n" "#define HAVE_DUP3 1" >>confdefs.h
|
||||
+ printf '%s\n' "#define HAVE_DUP 1" >>confdefs.h
|
||||
|
||||
fi
|
||||
ac_fn_c_check_func "$LINENO" "execv" "ac_cv_func_execv"
|
||||
@@ -18090,12 +18084,6 @@ if test "x$ac_cv_func_pipe" = xyes
|
||||
then :
|
||||
printf "%s\n" "#define HAVE_PIPE 1" >>confdefs.h
|
||||
|
||||
-fi
|
||||
-ac_fn_c_check_func "$LINENO" "pipe2" "ac_cv_func_pipe2"
|
||||
-if test "x$ac_cv_func_pipe2" = xyes
|
||||
-then :
|
||||
- printf "%s\n" "#define HAVE_PIPE2 1" >>confdefs.h
|
||||
-
|
||||
fi
|
||||
ac_fn_c_check_func "$LINENO" "plock" "ac_cv_func_plock"
|
||||
if test "x$ac_cv_func_plock" = xyes
|
||||
@@ -18670,6 +18658,25 @@ fi
|
||||
|
||||
fi
|
||||
|
||||
+# macOS introduced dup3 and pipe2 in macOS 27, late in the
|
||||
+# lifetime of this version of Python. Rather than adding weaklinking
|
||||
+# support for them, just continue to ignore them.
|
||||
+if test "$ac_sys_system" != "Darwin"; then
|
||||
+ ac_fn_c_check_func "$LINENO" "dup3" "ac_cv_func_dup3"
|
||||
+if test "x$ac_cv_func_dup3" = xyes
|
||||
+then :
|
||||
+ printf '%s\n' "#define HAVE_DUP3 1" >>confdefs.h
|
||||
+
|
||||
+fi
|
||||
+ac_fn_c_check_func "$LINENO" "pipe2" "ac_cv_func_pipe2"
|
||||
+if test "x$ac_cv_func_pipe2" = xyes
|
||||
+then :
|
||||
+ printf '%s\n' "#define HAVE_PIPE2 1" >>confdefs.h
|
||||
+
|
||||
+fi
|
||||
+
|
||||
+fi
|
||||
+
|
||||
{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for $CC options needed to detect all undeclared functions" >&5
|
||||
printf %s "checking for $CC options needed to detect all undeclared functions... " >&6; }
|
||||
if test ${ac_cv_c_undeclared_builtin_options+y}
|
||||
diff --git a/configure.ac b/configure.ac
|
||||
index 1a02d19f1b2..f2b58421d74 100644
|
||||
--- a/configure.ac
|
||||
+++ b/configure.ac
|
||||
@@ -4920,7 +4920,7 @@ fi
|
||||
# checks for library functions
|
||||
AC_CHECK_FUNCS([ \
|
||||
accept4 alarm bind_textdomain_codeset chmod chown clock close_range confstr \
|
||||
- copy_file_range ctermid dup dup3 execv explicit_bzero explicit_memset \
|
||||
+ copy_file_range ctermid dup execv explicit_bzero explicit_memset \
|
||||
faccessat fchmod fchmodat fchown fchownat fdopendir fdwalk fexecve \
|
||||
fork fork1 fpathconf fstatat ftime ftruncate futimens futimes futimesat \
|
||||
gai_strerror getegid getentropy geteuid getgid getgrgid getgrgid_r \
|
||||
@@ -4930,7 +4930,7 @@ AC_CHECK_FUNCS([ \
|
||||
getspnam getuid getwd if_nameindex initgroups kill killpg lchown linkat \
|
||||
lockf lstat lutimes madvise mbrtowc memrchr mkdirat mkfifo mkfifoat \
|
||||
mknod mknodat mktime mmap mremap nice openat opendir pathconf pause pipe \
|
||||
- pipe2 plock poll posix_fadvise posix_fallocate posix_spawn posix_spawnp \
|
||||
+ plock poll posix_fadvise posix_fallocate posix_spawn posix_spawnp \
|
||||
pread preadv preadv2 pthread_condattr_setclock pthread_init pthread_kill \
|
||||
pwrite pwritev pwritev2 readlink readlinkat readv realpath renameat \
|
||||
rtpSpawn sched_get_priority_max sched_rr_get_interval sched_setaffinity \
|
||||
@@ -4952,6 +4952,13 @@ if test "$MACHDEP" != linux; then
|
||||
AC_CHECK_FUNCS([lchmod])
|
||||
fi
|
||||
|
||||
+# macOS introduced dup3 and pipe2 in macOS 27, late in the
|
||||
+# lifetime of this version of Python. Rather than adding weaklinking
|
||||
+# support for them, just continue to ignore them.
|
||||
+if test "$ac_sys_system" != "Darwin"; then
|
||||
+ AC_CHECK_FUNCS([dup3 pipe2])
|
||||
+fi
|
||||
+
|
||||
AC_CHECK_DECL([dirfd],
|
||||
[AC_DEFINE([HAVE_DIRFD], [1],
|
||||
[Define if you have the 'dirfd' function or macro.])],
|
||||
--
|
||||
2.55.0.windows.3
|
||||
|
||||
@ -0,0 +1,119 @@
|
||||
From a4720333372f8d13138101cf9d51033eacf1d422 Mon Sep 17 00:00:00 2001
|
||||
From: Ned Deily <nad@python.org>
|
||||
Date: Wed, 5 Aug 2026 10:30:17 +0300
|
||||
Subject: [PATCH] (downstream) [3.12] gh-153711: Avoid use of dup3 and pipe2
|
||||
calls introduced in macOS 27 (#155211)
|
||||
|
||||
---
|
||||
...-08-05-02-02-33.gh-issue-153711.pO9fFb.rst | 3 ++
|
||||
configure | 33 +++++++++++--------
|
||||
configure.ac | 11 +++++--
|
||||
3 files changed, 32 insertions(+), 15 deletions(-)
|
||||
create mode 100644 Misc/NEWS.d/next/macOS/2026-08-05-02-02-33.gh-issue-153711.pO9fFb.rst
|
||||
|
||||
diff --git a/Misc/NEWS.d/next/macOS/2026-08-05-02-02-33.gh-issue-153711.pO9fFb.rst b/Misc/NEWS.d/next/macOS/2026-08-05-02-02-33.gh-issue-153711.pO9fFb.rst
|
||||
new file mode 100644
|
||||
index 00000000000..90804c179a4
|
||||
--- /dev/null
|
||||
+++ b/Misc/NEWS.d/next/macOS/2026-08-05-02-02-33.gh-issue-153711.pO9fFb.rst
|
||||
@@ -0,0 +1,3 @@
|
||||
+On macOS, do not attempt to use the :manpage:`dup3(2)` and
|
||||
+:manpage:`pipe2(2)` system calls introduced in
|
||||
+macOS 27 to prevent problems when running on older systems.
|
||||
diff --git a/configure b/configure
|
||||
index 89edc42f45c..e099c5ad55a 100755
|
||||
--- a/configure
|
||||
+++ b/configure
|
||||
@@ -17614,13 +17614,7 @@ fi
|
||||
ac_fn_c_check_func "$LINENO" "dup" "ac_cv_func_dup"
|
||||
if test "x$ac_cv_func_dup" = xyes
|
||||
then :
|
||||
- printf "%s\n" "#define HAVE_DUP 1" >>confdefs.h
|
||||
-
|
||||
-fi
|
||||
-ac_fn_c_check_func "$LINENO" "dup3" "ac_cv_func_dup3"
|
||||
-if test "x$ac_cv_func_dup3" = xyes
|
||||
-then :
|
||||
- printf "%s\n" "#define HAVE_DUP3 1" >>confdefs.h
|
||||
+ printf '%s\n' "#define HAVE_DUP 1" >>confdefs.h
|
||||
|
||||
fi
|
||||
ac_fn_c_check_func "$LINENO" "execv" "ac_cv_func_execv"
|
||||
@@ -18090,12 +18084,6 @@ if test "x$ac_cv_func_pipe" = xyes
|
||||
then :
|
||||
printf "%s\n" "#define HAVE_PIPE 1" >>confdefs.h
|
||||
|
||||
-fi
|
||||
-ac_fn_c_check_func "$LINENO" "pipe2" "ac_cv_func_pipe2"
|
||||
-if test "x$ac_cv_func_pipe2" = xyes
|
||||
-then :
|
||||
- printf "%s\n" "#define HAVE_PIPE2 1" >>confdefs.h
|
||||
-
|
||||
fi
|
||||
ac_fn_c_check_func "$LINENO" "plock" "ac_cv_func_plock"
|
||||
if test "x$ac_cv_func_plock" = xyes
|
||||
@@ -18670,6 +18658,25 @@ fi
|
||||
|
||||
fi
|
||||
|
||||
+# macOS introduced dup3 and pipe2 in macOS 27, late in the
|
||||
+# lifetime of this version of Python. Rather than adding weaklinking
|
||||
+# support for them, just continue to ignore them.
|
||||
+if test "$ac_sys_system" != "Darwin"; then
|
||||
+ ac_fn_c_check_func "$LINENO" "dup3" "ac_cv_func_dup3"
|
||||
+if test "x$ac_cv_func_dup3" = xyes
|
||||
+then :
|
||||
+ printf '%s\n' "#define HAVE_DUP3 1" >>confdefs.h
|
||||
+
|
||||
+fi
|
||||
+ac_fn_c_check_func "$LINENO" "pipe2" "ac_cv_func_pipe2"
|
||||
+if test "x$ac_cv_func_pipe2" = xyes
|
||||
+then :
|
||||
+ printf '%s\n' "#define HAVE_PIPE2 1" >>confdefs.h
|
||||
+
|
||||
+fi
|
||||
+
|
||||
+fi
|
||||
+
|
||||
{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for $CC options needed to detect all undeclared functions" >&5
|
||||
printf %s "checking for $CC options needed to detect all undeclared functions... " >&6; }
|
||||
if test ${ac_cv_c_undeclared_builtin_options+y}
|
||||
diff --git a/configure.ac b/configure.ac
|
||||
index 1a02d19f1b2..f2b58421d74 100644
|
||||
--- a/configure.ac
|
||||
+++ b/configure.ac
|
||||
@@ -4920,7 +4920,7 @@ fi
|
||||
# checks for library functions
|
||||
AC_CHECK_FUNCS([ \
|
||||
accept4 alarm bind_textdomain_codeset chmod chown clock close_range confstr \
|
||||
- copy_file_range ctermid dup dup3 execv explicit_bzero explicit_memset \
|
||||
+ copy_file_range ctermid dup execv explicit_bzero explicit_memset \
|
||||
faccessat fchmod fchmodat fchown fchownat fdopendir fdwalk fexecve \
|
||||
fork fork1 fpathconf fstatat ftime ftruncate futimens futimes futimesat \
|
||||
gai_strerror getegid getentropy geteuid getgid getgrgid getgrgid_r \
|
||||
@@ -4930,7 +4930,7 @@ AC_CHECK_FUNCS([ \
|
||||
getspnam getuid getwd if_nameindex initgroups kill killpg lchown linkat \
|
||||
lockf lstat lutimes madvise mbrtowc memrchr mkdirat mkfifo mkfifoat \
|
||||
mknod mknodat mktime mmap mremap nice openat opendir pathconf pause pipe \
|
||||
- pipe2 plock poll posix_fadvise posix_fallocate posix_spawn posix_spawnp \
|
||||
+ plock poll posix_fadvise posix_fallocate posix_spawn posix_spawnp \
|
||||
pread preadv preadv2 pthread_condattr_setclock pthread_init pthread_kill \
|
||||
pwrite pwritev pwritev2 readlink readlinkat readv realpath renameat \
|
||||
rtpSpawn sched_get_priority_max sched_rr_get_interval sched_setaffinity \
|
||||
@@ -4952,6 +4952,13 @@ if test "$MACHDEP" != linux; then
|
||||
AC_CHECK_FUNCS([lchmod])
|
||||
fi
|
||||
|
||||
+# macOS introduced dup3 and pipe2 in macOS 27, late in the
|
||||
+# lifetime of this version of Python. Rather than adding weaklinking
|
||||
+# support for them, just continue to ignore them.
|
||||
+if test "$ac_sys_system" != "Darwin"; then
|
||||
+ AC_CHECK_FUNCS([dup3 pipe2])
|
||||
+fi
|
||||
+
|
||||
AC_CHECK_DECL([dirfd],
|
||||
[AC_DEFINE([HAVE_DIRFD], [1],
|
||||
[Define if you have the 'dirfd' function or macro.])],
|
||||
--
|
||||
2.55.0.windows.3
|
||||
|
||||
@ -0,0 +1,119 @@
|
||||
From 9bd15ba319eb324b12a6ecf43a4b30c5fcdcdc83 Mon Sep 17 00:00:00 2001
|
||||
From: Ned Deily <nad@python.org>
|
||||
Date: Wed, 5 Aug 2026 10:30:17 +0300
|
||||
Subject: [PATCH] (downstream) [3.12] gh-153711: Avoid use of dup3 and pipe2
|
||||
calls introduced in macOS 27 (#155211)
|
||||
|
||||
---
|
||||
...-08-05-02-02-33.gh-issue-153711.pO9fFb.rst | 3 ++
|
||||
configure | 33 +++++++++++--------
|
||||
configure.ac | 11 +++++--
|
||||
3 files changed, 32 insertions(+), 15 deletions(-)
|
||||
create mode 100644 Misc/NEWS.d/next/macOS/2026-08-05-02-02-33.gh-issue-153711.pO9fFb.rst
|
||||
|
||||
diff --git a/Misc/NEWS.d/next/macOS/2026-08-05-02-02-33.gh-issue-153711.pO9fFb.rst b/Misc/NEWS.d/next/macOS/2026-08-05-02-02-33.gh-issue-153711.pO9fFb.rst
|
||||
new file mode 100644
|
||||
index 00000000000..90804c179a4
|
||||
--- /dev/null
|
||||
+++ b/Misc/NEWS.d/next/macOS/2026-08-05-02-02-33.gh-issue-153711.pO9fFb.rst
|
||||
@@ -0,0 +1,3 @@
|
||||
+On macOS, do not attempt to use the :manpage:`dup3(2)` and
|
||||
+:manpage:`pipe2(2)` system calls introduced in
|
||||
+macOS 27 to prevent problems when running on older systems.
|
||||
diff --git a/configure b/configure
|
||||
index 89edc42f45c..e099c5ad55a 100755
|
||||
--- a/configure
|
||||
+++ b/configure
|
||||
@@ -17614,13 +17614,7 @@ fi
|
||||
ac_fn_c_check_func "$LINENO" "dup" "ac_cv_func_dup"
|
||||
if test "x$ac_cv_func_dup" = xyes
|
||||
then :
|
||||
- printf "%s\n" "#define HAVE_DUP 1" >>confdefs.h
|
||||
-
|
||||
-fi
|
||||
-ac_fn_c_check_func "$LINENO" "dup3" "ac_cv_func_dup3"
|
||||
-if test "x$ac_cv_func_dup3" = xyes
|
||||
-then :
|
||||
- printf "%s\n" "#define HAVE_DUP3 1" >>confdefs.h
|
||||
+ printf '%s\n' "#define HAVE_DUP 1" >>confdefs.h
|
||||
|
||||
fi
|
||||
ac_fn_c_check_func "$LINENO" "execv" "ac_cv_func_execv"
|
||||
@@ -18090,12 +18084,6 @@ if test "x$ac_cv_func_pipe" = xyes
|
||||
then :
|
||||
printf "%s\n" "#define HAVE_PIPE 1" >>confdefs.h
|
||||
|
||||
-fi
|
||||
-ac_fn_c_check_func "$LINENO" "pipe2" "ac_cv_func_pipe2"
|
||||
-if test "x$ac_cv_func_pipe2" = xyes
|
||||
-then :
|
||||
- printf "%s\n" "#define HAVE_PIPE2 1" >>confdefs.h
|
||||
-
|
||||
fi
|
||||
ac_fn_c_check_func "$LINENO" "plock" "ac_cv_func_plock"
|
||||
if test "x$ac_cv_func_plock" = xyes
|
||||
@@ -18670,6 +18658,25 @@ fi
|
||||
|
||||
fi
|
||||
|
||||
+# macOS introduced dup3 and pipe2 in macOS 27, late in the
|
||||
+# lifetime of this version of Python. Rather than adding weaklinking
|
||||
+# support for them, just continue to ignore them.
|
||||
+if test "$ac_sys_system" != "Darwin"; then
|
||||
+ ac_fn_c_check_func "$LINENO" "dup3" "ac_cv_func_dup3"
|
||||
+if test "x$ac_cv_func_dup3" = xyes
|
||||
+then :
|
||||
+ printf '%s\n' "#define HAVE_DUP3 1" >>confdefs.h
|
||||
+
|
||||
+fi
|
||||
+ac_fn_c_check_func "$LINENO" "pipe2" "ac_cv_func_pipe2"
|
||||
+if test "x$ac_cv_func_pipe2" = xyes
|
||||
+then :
|
||||
+ printf '%s\n' "#define HAVE_PIPE2 1" >>confdefs.h
|
||||
+
|
||||
+fi
|
||||
+
|
||||
+fi
|
||||
+
|
||||
{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for $CC options needed to detect all undeclared functions" >&5
|
||||
printf %s "checking for $CC options needed to detect all undeclared functions... " >&6; }
|
||||
if test ${ac_cv_c_undeclared_builtin_options+y}
|
||||
diff --git a/configure.ac b/configure.ac
|
||||
index 1a02d19f1b2..f2b58421d74 100644
|
||||
--- a/configure.ac
|
||||
+++ b/configure.ac
|
||||
@@ -4920,7 +4920,7 @@ fi
|
||||
# checks for library functions
|
||||
AC_CHECK_FUNCS([ \
|
||||
accept4 alarm bind_textdomain_codeset chmod chown clock close_range confstr \
|
||||
- copy_file_range ctermid dup dup3 execv explicit_bzero explicit_memset \
|
||||
+ copy_file_range ctermid dup execv explicit_bzero explicit_memset \
|
||||
faccessat fchmod fchmodat fchown fchownat fdopendir fdwalk fexecve \
|
||||
fork fork1 fpathconf fstatat ftime ftruncate futimens futimes futimesat \
|
||||
gai_strerror getegid getentropy geteuid getgid getgrgid getgrgid_r \
|
||||
@@ -4930,7 +4930,7 @@ AC_CHECK_FUNCS([ \
|
||||
getspnam getuid getwd if_nameindex initgroups kill killpg lchown linkat \
|
||||
lockf lstat lutimes madvise mbrtowc memrchr mkdirat mkfifo mkfifoat \
|
||||
mknod mknodat mktime mmap mremap nice openat opendir pathconf pause pipe \
|
||||
- pipe2 plock poll posix_fadvise posix_fallocate posix_spawn posix_spawnp \
|
||||
+ plock poll posix_fadvise posix_fallocate posix_spawn posix_spawnp \
|
||||
pread preadv preadv2 pthread_condattr_setclock pthread_init pthread_kill \
|
||||
pwrite pwritev pwritev2 readlink readlinkat readv realpath renameat \
|
||||
rtpSpawn sched_get_priority_max sched_rr_get_interval sched_setaffinity \
|
||||
@@ -4952,6 +4952,13 @@ if test "$MACHDEP" != linux; then
|
||||
AC_CHECK_FUNCS([lchmod])
|
||||
fi
|
||||
|
||||
+# macOS introduced dup3 and pipe2 in macOS 27, late in the
|
||||
+# lifetime of this version of Python. Rather than adding weaklinking
|
||||
+# support for them, just continue to ignore them.
|
||||
+if test "$ac_sys_system" != "Darwin"; then
|
||||
+ AC_CHECK_FUNCS([dup3 pipe2])
|
||||
+fi
|
||||
+
|
||||
AC_CHECK_DECL([dirfd],
|
||||
[AC_DEFINE([HAVE_DIRFD], [1],
|
||||
[Define if you have the 'dirfd' function or macro.])],
|
||||
--
|
||||
2.55.0.windows.3
|
||||
|
||||
@ -0,0 +1,119 @@
|
||||
From 4cfd78f7b5128da5ca9628de77feec4b768c2531 Mon Sep 17 00:00:00 2001
|
||||
From: Ned Deily <nad@python.org>
|
||||
Date: Wed, 5 Aug 2026 10:30:17 +0300
|
||||
Subject: [PATCH] (downstream) [3.12] gh-153711: Avoid use of dup3 and pipe2
|
||||
calls introduced in macOS 27 (#155211)
|
||||
|
||||
---
|
||||
...-08-05-02-02-33.gh-issue-153711.pO9fFb.rst | 3 ++
|
||||
configure | 33 +++++++++++--------
|
||||
configure.ac | 11 +++++--
|
||||
3 files changed, 32 insertions(+), 15 deletions(-)
|
||||
create mode 100644 Misc/NEWS.d/next/macOS/2026-08-05-02-02-33.gh-issue-153711.pO9fFb.rst
|
||||
|
||||
diff --git a/Misc/NEWS.d/next/macOS/2026-08-05-02-02-33.gh-issue-153711.pO9fFb.rst b/Misc/NEWS.d/next/macOS/2026-08-05-02-02-33.gh-issue-153711.pO9fFb.rst
|
||||
new file mode 100644
|
||||
index 00000000000..90804c179a4
|
||||
--- /dev/null
|
||||
+++ b/Misc/NEWS.d/next/macOS/2026-08-05-02-02-33.gh-issue-153711.pO9fFb.rst
|
||||
@@ -0,0 +1,3 @@
|
||||
+On macOS, do not attempt to use the :manpage:`dup3(2)` and
|
||||
+:manpage:`pipe2(2)` system calls introduced in
|
||||
+macOS 27 to prevent problems when running on older systems.
|
||||
diff --git a/configure b/configure
|
||||
index 89edc42f45c..e099c5ad55a 100755
|
||||
--- a/configure
|
||||
+++ b/configure
|
||||
@@ -17614,13 +17614,7 @@ fi
|
||||
ac_fn_c_check_func "$LINENO" "dup" "ac_cv_func_dup"
|
||||
if test "x$ac_cv_func_dup" = xyes
|
||||
then :
|
||||
- printf "%s\n" "#define HAVE_DUP 1" >>confdefs.h
|
||||
-
|
||||
-fi
|
||||
-ac_fn_c_check_func "$LINENO" "dup3" "ac_cv_func_dup3"
|
||||
-if test "x$ac_cv_func_dup3" = xyes
|
||||
-then :
|
||||
- printf "%s\n" "#define HAVE_DUP3 1" >>confdefs.h
|
||||
+ printf '%s\n' "#define HAVE_DUP 1" >>confdefs.h
|
||||
|
||||
fi
|
||||
ac_fn_c_check_func "$LINENO" "execv" "ac_cv_func_execv"
|
||||
@@ -18090,12 +18084,6 @@ if test "x$ac_cv_func_pipe" = xyes
|
||||
then :
|
||||
printf "%s\n" "#define HAVE_PIPE 1" >>confdefs.h
|
||||
|
||||
-fi
|
||||
-ac_fn_c_check_func "$LINENO" "pipe2" "ac_cv_func_pipe2"
|
||||
-if test "x$ac_cv_func_pipe2" = xyes
|
||||
-then :
|
||||
- printf "%s\n" "#define HAVE_PIPE2 1" >>confdefs.h
|
||||
-
|
||||
fi
|
||||
ac_fn_c_check_func "$LINENO" "plock" "ac_cv_func_plock"
|
||||
if test "x$ac_cv_func_plock" = xyes
|
||||
@@ -18670,6 +18658,25 @@ fi
|
||||
|
||||
fi
|
||||
|
||||
+# macOS introduced dup3 and pipe2 in macOS 27, late in the
|
||||
+# lifetime of this version of Python. Rather than adding weaklinking
|
||||
+# support for them, just continue to ignore them.
|
||||
+if test "$ac_sys_system" != "Darwin"; then
|
||||
+ ac_fn_c_check_func "$LINENO" "dup3" "ac_cv_func_dup3"
|
||||
+if test "x$ac_cv_func_dup3" = xyes
|
||||
+then :
|
||||
+ printf '%s\n' "#define HAVE_DUP3 1" >>confdefs.h
|
||||
+
|
||||
+fi
|
||||
+ac_fn_c_check_func "$LINENO" "pipe2" "ac_cv_func_pipe2"
|
||||
+if test "x$ac_cv_func_pipe2" = xyes
|
||||
+then :
|
||||
+ printf '%s\n' "#define HAVE_PIPE2 1" >>confdefs.h
|
||||
+
|
||||
+fi
|
||||
+
|
||||
+fi
|
||||
+
|
||||
{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for $CC options needed to detect all undeclared functions" >&5
|
||||
printf %s "checking for $CC options needed to detect all undeclared functions... " >&6; }
|
||||
if test ${ac_cv_c_undeclared_builtin_options+y}
|
||||
diff --git a/configure.ac b/configure.ac
|
||||
index 1a02d19f1b2..f2b58421d74 100644
|
||||
--- a/configure.ac
|
||||
+++ b/configure.ac
|
||||
@@ -4920,7 +4920,7 @@ fi
|
||||
# checks for library functions
|
||||
AC_CHECK_FUNCS([ \
|
||||
accept4 alarm bind_textdomain_codeset chmod chown clock close_range confstr \
|
||||
- copy_file_range ctermid dup dup3 execv explicit_bzero explicit_memset \
|
||||
+ copy_file_range ctermid dup execv explicit_bzero explicit_memset \
|
||||
faccessat fchmod fchmodat fchown fchownat fdopendir fdwalk fexecve \
|
||||
fork fork1 fpathconf fstatat ftime ftruncate futimens futimes futimesat \
|
||||
gai_strerror getegid getentropy geteuid getgid getgrgid getgrgid_r \
|
||||
@@ -4930,7 +4930,7 @@ AC_CHECK_FUNCS([ \
|
||||
getspnam getuid getwd if_nameindex initgroups kill killpg lchown linkat \
|
||||
lockf lstat lutimes madvise mbrtowc memrchr mkdirat mkfifo mkfifoat \
|
||||
mknod mknodat mktime mmap mremap nice openat opendir pathconf pause pipe \
|
||||
- pipe2 plock poll posix_fadvise posix_fallocate posix_spawn posix_spawnp \
|
||||
+ plock poll posix_fadvise posix_fallocate posix_spawn posix_spawnp \
|
||||
pread preadv preadv2 pthread_condattr_setclock pthread_init pthread_kill \
|
||||
pwrite pwritev pwritev2 readlink readlinkat readv realpath renameat \
|
||||
rtpSpawn sched_get_priority_max sched_rr_get_interval sched_setaffinity \
|
||||
@@ -4952,6 +4952,13 @@ if test "$MACHDEP" != linux; then
|
||||
AC_CHECK_FUNCS([lchmod])
|
||||
fi
|
||||
|
||||
+# macOS introduced dup3 and pipe2 in macOS 27, late in the
|
||||
+# lifetime of this version of Python. Rather than adding weaklinking
|
||||
+# support for them, just continue to ignore them.
|
||||
+if test "$ac_sys_system" != "Darwin"; then
|
||||
+ AC_CHECK_FUNCS([dup3 pipe2])
|
||||
+fi
|
||||
+
|
||||
AC_CHECK_DECL([dirfd],
|
||||
[AC_DEFINE([HAVE_DIRFD], [1],
|
||||
[Define if you have the 'dirfd' function or macro.])],
|
||||
--
|
||||
2.55.0.windows.3
|
||||
|
||||
@ -0,0 +1,119 @@
|
||||
From ac12d63bf188f9497f8453c0447b9bc599acbf22 Mon Sep 17 00:00:00 2001
|
||||
From: Ned Deily <nad@python.org>
|
||||
Date: Wed, 5 Aug 2026 10:30:17 +0300
|
||||
Subject: [PATCH] (downstream) [3.12] gh-153711: Avoid use of dup3 and pipe2
|
||||
calls introduced in macOS 27 (#155211)
|
||||
|
||||
---
|
||||
...-08-05-02-02-33.gh-issue-153711.pO9fFb.rst | 3 ++
|
||||
configure | 33 +++++++++++--------
|
||||
configure.ac | 11 +++++--
|
||||
3 files changed, 32 insertions(+), 15 deletions(-)
|
||||
create mode 100644 Misc/NEWS.d/next/macOS/2026-08-05-02-02-33.gh-issue-153711.pO9fFb.rst
|
||||
|
||||
diff --git a/Misc/NEWS.d/next/macOS/2026-08-05-02-02-33.gh-issue-153711.pO9fFb.rst b/Misc/NEWS.d/next/macOS/2026-08-05-02-02-33.gh-issue-153711.pO9fFb.rst
|
||||
new file mode 100644
|
||||
index 00000000000..90804c179a4
|
||||
--- /dev/null
|
||||
+++ b/Misc/NEWS.d/next/macOS/2026-08-05-02-02-33.gh-issue-153711.pO9fFb.rst
|
||||
@@ -0,0 +1,3 @@
|
||||
+On macOS, do not attempt to use the :manpage:`dup3(2)` and
|
||||
+:manpage:`pipe2(2)` system calls introduced in
|
||||
+macOS 27 to prevent problems when running on older systems.
|
||||
diff --git a/configure b/configure
|
||||
index b6f90bcd8c7..b93aab935ce 100755
|
||||
--- a/configure
|
||||
+++ b/configure
|
||||
@@ -17552,13 +17552,7 @@ fi
|
||||
ac_fn_c_check_func "$LINENO" "dup" "ac_cv_func_dup"
|
||||
if test "x$ac_cv_func_dup" = xyes
|
||||
then :
|
||||
- printf "%s\n" "#define HAVE_DUP 1" >>confdefs.h
|
||||
-
|
||||
-fi
|
||||
-ac_fn_c_check_func "$LINENO" "dup3" "ac_cv_func_dup3"
|
||||
-if test "x$ac_cv_func_dup3" = xyes
|
||||
-then :
|
||||
- printf "%s\n" "#define HAVE_DUP3 1" >>confdefs.h
|
||||
+ printf '%s\n' "#define HAVE_DUP 1" >>confdefs.h
|
||||
|
||||
fi
|
||||
ac_fn_c_check_func "$LINENO" "execv" "ac_cv_func_execv"
|
||||
@@ -18028,12 +18022,6 @@ if test "x$ac_cv_func_pipe" = xyes
|
||||
then :
|
||||
printf "%s\n" "#define HAVE_PIPE 1" >>confdefs.h
|
||||
|
||||
-fi
|
||||
-ac_fn_c_check_func "$LINENO" "pipe2" "ac_cv_func_pipe2"
|
||||
-if test "x$ac_cv_func_pipe2" = xyes
|
||||
-then :
|
||||
- printf "%s\n" "#define HAVE_PIPE2 1" >>confdefs.h
|
||||
-
|
||||
fi
|
||||
ac_fn_c_check_func "$LINENO" "plock" "ac_cv_func_plock"
|
||||
if test "x$ac_cv_func_plock" = xyes
|
||||
@@ -18608,6 +18596,25 @@ fi
|
||||
|
||||
fi
|
||||
|
||||
+# macOS introduced dup3 and pipe2 in macOS 27, late in the
|
||||
+# lifetime of this version of Python. Rather than adding weaklinking
|
||||
+# support for them, just continue to ignore them.
|
||||
+if test "$ac_sys_system" != "Darwin"; then
|
||||
+ ac_fn_c_check_func "$LINENO" "dup3" "ac_cv_func_dup3"
|
||||
+if test "x$ac_cv_func_dup3" = xyes
|
||||
+then :
|
||||
+ printf '%s\n' "#define HAVE_DUP3 1" >>confdefs.h
|
||||
+
|
||||
+fi
|
||||
+ac_fn_c_check_func "$LINENO" "pipe2" "ac_cv_func_pipe2"
|
||||
+if test "x$ac_cv_func_pipe2" = xyes
|
||||
+then :
|
||||
+ printf '%s\n' "#define HAVE_PIPE2 1" >>confdefs.h
|
||||
+
|
||||
+fi
|
||||
+
|
||||
+fi
|
||||
+
|
||||
{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for $CC options needed to detect all undeclared functions" >&5
|
||||
printf %s "checking for $CC options needed to detect all undeclared functions... " >&6; }
|
||||
if test ${ac_cv_c_undeclared_builtin_options+y}
|
||||
diff --git a/configure.ac b/configure.ac
|
||||
index ba768aea930..92049fb2889 100644
|
||||
--- a/configure.ac
|
||||
+++ b/configure.ac
|
||||
@@ -4860,7 +4860,7 @@ fi
|
||||
# checks for library functions
|
||||
AC_CHECK_FUNCS([ \
|
||||
accept4 alarm bind_textdomain_codeset chmod chown clock close_range confstr \
|
||||
- copy_file_range ctermid dup dup3 execv explicit_bzero explicit_memset \
|
||||
+ copy_file_range ctermid dup execv explicit_bzero explicit_memset \
|
||||
faccessat fchmod fchmodat fchown fchownat fdopendir fdwalk fexecve \
|
||||
fork fork1 fpathconf fstatat ftime ftruncate futimens futimes futimesat \
|
||||
gai_strerror getegid getentropy geteuid getgid getgrgid getgrgid_r \
|
||||
@@ -4870,7 +4870,7 @@ AC_CHECK_FUNCS([ \
|
||||
getspnam getuid getwd if_nameindex initgroups kill killpg lchown linkat \
|
||||
lockf lstat lutimes madvise mbrtowc memrchr mkdirat mkfifo mkfifoat \
|
||||
mknod mknodat mktime mmap mremap nice openat opendir pathconf pause pipe \
|
||||
- pipe2 plock poll posix_fadvise posix_fallocate posix_spawn posix_spawnp \
|
||||
+ plock poll posix_fadvise posix_fallocate posix_spawn posix_spawnp \
|
||||
pread preadv preadv2 pthread_condattr_setclock pthread_init pthread_kill \
|
||||
pwrite pwritev pwritev2 readlink readlinkat readv realpath renameat \
|
||||
rtpSpawn sched_get_priority_max sched_rr_get_interval sched_setaffinity \
|
||||
@@ -4892,6 +4892,13 @@ if test "$MACHDEP" != linux; then
|
||||
AC_CHECK_FUNCS([lchmod])
|
||||
fi
|
||||
|
||||
+# macOS introduced dup3 and pipe2 in macOS 27, late in the
|
||||
+# lifetime of this version of Python. Rather than adding weaklinking
|
||||
+# support for them, just continue to ignore them.
|
||||
+if test "$ac_sys_system" != "Darwin"; then
|
||||
+ AC_CHECK_FUNCS([dup3 pipe2])
|
||||
+fi
|
||||
+
|
||||
AC_CHECK_DECL([dirfd],
|
||||
[AC_DEFINE([HAVE_DIRFD], [1],
|
||||
[Define if you have the 'dirfd' function or macro.])],
|
||||
--
|
||||
2.55.0.windows.3
|
||||
|
||||
@ -0,0 +1,119 @@
|
||||
From 2b0563ccd3da13eba12ceb53cfca3792df7bec44 Mon Sep 17 00:00:00 2001
|
||||
From: Ned Deily <nad@python.org>
|
||||
Date: Wed, 5 Aug 2026 10:30:17 +0300
|
||||
Subject: [PATCH] (downstream) [3.12] gh-153711: Avoid use of dup3 and pipe2
|
||||
calls introduced in macOS 27 (#155211)
|
||||
|
||||
---
|
||||
...-08-05-02-02-33.gh-issue-153711.pO9fFb.rst | 3 ++
|
||||
configure | 33 +++++++++++--------
|
||||
configure.ac | 11 +++++--
|
||||
3 files changed, 32 insertions(+), 15 deletions(-)
|
||||
create mode 100644 Misc/NEWS.d/next/macOS/2026-08-05-02-02-33.gh-issue-153711.pO9fFb.rst
|
||||
|
||||
diff --git a/Misc/NEWS.d/next/macOS/2026-08-05-02-02-33.gh-issue-153711.pO9fFb.rst b/Misc/NEWS.d/next/macOS/2026-08-05-02-02-33.gh-issue-153711.pO9fFb.rst
|
||||
new file mode 100644
|
||||
index 00000000000..90804c179a4
|
||||
--- /dev/null
|
||||
+++ b/Misc/NEWS.d/next/macOS/2026-08-05-02-02-33.gh-issue-153711.pO9fFb.rst
|
||||
@@ -0,0 +1,3 @@
|
||||
+On macOS, do not attempt to use the :manpage:`dup3(2)` and
|
||||
+:manpage:`pipe2(2)` system calls introduced in
|
||||
+macOS 27 to prevent problems when running on older systems.
|
||||
diff --git a/configure b/configure
|
||||
index e962a6aed12..7a7e3204ea9 100755
|
||||
--- a/configure
|
||||
+++ b/configure
|
||||
@@ -17566,13 +17566,7 @@ fi
|
||||
ac_fn_c_check_func "$LINENO" "dup" "ac_cv_func_dup"
|
||||
if test "x$ac_cv_func_dup" = xyes
|
||||
then :
|
||||
- printf "%s\n" "#define HAVE_DUP 1" >>confdefs.h
|
||||
-
|
||||
-fi
|
||||
-ac_fn_c_check_func "$LINENO" "dup3" "ac_cv_func_dup3"
|
||||
-if test "x$ac_cv_func_dup3" = xyes
|
||||
-then :
|
||||
- printf "%s\n" "#define HAVE_DUP3 1" >>confdefs.h
|
||||
+ printf '%s\n' "#define HAVE_DUP 1" >>confdefs.h
|
||||
|
||||
fi
|
||||
ac_fn_c_check_func "$LINENO" "execv" "ac_cv_func_execv"
|
||||
@@ -18042,12 +18036,6 @@ if test "x$ac_cv_func_pipe" = xyes
|
||||
then :
|
||||
printf "%s\n" "#define HAVE_PIPE 1" >>confdefs.h
|
||||
|
||||
-fi
|
||||
-ac_fn_c_check_func "$LINENO" "pipe2" "ac_cv_func_pipe2"
|
||||
-if test "x$ac_cv_func_pipe2" = xyes
|
||||
-then :
|
||||
- printf "%s\n" "#define HAVE_PIPE2 1" >>confdefs.h
|
||||
-
|
||||
fi
|
||||
ac_fn_c_check_func "$LINENO" "plock" "ac_cv_func_plock"
|
||||
if test "x$ac_cv_func_plock" = xyes
|
||||
@@ -18622,6 +18610,25 @@ fi
|
||||
|
||||
fi
|
||||
|
||||
+# macOS introduced dup3 and pipe2 in macOS 27, late in the
|
||||
+# lifetime of this version of Python. Rather than adding weaklinking
|
||||
+# support for them, just continue to ignore them.
|
||||
+if test "$ac_sys_system" != "Darwin"; then
|
||||
+ ac_fn_c_check_func "$LINENO" "dup3" "ac_cv_func_dup3"
|
||||
+if test "x$ac_cv_func_dup3" = xyes
|
||||
+then :
|
||||
+ printf '%s\n' "#define HAVE_DUP3 1" >>confdefs.h
|
||||
+
|
||||
+fi
|
||||
+ac_fn_c_check_func "$LINENO" "pipe2" "ac_cv_func_pipe2"
|
||||
+if test "x$ac_cv_func_pipe2" = xyes
|
||||
+then :
|
||||
+ printf '%s\n' "#define HAVE_PIPE2 1" >>confdefs.h
|
||||
+
|
||||
+fi
|
||||
+
|
||||
+fi
|
||||
+
|
||||
{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for $CC options needed to detect all undeclared functions" >&5
|
||||
printf %s "checking for $CC options needed to detect all undeclared functions... " >&6; }
|
||||
if test ${ac_cv_c_undeclared_builtin_options+y}
|
||||
diff --git a/configure.ac b/configure.ac
|
||||
index 384718db1f0..7f117003df7 100644
|
||||
--- a/configure.ac
|
||||
+++ b/configure.ac
|
||||
@@ -4870,7 +4870,7 @@ fi
|
||||
# checks for library functions
|
||||
AC_CHECK_FUNCS([ \
|
||||
accept4 alarm bind_textdomain_codeset chmod chown clock close_range confstr \
|
||||
- copy_file_range ctermid dup dup3 execv explicit_bzero explicit_memset \
|
||||
+ copy_file_range ctermid dup execv explicit_bzero explicit_memset \
|
||||
faccessat fchmod fchmodat fchown fchownat fdopendir fdwalk fexecve \
|
||||
fork fork1 fpathconf fstatat ftime ftruncate futimens futimes futimesat \
|
||||
gai_strerror getegid getentropy geteuid getgid getgrgid getgrgid_r \
|
||||
@@ -4880,7 +4880,7 @@ AC_CHECK_FUNCS([ \
|
||||
getspnam getuid getwd if_nameindex initgroups kill killpg lchown linkat \
|
||||
lockf lstat lutimes madvise mbrtowc memrchr mkdirat mkfifo mkfifoat \
|
||||
mknod mknodat mktime mmap mremap nice openat opendir pathconf pause pipe \
|
||||
- pipe2 plock poll posix_fadvise posix_fallocate posix_spawn posix_spawnp \
|
||||
+ plock poll posix_fadvise posix_fallocate posix_spawn posix_spawnp \
|
||||
pread preadv preadv2 pthread_condattr_setclock pthread_init pthread_kill \
|
||||
pwrite pwritev pwritev2 readlink readlinkat readv realpath renameat \
|
||||
rtpSpawn sched_get_priority_max sched_rr_get_interval sched_setaffinity \
|
||||
@@ -4902,6 +4902,13 @@ if test "$MACHDEP" != linux; then
|
||||
AC_CHECK_FUNCS([lchmod])
|
||||
fi
|
||||
|
||||
+# macOS introduced dup3 and pipe2 in macOS 27, late in the
|
||||
+# lifetime of this version of Python. Rather than adding weaklinking
|
||||
+# support for them, just continue to ignore them.
|
||||
+if test "$ac_sys_system" != "Darwin"; then
|
||||
+ AC_CHECK_FUNCS([dup3 pipe2])
|
||||
+fi
|
||||
+
|
||||
AC_CHECK_DECL([dirfd],
|
||||
[AC_DEFINE([HAVE_DIRFD], [1],
|
||||
[Define if you have the 'dirfd' function or macro.])],
|
||||
--
|
||||
2.55.0.windows.3
|
||||
|
||||
@ -0,0 +1,119 @@
|
||||
From c167d889c264347c658365acbb70bdd71c81550d Mon Sep 17 00:00:00 2001
|
||||
From: Ned Deily <nad@python.org>
|
||||
Date: Wed, 5 Aug 2026 10:30:17 +0300
|
||||
Subject: [PATCH] (downstream) [3.12] gh-153711: Avoid use of dup3 and pipe2
|
||||
calls introduced in macOS 27 (#155211)
|
||||
|
||||
---
|
||||
...-08-05-02-02-33.gh-issue-153711.pO9fFb.rst | 3 ++
|
||||
configure | 33 +++++++++++--------
|
||||
configure.ac | 11 +++++--
|
||||
3 files changed, 32 insertions(+), 15 deletions(-)
|
||||
create mode 100644 Misc/NEWS.d/next/macOS/2026-08-05-02-02-33.gh-issue-153711.pO9fFb.rst
|
||||
|
||||
diff --git a/Misc/NEWS.d/next/macOS/2026-08-05-02-02-33.gh-issue-153711.pO9fFb.rst b/Misc/NEWS.d/next/macOS/2026-08-05-02-02-33.gh-issue-153711.pO9fFb.rst
|
||||
new file mode 100644
|
||||
index 00000000000..90804c179a4
|
||||
--- /dev/null
|
||||
+++ b/Misc/NEWS.d/next/macOS/2026-08-05-02-02-33.gh-issue-153711.pO9fFb.rst
|
||||
@@ -0,0 +1,3 @@
|
||||
+On macOS, do not attempt to use the :manpage:`dup3(2)` and
|
||||
+:manpage:`pipe2(2)` system calls introduced in
|
||||
+macOS 27 to prevent problems when running on older systems.
|
||||
diff --git a/configure b/configure
|
||||
index be783faa248..87fca7d195f 100755
|
||||
--- a/configure
|
||||
+++ b/configure
|
||||
@@ -17591,13 +17591,7 @@ fi
|
||||
ac_fn_c_check_func "$LINENO" "dup" "ac_cv_func_dup"
|
||||
if test "x$ac_cv_func_dup" = xyes
|
||||
then :
|
||||
- printf "%s\n" "#define HAVE_DUP 1" >>confdefs.h
|
||||
-
|
||||
-fi
|
||||
-ac_fn_c_check_func "$LINENO" "dup3" "ac_cv_func_dup3"
|
||||
-if test "x$ac_cv_func_dup3" = xyes
|
||||
-then :
|
||||
- printf "%s\n" "#define HAVE_DUP3 1" >>confdefs.h
|
||||
+ printf '%s\n' "#define HAVE_DUP 1" >>confdefs.h
|
||||
|
||||
fi
|
||||
ac_fn_c_check_func "$LINENO" "execv" "ac_cv_func_execv"
|
||||
@@ -18067,12 +18061,6 @@ if test "x$ac_cv_func_pipe" = xyes
|
||||
then :
|
||||
printf "%s\n" "#define HAVE_PIPE 1" >>confdefs.h
|
||||
|
||||
-fi
|
||||
-ac_fn_c_check_func "$LINENO" "pipe2" "ac_cv_func_pipe2"
|
||||
-if test "x$ac_cv_func_pipe2" = xyes
|
||||
-then :
|
||||
- printf "%s\n" "#define HAVE_PIPE2 1" >>confdefs.h
|
||||
-
|
||||
fi
|
||||
ac_fn_c_check_func "$LINENO" "plock" "ac_cv_func_plock"
|
||||
if test "x$ac_cv_func_plock" = xyes
|
||||
@@ -18647,6 +18635,25 @@ fi
|
||||
|
||||
fi
|
||||
|
||||
+# macOS introduced dup3 and pipe2 in macOS 27, late in the
|
||||
+# lifetime of this version of Python. Rather than adding weaklinking
|
||||
+# support for them, just continue to ignore them.
|
||||
+if test "$ac_sys_system" != "Darwin"; then
|
||||
+ ac_fn_c_check_func "$LINENO" "dup3" "ac_cv_func_dup3"
|
||||
+if test "x$ac_cv_func_dup3" = xyes
|
||||
+then :
|
||||
+ printf '%s\n' "#define HAVE_DUP3 1" >>confdefs.h
|
||||
+
|
||||
+fi
|
||||
+ac_fn_c_check_func "$LINENO" "pipe2" "ac_cv_func_pipe2"
|
||||
+if test "x$ac_cv_func_pipe2" = xyes
|
||||
+then :
|
||||
+ printf '%s\n' "#define HAVE_PIPE2 1" >>confdefs.h
|
||||
+
|
||||
+fi
|
||||
+
|
||||
+fi
|
||||
+
|
||||
{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for $CC options needed to detect all undeclared functions" >&5
|
||||
printf %s "checking for $CC options needed to detect all undeclared functions... " >&6; }
|
||||
if test ${ac_cv_c_undeclared_builtin_options+y}
|
||||
diff --git a/configure.ac b/configure.ac
|
||||
index 8be26cc0ab7..313b5bd62ce 100644
|
||||
--- a/configure.ac
|
||||
+++ b/configure.ac
|
||||
@@ -4888,7 +4888,7 @@ fi
|
||||
# checks for library functions
|
||||
AC_CHECK_FUNCS([ \
|
||||
accept4 alarm bind_textdomain_codeset chmod chown clock close_range confstr \
|
||||
- copy_file_range ctermid dup dup3 execv explicit_bzero explicit_memset \
|
||||
+ copy_file_range ctermid dup execv explicit_bzero explicit_memset \
|
||||
faccessat fchmod fchmodat fchown fchownat fdopendir fdwalk fexecve \
|
||||
fork fork1 fpathconf fstatat ftime ftruncate futimens futimes futimesat \
|
||||
gai_strerror getegid getentropy geteuid getgid getgrgid getgrgid_r \
|
||||
@@ -4898,7 +4898,7 @@ AC_CHECK_FUNCS([ \
|
||||
getspnam getuid getwd if_nameindex initgroups kill killpg lchown linkat \
|
||||
lockf lstat lutimes madvise mbrtowc memrchr mkdirat mkfifo mkfifoat \
|
||||
mknod mknodat mktime mmap mremap nice openat opendir pathconf pause pipe \
|
||||
- pipe2 plock poll posix_fadvise posix_fallocate posix_spawn posix_spawnp \
|
||||
+ plock poll posix_fadvise posix_fallocate posix_spawn posix_spawnp \
|
||||
pread preadv preadv2 pthread_condattr_setclock pthread_init pthread_kill \
|
||||
pwrite pwritev pwritev2 readlink readlinkat readv realpath renameat \
|
||||
rtpSpawn sched_get_priority_max sched_rr_get_interval sched_setaffinity \
|
||||
@@ -4920,6 +4920,13 @@ if test "$MACHDEP" != linux; then
|
||||
AC_CHECK_FUNCS([lchmod])
|
||||
fi
|
||||
|
||||
+# macOS introduced dup3 and pipe2 in macOS 27, late in the
|
||||
+# lifetime of this version of Python. Rather than adding weaklinking
|
||||
+# support for them, just continue to ignore them.
|
||||
+if test "$ac_sys_system" != "Darwin"; then
|
||||
+ AC_CHECK_FUNCS([dup3 pipe2])
|
||||
+fi
|
||||
+
|
||||
AC_CHECK_DECL([dirfd],
|
||||
[AC_DEFINE([HAVE_DIRFD], [1],
|
||||
[Define if you have the 'dirfd' function or macro.])],
|
||||
--
|
||||
2.55.0.windows.3
|
||||
|
||||
@ -0,0 +1,119 @@
|
||||
From 9e0a06e1ad5baa743064a4ef3b9b0faf83e3d061 Mon Sep 17 00:00:00 2001
|
||||
From: Ned Deily <nad@python.org>
|
||||
Date: Wed, 5 Aug 2026 10:30:17 +0300
|
||||
Subject: [PATCH] (downstream) [3.12] gh-153711: Avoid use of dup3 and pipe2
|
||||
calls introduced in macOS 27 (#155211)
|
||||
|
||||
---
|
||||
...-08-05-02-02-33.gh-issue-153711.pO9fFb.rst | 3 ++
|
||||
configure | 33 +++++++++++--------
|
||||
configure.ac | 11 +++++--
|
||||
3 files changed, 32 insertions(+), 15 deletions(-)
|
||||
create mode 100644 Misc/NEWS.d/next/macOS/2026-08-05-02-02-33.gh-issue-153711.pO9fFb.rst
|
||||
|
||||
diff --git a/Misc/NEWS.d/next/macOS/2026-08-05-02-02-33.gh-issue-153711.pO9fFb.rst b/Misc/NEWS.d/next/macOS/2026-08-05-02-02-33.gh-issue-153711.pO9fFb.rst
|
||||
new file mode 100644
|
||||
index 00000000000..90804c179a4
|
||||
--- /dev/null
|
||||
+++ b/Misc/NEWS.d/next/macOS/2026-08-05-02-02-33.gh-issue-153711.pO9fFb.rst
|
||||
@@ -0,0 +1,3 @@
|
||||
+On macOS, do not attempt to use the :manpage:`dup3(2)` and
|
||||
+:manpage:`pipe2(2)` system calls introduced in
|
||||
+macOS 27 to prevent problems when running on older systems.
|
||||
diff --git a/configure b/configure
|
||||
index 6dc8a66e487..b2ce2542b9d 100755
|
||||
--- a/configure
|
||||
+++ b/configure
|
||||
@@ -17591,13 +17591,7 @@ fi
|
||||
ac_fn_c_check_func "$LINENO" "dup" "ac_cv_func_dup"
|
||||
if test "x$ac_cv_func_dup" = xyes
|
||||
then :
|
||||
- printf "%s\n" "#define HAVE_DUP 1" >>confdefs.h
|
||||
-
|
||||
-fi
|
||||
-ac_fn_c_check_func "$LINENO" "dup3" "ac_cv_func_dup3"
|
||||
-if test "x$ac_cv_func_dup3" = xyes
|
||||
-then :
|
||||
- printf "%s\n" "#define HAVE_DUP3 1" >>confdefs.h
|
||||
+ printf '%s\n' "#define HAVE_DUP 1" >>confdefs.h
|
||||
|
||||
fi
|
||||
ac_fn_c_check_func "$LINENO" "execv" "ac_cv_func_execv"
|
||||
@@ -18067,12 +18061,6 @@ if test "x$ac_cv_func_pipe" = xyes
|
||||
then :
|
||||
printf "%s\n" "#define HAVE_PIPE 1" >>confdefs.h
|
||||
|
||||
-fi
|
||||
-ac_fn_c_check_func "$LINENO" "pipe2" "ac_cv_func_pipe2"
|
||||
-if test "x$ac_cv_func_pipe2" = xyes
|
||||
-then :
|
||||
- printf "%s\n" "#define HAVE_PIPE2 1" >>confdefs.h
|
||||
-
|
||||
fi
|
||||
ac_fn_c_check_func "$LINENO" "plock" "ac_cv_func_plock"
|
||||
if test "x$ac_cv_func_plock" = xyes
|
||||
@@ -18647,6 +18635,25 @@ fi
|
||||
|
||||
fi
|
||||
|
||||
+# macOS introduced dup3 and pipe2 in macOS 27, late in the
|
||||
+# lifetime of this version of Python. Rather than adding weaklinking
|
||||
+# support for them, just continue to ignore them.
|
||||
+if test "$ac_sys_system" != "Darwin"; then
|
||||
+ ac_fn_c_check_func "$LINENO" "dup3" "ac_cv_func_dup3"
|
||||
+if test "x$ac_cv_func_dup3" = xyes
|
||||
+then :
|
||||
+ printf '%s\n' "#define HAVE_DUP3 1" >>confdefs.h
|
||||
+
|
||||
+fi
|
||||
+ac_fn_c_check_func "$LINENO" "pipe2" "ac_cv_func_pipe2"
|
||||
+if test "x$ac_cv_func_pipe2" = xyes
|
||||
+then :
|
||||
+ printf '%s\n' "#define HAVE_PIPE2 1" >>confdefs.h
|
||||
+
|
||||
+fi
|
||||
+
|
||||
+fi
|
||||
+
|
||||
{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for $CC options needed to detect all undeclared functions" >&5
|
||||
printf %s "checking for $CC options needed to detect all undeclared functions... " >&6; }
|
||||
if test ${ac_cv_c_undeclared_builtin_options+y}
|
||||
diff --git a/configure.ac b/configure.ac
|
||||
index 8a32cb58f4e..0cec0c7aeea 100644
|
||||
--- a/configure.ac
|
||||
+++ b/configure.ac
|
||||
@@ -4896,7 +4896,7 @@ fi
|
||||
# checks for library functions
|
||||
AC_CHECK_FUNCS([ \
|
||||
accept4 alarm bind_textdomain_codeset chmod chown clock close_range confstr \
|
||||
- copy_file_range ctermid dup dup3 execv explicit_bzero explicit_memset \
|
||||
+ copy_file_range ctermid dup execv explicit_bzero explicit_memset \
|
||||
faccessat fchmod fchmodat fchown fchownat fdopendir fdwalk fexecve \
|
||||
fork fork1 fpathconf fstatat ftime ftruncate futimens futimes futimesat \
|
||||
gai_strerror getegid getentropy geteuid getgid getgrgid getgrgid_r \
|
||||
@@ -4906,7 +4906,7 @@ AC_CHECK_FUNCS([ \
|
||||
getspnam getuid getwd if_nameindex initgroups kill killpg lchown linkat \
|
||||
lockf lstat lutimes madvise mbrtowc memrchr mkdirat mkfifo mkfifoat \
|
||||
mknod mknodat mktime mmap mremap nice openat opendir pathconf pause pipe \
|
||||
- pipe2 plock poll posix_fadvise posix_fallocate posix_spawn posix_spawnp \
|
||||
+ plock poll posix_fadvise posix_fallocate posix_spawn posix_spawnp \
|
||||
pread preadv preadv2 pthread_condattr_setclock pthread_init pthread_kill \
|
||||
pwrite pwritev pwritev2 readlink readlinkat readv realpath renameat \
|
||||
rtpSpawn sched_get_priority_max sched_rr_get_interval sched_setaffinity \
|
||||
@@ -4928,6 +4928,13 @@ if test "$MACHDEP" != linux; then
|
||||
AC_CHECK_FUNCS([lchmod])
|
||||
fi
|
||||
|
||||
+# macOS introduced dup3 and pipe2 in macOS 27, late in the
|
||||
+# lifetime of this version of Python. Rather than adding weaklinking
|
||||
+# support for them, just continue to ignore them.
|
||||
+if test "$ac_sys_system" != "Darwin"; then
|
||||
+ AC_CHECK_FUNCS([dup3 pipe2])
|
||||
+fi
|
||||
+
|
||||
AC_CHECK_DECL([dirfd],
|
||||
[AC_DEFINE([HAVE_DIRFD], [1],
|
||||
[Define if you have the 'dirfd' function or macro.])],
|
||||
--
|
||||
2.55.0.windows.3
|
||||
|
||||
@ -0,0 +1,119 @@
|
||||
From 16d9ac47e5e6b6e8020049622c697e8118999480 Mon Sep 17 00:00:00 2001
|
||||
From: Ned Deily <nad@python.org>
|
||||
Date: Wed, 5 Aug 2026 10:30:17 +0300
|
||||
Subject: [PATCH] (downstream) [3.12] gh-153711: Avoid use of dup3 and pipe2
|
||||
calls introduced in macOS 27 (#155211)
|
||||
|
||||
---
|
||||
...-08-05-02-02-33.gh-issue-153711.pO9fFb.rst | 3 ++
|
||||
configure | 33 +++++++++++--------
|
||||
configure.ac | 11 +++++--
|
||||
3 files changed, 32 insertions(+), 15 deletions(-)
|
||||
create mode 100644 Misc/NEWS.d/next/macOS/2026-08-05-02-02-33.gh-issue-153711.pO9fFb.rst
|
||||
|
||||
diff --git a/Misc/NEWS.d/next/macOS/2026-08-05-02-02-33.gh-issue-153711.pO9fFb.rst b/Misc/NEWS.d/next/macOS/2026-08-05-02-02-33.gh-issue-153711.pO9fFb.rst
|
||||
new file mode 100644
|
||||
index 00000000000..90804c179a4
|
||||
--- /dev/null
|
||||
+++ b/Misc/NEWS.d/next/macOS/2026-08-05-02-02-33.gh-issue-153711.pO9fFb.rst
|
||||
@@ -0,0 +1,3 @@
|
||||
+On macOS, do not attempt to use the :manpage:`dup3(2)` and
|
||||
+:manpage:`pipe2(2)` system calls introduced in
|
||||
+macOS 27 to prevent problems when running on older systems.
|
||||
diff --git a/configure b/configure
|
||||
index 4dfaeecfc0b..bec4c9ac763 100755
|
||||
--- a/configure
|
||||
+++ b/configure
|
||||
@@ -17591,13 +17591,7 @@ fi
|
||||
ac_fn_c_check_func "$LINENO" "dup" "ac_cv_func_dup"
|
||||
if test "x$ac_cv_func_dup" = xyes
|
||||
then :
|
||||
- printf "%s\n" "#define HAVE_DUP 1" >>confdefs.h
|
||||
-
|
||||
-fi
|
||||
-ac_fn_c_check_func "$LINENO" "dup3" "ac_cv_func_dup3"
|
||||
-if test "x$ac_cv_func_dup3" = xyes
|
||||
-then :
|
||||
- printf "%s\n" "#define HAVE_DUP3 1" >>confdefs.h
|
||||
+ printf '%s\n' "#define HAVE_DUP 1" >>confdefs.h
|
||||
|
||||
fi
|
||||
ac_fn_c_check_func "$LINENO" "execv" "ac_cv_func_execv"
|
||||
@@ -18067,12 +18061,6 @@ if test "x$ac_cv_func_pipe" = xyes
|
||||
then :
|
||||
printf "%s\n" "#define HAVE_PIPE 1" >>confdefs.h
|
||||
|
||||
-fi
|
||||
-ac_fn_c_check_func "$LINENO" "pipe2" "ac_cv_func_pipe2"
|
||||
-if test "x$ac_cv_func_pipe2" = xyes
|
||||
-then :
|
||||
- printf "%s\n" "#define HAVE_PIPE2 1" >>confdefs.h
|
||||
-
|
||||
fi
|
||||
ac_fn_c_check_func "$LINENO" "plock" "ac_cv_func_plock"
|
||||
if test "x$ac_cv_func_plock" = xyes
|
||||
@@ -18647,6 +18635,25 @@ fi
|
||||
|
||||
fi
|
||||
|
||||
+# macOS introduced dup3 and pipe2 in macOS 27, late in the
|
||||
+# lifetime of this version of Python. Rather than adding weaklinking
|
||||
+# support for them, just continue to ignore them.
|
||||
+if test "$ac_sys_system" != "Darwin"; then
|
||||
+ ac_fn_c_check_func "$LINENO" "dup3" "ac_cv_func_dup3"
|
||||
+if test "x$ac_cv_func_dup3" = xyes
|
||||
+then :
|
||||
+ printf '%s\n' "#define HAVE_DUP3 1" >>confdefs.h
|
||||
+
|
||||
+fi
|
||||
+ac_fn_c_check_func "$LINENO" "pipe2" "ac_cv_func_pipe2"
|
||||
+if test "x$ac_cv_func_pipe2" = xyes
|
||||
+then :
|
||||
+ printf '%s\n' "#define HAVE_PIPE2 1" >>confdefs.h
|
||||
+
|
||||
+fi
|
||||
+
|
||||
+fi
|
||||
+
|
||||
{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for $CC options needed to detect all undeclared functions" >&5
|
||||
printf %s "checking for $CC options needed to detect all undeclared functions... " >&6; }
|
||||
if test ${ac_cv_c_undeclared_builtin_options+y}
|
||||
diff --git a/configure.ac b/configure.ac
|
||||
index 0d6df8e24e4..cbf749da60b 100644
|
||||
--- a/configure.ac
|
||||
+++ b/configure.ac
|
||||
@@ -4896,7 +4896,7 @@ fi
|
||||
# checks for library functions
|
||||
AC_CHECK_FUNCS([ \
|
||||
accept4 alarm bind_textdomain_codeset chmod chown clock close_range confstr \
|
||||
- copy_file_range ctermid dup dup3 execv explicit_bzero explicit_memset \
|
||||
+ copy_file_range ctermid dup execv explicit_bzero explicit_memset \
|
||||
faccessat fchmod fchmodat fchown fchownat fdopendir fdwalk fexecve \
|
||||
fork fork1 fpathconf fstatat ftime ftruncate futimens futimes futimesat \
|
||||
gai_strerror getegid getentropy geteuid getgid getgrgid getgrgid_r \
|
||||
@@ -4906,7 +4906,7 @@ AC_CHECK_FUNCS([ \
|
||||
getspnam getuid getwd if_nameindex initgroups kill killpg lchown linkat \
|
||||
lockf lstat lutimes madvise mbrtowc memrchr mkdirat mkfifo mkfifoat \
|
||||
mknod mknodat mktime mmap mremap nice openat opendir pathconf pause pipe \
|
||||
- pipe2 plock poll posix_fadvise posix_fallocate posix_spawn posix_spawnp \
|
||||
+ plock poll posix_fadvise posix_fallocate posix_spawn posix_spawnp \
|
||||
pread preadv preadv2 pthread_condattr_setclock pthread_init pthread_kill \
|
||||
pwrite pwritev pwritev2 readlink readlinkat readv realpath renameat \
|
||||
rtpSpawn sched_get_priority_max sched_rr_get_interval sched_setaffinity \
|
||||
@@ -4928,6 +4928,13 @@ if test "$MACHDEP" != linux; then
|
||||
AC_CHECK_FUNCS([lchmod])
|
||||
fi
|
||||
|
||||
+# macOS introduced dup3 and pipe2 in macOS 27, late in the
|
||||
+# lifetime of this version of Python. Rather than adding weaklinking
|
||||
+# support for them, just continue to ignore them.
|
||||
+if test "$ac_sys_system" != "Darwin"; then
|
||||
+ AC_CHECK_FUNCS([dup3 pipe2])
|
||||
+fi
|
||||
+
|
||||
AC_CHECK_DECL([dirfd],
|
||||
[AC_DEFINE([HAVE_DIRFD], [1],
|
||||
[Define if you have the 'dirfd' function or macro.])],
|
||||
--
|
||||
2.55.0.windows.3
|
||||
|
||||
@ -0,0 +1,119 @@
|
||||
From 33d7809038f73f689c4a7d622dbf49e90774f1ff Mon Sep 17 00:00:00 2001
|
||||
From: Ned Deily <nad@python.org>
|
||||
Date: Wed, 5 Aug 2026 10:30:17 +0300
|
||||
Subject: [PATCH] (downstream) [3.12] gh-153711: Avoid use of dup3 and pipe2
|
||||
calls introduced in macOS 27 (#155211)
|
||||
|
||||
---
|
||||
...-08-05-02-02-33.gh-issue-153711.pO9fFb.rst | 3 ++
|
||||
configure | 33 +++++++++++--------
|
||||
configure.ac | 11 +++++--
|
||||
3 files changed, 32 insertions(+), 15 deletions(-)
|
||||
create mode 100644 Misc/NEWS.d/next/macOS/2026-08-05-02-02-33.gh-issue-153711.pO9fFb.rst
|
||||
|
||||
diff --git a/Misc/NEWS.d/next/macOS/2026-08-05-02-02-33.gh-issue-153711.pO9fFb.rst b/Misc/NEWS.d/next/macOS/2026-08-05-02-02-33.gh-issue-153711.pO9fFb.rst
|
||||
new file mode 100644
|
||||
index 00000000000..90804c179a4
|
||||
--- /dev/null
|
||||
+++ b/Misc/NEWS.d/next/macOS/2026-08-05-02-02-33.gh-issue-153711.pO9fFb.rst
|
||||
@@ -0,0 +1,3 @@
|
||||
+On macOS, do not attempt to use the :manpage:`dup3(2)` and
|
||||
+:manpage:`pipe2(2)` system calls introduced in
|
||||
+macOS 27 to prevent problems when running on older systems.
|
||||
diff --git a/configure b/configure
|
||||
index 4dfaeecfc0b..bec4c9ac763 100755
|
||||
--- a/configure
|
||||
+++ b/configure
|
||||
@@ -17591,13 +17591,7 @@ fi
|
||||
ac_fn_c_check_func "$LINENO" "dup" "ac_cv_func_dup"
|
||||
if test "x$ac_cv_func_dup" = xyes
|
||||
then :
|
||||
- printf "%s\n" "#define HAVE_DUP 1" >>confdefs.h
|
||||
-
|
||||
-fi
|
||||
-ac_fn_c_check_func "$LINENO" "dup3" "ac_cv_func_dup3"
|
||||
-if test "x$ac_cv_func_dup3" = xyes
|
||||
-then :
|
||||
- printf "%s\n" "#define HAVE_DUP3 1" >>confdefs.h
|
||||
+ printf '%s\n' "#define HAVE_DUP 1" >>confdefs.h
|
||||
|
||||
fi
|
||||
ac_fn_c_check_func "$LINENO" "execv" "ac_cv_func_execv"
|
||||
@@ -18067,12 +18061,6 @@ if test "x$ac_cv_func_pipe" = xyes
|
||||
then :
|
||||
printf "%s\n" "#define HAVE_PIPE 1" >>confdefs.h
|
||||
|
||||
-fi
|
||||
-ac_fn_c_check_func "$LINENO" "pipe2" "ac_cv_func_pipe2"
|
||||
-if test "x$ac_cv_func_pipe2" = xyes
|
||||
-then :
|
||||
- printf "%s\n" "#define HAVE_PIPE2 1" >>confdefs.h
|
||||
-
|
||||
fi
|
||||
ac_fn_c_check_func "$LINENO" "plock" "ac_cv_func_plock"
|
||||
if test "x$ac_cv_func_plock" = xyes
|
||||
@@ -18647,6 +18635,25 @@ fi
|
||||
|
||||
fi
|
||||
|
||||
+# macOS introduced dup3 and pipe2 in macOS 27, late in the
|
||||
+# lifetime of this version of Python. Rather than adding weaklinking
|
||||
+# support for them, just continue to ignore them.
|
||||
+if test "$ac_sys_system" != "Darwin"; then
|
||||
+ ac_fn_c_check_func "$LINENO" "dup3" "ac_cv_func_dup3"
|
||||
+if test "x$ac_cv_func_dup3" = xyes
|
||||
+then :
|
||||
+ printf '%s\n' "#define HAVE_DUP3 1" >>confdefs.h
|
||||
+
|
||||
+fi
|
||||
+ac_fn_c_check_func "$LINENO" "pipe2" "ac_cv_func_pipe2"
|
||||
+if test "x$ac_cv_func_pipe2" = xyes
|
||||
+then :
|
||||
+ printf '%s\n' "#define HAVE_PIPE2 1" >>confdefs.h
|
||||
+
|
||||
+fi
|
||||
+
|
||||
+fi
|
||||
+
|
||||
{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for $CC options needed to detect all undeclared functions" >&5
|
||||
printf %s "checking for $CC options needed to detect all undeclared functions... " >&6; }
|
||||
if test ${ac_cv_c_undeclared_builtin_options+y}
|
||||
diff --git a/configure.ac b/configure.ac
|
||||
index 0d6df8e24e4..cbf749da60b 100644
|
||||
--- a/configure.ac
|
||||
+++ b/configure.ac
|
||||
@@ -4896,7 +4896,7 @@ fi
|
||||
# checks for library functions
|
||||
AC_CHECK_FUNCS([ \
|
||||
accept4 alarm bind_textdomain_codeset chmod chown clock close_range confstr \
|
||||
- copy_file_range ctermid dup dup3 execv explicit_bzero explicit_memset \
|
||||
+ copy_file_range ctermid dup execv explicit_bzero explicit_memset \
|
||||
faccessat fchmod fchmodat fchown fchownat fdopendir fdwalk fexecve \
|
||||
fork fork1 fpathconf fstatat ftime ftruncate futimens futimes futimesat \
|
||||
gai_strerror getegid getentropy geteuid getgid getgrgid getgrgid_r \
|
||||
@@ -4906,7 +4906,7 @@ AC_CHECK_FUNCS([ \
|
||||
getspnam getuid getwd if_nameindex initgroups kill killpg lchown linkat \
|
||||
lockf lstat lutimes madvise mbrtowc memrchr mkdirat mkfifo mkfifoat \
|
||||
mknod mknodat mktime mmap mremap nice openat opendir pathconf pause pipe \
|
||||
- pipe2 plock poll posix_fadvise posix_fallocate posix_spawn posix_spawnp \
|
||||
+ plock poll posix_fadvise posix_fallocate posix_spawn posix_spawnp \
|
||||
pread preadv preadv2 pthread_condattr_setclock pthread_init pthread_kill \
|
||||
pwrite pwritev pwritev2 readlink readlinkat readv realpath renameat \
|
||||
rtpSpawn sched_get_priority_max sched_rr_get_interval sched_setaffinity \
|
||||
@@ -4928,6 +4928,13 @@ if test "$MACHDEP" != linux; then
|
||||
AC_CHECK_FUNCS([lchmod])
|
||||
fi
|
||||
|
||||
+# macOS introduced dup3 and pipe2 in macOS 27, late in the
|
||||
+# lifetime of this version of Python. Rather than adding weaklinking
|
||||
+# support for them, just continue to ignore them.
|
||||
+if test "$ac_sys_system" != "Darwin"; then
|
||||
+ AC_CHECK_FUNCS([dup3 pipe2])
|
||||
+fi
|
||||
+
|
||||
AC_CHECK_DECL([dirfd],
|
||||
[AC_DEFINE([HAVE_DIRFD], [1],
|
||||
[Define if you have the 'dirfd' function or macro.])],
|
||||
--
|
||||
2.55.0.windows.3
|
||||
|
||||
@ -0,0 +1,119 @@
|
||||
From 2b8183e6b45ec2b5d591c034687e7f0ba5eb1bbc Mon Sep 17 00:00:00 2001
|
||||
From: Ned Deily <nad@python.org>
|
||||
Date: Wed, 5 Aug 2026 10:30:17 +0300
|
||||
Subject: [PATCH] (downstream) [3.12] gh-153711: Avoid use of dup3 and pipe2
|
||||
calls introduced in macOS 27 (#155211)
|
||||
|
||||
---
|
||||
...-08-05-02-02-33.gh-issue-153711.pO9fFb.rst | 3 ++
|
||||
configure | 33 +++++++++++--------
|
||||
configure.ac | 11 +++++--
|
||||
3 files changed, 32 insertions(+), 15 deletions(-)
|
||||
create mode 100644 Misc/NEWS.d/next/macOS/2026-08-05-02-02-33.gh-issue-153711.pO9fFb.rst
|
||||
|
||||
diff --git a/Misc/NEWS.d/next/macOS/2026-08-05-02-02-33.gh-issue-153711.pO9fFb.rst b/Misc/NEWS.d/next/macOS/2026-08-05-02-02-33.gh-issue-153711.pO9fFb.rst
|
||||
new file mode 100644
|
||||
index 00000000000..90804c179a4
|
||||
--- /dev/null
|
||||
+++ b/Misc/NEWS.d/next/macOS/2026-08-05-02-02-33.gh-issue-153711.pO9fFb.rst
|
||||
@@ -0,0 +1,3 @@
|
||||
+On macOS, do not attempt to use the :manpage:`dup3(2)` and
|
||||
+:manpage:`pipe2(2)` system calls introduced in
|
||||
+macOS 27 to prevent problems when running on older systems.
|
||||
diff --git a/configure b/configure
|
||||
index 1c75810d9e8..439464c2d98 100755
|
||||
--- a/configure
|
||||
+++ b/configure
|
||||
@@ -17591,13 +17591,7 @@ fi
|
||||
ac_fn_c_check_func "$LINENO" "dup" "ac_cv_func_dup"
|
||||
if test "x$ac_cv_func_dup" = xyes
|
||||
then :
|
||||
- printf "%s\n" "#define HAVE_DUP 1" >>confdefs.h
|
||||
-
|
||||
-fi
|
||||
-ac_fn_c_check_func "$LINENO" "dup3" "ac_cv_func_dup3"
|
||||
-if test "x$ac_cv_func_dup3" = xyes
|
||||
-then :
|
||||
- printf "%s\n" "#define HAVE_DUP3 1" >>confdefs.h
|
||||
+ printf '%s\n' "#define HAVE_DUP 1" >>confdefs.h
|
||||
|
||||
fi
|
||||
ac_fn_c_check_func "$LINENO" "execv" "ac_cv_func_execv"
|
||||
@@ -18067,12 +18061,6 @@ if test "x$ac_cv_func_pipe" = xyes
|
||||
then :
|
||||
printf "%s\n" "#define HAVE_PIPE 1" >>confdefs.h
|
||||
|
||||
-fi
|
||||
-ac_fn_c_check_func "$LINENO" "pipe2" "ac_cv_func_pipe2"
|
||||
-if test "x$ac_cv_func_pipe2" = xyes
|
||||
-then :
|
||||
- printf "%s\n" "#define HAVE_PIPE2 1" >>confdefs.h
|
||||
-
|
||||
fi
|
||||
ac_fn_c_check_func "$LINENO" "plock" "ac_cv_func_plock"
|
||||
if test "x$ac_cv_func_plock" = xyes
|
||||
@@ -18647,6 +18635,25 @@ fi
|
||||
|
||||
fi
|
||||
|
||||
+# macOS introduced dup3 and pipe2 in macOS 27, late in the
|
||||
+# lifetime of this version of Python. Rather than adding weaklinking
|
||||
+# support for them, just continue to ignore them.
|
||||
+if test "$ac_sys_system" != "Darwin"; then
|
||||
+ ac_fn_c_check_func "$LINENO" "dup3" "ac_cv_func_dup3"
|
||||
+if test "x$ac_cv_func_dup3" = xyes
|
||||
+then :
|
||||
+ printf '%s\n' "#define HAVE_DUP3 1" >>confdefs.h
|
||||
+
|
||||
+fi
|
||||
+ac_fn_c_check_func "$LINENO" "pipe2" "ac_cv_func_pipe2"
|
||||
+if test "x$ac_cv_func_pipe2" = xyes
|
||||
+then :
|
||||
+ printf '%s\n' "#define HAVE_PIPE2 1" >>confdefs.h
|
||||
+
|
||||
+fi
|
||||
+
|
||||
+fi
|
||||
+
|
||||
{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for $CC options needed to detect all undeclared functions" >&5
|
||||
printf %s "checking for $CC options needed to detect all undeclared functions... " >&6; }
|
||||
if test ${ac_cv_c_undeclared_builtin_options+y}
|
||||
diff --git a/configure.ac b/configure.ac
|
||||
index d0d54050286..94b624b3e0c 100644
|
||||
--- a/configure.ac
|
||||
+++ b/configure.ac
|
||||
@@ -4896,7 +4896,7 @@ fi
|
||||
# checks for library functions
|
||||
AC_CHECK_FUNCS([ \
|
||||
accept4 alarm bind_textdomain_codeset chmod chown clock close_range confstr \
|
||||
- copy_file_range ctermid dup dup3 execv explicit_bzero explicit_memset \
|
||||
+ copy_file_range ctermid dup execv explicit_bzero explicit_memset \
|
||||
faccessat fchmod fchmodat fchown fchownat fdopendir fdwalk fexecve \
|
||||
fork fork1 fpathconf fstatat ftime ftruncate futimens futimes futimesat \
|
||||
gai_strerror getegid getentropy geteuid getgid getgrgid getgrgid_r \
|
||||
@@ -4906,7 +4906,7 @@ AC_CHECK_FUNCS([ \
|
||||
getspnam getuid getwd if_nameindex initgroups kill killpg lchown linkat \
|
||||
lockf lstat lutimes madvise mbrtowc memrchr mkdirat mkfifo mkfifoat \
|
||||
mknod mknodat mktime mmap mremap nice openat opendir pathconf pause pipe \
|
||||
- pipe2 plock poll posix_fadvise posix_fallocate posix_spawn posix_spawnp \
|
||||
+ plock poll posix_fadvise posix_fallocate posix_spawn posix_spawnp \
|
||||
pread preadv preadv2 pthread_condattr_setclock pthread_init pthread_kill \
|
||||
pwrite pwritev pwritev2 readlink readlinkat readv realpath renameat \
|
||||
rtpSpawn sched_get_priority_max sched_rr_get_interval sched_setaffinity \
|
||||
@@ -4928,6 +4928,13 @@ if test "$MACHDEP" != linux; then
|
||||
AC_CHECK_FUNCS([lchmod])
|
||||
fi
|
||||
|
||||
+# macOS introduced dup3 and pipe2 in macOS 27, late in the
|
||||
+# lifetime of this version of Python. Rather than adding weaklinking
|
||||
+# support for them, just continue to ignore them.
|
||||
+if test "$ac_sys_system" != "Darwin"; then
|
||||
+ AC_CHECK_FUNCS([dup3 pipe2])
|
||||
+fi
|
||||
+
|
||||
AC_CHECK_DECL([dirfd],
|
||||
[AC_DEFINE([HAVE_DIRFD], [1],
|
||||
[Define if you have the 'dirfd' function or macro.])],
|
||||
--
|
||||
2.55.0.windows.3
|
||||
|
||||
@ -0,0 +1,119 @@
|
||||
From d92ec3351dd6a0cc2e2fe10bae23ffdb817de42d Mon Sep 17 00:00:00 2001
|
||||
From: Ned Deily <nad@python.org>
|
||||
Date: Wed, 5 Aug 2026 10:30:17 +0300
|
||||
Subject: [PATCH] (downstream) [3.12] gh-153711: Avoid use of dup3 and pipe2
|
||||
calls introduced in macOS 27 (#155211)
|
||||
|
||||
---
|
||||
...-08-05-02-02-33.gh-issue-153711.pO9fFb.rst | 3 ++
|
||||
configure | 33 +++++++++++--------
|
||||
configure.ac | 11 +++++--
|
||||
3 files changed, 32 insertions(+), 15 deletions(-)
|
||||
create mode 100644 Misc/NEWS.d/next/macOS/2026-08-05-02-02-33.gh-issue-153711.pO9fFb.rst
|
||||
|
||||
diff --git a/Misc/NEWS.d/next/macOS/2026-08-05-02-02-33.gh-issue-153711.pO9fFb.rst b/Misc/NEWS.d/next/macOS/2026-08-05-02-02-33.gh-issue-153711.pO9fFb.rst
|
||||
new file mode 100644
|
||||
index 00000000000..90804c179a4
|
||||
--- /dev/null
|
||||
+++ b/Misc/NEWS.d/next/macOS/2026-08-05-02-02-33.gh-issue-153711.pO9fFb.rst
|
||||
@@ -0,0 +1,3 @@
|
||||
+On macOS, do not attempt to use the :manpage:`dup3(2)` and
|
||||
+:manpage:`pipe2(2)` system calls introduced in
|
||||
+macOS 27 to prevent problems when running on older systems.
|
||||
diff --git a/configure b/configure
|
||||
index 241cf8f3d4a..62575e79243 100755
|
||||
--- a/configure
|
||||
+++ b/configure
|
||||
@@ -17594,13 +17594,7 @@ fi
|
||||
ac_fn_c_check_func "$LINENO" "dup" "ac_cv_func_dup"
|
||||
if test "x$ac_cv_func_dup" = xyes
|
||||
then :
|
||||
- printf "%s\n" "#define HAVE_DUP 1" >>confdefs.h
|
||||
-
|
||||
-fi
|
||||
-ac_fn_c_check_func "$LINENO" "dup3" "ac_cv_func_dup3"
|
||||
-if test "x$ac_cv_func_dup3" = xyes
|
||||
-then :
|
||||
- printf "%s\n" "#define HAVE_DUP3 1" >>confdefs.h
|
||||
+ printf '%s\n' "#define HAVE_DUP 1" >>confdefs.h
|
||||
|
||||
fi
|
||||
ac_fn_c_check_func "$LINENO" "execv" "ac_cv_func_execv"
|
||||
@@ -18070,12 +18064,6 @@ if test "x$ac_cv_func_pipe" = xyes
|
||||
then :
|
||||
printf "%s\n" "#define HAVE_PIPE 1" >>confdefs.h
|
||||
|
||||
-fi
|
||||
-ac_fn_c_check_func "$LINENO" "pipe2" "ac_cv_func_pipe2"
|
||||
-if test "x$ac_cv_func_pipe2" = xyes
|
||||
-then :
|
||||
- printf "%s\n" "#define HAVE_PIPE2 1" >>confdefs.h
|
||||
-
|
||||
fi
|
||||
ac_fn_c_check_func "$LINENO" "plock" "ac_cv_func_plock"
|
||||
if test "x$ac_cv_func_plock" = xyes
|
||||
@@ -18650,6 +18638,25 @@ fi
|
||||
|
||||
fi
|
||||
|
||||
+# macOS introduced dup3 and pipe2 in macOS 27, late in the
|
||||
+# lifetime of this version of Python. Rather than adding weaklinking
|
||||
+# support for them, just continue to ignore them.
|
||||
+if test "$ac_sys_system" != "Darwin"; then
|
||||
+ ac_fn_c_check_func "$LINENO" "dup3" "ac_cv_func_dup3"
|
||||
+if test "x$ac_cv_func_dup3" = xyes
|
||||
+then :
|
||||
+ printf '%s\n' "#define HAVE_DUP3 1" >>confdefs.h
|
||||
+
|
||||
+fi
|
||||
+ac_fn_c_check_func "$LINENO" "pipe2" "ac_cv_func_pipe2"
|
||||
+if test "x$ac_cv_func_pipe2" = xyes
|
||||
+then :
|
||||
+ printf '%s\n' "#define HAVE_PIPE2 1" >>confdefs.h
|
||||
+
|
||||
+fi
|
||||
+
|
||||
+fi
|
||||
+
|
||||
{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for $CC options needed to detect all undeclared functions" >&5
|
||||
printf %s "checking for $CC options needed to detect all undeclared functions... " >&6; }
|
||||
if test ${ac_cv_c_undeclared_builtin_options+y}
|
||||
diff --git a/configure.ac b/configure.ac
|
||||
index 9270b5f7172..7225a26752e 100644
|
||||
--- a/configure.ac
|
||||
+++ b/configure.ac
|
||||
@@ -4899,7 +4899,7 @@ fi
|
||||
# checks for library functions
|
||||
AC_CHECK_FUNCS([ \
|
||||
accept4 alarm bind_textdomain_codeset chmod chown clock close_range confstr \
|
||||
- copy_file_range ctermid dup dup3 execv explicit_bzero explicit_memset \
|
||||
+ copy_file_range ctermid dup execv explicit_bzero explicit_memset \
|
||||
faccessat fchmod fchmodat fchown fchownat fdopendir fdwalk fexecve \
|
||||
fork fork1 fpathconf fstatat ftime ftruncate futimens futimes futimesat \
|
||||
gai_strerror getegid getentropy geteuid getgid getgrgid getgrgid_r \
|
||||
@@ -4909,7 +4909,7 @@ AC_CHECK_FUNCS([ \
|
||||
getspnam getuid getwd if_nameindex initgroups kill killpg lchown linkat \
|
||||
lockf lstat lutimes madvise mbrtowc memrchr mkdirat mkfifo mkfifoat \
|
||||
mknod mknodat mktime mmap mremap nice openat opendir pathconf pause pipe \
|
||||
- pipe2 plock poll posix_fadvise posix_fallocate posix_spawn posix_spawnp \
|
||||
+ plock poll posix_fadvise posix_fallocate posix_spawn posix_spawnp \
|
||||
pread preadv preadv2 pthread_condattr_setclock pthread_init pthread_kill \
|
||||
pwrite pwritev pwritev2 readlink readlinkat readv realpath renameat \
|
||||
rtpSpawn sched_get_priority_max sched_rr_get_interval sched_setaffinity \
|
||||
@@ -4931,6 +4931,13 @@ if test "$MACHDEP" != linux; then
|
||||
AC_CHECK_FUNCS([lchmod])
|
||||
fi
|
||||
|
||||
+# macOS introduced dup3 and pipe2 in macOS 27, late in the
|
||||
+# lifetime of this version of Python. Rather than adding weaklinking
|
||||
+# support for them, just continue to ignore them.
|
||||
+if test "$ac_sys_system" != "Darwin"; then
|
||||
+ AC_CHECK_FUNCS([dup3 pipe2])
|
||||
+fi
|
||||
+
|
||||
AC_CHECK_DECL([dirfd],
|
||||
[AC_DEFINE([HAVE_DIRFD], [1],
|
||||
[Define if you have the 'dirfd' function or macro.])],
|
||||
--
|
||||
2.55.0.windows.3
|
||||
|
||||
@ -0,0 +1,119 @@
|
||||
From 99908afd676839023dd45807502e0018e3347268 Mon Sep 17 00:00:00 2001
|
||||
From: Ned Deily <nad@python.org>
|
||||
Date: Wed, 5 Aug 2026 10:30:17 +0300
|
||||
Subject: [PATCH] (downstream) [3.12] gh-153711: Avoid use of dup3 and pipe2
|
||||
calls introduced in macOS 27 (#155211)
|
||||
|
||||
---
|
||||
...-08-05-02-02-33.gh-issue-153711.pO9fFb.rst | 3 ++
|
||||
configure | 33 +++++++++++--------
|
||||
configure.ac | 11 +++++--
|
||||
3 files changed, 32 insertions(+), 15 deletions(-)
|
||||
create mode 100644 Misc/NEWS.d/next/macOS/2026-08-05-02-02-33.gh-issue-153711.pO9fFb.rst
|
||||
|
||||
diff --git a/Misc/NEWS.d/next/macOS/2026-08-05-02-02-33.gh-issue-153711.pO9fFb.rst b/Misc/NEWS.d/next/macOS/2026-08-05-02-02-33.gh-issue-153711.pO9fFb.rst
|
||||
new file mode 100644
|
||||
index 00000000000..90804c179a4
|
||||
--- /dev/null
|
||||
+++ b/Misc/NEWS.d/next/macOS/2026-08-05-02-02-33.gh-issue-153711.pO9fFb.rst
|
||||
@@ -0,0 +1,3 @@
|
||||
+On macOS, do not attempt to use the :manpage:`dup3(2)` and
|
||||
+:manpage:`pipe2(2)` system calls introduced in
|
||||
+macOS 27 to prevent problems when running on older systems.
|
||||
diff --git a/configure b/configure
|
||||
index 89edc42f45c..e099c5ad55a 100755
|
||||
--- a/configure
|
||||
+++ b/configure
|
||||
@@ -17614,13 +17614,7 @@ fi
|
||||
ac_fn_c_check_func "$LINENO" "dup" "ac_cv_func_dup"
|
||||
if test "x$ac_cv_func_dup" = xyes
|
||||
then :
|
||||
- printf "%s\n" "#define HAVE_DUP 1" >>confdefs.h
|
||||
-
|
||||
-fi
|
||||
-ac_fn_c_check_func "$LINENO" "dup3" "ac_cv_func_dup3"
|
||||
-if test "x$ac_cv_func_dup3" = xyes
|
||||
-then :
|
||||
- printf "%s\n" "#define HAVE_DUP3 1" >>confdefs.h
|
||||
+ printf '%s\n' "#define HAVE_DUP 1" >>confdefs.h
|
||||
|
||||
fi
|
||||
ac_fn_c_check_func "$LINENO" "execv" "ac_cv_func_execv"
|
||||
@@ -18090,12 +18084,6 @@ if test "x$ac_cv_func_pipe" = xyes
|
||||
then :
|
||||
printf "%s\n" "#define HAVE_PIPE 1" >>confdefs.h
|
||||
|
||||
-fi
|
||||
-ac_fn_c_check_func "$LINENO" "pipe2" "ac_cv_func_pipe2"
|
||||
-if test "x$ac_cv_func_pipe2" = xyes
|
||||
-then :
|
||||
- printf "%s\n" "#define HAVE_PIPE2 1" >>confdefs.h
|
||||
-
|
||||
fi
|
||||
ac_fn_c_check_func "$LINENO" "plock" "ac_cv_func_plock"
|
||||
if test "x$ac_cv_func_plock" = xyes
|
||||
@@ -18670,6 +18658,25 @@ fi
|
||||
|
||||
fi
|
||||
|
||||
+# macOS introduced dup3 and pipe2 in macOS 27, late in the
|
||||
+# lifetime of this version of Python. Rather than adding weaklinking
|
||||
+# support for them, just continue to ignore them.
|
||||
+if test "$ac_sys_system" != "Darwin"; then
|
||||
+ ac_fn_c_check_func "$LINENO" "dup3" "ac_cv_func_dup3"
|
||||
+if test "x$ac_cv_func_dup3" = xyes
|
||||
+then :
|
||||
+ printf '%s\n' "#define HAVE_DUP3 1" >>confdefs.h
|
||||
+
|
||||
+fi
|
||||
+ac_fn_c_check_func "$LINENO" "pipe2" "ac_cv_func_pipe2"
|
||||
+if test "x$ac_cv_func_pipe2" = xyes
|
||||
+then :
|
||||
+ printf '%s\n' "#define HAVE_PIPE2 1" >>confdefs.h
|
||||
+
|
||||
+fi
|
||||
+
|
||||
+fi
|
||||
+
|
||||
{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for $CC options needed to detect all undeclared functions" >&5
|
||||
printf %s "checking for $CC options needed to detect all undeclared functions... " >&6; }
|
||||
if test ${ac_cv_c_undeclared_builtin_options+y}
|
||||
diff --git a/configure.ac b/configure.ac
|
||||
index 1a02d19f1b2..f2b58421d74 100644
|
||||
--- a/configure.ac
|
||||
+++ b/configure.ac
|
||||
@@ -4920,7 +4920,7 @@ fi
|
||||
# checks for library functions
|
||||
AC_CHECK_FUNCS([ \
|
||||
accept4 alarm bind_textdomain_codeset chmod chown clock close_range confstr \
|
||||
- copy_file_range ctermid dup dup3 execv explicit_bzero explicit_memset \
|
||||
+ copy_file_range ctermid dup execv explicit_bzero explicit_memset \
|
||||
faccessat fchmod fchmodat fchown fchownat fdopendir fdwalk fexecve \
|
||||
fork fork1 fpathconf fstatat ftime ftruncate futimens futimes futimesat \
|
||||
gai_strerror getegid getentropy geteuid getgid getgrgid getgrgid_r \
|
||||
@@ -4930,7 +4930,7 @@ AC_CHECK_FUNCS([ \
|
||||
getspnam getuid getwd if_nameindex initgroups kill killpg lchown linkat \
|
||||
lockf lstat lutimes madvise mbrtowc memrchr mkdirat mkfifo mkfifoat \
|
||||
mknod mknodat mktime mmap mremap nice openat opendir pathconf pause pipe \
|
||||
- pipe2 plock poll posix_fadvise posix_fallocate posix_spawn posix_spawnp \
|
||||
+ plock poll posix_fadvise posix_fallocate posix_spawn posix_spawnp \
|
||||
pread preadv preadv2 pthread_condattr_setclock pthread_init pthread_kill \
|
||||
pwrite pwritev pwritev2 readlink readlinkat readv realpath renameat \
|
||||
rtpSpawn sched_get_priority_max sched_rr_get_interval sched_setaffinity \
|
||||
@@ -4952,6 +4952,13 @@ if test "$MACHDEP" != linux; then
|
||||
AC_CHECK_FUNCS([lchmod])
|
||||
fi
|
||||
|
||||
+# macOS introduced dup3 and pipe2 in macOS 27, late in the
|
||||
+# lifetime of this version of Python. Rather than adding weaklinking
|
||||
+# support for them, just continue to ignore them.
|
||||
+if test "$ac_sys_system" != "Darwin"; then
|
||||
+ AC_CHECK_FUNCS([dup3 pipe2])
|
||||
+fi
|
||||
+
|
||||
AC_CHECK_DECL([dirfd],
|
||||
[AC_DEFINE([HAVE_DIRFD], [1],
|
||||
[Define if you have the 'dirfd' function or macro.])],
|
||||
--
|
||||
2.55.0.windows.3
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user