>From 3a1e709270f02f91e6132bbb2ef333a01bbaa7e2 Mon Sep 17 00:00:00 2001 From: Bruno Haible Date: Sun, 22 Jan 2023 02:08:45 +0100 Subject: [PATCH 11/47] Resolve conflicts for functions introduced in Android API level 16-17. * m4/posix_memalign.m4 (gl_FUNC_POSIX_MEMALIGN): Conditionally set REPLACE_POSIX_MEMALIGN. * lib/stdlib.in.h (posix_memalign): Disable _GL_CXXALIASWARN invocation on non-glibc systems. --- ChangeLog | 8 ++++++++ lib/stdlib.in.h | 2 +- m4/posix_memalign.m4 | 5 ++++- 3 files changed, 13 insertions(+), 2 deletions(-) diff --git a/ChangeLog b/ChangeLog index 8f536cfc73..b60113ead2 100644 --- a/ChangeLog +++ b/ChangeLog @@ -1,3 +1,11 @@ +2023-01-22 Bruno Haible + + Resolve conflicts for functions introduced in Android API level 16-17. + * m4/posix_memalign.m4 (gl_FUNC_POSIX_MEMALIGN): Conditionally set + REPLACE_POSIX_MEMALIGN. + * lib/stdlib.in.h (posix_memalign): Disable _GL_CXXALIASWARN invocation + on non-glibc systems. + 2023-01-22 Bruno Haible Resolve conflicts for functions introduced in Android API level 16. diff --git a/lib/stdlib.in.h b/lib/stdlib.in.h index 55f31feb42..018e7945db 100644 --- a/lib/stdlib.in.h +++ b/lib/stdlib.in.h @@ -733,7 +733,7 @@ _GL_CXXALIAS_SYS (posix_memalign, int, (void **memptr, size_t alignment, size_t size)); # endif # endif -# if @HAVE_POSIX_MEMALIGN@ +# if __GLIBC__ >= 2 && @HAVE_POSIX_MEMALIGN@ _GL_CXXALIASWARN (posix_memalign); # endif #elif defined GNULIB_POSIXCHECK diff --git a/m4/posix_memalign.m4 b/m4/posix_memalign.m4 index 36d88e0323..c5404a0119 100644 --- a/m4/posix_memalign.m4 +++ b/m4/posix_memalign.m4 @@ -1,4 +1,4 @@ -# posix_memalign.m4 serial 2 +# posix_memalign.m4 serial 3 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, @@ -46,5 +46,8 @@ AC_DEFUN([gl_FUNC_POSIX_MEMALIGN], else dnl The system does not have posix_memalign. HAVE_POSIX_MEMALIGN=0 + case "$gl_cv_onwards_func_posix_memalign" in + future*) REPLACE_POSIX_MEMALIGN=1 ;; + esac fi ]) -- 2.34.1