summaryrefslogtreecommitdiff
path: root/m4
diff options
context:
space:
mode:
authorBruno Haible <bruno@clisp.org>2023-01-19 21:55:29 +0100
committerBruno Haible <bruno@clisp.org>2023-01-19 21:55:29 +0100
commitbf3b90e898ca373873ac57df8c9f992eeab3bd03 (patch)
tree7a63adc1236dc62caa981523f1ee8b045c74b5e4 /m4
parent4e763315017dfffcde655329d3343fef35fb0537 (diff)
downloadgnulib-bf3b90e898ca373873ac57df8c9f992eeab3bd03.tar.gz
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.
Diffstat (limited to 'm4')
-rw-r--r--m4/fbufmode.m45
-rw-r--r--m4/filenamecat.m44
-rw-r--r--m4/fpurge.m44
-rw-r--r--m4/freadable.m44
-rw-r--r--m4/fwritable.m44
-rw-r--r--m4/getpass.m44
-rw-r--r--m4/mempcpy.m44
-rw-r--r--m4/mkfifoat.m44
-rw-r--r--m4/mkostemp.m44
-rw-r--r--m4/mkostemps.m44
-rw-r--r--m4/pty.m44
-rw-r--r--m4/sethostname.m44
-rw-r--r--m4/strerror_r.m42
-rw-r--r--m4/wmempcpy.m44
14 files changed, 28 insertions, 27 deletions
diff --git a/m4/fbufmode.m4 b/m4/fbufmode.m4
index 843a51b2ff..c408584192 100644
--- a/m4/fbufmode.m4
+++ b/m4/fbufmode.m4
@@ -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>]])
])
diff --git a/m4/filenamecat.m4 b/m4/filenamecat.m4
index d09b125cb0..3dab236d1a 100644
--- a/m4/filenamecat.m4
+++ b/m4/filenamecat.m4
@@ -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>]])
])
diff --git a/m4/fpurge.m4 b/m4/fpurge.m4
index b365409d05..8208250ee5 100644
--- a/m4/fpurge.m4
+++ b/m4/fpurge.m4
@@ -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
diff --git a/m4/freadable.m4 b/m4/freadable.m4
index a86fdcbcb3..fce67810e9 100644
--- a/m4/freadable.m4
+++ b/m4/freadable.m4
@@ -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>]])
])
diff --git a/m4/fwritable.m4 b/m4/fwritable.m4
index 5452c29095..0c4dc20149 100644
--- a/m4/fwritable.m4
+++ b/m4/fwritable.m4
@@ -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>]])
])
diff --git a/m4/getpass.m4 b/m4/getpass.m4
index 0e46edf64b..27a31f80b9 100644
--- a/m4/getpass.m4
+++ b/m4/getpass.m4
@@ -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
diff --git a/m4/mempcpy.m4 b/m4/mempcpy.m4
index 55bee2ab7a..d663b67174 100644
--- a/m4/mempcpy.m4
+++ b/m4/mempcpy.m4
@@ -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
diff --git a/m4/mkfifoat.m4 b/m4/mkfifoat.m4
index 8bf5a227ee..e9ed962415 100644
--- a/m4/mkfifoat.m4
+++ b/m4/mkfifoat.m4
@@ -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],
diff --git a/m4/mkostemp.m4 b/m4/mkostemp.m4
index a7cfac4cb8..9424f85f43 100644
--- a/m4/mkostemp.m4
+++ b/m4/mkostemp.m4
@@ -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
diff --git a/m4/mkostemps.m4 b/m4/mkostemps.m4
index 5af22ac831..fdf6971496 100644
--- a/m4/mkostemps.m4
+++ b/m4/mkostemps.m4
@@ -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
diff --git a/m4/pty.m4 b/m4/pty.m4
index ac4ac2651a..54523fdac0 100644
--- 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"
])
diff --git a/m4/sethostname.m4 b/m4/sethostname.m4
index 8bb9b5cce0..8f3cd18c6c 100644
--- a/m4/sethostname.m4
+++ b/m4/sethostname.m4
@@ -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
diff --git a/m4/strerror_r.m4 b/m4/strerror_r.m4
index fb4ae6b600..a56f80087d 100644
--- a/m4/strerror_r.m4
+++ b/m4/strerror_r.m4
@@ -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);
diff --git a/m4/wmempcpy.m4 b/m4/wmempcpy.m4
index 40fbb0d7ff..729128cab7 100644
--- a/m4/wmempcpy.m4
+++ b/m4/wmempcpy.m4
@@ -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