On 2026-07-28 19:45, Collin Funk wrote:
I haven't seen that issue specifically, but there is some discussion on
libc-alpha and bug-gnulib [1], about a similar issue.
Any reason not to install the patch (attached) that you proposed Saturday on
bug-gnulib for this problem? I've been waiting for it to get installed so that
I can propagate it into m4 master and (I hope) fix Tom's problem.
From b0b3d5d5518985fad0878ba1a3f63bfcef25f791 Mon Sep 17 00:00:00 2001
Message-ID: <b0b3d5d5518985fad0878ba1a3f63bfcef25f791.1785006655.git.collin.fu...@gmail.com>
From: Collin Funk <[email protected]>
Date: Sat, 25 Jul 2026 12:09:28 -0700
Subject: [PATCH] posix_spawn_faction_add{chdir,fchdir}: Fix checks on
glibc-2.44.
Reported by Xi Ruoyao <[email protected]>:
<https://lists.gnu.org/archive/html/bug-gnulib/2026-07/msg00164.html>
* m4/posix_spawn_faction_addchdir.m4
(gl_FUNC_POSIX_SPAWN_FILE_ACTIONS_ADDCHDIR): Use AC_CHECK_DECLS instead
of AC_CHECK_FUNCS_ONCE.
* m4/posix_spawn_faction_addfchdir.m4
(gl_FUNC_POSIX_SPAWN_FILE_ACTIONS_ADDFCHDIR): Use AC_CHECK_DECLS instead
of AC_CHECK_FUNCS_ONCE.
---
ChangeLog | 12 ++++++++++++
m4/posix_spawn_faction_addchdir.m4 | 7 ++++---
m4/posix_spawn_faction_addfchdir.m4 | 7 ++++---
3 files changed, 20 insertions(+), 6 deletions(-)
diff --git a/ChangeLog b/ChangeLog
index 97ce480fd9..eb96f263a4 100644
--- a/ChangeLog
+++ b/ChangeLog
@@ -1,3 +1,15 @@
+2026-07-25 Collin Funk <[email protected]>
+
+ posix_spawn_faction_add{chdir,fchdir}: Fix checks on glibc-2.44.
+ Reported by Xi Ruoyao <[email protected]>:
+ <https://lists.gnu.org/archive/html/bug-gnulib/2026-07/msg00164.html>
+ * m4/posix_spawn_faction_addchdir.m4
+ (gl_FUNC_POSIX_SPAWN_FILE_ACTIONS_ADDCHDIR): Use AC_CHECK_DECLS instead
+ of AC_CHECK_FUNCS_ONCE.
+ * m4/posix_spawn_faction_addfchdir.m4
+ (gl_FUNC_POSIX_SPAWN_FILE_ACTIONS_ADDFCHDIR): Use AC_CHECK_DECLS instead
+ of AC_CHECK_FUNCS_ONCE.
+
2026-07-25 Paul Eggert <[email protected]>
gettext-h: conform to C on Solaris
diff --git a/m4/posix_spawn_faction_addchdir.m4 b/m4/posix_spawn_faction_addchdir.m4
index 779e3813a7..56e33d1a51 100644
--- a/m4/posix_spawn_faction_addchdir.m4
+++ b/m4/posix_spawn_faction_addchdir.m4
@@ -1,5 +1,5 @@
# posix_spawn_faction_addchdir.m4
-# serial 2
+# serial 3
dnl Copyright (C) 2018-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,
@@ -11,10 +11,11 @@ AC_DEFUN([gl_FUNC_POSIX_SPAWN_FILE_ACTIONS_ADDCHDIR]
AC_REQUIRE([gl_SPAWN_H_DEFAULTS])
AC_REQUIRE([AC_PROG_CC])
gl_POSIX_SPAWN
- AC_CHECK_FUNCS_ONCE([posix_spawn_file_actions_addchdir])
+ AC_CHECK_DECLS([posix_spawn_file_actions_addchdir],,,
+ [[#include <spawn.h>]])
gl_CHECK_FUNCS_ANDROID([posix_spawn_file_actions_addchdir_np],
[[#include <spawn.h>]])
- if test $ac_cv_func_posix_spawn_file_actions_addchdir = yes; then
+ if test $ac_cv_have_decl_posix_spawn_file_actions_addchdir = yes; then
dnl This function is not yet standardized. Therefore override the
dnl system's implementation always.
REPLACE_POSIX_SPAWN_FILE_ACTIONS_ADDCHDIR=1
diff --git a/m4/posix_spawn_faction_addfchdir.m4 b/m4/posix_spawn_faction_addfchdir.m4
index e78ea11a88..e8ea9b08b1 100644
--- a/m4/posix_spawn_faction_addfchdir.m4
+++ b/m4/posix_spawn_faction_addfchdir.m4
@@ -1,5 +1,5 @@
# posix_spawn_faction_addfchdir.m4
-# serial 2
+# serial 3
dnl Copyright (C) 2018-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,
@@ -11,10 +11,11 @@ AC_DEFUN([gl_FUNC_POSIX_SPAWN_FILE_ACTIONS_ADDFCHDIR]
AC_REQUIRE([gl_SPAWN_H_DEFAULTS])
AC_REQUIRE([AC_PROG_CC])
gl_POSIX_SPAWN
- AC_CHECK_FUNCS_ONCE([posix_spawn_file_actions_addfchdir])
+ AC_CHECK_DECLS([posix_spawn_file_actions_addfchdir],,,
+ [[#include <spawn.h>]])
gl_CHECK_FUNCS_ANDROID([posix_spawn_file_actions_addfchdir_np],
[[#include <spawn.h>]])
- if test $ac_cv_func_posix_spawn_file_actions_addfchdir = yes; then
+ if test $ac_cv_have_decl_posix_spawn_file_actions_addfchdir = yes; then
dnl This function is not yet standardized. Therefore override the
dnl system's implementation always.
REPLACE_POSIX_SPAWN_FILE_ACTIONS_ADDFCHDIR=1
--
2.55.0