>From b92393eff2274b6c6be19a44a12798c3b93f2bbd Mon Sep 17 00:00:00 2001 From: Bruno Haible Date: Thu, 19 Jan 2023 21:55:35 +0100 Subject: [PATCH 11/15] Fix warnings for functions introduced in Android API level 26. * m4/mountlist.m4 (gl_MOUNTLIST): Test for hasmntopt using gl_CHECK_FUNCS_ANDROID instead of AC_CHECK_FUNCS. * m4/nl_langinfo.m4 (gl_FUNC_NL_LANGINFO): Test for nl_langinfo using gl_CHECK_FUNCS_ANDROID instead of AC_CHECK_FUNCS_ONCE. * m4/strtod.m4 (gl_PREREQ_STRTOD): Test for nl_langinfo using gl_CHECK_FUNCS_ANDROID instead of AC_CHECK_FUNCS. * m4/strtold.m4 (gl_PREREQ_STRTOLD): Likewise. * m4/vasnprintf.m4 (gl_PREREQ_VASNPRINTF_DIRECTIVE_A): Likewise. * m4/strerror_r.m4 (gl_PREREQ_STRERROR_R): Test for catgets using gl_CHECK_FUNCS_ANDROID instead of AC_CHECK_FUNCS_ONCE. * m4/utimens.m4 (gl_UTIMENS): Test for lutimes using gl_CHECK_FUNCS_ANDROID instead of AC_CHECK_FUNCS_ONCE. * m4/duplocale.m4 (gl_FUNC_DUPLOCALE): Test for nl_langinfo_l using gl_CHECK_FUNCS_ANDROID instead of AC_CHECK_FUNCS_ONCE. * modules/duplocale-tests (configure.ac): Likewise. * m4/getdomainname.m4 (gl_FUNC_GETDOMAINNAME): Update comment. --- ChangeLog | 20 ++++++++++++++++++++ m4/duplocale.m4 | 5 +++-- m4/getdomainname.m4 | 3 ++- m4/mountlist.m4 | 7 +++++-- m4/nl_langinfo.m4 | 4 ++-- m4/strerror_r.m4 | 4 ++-- m4/strtod.m4 | 4 ++-- m4/strtold.m4 | 4 ++-- m4/utimens.m4 | 4 ++-- m4/vasnprintf.m4 | 4 ++-- modules/duplocale-tests | 3 ++- 11 files changed, 44 insertions(+), 18 deletions(-) diff --git a/ChangeLog b/ChangeLog index eebfd2bd67..a39cb4c603 100644 --- a/ChangeLog +++ b/ChangeLog @@ -1,3 +1,23 @@ +2023-01-19 Bruno Haible + + Fix warnings for functions introduced in Android API level 26. + * m4/mountlist.m4 (gl_MOUNTLIST): Test for hasmntopt using + gl_CHECK_FUNCS_ANDROID instead of AC_CHECK_FUNCS. + * m4/nl_langinfo.m4 (gl_FUNC_NL_LANGINFO): Test for nl_langinfo using + gl_CHECK_FUNCS_ANDROID instead of AC_CHECK_FUNCS_ONCE. + * m4/strtod.m4 (gl_PREREQ_STRTOD): Test for nl_langinfo using + gl_CHECK_FUNCS_ANDROID instead of AC_CHECK_FUNCS. + * m4/strtold.m4 (gl_PREREQ_STRTOLD): Likewise. + * m4/vasnprintf.m4 (gl_PREREQ_VASNPRINTF_DIRECTIVE_A): Likewise. + * m4/strerror_r.m4 (gl_PREREQ_STRERROR_R): Test for catgets using + gl_CHECK_FUNCS_ANDROID instead of AC_CHECK_FUNCS_ONCE. + * m4/utimens.m4 (gl_UTIMENS): Test for lutimes using + gl_CHECK_FUNCS_ANDROID instead of AC_CHECK_FUNCS_ONCE. + * m4/duplocale.m4 (gl_FUNC_DUPLOCALE): Test for nl_langinfo_l using + gl_CHECK_FUNCS_ANDROID instead of AC_CHECK_FUNCS_ONCE. + * modules/duplocale-tests (configure.ac): Likewise. + * m4/getdomainname.m4 (gl_FUNC_GETDOMAINNAME): Update comment. + 2023-01-19 Bruno Haible Fix warnings for functions introduced in Android API level 24. diff --git a/m4/duplocale.m4 b/m4/duplocale.m4 index e97cf5c055..22b4bf80bd 100644 --- a/m4/duplocale.m4 +++ b/m4/duplocale.m4 @@ -1,4 +1,4 @@ -# duplocale.m4 serial 15 +# duplocale.m4 serial 17 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, @@ -19,7 +19,8 @@ AC_DEFUN([gl_FUNC_DUPLOCALE], dnl corresponds to the C locale. AC_REQUIRE([gl_LOCALE_H]) if test $HAVE_LOCALE_T = 1; then - AC_CHECK_FUNCS_ONCE([snprintf_l nl_langinfo_l]) + AC_CHECK_FUNCS_ONCE([snprintf_l]) + gl_CHECK_FUNCS_ANDROID([nl_langinfo_l], [[#include ]]) AC_CACHE_CHECK([whether duplocale(LC_GLOBAL_LOCALE) works], [gl_cv_func_duplocale_works], [AC_RUN_IFELSE( diff --git a/m4/getdomainname.m4 b/m4/getdomainname.m4 index 1510a66163..8b118bafe7 100644 --- a/m4/getdomainname.m4 +++ b/m4/getdomainname.m4 @@ -1,4 +1,4 @@ -# getdomainname.m4 serial 11 +# getdomainname.m4 serial 12 dnl Copyright (C) 2002-2003, 2008-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, @@ -85,6 +85,7 @@ AC_DEFUN([gl_FUNC_GETDOMAINNAME], HAVE_DECL_GETDOMAINNAME=0 fi + dnl TODO Android, cf. gl_CHECK_FUNCS_ANDROID. if { test $ac_cv_func_getdomainname = yes \ && test $gl_cv_decl_getdomainname_argtype2 != size_t; \ } \ diff --git a/m4/mountlist.m4 b/m4/mountlist.m4 index 343017d354..80b4aa4239 100644 --- a/m4/mountlist.m4 +++ b/m4/mountlist.m4 @@ -1,4 +1,4 @@ -# serial 16 +# serial 17 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, @@ -106,7 +106,6 @@ $ac_includes_default [Define if there is a function named getmntent for reading the list of mounted file systems, and that function takes a single argument. (4.3BSD, SunOS, HP-UX, Irix)]) - AC_CHECK_FUNCS([hasmntopt]) gl_CHECK_FUNCS_ANDROID([setmntent], [[#include #include @@ -115,6 +114,10 @@ $ac_includes_default [[#include #include ]]) + gl_CHECK_FUNCS_ANDROID([hasmntopt], + [[#include + #include + ]]) fi fi diff --git a/m4/nl_langinfo.m4 b/m4/nl_langinfo.m4 index f3192f30d1..c7146ace03 100644 --- a/m4/nl_langinfo.m4 +++ b/m4/nl_langinfo.m4 @@ -1,4 +1,4 @@ -# nl_langinfo.m4 serial 9 +# nl_langinfo.m4 serial 10 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, @@ -8,7 +8,7 @@ AC_DEFUN([gl_FUNC_NL_LANGINFO], [ AC_REQUIRE([gl_LANGINFO_H_DEFAULTS]) AC_REQUIRE([gl_LANGINFO_H]) - AC_CHECK_FUNCS_ONCE([nl_langinfo]) + gl_CHECK_FUNCS_ANDROID([nl_langinfo], [[#include ]]) AC_REQUIRE([AC_CANONICAL_HOST]) AC_REQUIRE([gl_FUNC_SETLOCALE_NULL]) AC_REQUIRE([gl_PTHREADLIB]) diff --git a/m4/strerror_r.m4 b/m4/strerror_r.m4 index a56f80087d..358fc07bfd 100644 --- a/m4/strerror_r.m4 +++ b/m4/strerror_r.m4 @@ -1,4 +1,4 @@ -# strerror_r.m4 serial 24 +# strerror_r.m4 serial 25 dnl Copyright (C) 2002, 2007-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, @@ -40,7 +40,7 @@ AC_DEFUN([gl_PREREQ_STRERROR_R], [ AC_REQUIRE([AC_FUNC_STRERROR_R]) dnl glibc >= 2.3.4 and cygwin 1.7.9 have a function __xpg_strerror_r. AC_CHECK_FUNCS_ONCE([__xpg_strerror_r]) - AC_CHECK_FUNCS_ONCE([catgets]) + gl_CHECK_FUNCS_ANDROID([catgets], [[#include ]]) AC_CHECK_FUNCS_ONCE([snprintf]) ]) diff --git a/m4/strtod.m4 b/m4/strtod.m4 index 4440cbaa47..e4e0f06dfb 100644 --- a/m4/strtod.m4 +++ b/m4/strtod.m4 @@ -1,4 +1,4 @@ -# strtod.m4 serial 26 +# strtod.m4 serial 27 dnl Copyright (C) 2002-2003, 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, @@ -140,5 +140,5 @@ AC_DEFUN([gl_PREREQ_STRTOD], [ AC_DEFINE([HAVE_LDEXP_IN_LIBC], [1], [Define if the ldexp function is available in libc.]) fi - AC_CHECK_FUNCS([nl_langinfo]) + gl_CHECK_FUNCS_ANDROID([nl_langinfo], [[#include ]]) ]) diff --git a/m4/strtold.m4 b/m4/strtold.m4 index 5556aa7413..08a722b199 100644 --- a/m4/strtold.m4 +++ b/m4/strtold.m4 @@ -1,4 +1,4 @@ -# strtold.m4 serial 7 +# strtold.m4 serial 8 dnl Copyright (C) 2002-2003, 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, @@ -145,5 +145,5 @@ AC_DEFUN([gl_PREREQ_STRTOLD], [ AC_DEFINE([HAVE_LDEXPL_IN_LIBC], [1], [Define if the ldexpl function is available in libc.]) fi - AC_CHECK_FUNCS([nl_langinfo]) + gl_CHECK_FUNCS_ANDROID([nl_langinfo], [[#include ]]) ]) diff --git a/m4/utimens.m4 b/m4/utimens.m4 index ffd289e1c7..5f8606167a 100644 --- a/m4/utimens.m4 +++ b/m4/utimens.m4 @@ -3,7 +3,7 @@ dnl This file is free software; the Free Software Foundation dnl gives unlimited permission to copy and/or distribute it, dnl with or without modifications, as long as this notice is preserved. -dnl serial 14 +dnl serial 15 AC_DEFUN([gl_UTIMENS], [ @@ -11,9 +11,9 @@ AC_DEFUN([gl_UTIMENS], AC_REQUIRE([gl_FUNC_UTIMES]) AC_REQUIRE([gl_CHECK_TYPE_STRUCT_TIMESPEC]) AC_REQUIRE([AC_CANONICAL_HOST]) dnl for cross-compiles - AC_CHECK_FUNCS_ONCE([lutimes]) gl_CHECK_FUNCS_ANDROID([futimes], [[#include ]]) gl_CHECK_FUNCS_ANDROID([futimesat], [[#include ]]) + gl_CHECK_FUNCS_ANDROID([lutimes], [[#include ]]) gl_CHECK_FUNCS_ANDROID([futimens], [[#include ]]) gl_CHECK_FUNCS_ANDROID([utimensat], [[#include ]]) diff --git a/m4/vasnprintf.m4 b/m4/vasnprintf.m4 index 6361c8436c..fda90c402b 100644 --- a/m4/vasnprintf.m4 +++ b/m4/vasnprintf.m4 @@ -1,4 +1,4 @@ -# vasnprintf.m4 serial 38 +# vasnprintf.m4 serial 39 dnl Copyright (C) 2002-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, @@ -152,7 +152,7 @@ AC_DEFUN([gl_PREREQ_VASNPRINTF_DIRECTIVE_A], AC_DEFINE([NEED_PRINTF_DIRECTIVE_A], [1], [Define if the vasnprintf implementation needs special code for the 'a' and 'A' directives.]) - AC_CHECK_FUNCS([nl_langinfo]) + gl_CHECK_FUNCS_ANDROID([nl_langinfo], [[#include ]]) ;; esac ]) diff --git a/modules/duplocale-tests b/modules/duplocale-tests index 0cb7af4703..77295bb38a 100644 --- a/modules/duplocale-tests +++ b/modules/duplocale-tests @@ -8,8 +8,9 @@ Depends-on: langinfo configure.ac: -AC_CHECK_FUNCS_ONCE([strfmon_l snprintf_l nl_langinfo_l]) +AC_CHECK_FUNCS_ONCE([strfmon_l snprintf_l]) gl_CHECK_FUNCS_ANDROID([duplocale], [[#include ]]) +gl_CHECK_FUNCS_ANDROID([nl_langinfo_l], [[#include ]]) AC_CHECK_HEADERS_ONCE([monetary.h]) gt_FUNC_USELOCALE -- 2.34.1