Fix warnings for functions introduced in Android API level 23.
authorBruno Haible <bruno@clisp.org>
Thu, 19 Jan 2023 20:55:29 +0000 (21:55 +0100)
committerBruno Haible <bruno@clisp.org>
Thu, 19 Jan 2023 20:55:29 +0000 (21:55 +0100)
* m4/fbufmode.m4 (gl_FUNC_FBUFMODE): Test for __flbf, __fbufsize using
gl_CHECK_FUNCS_ANDROID instead of AC_CHECK_FUNCS_ONCE.
* m4/filenamecat.m4 (gl_FILE_NAME_CONCAT_LGPL): Test for mempcpy using
gl_CHECK_FUNCS_ANDROID instead of AC_CHECK_FUNCS_ONCE.
* m4/fpurge.m4 (gl_FUNC_FPURGE): Test for __fpurge using
gl_CHECK_FUNCS_ANDROID instead of AC_CHECK_FUNCS_ONCE.
* m4/freadable.m4 (gl_FUNC_FREADABLE): Test for __freadable using
gl_CHECK_FUNCS_ANDROID instead of AC_CHECK_FUNCS_ONCE.
* m4/fwritable.m4 (gl_FUNC_FWRITABLE): Test for __fwritable using
gl_CHECK_FUNCS_ANDROID instead of AC_CHECK_FUNCS_ONCE.
* m4/getpass.m4 (gl_FUNC_GETPASS_GNU): Test for __fsetlocking using
gl_CHECK_FUNCS_ANDROID instead of AC_CHECK_FUNCS_ONCE.
* m4/mempcpy.m4 (gl_FUNC_MEMPCPY): Test for mempcpy using
gl_CHECK_FUNCS_ANDROID instead of AC_CHECK_FUNCS.
* m4/mkfifoat.m4 (gl_FUNC_MKFIFOAT): Test for mkfifoat using
gl_CHECK_FUNCS_ANDROID instead of AC_CHECK_FUNCS_ONCE.
* m4/mkostemp.m4 (gl_FUNC_MKOSTEMP): Test for mkostemp using
gl_CHECK_FUNCS_ANDROID instead of AC_CHECK_FUNCS_ONCE.
* m4/mkostemps.m4 (gl_FUNC_MKOSTEMPS): Test for mkostemps using
gl_CHECK_FUNCS_ANDROID instead of AC_CHECK_FUNCS_ONCE.
* m4/pty.m4 (gl_FUNC_LOGIN_TTY): Test for login_tty using
gl_CHECK_FUNCS_ANDROID instead of AC_CHECK_FUNCS.
* m4/sethostname.m4 (gl_FUNC_SETHOSTNAME): Test for sethostname using
gl_CHECK_FUNCS_ANDROID instead of AC_CHECK_FUNCS.
* m4/strerror_r.m4 (gl_FUNC_STRERROR_R_WORKS): Test for strerror_r using
gl_CHECK_FUNCS_ANDROID instead of AC_CHECK_FUNCS_ONCE.
* m4/wmempcpy.m4 (gl_FUNC_WMEMPCPY): Test for wmempcpy using
gl_CHECK_FUNCS_ANDROID instead of AC_CHECK_FUNCS_ONCE.

15 files changed:
ChangeLog
m4/fbufmode.m4
m4/filenamecat.m4
m4/fpurge.m4
m4/freadable.m4
m4/fwritable.m4
m4/getpass.m4
m4/mempcpy.m4
m4/mkfifoat.m4
m4/mkostemp.m4
m4/mkostemps.m4
m4/pty.m4
m4/sethostname.m4
m4/strerror_r.m4
m4/wmempcpy.m4

