From: Bruno Haible Date: Fri, 1 Nov 2024 12:26:40 +0000 (+0100) Subject: realloc-posix: Fix test failure on AIX (regression 2024-10-27). X-Git-Url: https://gitweb.git.savannah.gnu.org/gitweb/?a=commitdiff_plain;h=6cb29d229f466d8f0e6aaa3bd34b7cbbf1c9c5a3;p=gnulib.git 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. --- diff --git a/ChangeLog b/ChangeLog index 87ffe5d70c..fd3f4b3fcc 100644 --- a/ChangeLog +++ b/ChangeLog @@ -1,3 +1,9 @@ +2024-11-01 Bruno Haible + + 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 eealloc: Use the same cross-compilation guess as malloc-posix. diff --git a/m4/realloc.m4 b/m4/realloc.m4 index 4f414b4817..639d7a9efe 100644 --- a/m4/realloc.m4 +++ b/m4/realloc.m4 @@ -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"]) +]) diff --git a/modules/realloc-posix b/modules/realloc-posix index 566d389194..e7188b5f04 100644 --- a/modules/realloc-posix +++ b/modules/realloc-posix @@ -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