+2023-01-19 Bruno Haible <bruno@clisp.org>
+
+ Fix warnings for functions introduced in Android API level 16 or 17.
+ * m4/posix_memalign.m4 (gl_FUNC_POSIX_MEMALIGN): Test for posix_memalign
+ using gl_CHECK_FUNCS_ANDROID instead of AC_CHECK_FUNCS_ONCE.
+ * m4/alignalloc.m4 (gl_ALIGNALLOC): Likewise.
+ * m4/pagealign_alloc.m4 (gl_PREREQ_PAGEALIGN_ALLOC): Likewise.
+ * modules/aligned-malloc (configure.ac): Likewise.
+
2023-01-19 Bruno Haible <bruno@clisp.org>
Fix warnings for functions introduced in Android API level 16.
+# alignalloc.m4 serial 1
dnl Copyright 2022-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_DEFUN([gl_ALIGNALLOC],
[
AC_REQUIRE([AC_USE_SYSTEM_EXTENSIONS])
- AC_CHECK_FUNCS_ONCE([posix_memalign])
+ gl_CHECK_FUNCS_ANDROID([posix_memalign], [[#include <stdlib.h>]])
])
-#serial 6
+#serial 7
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_DEFUN([gl_PREREQ_PAGEALIGN_ALLOC],
[
AC_REQUIRE([gl_FUNC_MMAP_ANON])
- AC_CHECK_FUNCS_ONCE([posix_memalign])
+ gl_CHECK_FUNCS_ANDROID([posix_memalign], [[#include <stdlib.h>]])
AC_CHECK_HEADERS_ONCE([unistd.h])
])
-# posix_memalign.m4 serial 1
+# posix_memalign.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,
dnl Persuade glibc <stdlib.h> to declare posix_memalign().
AC_REQUIRE([AC_USE_SYSTEM_EXTENSIONS])
- AC_CHECK_FUNCS_ONCE([posix_memalign])
+ gl_CHECK_FUNCS_ANDROID([posix_memalign], [[#include <stdlib.h>]])
if test $ac_cv_func_posix_memalign = yes; then
dnl On OpenBSD 6.1, posix_memalign (&p, 32, 2406) returns a pointer
dnl that is not a multiple of 32.
configure.ac:
gl_MALLOC_ALIGNMENT
AC_REQUIRE([AC_C_INLINE])
-AC_CHECK_FUNCS_ONCE([posix_memalign memalign])
+AC_CHECK_FUNCS_ONCE([memalign])
gl_CHECK_FUNCS_ANDROID([aligned_alloc], [[#include <stdlib.h>]])
+gl_CHECK_FUNCS_ANDROID([posix_memalign], [[#include <stdlib.h>]])
Makefile.am: