>From 64ad3c7d1d74fb34ab6ae92b8ab0fdd9cdd3bfbc Mon Sep 17 00:00:00 2001 From: Bruno Haible Date: Sun, 22 Jan 2023 14:33:37 +0100 Subject: [PATCH 41/47] Resolve conflicts for functions introduced in Android API level 28. * m4/glob.m4 (gl_GLOB): Conditionally set REPLACE_GLOB. * lib/glob.in.h (glob): Disable _GL_CXXALIASWARN invocation on non-glibc systems. --- ChangeLog | 4 ++++ lib/glob.in.h | 2 ++ m4/glob.m4 | 5 ++++- 3 files changed, 10 insertions(+), 1 deletion(-) diff --git a/ChangeLog b/ChangeLog index fa9d220e0c..152b3399fa 100644 --- a/ChangeLog +++ b/ChangeLog @@ -2,6 +2,10 @@ Resolve conflicts for functions introduced in Android API level 28. + * m4/glob.m4 (gl_GLOB): Conditionally set REPLACE_GLOB. + * lib/glob.in.h (glob): Disable _GL_CXXALIASWARN invocation on non-glibc + systems. + * lib/unistd.in.h (getentropy): Consider REPLACE_GETENTROPY. Disable _GL_CXXALIASWARN invocation on non-glibc systems. * m4/unistd_h.m4 (gl_UNISTD_H_DEFAULTS): Initialize REPLACE_GETENTROPY. diff --git a/lib/glob.in.h b/lib/glob.in.h index c628a9bcbd..7fc3ef7347 100644 --- a/lib/glob.in.h +++ b/lib/glob.in.h @@ -120,7 +120,9 @@ _GL_CXXALIAS_SYS (glob, int, (const char *_Restrict_ __pattern, int __flags, _gl_glob_errfunc_fn __errfunc, glob_t *_Restrict_ __pglob)); # endif +# if __GLIBC__ >= 2 _GL_CXXALIASWARN (glob); +# endif #elif defined GNULIB_POSIXCHECK # undef glob # if HAVE_RAW_DECL_GLOB diff --git a/m4/glob.m4 b/m4/glob.m4 index 9365f3362d..62be6a3397 100644 --- a/m4/glob.m4 +++ b/m4/glob.m4 @@ -1,4 +1,4 @@ -# glob.m4 serial 29 +# glob.m4 serial 30 dnl Copyright (C) 2005-2007, 2009-2023 Free Software Foundation, Inc. dnl This file is free software; the Free Software Foundation dnl gives unlimited permission to copy and/or distribute it, @@ -16,6 +16,9 @@ AC_DEFUN([gl_GLOB], gl_CHECK_FUNCS_ANDROID([glob], [[#include ]]) if test $ac_cv_func_glob = no; then HAVE_GLOB=0 + case "$gl_cv_onwards_func_glob" in + future*) REPLACE_GLOB=1 ;; + esac else AC_CACHE_CHECK([for GNU glob interface version 1 or 2], -- 2.34.1