>From 1f79d0e79a4402aaae3ab890420cd70d4308732a Mon Sep 17 00:00:00 2001 From: Bruno Haible Date: Thu, 19 Jan 2023 21:55:17 +0100 Subject: [PATCH 04/15] Fix warnings for functions introduced in Android API level 16. * m4/faccessat.m4 (gl_FUNC_FACCESSAT): Test for faccessat using gl_CHECK_FUNCS_ANDROID instead of AC_CHECK_FUNCS_ONCE. * m4/canonicalize.m4 (gl_FUNC_CANONICALIZE_FILENAME_MODE, gl_CANONICALIZE_LGPL_SEPARATE): Likewise. * m4/euidaccess.m4 (gl_PREREQ_EUIDACCESS): Likewise. * m4/tsearch.m4 (gl_FUNC_TSEARCH): Test for tsearch using gl_CHECK_FUNCS_ANDROID instead of AC_CHECK_FUNCS. * m4/setenv.m4 (gl_PREREQ_SETENV): Likewise. --- ChangeLog | 12 ++++++++++++ m4/canonicalize.m4 | 8 +++++--- m4/euidaccess.m4 | 4 ++-- m4/faccessat.m4 | 4 ++-- m4/setenv.m4 | 4 ++-- m4/tsearch.m4 | 5 +++-- 6 files changed, 26 insertions(+), 11 deletions(-) diff --git a/ChangeLog b/ChangeLog index c29bd760ec..5d4ab35005 100644 --- a/ChangeLog +++ b/ChangeLog @@ -1,3 +1,15 @@ +2023-01-19 Bruno Haible + + Fix warnings for functions introduced in Android API level 16. + * m4/faccessat.m4 (gl_FUNC_FACCESSAT): Test for faccessat using + gl_CHECK_FUNCS_ANDROID instead of AC_CHECK_FUNCS_ONCE. + * m4/canonicalize.m4 (gl_FUNC_CANONICALIZE_FILENAME_MODE, + gl_CANONICALIZE_LGPL_SEPARATE): Likewise. + * m4/euidaccess.m4 (gl_PREREQ_EUIDACCESS): Likewise. + * m4/tsearch.m4 (gl_FUNC_TSEARCH): Test for tsearch using + gl_CHECK_FUNCS_ANDROID instead of AC_CHECK_FUNCS. + * m4/setenv.m4 (gl_PREREQ_SETENV): Likewise. + 2023-01-19 Bruno Haible Fix warnings for functions introduced in Android API level 12. diff --git a/m4/canonicalize.m4 b/m4/canonicalize.m4 index 03cb0aec93..d319645fd3 100644 --- a/m4/canonicalize.m4 +++ b/m4/canonicalize.m4 @@ -1,4 +1,4 @@ -# canonicalize.m4 serial 37 +# canonicalize.m4 serial 38 dnl Copyright (C) 2003-2007, 2009-2023 Free Software Foundation, Inc. @@ -12,7 +12,8 @@ AC_DEFUN([gl_FUNC_CANONICALIZE_FILENAME_MODE], [ AC_REQUIRE([gl_USE_SYSTEM_EXTENSIONS]) AC_REQUIRE([gl_FUNC_LSTAT_FOLLOWS_SLASHED_SYMLINK]) - AC_CHECK_FUNCS_ONCE([canonicalize_file_name faccessat]) + AC_CHECK_FUNCS_ONCE([canonicalize_file_name]) + gl_CHECK_FUNCS_ANDROID([faccessat], [[#include ]]) AC_REQUIRE([gl_DOUBLE_SLASH_ROOT]) AC_REQUIRE([gl_FUNC_REALPATH_WORKS]) if test $ac_cv_func_canonicalize_file_name = no; then @@ -58,7 +59,8 @@ AC_DEFUN([gl_CANONICALIZE_LGPL_SEPARATE], [ AC_REQUIRE([gl_USE_SYSTEM_EXTENSIONS]) AC_REQUIRE([gl_FUNC_LSTAT_FOLLOWS_SLASHED_SYMLINK]) - AC_CHECK_FUNCS_ONCE([canonicalize_file_name faccessat]) + AC_CHECK_FUNCS_ONCE([canonicalize_file_name]) + gl_CHECK_FUNCS_ANDROID([faccessat], [[#include ]]) dnl On native Windows, we use _getcwd(), regardless whether getcwd() is dnl available through the linker option '-loldnames'. diff --git a/m4/euidaccess.m4 b/m4/euidaccess.m4 index f0eb5bde84..7429779c15 100644 --- a/m4/euidaccess.m4 +++ b/m4/euidaccess.m4 @@ -1,4 +1,4 @@ -# euidaccess.m4 serial 16 +# euidaccess.m4 serial 17 dnl Copyright (C) 2002-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, @@ -32,7 +32,7 @@ AC_DEFUN([gl_FUNC_EUIDACCESS], # Prerequisites of lib/euidaccess.c. AC_DEFUN([gl_PREREQ_EUIDACCESS], [ dnl Prefer POSIX faccessat over non-standard euidaccess. - AC_CHECK_FUNCS_ONCE([faccessat]) + gl_CHECK_FUNCS_ANDROID([faccessat], [[#include ]]) dnl Try various other non-standard fallbacks. AC_CHECK_HEADERS([libgen.h]) AC_FUNC_GETGROUPS diff --git a/m4/faccessat.m4 b/m4/faccessat.m4 index 934c1f4154..958c4978b7 100644 --- a/m4/faccessat.m4 +++ b/m4/faccessat.m4 @@ -1,4 +1,4 @@ -# serial 10 +# serial 11 # See if we need to provide faccessat replacement. dnl Copyright (C) 2009-2023 Free Software Foundation, Inc. @@ -16,7 +16,7 @@ AC_DEFUN([gl_FUNC_FACCESSAT], dnl Persuade glibc to declare faccessat(). AC_REQUIRE([gl_USE_SYSTEM_EXTENSIONS]) - AC_CHECK_FUNCS_ONCE([faccessat]) + gl_CHECK_FUNCS_ANDROID([faccessat], [[#include ]]) if test $ac_cv_func_faccessat = no; then HAVE_FACCESSAT=0 else diff --git a/m4/setenv.m4 b/m4/setenv.m4 index 16f9eb5531..c0b7475606 100644 --- a/m4/setenv.m4 +++ b/m4/setenv.m4 @@ -1,4 +1,4 @@ -# setenv.m4 serial 30 +# setenv.m4 serial 31 dnl Copyright (C) 2001-2004, 2006-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, @@ -155,7 +155,7 @@ AC_DEFUN([gl_PREREQ_SETENV], AC_REQUIRE([gl_ENVIRON]) AC_CHECK_HEADERS_ONCE([unistd.h]) AC_CHECK_HEADERS([search.h]) - AC_CHECK_FUNCS([tsearch]) + gl_CHECK_FUNCS_ANDROID([tsearch], [[#include ]]) ]) # Prerequisites of lib/unsetenv.c. diff --git a/m4/tsearch.m4 b/m4/tsearch.m4 index d24b2ca4a5..8e6a894f83 100644 --- a/m4/tsearch.m4 +++ b/m4/tsearch.m4 @@ -1,4 +1,4 @@ -# tsearch.m4 serial 8 +# tsearch.m4 serial 9 dnl Copyright (C) 2006-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, @@ -7,7 +7,8 @@ dnl with or without modifications, as long as this notice is preserved. AC_DEFUN([gl_FUNC_TSEARCH], [ AC_REQUIRE([gl_SEARCH_H_DEFAULTS]) - AC_CHECK_FUNCS([tsearch twalk]) + AC_CHECK_FUNCS([twalk]) + gl_CHECK_FUNCS_ANDROID([tsearch], [[#include ]]) if test $ac_cv_func_tsearch = yes; then dnl On OpenBSD 4.0, the return value of tdelete() is incorrect. AC_REQUIRE([AC_PROG_CC]) -- 2.34.1