From 16958daf86929945e5af1ee971fbdf3a631bea39 Mon Sep 17 00:00:00 2001 From: Bruno Haible Date: Fri, 26 Jan 2024 00:18:52 +0100 Subject: [PATCH] Resolve conflicts for functions introduced in Android API level 34. * m4/posix_spawn.m4 (gl_POSIX_SPAWN_BODY): Test for posix_spawn_file_actions_addchdir_np and posix_spawn_file_actions_addfchdir_np using gl_CHECK_FUNCS_ANDROID instead of AC_CHECK_FUNCS_ONCE. * m4/posix_spawn_faction_addchdir.m4 (gl_FUNC_POSIX_SPAWN_FILE_ACTIONS_ADDCHDIR): Test for posix_spawn_file_actions_addchdir_np using gl_CHECK_FUNCS_ANDROID instead of AC_CHECK_FUNCS_ONCE. * m4/posix_spawn_faction_addfchdir.m4 (gl_FUNC_POSIX_SPAWN_FILE_ACTIONS_ADDFCHDIR): Test for posix_spawn_file_actions_addfchdir_np using gl_CHECK_FUNCS_ANDROID instead of AC_CHECK_FUNCS_ONCE. * doc/glibc-functions/posix_spawn_file_actions_addchdir_np.texi: Mention the Android API levels. * doc/glibc-functions/posix_spawn_file_actions_addfchdir_np.texi: Likewise. --- ChangeLog | 17 +++++++++++++++++ .../posix_spawn_file_actions_addchdir_np.texi | 4 ++-- .../posix_spawn_file_actions_addfchdir_np.texi | 4 ++-- m4/posix_spawn.m4 | 10 ++++++---- m4/posix_spawn_faction_addchdir.m4 | 8 +++++--- m4/posix_spawn_faction_addfchdir.m4 | 8 +++++--- 6 files changed, 37 insertions(+), 14 deletions(-) diff --git a/ChangeLog b/ChangeLog index de43b8db1d..c13636dc7f 100644 --- a/ChangeLog +++ b/ChangeLog @@ -2,6 +2,23 @@ Resolve conflicts for functions introduced in Android API level 34. + * m4/posix_spawn.m4 (gl_POSIX_SPAWN_BODY): Test for + posix_spawn_file_actions_addchdir_np and + posix_spawn_file_actions_addfchdir_np using gl_CHECK_FUNCS_ANDROID + instead of AC_CHECK_FUNCS_ONCE. + * m4/posix_spawn_faction_addchdir.m4 + (gl_FUNC_POSIX_SPAWN_FILE_ACTIONS_ADDCHDIR): Test for + posix_spawn_file_actions_addchdir_np using gl_CHECK_FUNCS_ANDROID + instead of AC_CHECK_FUNCS_ONCE. + * m4/posix_spawn_faction_addfchdir.m4 + (gl_FUNC_POSIX_SPAWN_FILE_ACTIONS_ADDFCHDIR): Test for + posix_spawn_file_actions_addfchdir_np using gl_CHECK_FUNCS_ANDROID + instead of AC_CHECK_FUNCS_ONCE. + * doc/glibc-functions/posix_spawn_file_actions_addchdir_np.texi: Mention + the Android API levels. + * doc/glibc-functions/posix_spawn_file_actions_addfchdir_np.texi: + Likewise. + * lib/string.in.h (memset_explicit): Consider REPLACE_MEMSET_EXPLICIT. * m4/string_h.m4 (gl_STRING_H_DEFAULTS): Initialize REPLACE_MEMSET_EXPLICIT. diff --git a/doc/glibc-functions/posix_spawn_file_actions_addchdir_np.texi b/doc/glibc-functions/posix_spawn_file_actions_addchdir_np.texi index 7d50ca8091..a55b4517de 100644 --- a/doc/glibc-functions/posix_spawn_file_actions_addchdir_np.texi +++ b/doc/glibc-functions/posix_spawn_file_actions_addchdir_np.texi @@ -13,8 +13,8 @@ Portability problems fixed by Gnulib: Portability problems not fixed by Gnulib: @itemize @item -This function is missing on many non-glibc platforms: -glibc 2.28, macOS 10.13, FreeBSD 13.0, NetBSD 9.0, OpenBSD 6.7, Minix 3.1.8, AIX 7.1, HP-UX 11.31, IRIX 6.5, Solaris 11.0, Cygwin 3.4.6, mingw, MSVC 14, Android 9.0. +This function is missing on many platforms: +glibc 2.28, macOS 10.13, FreeBSD 13.0, NetBSD 9.0, OpenBSD 6.7, Minix 3.1.8, AIX 7.1, HP-UX 11.31, IRIX 6.5, Solaris 11.0, Cygwin 3.4.6, mingw, MSVC 14, Android API level 33. @end itemize Note: Gnulib has a module @code{posix_spawn_file_actions_addchdir} that diff --git a/doc/glibc-functions/posix_spawn_file_actions_addfchdir_np.texi b/doc/glibc-functions/posix_spawn_file_actions_addfchdir_np.texi index 8a98195de9..10f66e0a04 100644 --- a/doc/glibc-functions/posix_spawn_file_actions_addfchdir_np.texi +++ b/doc/glibc-functions/posix_spawn_file_actions_addfchdir_np.texi @@ -13,8 +13,8 @@ Portability problems fixed by Gnulib: Portability problems not fixed by Gnulib: @itemize @item -This function is missing on all non-glibc platforms: -glibc 2.28, macOS 10.13, FreeBSD 13.0, NetBSD 9.0, OpenBSD 6.7, Minix 3.1.8, AIX 7.1, HP-UX 11.31, IRIX 6.5, Solaris 11.4, Cygwin 3.4.6, mingw, MSVC 14, Android 9.0. +This function is missing on many platforms: +glibc 2.28, macOS 10.13, FreeBSD 13.0, NetBSD 9.0, OpenBSD 6.7, Minix 3.1.8, AIX 7.1, HP-UX 11.31, IRIX 6.5, Solaris 11.4, Cygwin 3.4.6, mingw, MSVC 14, Android API level 33. @end itemize Note: Gnulib has a module @code{posix_spawn_file_actions_addfchdir} that diff --git a/m4/posix_spawn.m4 b/m4/posix_spawn.m4 index 0a0dfe7685..6291de05ad 100644 --- a/m4/posix_spawn.m4 +++ b/m4/posix_spawn.m4 @@ -1,5 +1,5 @@ -# posix_spawn.m4 serial 23 -dnl Copyright (C) 2008-2023 Free Software Foundation, Inc. +# posix_spawn.m4 serial 23.1 +dnl Copyright (C) 2008-2024 Free Software Foundation, Inc. dnl This file is free software; the Free Software Foundation dnl gives unlimited permission to copy and/or distribute it, dnl with or without modifications, as long as this notice is preserved. @@ -36,7 +36,8 @@ AC_DEFUN([gl_POSIX_SPAWN_BODY], if test $ac_cv_func_posix_spawn = yes; then m4_ifdef([gl_FUNC_POSIX_SPAWN_FILE_ACTIONS_ADDCHDIR], [dnl Module 'posix_spawn_file_actions_addchdir' is present. - AC_CHECK_FUNCS_ONCE([posix_spawn_file_actions_addchdir_np]) + gl_CHECK_FUNCS_ANDROID([posix_spawn_file_actions_addchdir_np], + [[#include ]]) if test $ac_cv_func_posix_spawn_file_actions_addchdir_np = no; then dnl In order to implement the posix_spawn_file_actions_addchdir dnl function, we need to replace the entire posix_spawn facility. @@ -45,7 +46,8 @@ AC_DEFUN([gl_POSIX_SPAWN_BODY], ]) m4_ifdef([gl_FUNC_POSIX_SPAWN_FILE_ACTIONS_ADDFCHDIR], [dnl Module 'posix_spawn_file_actions_addfchdir' is present. - AC_CHECK_FUNCS_ONCE([posix_spawn_file_actions_addfchdir_np]) + gl_CHECK_FUNCS_ANDROID([posix_spawn_file_actions_addfchdir_np], + [[#include ]]) if test $ac_cv_func_posix_spawn_file_actions_addfchdir_np = no; then dnl In order to implement the posix_spawn_file_actions_addfchdir dnl function, we need to replace the entire posix_spawn facility. diff --git a/m4/posix_spawn_faction_addchdir.m4 b/m4/posix_spawn_faction_addchdir.m4 index 6116a8e50d..a22e3a5323 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 1 -dnl Copyright (C) 2018-2023 Free Software Foundation, Inc. +# posix_spawn_faction_addchdir.m4 serial 2 +dnl Copyright (C) 2018-2024 Free Software Foundation, Inc. dnl This file is free software; the Free Software Foundation dnl gives unlimited permission to copy and/or distribute it, dnl with or without modifications, as long as this notice is preserved. @@ -9,7 +9,9 @@ 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 posix_spawn_file_actions_addchdir_np]) + AC_CHECK_FUNCS_ONCE([posix_spawn_file_actions_addchdir]) + gl_CHECK_FUNCS_ANDROID([posix_spawn_file_actions_addchdir_np], + [[#include ]]) if test $ac_cv_func_posix_spawn_file_actions_addchdir = yes; then dnl This function is not yet standardized. Therefore override the dnl system's implementation always. diff --git a/m4/posix_spawn_faction_addfchdir.m4 b/m4/posix_spawn_faction_addfchdir.m4 index d5d156f255..9bddad5378 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 1 -dnl Copyright (C) 2018-2023 Free Software Foundation, Inc. +# posix_spawn_faction_addfchdir.m4 serial 2 +dnl Copyright (C) 2018-2024 Free Software Foundation, Inc. dnl This file is free software; the Free Software Foundation dnl gives unlimited permission to copy and/or distribute it, dnl with or without modifications, as long as this notice is preserved. @@ -9,7 +9,9 @@ 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 posix_spawn_file_actions_addfchdir_np]) + AC_CHECK_FUNCS_ONCE([posix_spawn_file_actions_addfchdir]) + gl_CHECK_FUNCS_ANDROID([posix_spawn_file_actions_addfchdir_np], + [[#include ]]) if test $ac_cv_func_posix_spawn_file_actions_addfchdir = yes; then dnl This function is not yet standardized. Therefore override the dnl system's implementation always. -- 2.39.5