]> Savannah Git Hosting - gnulib.git/commitdiff
Fix warnings for functions introduced in Android API level 16.
authorBruno Haible <bruno@clisp.org>
Thu, 19 Jan 2023 20:55:17 +0000 (21:55 +0100)
committerBruno Haible <bruno@clisp.org>
Thu, 19 Jan 2023 20:55:17 +0000 (21:55 +0100)
* 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
m4/canonicalize.m4
m4/euidaccess.m4
m4/faccessat.m4
m4/setenv.m4
m4/tsearch.m4

index c29bd760ec70c38782824e439869e44774a1f133..5d4ab35005a10ebcb3ee48bdb75959940407809a 100644 (file)
--- a/ChangeLog
+++ b/ChangeLog
@@ -1,3 +1,15 @@
+2023-01-19  Bruno Haible  <bruno@clisp.org>
+
+       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  <bruno@clisp.org>
 
        Fix warnings for functions introduced in Android API level 12.
index 03cb0aec93f666fccd8482bb6c8bc91979de1c8a..d319645fd3f562540873a5f2a53afd617b7f46ce 100644 (file)
@@ -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'.
index f0eb5bde84ae0aa43815f8813d3c9c6bbf58593d..7429779c152bdb6d30615bed368a30fc30b35d4d 100644 (file)
@@ -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
index 934c1f415460a88581d2bde2c73733aedc103732..958c4978b7d5e6911328e3a65733af64f320b094 100644 (file)
@@ -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
index 16f9eb55319579d474bb1739e534f1cf7b86471a..c0b7475606d3a9c254c383deb2afc102b7c08546 100644 (file)
@@ -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.
index d24b2ca4a57631d449d84c17cf9955eb3fc22056..8e6a894f83723c2607d2f31a4db13f76acf6d650 100644 (file)
@@ -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])