]> Savannah Git Hosting - gnulib.git/commitdiff
Resolve conflicts for functions introduced in Android API level 29.
authorBruno Haible <bruno@clisp.org>
Sun, 22 Jan 2023 13:49:05 +0000 (14:49 +0100)
committerBruno Haible <bruno@clisp.org>
Sun, 22 Jan 2023 14:57:33 +0000 (15:57 +0100)
* m4/reallocarray.m4 (gl_FUNC_REALLOCARRAY): Conditionally set
REPLACE_REALLOCARRAY.
* lib/stdlib.in.h (reallocarray): Disable _GL_CXXALIASWARN invocation on
non-glibc systems.

ChangeLog
lib/stdlib.in.h
m4/reallocarray.m4

index 98363006316246c7bf00b9465ac59b0c7a98121a..33473610a5690f5e678f6096a74b93b818ea0cad 100644 (file)
--- a/ChangeLog
+++ b/ChangeLog
@@ -2,6 +2,11 @@
 
        Resolve conflicts for functions introduced in Android API level 29.
 
+       * m4/reallocarray.m4 (gl_FUNC_REALLOCARRAY): Conditionally set
+       REPLACE_REALLOCARRAY.
+       * lib/stdlib.in.h (reallocarray): Disable _GL_CXXALIASWARN invocation on
+       non-glibc systems.
+
        * lib/stdlib.in.h (getloadavg): Consider REPLACE_GETLOADAVG. Disable
        _GL_CXXALIASWARN invocation on non-glibc systems.
        * m4/stdlib_h.m4 (gl_STDLIB_H_DEFAULTS): Initialize REPLACE_GETLOADAVG.
index ba1d8bff4e7e71f0ccada9da86e8bf233dbe2166..a91f4e23d6792ce81ba1a3cd9e6711a542601c44 100644 (file)
@@ -1280,7 +1280,9 @@ _GL_FUNCDECL_SYS (reallocarray, void *,
 _GL_CXXALIAS_SYS (reallocarray, void *,
                   (void *ptr, size_t nmemb, size_t size));
 # endif
+# if __GLIBC__ >= 2
 _GL_CXXALIASWARN (reallocarray);
+# endif
 #elif defined GNULIB_POSIXCHECK
 # undef reallocarray
 # if HAVE_RAW_DECL_REALLOCARRAY
index 4be7cd1be2a3768f03cae8361230d07ebd42b2e1..6a5b5ab344d34c0e7b9e9367942ee7188a824660 100644 (file)
@@ -1,4 +1,4 @@
-# reallocarray.m4 serial 4
+# reallocarray.m4 serial 5
 dnl Copyright (C) 2017-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,
@@ -14,6 +14,9 @@ AC_DEFUN([gl_FUNC_REALLOCARRAY],
   gl_CHECK_FUNCS_ANDROID([reallocarray], [[#include <stdlib.h>]])
   if test "$ac_cv_func_reallocarray" = no; then
     HAVE_REALLOCARRAY=0
+    case "$gl_cv_onwards_func_reallocarray" in
+      future*) REPLACE_REALLOCARRAY=1 ;;
+    esac
   elif test "$gl_cv_malloc_ptrdiff" = no; then
     REPLACE_REALLOCARRAY=1
   fi