+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.
-# 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,
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(
-# 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,
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; \
} \
-# 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,
[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>
[[#include <stdio.h>
#include <mntent.h>
]])
+ gl_CHECK_FUNCS_ANDROID([hasmntopt],
+ [[#include <stdio.h>
+ #include <mntent.h>
+ ]])
fi
fi
-# 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,
[
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])
-# 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,
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])
])
-# 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,
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>]])
])
-# 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,
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>]])
])
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],
[
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>]])
-# 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,
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
])
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