]> Savannah Git Hosting - gnulib.git/commitdiff
Fix warnings for functions introduced in Android API level 26.
authorBruno Haible <bruno@clisp.org>
Thu, 19 Jan 2023 20:55:35 +0000 (21:55 +0100)
committerBruno Haible <bruno@clisp.org>
Thu, 19 Jan 2023 20:55:35 +0000 (21:55 +0100)
* 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
m4/duplocale.m4
m4/getdomainname.m4
m4/mountlist.m4
m4/nl_langinfo.m4
m4/strerror_r.m4
m4/strtod.m4
m4/strtold.m4
m4/utimens.m4
m4/vasnprintf.m4
modules/duplocale-tests

index eebfd2bd675d506a196c005fe7e6cf0bfae099c8..a39cb4c603740ba3f3af362fcc4beb87553a498a 100644 (file)
--- a/ChangeLog
+++ b/ChangeLog
@@ -1,3 +1,23 @@
+2023-01-19  Bruno Haible  <bruno@clisp.org>
+
+       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  <bruno@clisp.org>
 
        Fix warnings for functions introduced in Android API level 24.
index e97cf5c05589a32ed68be8478ae998ab369ee147..22b4bf80bde3209883e7e9c022f43ce293184f8b 100644 (file)
@@ -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 <langinfo.h>]])
       AC_CACHE_CHECK([whether duplocale(LC_GLOBAL_LOCALE) works],
         [gl_cv_func_duplocale_works],
         [AC_RUN_IFELSE(
index 1510a6616327cd040ac015a525bef4f80df0a268..8b118bafe792fcb643f10bb05dda3eea58e32a43 100644 (file)
@@ -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; \
      } \
index 343017d354a5bbf541aed809e264b2b6d1e55dd1..80b4aa42390f37a857abc6b7f22182c24813d9f5 100644 (file)
@@ -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 <stdio.h>
             #include <mntent.h>
@@ -115,6 +114,10 @@ $ac_includes_default
           [[#include <stdio.h>
             #include <mntent.h>
           ]])
+        gl_CHECK_FUNCS_ANDROID([hasmntopt],
+          [[#include <stdio.h>
+            #include <mntent.h>
+          ]])
       fi
     fi
 
index f3192f30d152ce2eaa6e0d5f769527d88a7c632f..c7146ace03091fe2addf119ee38ac4461bb8b2e4 100644 (file)
@@ -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 <langinfo.h>]])
   AC_REQUIRE([AC_CANONICAL_HOST])
   AC_REQUIRE([gl_FUNC_SETLOCALE_NULL])
   AC_REQUIRE([gl_PTHREADLIB])
index a56f80087dee7100648c60d596c4df496bff529c..358fc07bfdac4e0e16a6326ae09bb831c86085b8 100644 (file)
@@ -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 <nl_types.h>]])
   AC_CHECK_FUNCS_ONCE([snprintf])
 ])
 
index 4440cbaa479a7850d2011ca6b23346b5fc1205d6..e4e0f06dfbeaeecae0fc7137ee06276398ffbbcd 100644 (file)
@@ -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 <langinfo.h>]])
 ])
index 5556aa74133aca6427960e9b1fa0c69c7e992bf0..08a722b1992adea08b62928f8f056206deda68c8 100644 (file)
@@ -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 <langinfo.h>]])
 ])
index ffd289e1c7cb775d9f1f27409bfd0111c29e9598..5f8606167a66306f1e97284d94358080aef7ed15 100644 (file)
@@ -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 <sys/time.h>]])
   gl_CHECK_FUNCS_ANDROID([futimesat], [[#include <sys/time.h>]])
+  gl_CHECK_FUNCS_ANDROID([lutimes], [[#include <sys/time.h>]])
   gl_CHECK_FUNCS_ANDROID([futimens], [[#include <sys/stat.h>]])
   gl_CHECK_FUNCS_ANDROID([utimensat], [[#include <sys/stat.h>]])
 
index 6361c8436cd8dc60796d28f638c9406b6b290842..fda90c402b4565f0b927162971e8fbec191c4766 100644 (file)
@@ -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 <langinfo.h>]])
       ;;
   esac
 ])
index 0cb7af470330feb24487daabb574ebe0e8b87143..77295bb38a19a71feb5a49ac33027afbedf170d5 100644 (file)
@@ -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 <locale.h>]])
+gl_CHECK_FUNCS_ANDROID([nl_langinfo_l], [[#include <langinfo.h>]])
 AC_CHECK_HEADERS_ONCE([monetary.h])
 gt_FUNC_USELOCALE