index ae2fb8c5c9f0ab4a8c26cdf859e63cddd2bd7465..66e71304c837489dc65a223a1e022bf18e60729a 100644 (file)
--- a/ChangeLog
+++ b/ChangeLog
@@ -1,3 +1,35 @@
+2023-01-19  Bruno Haible  <bruno@clisp.org>
+
+       Fix warnings for functions introduced in Android API level 23.
+       * m4/fbufmode.m4 (gl_FUNC_FBUFMODE): Test for __flbf, __fbufsize using
+       gl_CHECK_FUNCS_ANDROID instead of AC_CHECK_FUNCS_ONCE.
+       * m4/filenamecat.m4 (gl_FILE_NAME_CONCAT_LGPL): Test for mempcpy using
+       gl_CHECK_FUNCS_ANDROID instead of AC_CHECK_FUNCS_ONCE.
+       * m4/fpurge.m4 (gl_FUNC_FPURGE): Test for __fpurge using
+       gl_CHECK_FUNCS_ANDROID instead of AC_CHECK_FUNCS_ONCE.
+       * m4/freadable.m4 (gl_FUNC_FREADABLE): Test for __freadable using
+       gl_CHECK_FUNCS_ANDROID instead of AC_CHECK_FUNCS_ONCE.
+       * m4/fwritable.m4 (gl_FUNC_FWRITABLE): Test for __fwritable using
+       gl_CHECK_FUNCS_ANDROID instead of AC_CHECK_FUNCS_ONCE.
+       * m4/getpass.m4 (gl_FUNC_GETPASS_GNU): Test for __fsetlocking using
+       gl_CHECK_FUNCS_ANDROID instead of AC_CHECK_FUNCS_ONCE.
+       * m4/mempcpy.m4 (gl_FUNC_MEMPCPY): Test for mempcpy using
+       gl_CHECK_FUNCS_ANDROID instead of AC_CHECK_FUNCS.
+       * m4/mkfifoat.m4 (gl_FUNC_MKFIFOAT): Test for mkfifoat using
+       gl_CHECK_FUNCS_ANDROID instead of AC_CHECK_FUNCS_ONCE.
+       * m4/mkostemp.m4 (gl_FUNC_MKOSTEMP): Test for mkostemp using
+       gl_CHECK_FUNCS_ANDROID instead of AC_CHECK_FUNCS_ONCE.
+       * m4/mkostemps.m4 (gl_FUNC_MKOSTEMPS): Test for mkostemps using
+       gl_CHECK_FUNCS_ANDROID instead of AC_CHECK_FUNCS_ONCE.
+       * m4/pty.m4 (gl_FUNC_LOGIN_TTY): Test for login_tty using
+       gl_CHECK_FUNCS_ANDROID instead of AC_CHECK_FUNCS.
+       * m4/sethostname.m4 (gl_FUNC_SETHOSTNAME): Test for sethostname using
+       gl_CHECK_FUNCS_ANDROID instead of AC_CHECK_FUNCS.
+       * m4/strerror_r.m4 (gl_FUNC_STRERROR_R_WORKS): Test for strerror_r using
+       gl_CHECK_FUNCS_ANDROID instead of AC_CHECK_FUNCS_ONCE.
+       * m4/wmempcpy.m4 (gl_FUNC_WMEMPCPY): Test for wmempcpy using
+       gl_CHECK_FUNCS_ANDROID instead of AC_CHECK_FUNCS_ONCE.
+
 2023-01-19  Bruno Haible  <bruno@clisp.org>
 
        Fix warnings for functions introduced in Android API level 21.
index 843a51b2ff8b200ad6c7b84710815f85cec2b6c2..c408584192c1a85bf2f4331b13a2ddb3f86d4a07 100644 (file)
@@ -1,4 +1,4 @@
-# fbufmode.m4 serial 3
+# fbufmode.m4 serial 4
 dnl Copyright (C) 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,
