summaryrefslogtreecommitdiff
path: root/m4
diff options
context:
space:
mode:
authorBruno Haible <bruno@clisp.org>2023-01-19 21:55:17 +0100
committerBruno Haible <bruno@clisp.org>2023-01-19 21:55:17 +0100
commit1f79d0e79a4402aaae3ab890420cd70d4308732a (patch)
treebe15860b8201310b698b3f505d98919c83de5d23 /m4
parent430cd900f19b62994c8cc1b6f1b560b4aed94025 (diff)
downloadgnulib-1f79d0e79a4402aaae3ab890420cd70d4308732a.tar.gz
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.
Diffstat (limited to 'm4')
-rw-r--r--m4/canonicalize.m48
-rw-r--r--m4/euidaccess.m44
-rw-r--r--m4/faccessat.m44
-rw-r--r--m4/setenv.m44
-rw-r--r--m4/tsearch.m45
5 files changed, 14 insertions, 11 deletions
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 <unistd.h>]])
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 <unistd.h>]])
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 <unistd.h>]])
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 <unistd.h> to declare faccessat().
AC_REQUIRE([gl_USE_SYSTEM_EXTENSIONS])
- AC_CHECK_FUNCS_ONCE([faccessat])
+ gl_CHECK_FUNCS_ANDROID([faccessat], [[#include <unistd.h>]])
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 <search.h>]])
])
# 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 <search.h>]])
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])