From df12be387c61fa8816c5e7a1b1a435f6e2ce255c Mon Sep 17 00:00:00 2001 From: Bruno Haible Date: Sun, 22 Jan 2023 02:00:51 +0100 Subject: [PATCH 09/47] Resolve conflicts for functions introduced in Android API level 16. * m4/faccessat.m4 (gl_FUNC_FACCESSAT): Conditionally set REPLACE_FACCESSAT. * lib/unistd.in.h (faccessat): Disable _GL_CXXALIASWARN invocation on non-glibc systems. --- ChangeLog | 9 +++++++++ lib/unistd.in.h | 2 ++ m4/faccessat.m4 | 5 ++++- 3 files changed, 15 insertions(+), 1 deletion(-) diff --git a/ChangeLog b/ChangeLog index e711c34b6c..7283803817 100644 --- a/ChangeLog +++ b/ChangeLog @@ -1,3 +1,12 @@ +2023-01-22 Bruno Haible + + Resolve conflicts for functions introduced in Android API level 16. + + * m4/faccessat.m4 (gl_FUNC_FACCESSAT): Conditionally set + REPLACE_FACCESSAT. + * lib/unistd.in.h (faccessat): Disable _GL_CXXALIASWARN invocation on + non-glibc systems. + 2023-01-22 Bruno Haible Resolve conflicts for functions introduced in Android API level 12. diff --git a/lib/unistd.in.h b/lib/unistd.in.h index bc69194fac..df095ba479 100644 --- a/lib/unistd.in.h +++ b/lib/unistd.in.h @@ -925,7 +925,9 @@ _GL_FUNCDECL_SYS (faccessat, int, _GL_CXXALIAS_SYS (faccessat, int, (int fd, char const *file, int mode, int flag)); # endif +# if __GLIBC__ >= 2 _GL_CXXALIASWARN (faccessat); +# endif #elif defined GNULIB_POSIXCHECK # undef faccessat # if HAVE_RAW_DECL_FACCESSAT diff --git a/m4/faccessat.m4 b/m4/faccessat.m4 index 958c4978b7..a858bfee33 100644 --- a/m4/faccessat.m4 +++ b/m4/faccessat.m4 @@ -1,4 +1,4 @@ -# serial 11 +# serial 12 # See if we need to provide faccessat replacement. dnl Copyright (C) 2009-2023 Free Software Foundation, Inc. @@ -19,6 +19,9 @@ AC_DEFUN([gl_FUNC_FACCESSAT], gl_CHECK_FUNCS_ANDROID([faccessat], [[#include ]]) if test $ac_cv_func_faccessat = no; then HAVE_FACCESSAT=0 + case "$gl_cv_onwards_func_faccessat" in + future*) REPLACE_FACCESSAT=1 ;; + esac else case $gl_cv_func_lstat_dereferences_slashed_symlink in *yes) ;; -- 2.34.1