@@ -8,5 +8,6 @@ AC_DEFUN([gl_FUNC_FBUFMODE],
 [
   dnl Prerequisites of lib/fbufmode.c.
   AC_CHECK_HEADERS_ONCE([stdio_ext.h])
-  AC_CHECK_FUNCS_ONCE([__flbf __fbufsize])
+  gl_CHECK_FUNCS_ANDROID([__flbf], [[#include <stdio_ext.h>]])
+  gl_CHECK_FUNCS_ANDROID([__fbufsize], [[#include <stdio_ext.h>]])
 ])
index d09b125cb050194e5d53e9a9f2e5f8a2b09cf92d..3dab236d1a9c1daa133b7e1dfad1a2bec3522b17 100644 (file)
@@ -1,4 +1,4 @@
-# filenamecat.m4 serial 11
+# filenamecat.m4 serial 12
 dnl Copyright (C) 2002-2006, 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,
@@ -12,5 +12,5 @@ AC_DEFUN([gl_FILE_NAME_CONCAT],
 AC_DEFUN([gl_FILE_NAME_CONCAT_LGPL],
 [
   dnl Prerequisites of lib/filenamecat-lgpl.c.
-  AC_CHECK_FUNCS_ONCE([mempcpy])
+  gl_CHECK_FUNCS_ANDROID([mempcpy], [[#include <string.h>]])
 ])
index b365409d0552c0abb7a591a3afd6338846005c89..8208250ee5852047ae4c9dba1b126f80fb62c5d0 100644 (file)
@@ -1,4 +1,4 @@
-# fpurge.m4 serial 12
+# fpurge.m4 serial 13
 dnl Copyright (C) 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,
@@ -10,7 +10,7 @@ AC_DEFUN([gl_FUNC_FPURGE],
   AC_REQUIRE([AC_CANONICAL_HOST]) dnl for cross-compiles
   AC_CHECK_HEADERS_ONCE([stdio_ext.h])
   AC_CHECK_FUNCS_ONCE([fpurge])
-  AC_CHECK_FUNCS_ONCE([__fpurge])
+  gl_CHECK_FUNCS_ANDROID([__fpurge], [[#include <stdio_ext.h>]])
   AC_CHECK_DECLS([fpurge], , , [[#include <stdio.h>]])
   if test "x$ac_cv_func_fpurge" = xyes; then
     HAVE_FPURGE=1
index a86fdcbcb387b929f64a3803d08e1104e737a098..fce67810e907e64fb15969eef7042bf5f3f69749 100644 (file)
@@ -1,4 +1,4 @@
-# freadable.m4 serial 3
+# freadable.m4 serial 4
 dnl Copyright (C) 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,
@@ -7,5 +7,5 @@ dnl with or without modifications, as long as this notice is preserved.
 AC_DEFUN([gl_FUNC_FREADABLE],
 [
   AC_CHECK_HEADERS_ONCE([stdio_ext.h])
-  AC_CHECK_FUNCS_ONCE([__freadable])
+  gl_CHECK_FUNCS_ANDROID([__freadable], [[#include <stdio_ext.h>]])
 ])
index 5452c29095ce2e1328bf99abb71e06620f3bf3d4..0c4dc20149f1da21af9ac9f1b706b36f4ada5cf1 100644 (file)
@@ -1,4 +1,4 @@
-# fwritable.m4 serial 3
+# fwritable.m4 serial 4
 dnl Copyright (C) 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,
@@ -7,5 +7,5 @@ dnl with or without modifications, as long as this notice is preserved.
 AC_DEFUN([gl_FUNC_FWRITABLE],
 [
   AC_CHECK_HEADERS_ONCE([stdio_ext.h])
-  AC_CHECK_FUNCS_ONCE([__fwritable])
+  gl_CHECK_FUNCS_ANDROID([__fwritable], [[#include <stdio_ext.h>]])
 ])
index 0e46edf64b971c95a1baa45bc026e38f17b2c698..27a31f80b9c1b177f515b84a3457bb571ac6491d 100644 (file)
@@ -1,4 +1,4 @@
-# getpass.m4 serial 19
+# getpass.m4 serial 20
 dnl Copyright (C) 2002-2003, 2005-2006, 2009-2023 Free Software Foundation,
 dnl Inc.
 dnl This file is free software; the Free Software Foundation
@@ -53,7 +53,7 @@ AC_DEFUN([gl_FUNC_GETPASS_GNU],
 # Prerequisites of lib/getpass.c.
 AC_DEFUN([gl_PREREQ_GETPASS], [
   AC_CHECK_HEADERS_ONCE([stdio_ext.h termios.h])
-  AC_CHECK_FUNCS_ONCE([__fsetlocking])
+  gl_CHECK_FUNCS_ANDROID([__fsetlocking], [[#include <stdio_ext.h>]])
   AC_CHECK_DECLS([__fsetlocking],,,
     [[#include <stdio.h>
       #if HAVE_STDIO_EXT_H
index 55bee2ab7a223e72531967eee7a7af3755a40dbe..d663b671749aefc644e99e179f2d642a555e5953 100644 (file)
@@ -1,4 +1,4 @@
-# mempcpy.m4 serial 12
+# mempcpy.m4 serial 13
 dnl Copyright (C) 2003-2004, 2006-2007, 2009-2023 Free Software Foundation,
 dnl Inc.
 dnl This file is free software; the Free Software Foundation
@@ -14,7 +14,7 @@ AC_DEFUN([gl_FUNC_MEMPCPY],
   AC_REQUIRE([AC_C_RESTRICT])
 
   AC_REQUIRE([gl_STRING_H_DEFAULTS])
-  AC_CHECK_FUNCS([mempcpy])
+  gl_CHECK_FUNCS_ANDROID([mempcpy], [[#include <string.h>]])
   if test $ac_cv_func_mempcpy = no; then
     HAVE_MEMPCPY=0
   fi
index 8bf5a227ee2997f88f5ba3d37076115e4bb42234..e9ed96241576789319b1d3f7117abd28e1b3c325 100644 (file)
@@ -1,4 +1,4 @@
-# serial 6
+# serial 7
 # See if we need to provide mkfifoat/mknodat replacement.
 
 dnl Copyright (C) 2009-2023 Free Software Foundation, Inc.
@@ -19,7 +19,7 @@ AC_DEFUN([gl_FUNC_MKFIFOAT],
   AC_REQUIRE([gl_FUNC_OPENAT])
 
   gl_CHECK_FUNCS_ANDROID([mknodat], [[#include <sys/stat.h>]])
-  AC_CHECK_FUNCS_ONCE([mkfifoat])
+  gl_CHECK_FUNCS_ANDROID([mkfifoat], [[#include <sys/stat.h>]])
   if test $ac_cv_func_mkfifoat = yes; then
     dnl Check for AIX 7.2 bug with trailing slash.
     AC_CACHE_CHECK([whether mkfifoat rejects trailing slashes],
index a7cfac4cb876291efe4fc2c8ee0c4f467c45d8f0..9424f85f430f88c22c68aba785c1d34f0daa727e 100644 (file)
@@ -1,4 +1,4 @@
-# mkostemp.m4 serial 2
+# mkostemp.m4 serial 3
 dnl Copyright (C) 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,
@@ -11,7 +11,7 @@ AC_DEFUN([gl_FUNC_MKOSTEMP],
   dnl Persuade glibc <stdlib.h> to declare mkostemp().
   AC_REQUIRE([AC_USE_SYSTEM_EXTENSIONS])
 
-  AC_CHECK_FUNCS_ONCE([mkostemp])
+  gl_CHECK_FUNCS_ANDROID([mkostemp], [[#include <stdlib.h>]])
   if test $ac_cv_func_mkostemp != yes; then
     HAVE_MKOSTEMP=0
   fi
index 5af22ac8318396ebfa33fbda5d994980708cad76..fdf6971496513dafcd2be142d5ff8bb40b45a68c 100644 (file)
@@ -1,4 +1,4 @@
-# mkostemps.m4 serial 2
+# mkostemps.m4 serial 3
 dnl Copyright (C) 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,
@@ -11,7 +11,7 @@ AC_DEFUN([gl_FUNC_MKOSTEMPS],
   dnl Persuade glibc <stdlib.h> to declare mkostemps().
   AC_REQUIRE([AC_USE_SYSTEM_EXTENSIONS])
 
-  AC_CHECK_FUNCS_ONCE([mkostemps])
+  gl_CHECK_FUNCS_ANDROID([mkostemps], [[#include <stdlib.h>]])
   if test $ac_cv_func_mkostemps != yes; then
     HAVE_MKOSTEMPS=0
   fi
index ac4ac2651a51bf80eee060a7e30c4049ad4f76c9..54523fdac0c727dc8272938755499f22a0103951 100644 (file)
--- a/m4/pty.m4
+++ b/m4/pty.m4
@@ -1,4 +1,4 @@
-# pty.m4 serial 15
+# pty.m4 serial 16
 dnl Copyright (C) 2010-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,
@@ -156,6 +156,6 @@ AC_DEFUN([gl_FUNC_LOGIN_TTY],
 
   gl_saved_libs="$LIBS"
   LIBS="$LIBS $PTY_LIB"
-  AC_CHECK_FUNCS([login_tty])
+  gl_CHECK_FUNCS_ANDROID([login_tty], [[#include <utmp.h>]])
   LIBS="$gl_saved_LIBS"
 ])
index 8bb9b5cce0867a2f968095a6365fba532cdb6f86..8f3cd18c6c7808c8f3345ba871d5a16b7f8c4df5 100644 (file)
@@ -1,4 +1,4 @@
-# sethostname.m4 serial 1
+# sethostname.m4 serial 2
 dnl Copyright (C) 2011-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,
@@ -13,7 +13,7 @@ AC_DEFUN([gl_FUNC_SETHOSTNAME],
 
   gl_PREREQ_HOST_NAME_MAX
 
-  AC_CHECK_FUNCS([sethostname])
+  gl_CHECK_FUNCS_ANDROID([sethostname], [[#include <unistd.h>]])
   if test $ac_cv_func_sethostname = no; then
     HAVE_SETHOSTNAME=0
   fi
index fb4ae6b60060054a3a1bbf01d3de7482d2d46f11..a56f80087dee7100648c60d596c4df496bff529c 100644 (file)
@@ -57,7 +57,7 @@ AC_DEFUN([gl_FUNC_STRERROR_R_WORKS],
 
   AC_REQUIRE([gl_FUNC_STRERROR_0])
 
-  AC_CHECK_FUNCS_ONCE([strerror_r])
+  gl_CHECK_FUNCS_ANDROID([strerror_r], [[#include <string.h>]])
   if test $ac_cv_func_strerror_r = yes; then
     if test "$GL_GENERATE_ERRNO_H:$REPLACE_STRERROR_0" = false:0; then
       dnl The POSIX prototype is:  int strerror_r (int, char *, size_t);
index 40fbb0d7ff5be767e2e93e52bed2cae230ffea52..729128cab7efd542d2e356cdeabb98ebe91210f9 100644 (file)
@@ -1,4 +1,4 @@
-# wmempcpy.m4 serial 1
+# wmempcpy.m4 serial 2
 dnl Copyright (C) 2020-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,
@@ -14,7 +14,7 @@ AC_DEFUN([gl_FUNC_WMEMPCPY],
   dnl The wmempcpy() declaration in lib/wchar.in.h uses 'restrict'.
   AC_REQUIRE([AC_C_RESTRICT])
 
-  AC_CHECK_FUNCS_ONCE([wmempcpy])
+  gl_CHECK_FUNCS_ANDROID([wmempcpy], [[#include <wchar.h>]])
   if test $ac_cv_func_wmempcpy = no; then
     HAVE_WMEMPCPY=0
   fi