Paul Eggert wrote:
> macOS 27 will introduce pipe2 and looks like Apple thought
> about also introducing dup3 but didn't pull the trigger.

Then we need the Apple-specific AC_CHECK_FUNCS alternative:


2026-09-13  Bruno Haible  <[email protected]>

        dup3, pipe2: Prepare for macOS 27.
        * m4/dup3.m4 (gl_FUNC_DUP3): Invoke gl_CHECK_FUNCS_ANDROID_MACOS instead
        of gl_CHECK_FUNCS_ANDROID.
        * m4/pipe2.m4 (gl_FUNC_PIPE2): Likewise.

diff --git a/m4/dup3.m4 b/m4/dup3.m4
index c4b7d67ddd..e6474d6a32 100644
--- a/m4/dup3.m4
+++ b/m4/dup3.m4
@@ -1,5 +1,5 @@
 # dup3.m4
-# serial 7
+# serial 8
 dnl Copyright (C) 2009-2026 Free Software Foundation, Inc.
 dnl This file is free software; the Free Software Foundation
 dnl gives unlimited permission to copy and/or distribute it,
@@ -14,7 +14,7 @@ AC_DEFUN([gl_FUNC_DUP3]
   AC_REQUIRE([AC_USE_SYSTEM_EXTENSIONS])
 
   AC_CHECK_FUNCS_ONCE([setdtablesize])
-  gl_CHECK_FUNCS_ANDROID([dup3], [[#include <unistd.h>]])
+  gl_CHECK_FUNCS_ANDROID_MACOS([dup3], [[#include <unistd.h>]])
   if test $ac_cv_func_dup3 != yes; then
     HAVE_DUP3=0
     case "$gl_cv_onwards_func_dup3" in
diff --git a/m4/pipe2.m4 b/m4/pipe2.m4
index 340020f56e..77f26b86d6 100644
--- a/m4/pipe2.m4
+++ b/m4/pipe2.m4
@@ -1,5 +1,5 @@
 # pipe2.m4
-# serial 4
+# serial 5
 dnl Copyright (C) 2009-2026 Free Software Foundation, Inc.
 dnl This file is free software; the Free Software Foundation
 dnl gives unlimited permission to copy and/or distribute it,
@@ -13,7 +13,7 @@ AC_DEFUN([gl_FUNC_PIPE2]
   dnl Persuade glibc <unistd.h> to declare pipe2().
   AC_REQUIRE([AC_USE_SYSTEM_EXTENSIONS])
 
-  gl_CHECK_FUNCS_ANDROID([pipe2], [[#include <unistd.h>]])
+  gl_CHECK_FUNCS_ANDROID_MACOS([pipe2], [[#include <unistd.h>]])
   if test $ac_cv_func_pipe2 != yes; then
     HAVE_PIPE2=0
     case "$gl_cv_onwards_func_pipe2" in




Reply via email to