]> Savannah Git Hosting - gnulib.git/commitdiff
realloc-posix: Fix test failure on AIX (regression 2024-10-27).
authorBruno Haible <bruno@clisp.org>
Fri, 1 Nov 2024 12:26:40 +0000 (13:26 +0100)
committerBruno Haible <bruno@clisp.org>
Fri, 1 Nov 2024 12:26:40 +0000 (13:26 +0100)
* m4/realloc.m4 (gl_FUNC_REALLOC_0_NONNULL): New macro.
* modules/realloc-posix (configure.ac): Invoke it.

ChangeLog
m4/realloc.m4
modules/realloc-posix

index 87ffe5d70c2be48985b912b9c2b716c5105dd1c9..fd3f4b3fcc34bd2282893a32b5ce2e7f5e42074a 100644 (file)
--- a/ChangeLog
+++ b/ChangeLog
@@ -1,3 +1,9 @@
+2024-11-01  Bruno Haible  <bruno@clisp.org>
+
+       realloc-posix: Fix test failure on AIX (regression 2024-10-27).
+       * m4/realloc.m4 (gl_FUNC_REALLOC_0_NONNULL): New macro.
+       * modules/realloc-posix (configure.ac): Invoke it.
+
 2024-11-01  Bruno Haible  <bruno@clisp.org>
 
        eealloc: Use the same cross-compilation guess as malloc-posix.
index 4f414b4817aa43408cb0bb3fa249ca71a7499a9e..639d7a9efe3fe1d824197178a7d591f2c4d9279a 100644 (file)
@@ -1,5 +1,5 @@
 # realloc.m4
-# serial 36
+# serial 37
 dnl Copyright (C) 2007, 2009-2024 Free Software Foundation, Inc.
 dnl This file is free software; the Free Software Foundation
 dnl gives unlimited permission to copy and/or distribute it,
@@ -75,3 +75,14 @@ AC_DEFUN([gl_FUNC_REALLOC_POSIX],
     fi
   fi
 ])
+
+# gl_FUNC_REALLOC_0_NONNULL
+# -------------------------
+# Replace realloc if it is not compatible with GNU libc.
+AC_DEFUN([gl_FUNC_REALLOC_0_NONNULL],
+[
+  AC_REQUIRE([gl_STDLIB_H_DEFAULTS])
+
+  _AC_FUNC_REALLOC_IF([], [REPLACE_REALLOC_FOR_REALLOC_POSIX=1],
+    ["$gl_cross_guess_normal"])
+])
index 566d38919408a559ddbba4540a430fffb3d8a75d..e7188b5f041bde556e9ef305e8f9d2dbd343cb26 100644 (file)
@@ -12,6 +12,7 @@ stdlib
 
 configure.ac:
 gl_FUNC_REALLOC_POSIX
+gl_FUNC_REALLOC_0_NONNULL
 if test $REPLACE_REALLOC_FOR_REALLOC_POSIX = 1; then
   AC_LIBOBJ([realloc])
 fi