]> Savannah Git Hosting - gnulib.git/commitdiff
Resolve conflicts for functions introduced in Android API level 16-17.
authorBruno Haible <bruno@clisp.org>
Sun, 22 Jan 2023 01:08:45 +0000 (02:08 +0100)
committerBruno Haible <bruno@clisp.org>
Sun, 22 Jan 2023 14:56:13 +0000 (15:56 +0100)
* 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
lib/stdlib.in.h
m4/posix_memalign.m4

index 8f536cfc734d364449bd9c761de0e1f806c74a51..b60113ead2c92d5d92f15ab2f1f9143a737e0af3 100644 (file)
--- a/ChangeLog
+++ b/ChangeLog
@@ -1,3 +1,11 @@
+2023-01-22  Bruno Haible  <bruno@clisp.org>
+
+       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  <bruno@clisp.org>
 
        Resolve conflicts for functions introduced in Android API level 16.
index 55f31feb4295e63bfebee1aa34150619ad4f6f0e..018e7945dbf7284d83ac6ce98889e59b5486394b 100644 (file)
@@ -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
index 36d88e0323b106113059c8c4b1ba25834c359275..c5404a0119a32ee5c033905e7883603acef622ed 100644 (file)
@@ -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
 ])