>From cb4b0191ce484321121bd5701d271f9d1832958c Mon Sep 17 00:00:00 2001 From: Bruno Haible Date: Sun, 22 Jan 2023 02:43:23 +0100 Subject: [PATCH 14/47] Resolve conflicts for functions introduced in Android API level 19. * m4/futimens.m4 (gl_FUNC_FUTIMENS): Conditionally set REPLACE_FUTIMENS. * lib/sys_stat.in.h (futimens): Disable _GL_CXXALIASWARN invocation on non-glibc systems. --- ChangeLog | 8 ++++++++ lib/sys_stat.in.h | 2 +- m4/futimens.m4 | 5 ++++- 3 files changed, 13 insertions(+), 2 deletions(-) diff --git a/ChangeLog b/ChangeLog index acd6ddfe0f..ace915fe22 100644 --- a/ChangeLog +++ b/ChangeLog @@ -1,3 +1,11 @@ +2023-01-22 Bruno Haible + + Resolve conflicts for functions introduced in Android API level 19. + + * m4/futimens.m4 (gl_FUNC_FUTIMENS): Conditionally set REPLACE_FUTIMENS. + * lib/sys_stat.in.h (futimens): Disable _GL_CXXALIASWARN invocation on + non-glibc systems. + 2023-01-22 Bruno Haible Resolve conflicts for functions introduced in Android API level 18. diff --git a/lib/sys_stat.in.h b/lib/sys_stat.in.h index 915cab08fb..7d92239dd1 100644 --- a/lib/sys_stat.in.h +++ b/lib/sys_stat.in.h @@ -549,7 +549,7 @@ _GL_FUNCDECL_SYS (futimens, int, (int fd, struct timespec const times[2])); # endif _GL_CXXALIAS_SYS (futimens, int, (int fd, struct timespec const times[2])); # endif -# if @HAVE_FUTIMENS@ +# if __GLIBC__ >= 2 && @HAVE_FUTIMENS@ _GL_CXXALIASWARN (futimens); # endif #elif defined GNULIB_POSIXCHECK diff --git a/m4/futimens.m4 b/m4/futimens.m4 index 8e997d6ea6..dc0b21b9d5 100644 --- a/m4/futimens.m4 +++ b/m4/futimens.m4 @@ -1,4 +1,4 @@ -# serial 10 +# serial 11 # See if we need to provide futimens replacement. dnl Copyright (C) 2009-2023 Free Software Foundation, Inc. @@ -16,6 +16,9 @@ AC_DEFUN([gl_FUNC_FUTIMENS], gl_CHECK_FUNCS_ANDROID([futimens], [[#include ]]) if test $ac_cv_func_futimens = no; then HAVE_FUTIMENS=0 + case "$gl_cv_onwards_func_futimens" in + future*) REPLACE_FUTIMENS=1 ;; + esac else AC_CACHE_CHECK([whether futimens works], [gl_cv_func_futimens_works], -- 2.34.1