]> Savannah Git Hosting - gnulib.git/commitdiff
Fix warnings for functions introduced in Android API level 16 or 17.
authorBruno Haible <bruno@clisp.org>
Thu, 19 Jan 2023 20:55:20 +0000 (21:55 +0100)
committerBruno Haible <bruno@clisp.org>
Thu, 19 Jan 2023 20:55:20 +0000 (21:55 +0100)
* 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.

ChangeLog
m4/alignalloc.m4
m4/pagealign_alloc.m4
m4/posix_memalign.m4
modules/aligned-malloc

index 5d4ab35005a10ebcb3ee48bdb75959940407809a..0704164a25223bdab4562285e117fc5db7bf9977 100644 (file)
--- a/ChangeLog
+++ b/ChangeLog
@@ -1,3 +1,12 @@
+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.
index fa8fb7cd2b5d5e5b39cbb2fb8c8e870e4b801aa5..ec199ed01cb66b52a0c48d8bede5cf035b1eca91 100644 (file)
@@ -1,3 +1,4 @@
+# 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,
@@ -6,5 +7,5 @@ dnl with or without modifications, as long as this notice is preserved.
 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>]])
 ])
index cdf2e182b4e3edd13ec0ab60e1d2f43842746c8f..1cfb3beca88853cf7daf712fcebf7ddce0cccbb3 100644 (file)
@@ -1,4 +1,4 @@
-#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,
@@ -16,6 +16,6 @@ AC_DEFUN([gl_PAGEALIGN_ALLOC],
 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])
 ])
index b29f573adf6b2998329ac1d32295da22ffdaaba0..36d88e0323b106113059c8c4b1ba25834c359275 100644 (file)
@@ -1,4 +1,4 @@
-# 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,
@@ -12,7 +12,7 @@ AC_DEFUN([gl_FUNC_POSIX_MEMALIGN],
   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.
index 1ef05d1b76e5b4ae2a7c6a2e7885b5d02ebec171..ce2297243633e6fc2909f48f6c7c6ca674fd752b 100644 (file)
@@ -14,8 +14,9 @@ memalign
 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: