Reported by Po Lu <luangruo@yahoo.com>.
* m4/ftruncate.m4 (gl_FUNC_FTRUNCATE): Test for ftruncate using
gl_CHECK_FUNCS_ANDROID instead of AC_CHECK_FUNCS_ONCE.
* m4/glob.m4 (gl_PREREQ_GLOB): Test for getpwnam_r using
gl_CHECK_FUNCS_ANDROID instead of AC_CHECK_FUNCS_ONCE.
* m4/nproc.m4 (gl_PREREQ_NPROC): Test for sched_getaffinity using
gl_CHECK_FUNCS_ANDROID instead of AC_CHECK_FUNCS.
* m4/pread.m4 (gl_FUNC_PREAD): Test for pread using
gl_CHECK_FUNCS_ANDROID instead of AC_CHECK_FUNCS_ONCE.
* m4/pwrite.m4 (gl_FUNC_PWRITE): Test for pwrite using
gl_CHECK_FUNCS_ANDROID instead of AC_CHECK_FUNCS_ONCE.
* m4/thread.m4 (gl_THREAD): Test for pthread_atfork using
gl_CHECK_FUNCS_ANDROID instead of AC_CHECK_FUNCS.
* m4/timegm.m4 (gl_FUNC_TIMEGM): Test for timegm using
gl_CHECK_FUNCS_ANDROID instead of AC_CHECK_FUNCS_ONCE.
* m4/utimensat.m4 (gl_FUNC_UTIMENSAT): Test for utimensat using
gl_CHECK_FUNCS_ANDROID instead of AC_CHECK_FUNCS_ONCE.
* m4/utimens.m4 (gl_UTIMENS): Likewise.
+2023-01-19 Bruno Haible <bruno@clisp.org>
+
+ Fix warnings for functions introduced in Android API level 12.
+ Reported by Po Lu <luangruo@yahoo.com>.
+ * m4/ftruncate.m4 (gl_FUNC_FTRUNCATE): Test for ftruncate using
+ gl_CHECK_FUNCS_ANDROID instead of AC_CHECK_FUNCS_ONCE.
+ * m4/glob.m4 (gl_PREREQ_GLOB): Test for getpwnam_r using
+ gl_CHECK_FUNCS_ANDROID instead of AC_CHECK_FUNCS_ONCE.
+ * m4/nproc.m4 (gl_PREREQ_NPROC): Test for sched_getaffinity using
+ gl_CHECK_FUNCS_ANDROID instead of AC_CHECK_FUNCS.
+ * m4/pread.m4 (gl_FUNC_PREAD): Test for pread using
+ gl_CHECK_FUNCS_ANDROID instead of AC_CHECK_FUNCS_ONCE.
+ * m4/pwrite.m4 (gl_FUNC_PWRITE): Test for pwrite using
+ gl_CHECK_FUNCS_ANDROID instead of AC_CHECK_FUNCS_ONCE.
+ * m4/thread.m4 (gl_THREAD): Test for pthread_atfork using
+ gl_CHECK_FUNCS_ANDROID instead of AC_CHECK_FUNCS.
+ * m4/timegm.m4 (gl_FUNC_TIMEGM): Test for timegm using
+ gl_CHECK_FUNCS_ANDROID instead of AC_CHECK_FUNCS_ONCE.
+ * m4/utimensat.m4 (gl_FUNC_UTIMENSAT): Test for utimensat using
+ gl_CHECK_FUNCS_ANDROID instead of AC_CHECK_FUNCS_ONCE.
+ * m4/utimens.m4 (gl_UTIMENS): Likewise.
+
2023-01-19 Bruno Haible <bruno@clisp.org>
Fix warnings for functions introduced in Android API level 9.
-# serial 21
+# serial 22
# See if we need to emulate a missing ftruncate function using _chsize.
AC_DEFUN([gl_FUNC_FTRUNCATE],
[
AC_REQUIRE([gl_UNISTD_H_DEFAULTS])
- AC_CHECK_FUNCS_ONCE([ftruncate])
+ gl_CHECK_FUNCS_ANDROID([ftruncate], [[#include <unistd.h>]])
if test $ac_cv_func_ftruncate = yes; then
m4_ifdef([gl_LARGEFILE], [
AC_REQUIRE([AC_CANONICAL_HOST])
-# glob.m4 serial 27
+# glob.m4 serial 28
dnl Copyright (C) 2005-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,
AC_REQUIRE([gl_CHECK_TYPE_STRUCT_DIRENT_D_TYPE])
AC_CHECK_HEADERS_ONCE([unistd.h])
gl_CHECK_FUNCS_ANDROID([getlogin_r], [[#include <unistd.h>]])
- AC_CHECK_FUNCS_ONCE([getpwnam_r])
+ gl_CHECK_FUNCS_ANDROID([getpwnam_r], [[#include <pwd.h>]])
])
-# nproc.m4 serial 5
+# nproc.m4 serial 6
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,
#endif
])
- AC_CHECK_FUNCS([sched_getaffinity sched_getaffinity_np \
- pstat_getdynamic sysmp sysctl])
+ AC_CHECK_FUNCS([sched_getaffinity_np pstat_getdynamic sysmp sysctl])
+ gl_CHECK_FUNCS_ANDROID([sched_getaffinity], [[#include <sched.h>]])
dnl Test whether sched_getaffinity has the expected declaration.
dnl glibc 2.3.[0-2]:
-# pread.m4 serial 6
+# pread.m4 serial 7
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 Persuade glibc <unistd.h> to declare pread().
AC_REQUIRE([AC_USE_SYSTEM_EXTENSIONS])
- AC_CHECK_FUNCS_ONCE([pread])
+ gl_CHECK_FUNCS_ANDROID([pread], [[#include <unistd.h>]])
if test $ac_cv_func_pread = yes; then
dnl On HP-UX 11.11 with _FILE_OFFSET_BITS=64, pread() on a file returns 0
dnl instead of a positive value.
-# pwrite.m4 serial 6
+# pwrite.m4 serial 7
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,
dnl Persuade glibc <unistd.h> to declare pwrite().
AC_REQUIRE([AC_USE_SYSTEM_EXTENSIONS])
- AC_CHECK_FUNCS_ONCE([pwrite])
+ gl_CHECK_FUNCS_ANDROID([pwrite], [[#include <unistd.h>]])
if test $ac_cv_func_pwrite = yes; then
dnl On HP-UX 11.11 with _FILE_OFFSET_BITS=64, pwrite() on a file does not
dnl fail when an invalid (negative) offset is passed and uses an arbitrary
-# thread.m4 serial 3
+# thread.m4 serial 4
dnl Copyright (C) 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,
if test $gl_threads_api = posix; then
gl_save_LIBS="$LIBS"
LIBS="$LIBS $LIBMULTITHREAD"
- AC_CHECK_FUNCS([pthread_atfork])
+ gl_CHECK_FUNCS_ANDROID([pthread_atfork], [[#include <pthread.h>]])
LIBS="$gl_save_LIBS"
fi
])
-# timegm.m4 serial 13
+# timegm.m4 serial 14
dnl Copyright (C) 2003, 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,
AC_REQUIRE([gl_TIME_H_DEFAULTS])
AC_REQUIRE([gl_FUNC_MKTIME_WORKS])
REPLACE_TIMEGM=0
- AC_CHECK_FUNCS_ONCE([timegm])
+ gl_CHECK_FUNCS_ANDROID([timegm], [[#include <time.h>]])
if test $ac_cv_func_timegm = yes; then
if test "$gl_cv_func_working_mktime" != yes; then
# Assume that timegm is buggy if mktime is.
dnl gives unlimited permission to copy and/or distribute it,
dnl with or without modifications, as long as this notice is preserved.
-dnl serial 12
+dnl serial 13
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([futimens utimensat lutimes])
+ AC_CHECK_FUNCS_ONCE([futimens lutimes])
gl_CHECK_FUNCS_ANDROID([futimes], [[#include <sys/time.h>]])
gl_CHECK_FUNCS_ANDROID([futimesat], [[#include <sys/time.h>]])
+ gl_CHECK_FUNCS_ANDROID([utimensat], [[#include <sys/stat.h>]])
if test $ac_cv_func_futimens = no && test $ac_cv_func_futimesat = yes; then
dnl FreeBSD 8.0-rc2 mishandles futimesat(fd,NULL,time). It is not
-# serial 9
+# serial 10
# See if we need to provide utimensat replacement.
dnl Copyright (C) 2009-2023 Free Software Foundation, Inc.
AC_REQUIRE([gl_SYS_STAT_H_DEFAULTS])
AC_REQUIRE([gl_USE_SYSTEM_EXTENSIONS])
AC_REQUIRE([AC_CANONICAL_HOST]) dnl for cross-compiles
- AC_CHECK_FUNCS_ONCE([utimensat])
+ gl_CHECK_FUNCS_ANDROID([utimensat], [[#include <sys/stat.h>]])
if test $ac_cv_func_utimensat = no; then
HAVE_UTIMENSAT=0
else