]> git.ipfire.org Git - thirdparty/gnulib.git/commitdiff
{realloc,calloc}-gnu: Fix autoconf macro (regression 2021-04-18).
authorBruno Haible <bruno@clisp.org>
Sun, 9 May 2021 22:59:21 +0000 (00:59 +0200)
committerBruno Haible <bruno@clisp.org>
Sun, 9 May 2021 22:59:21 +0000 (00:59 +0200)
* m4/realloc.m4 (gl_FUNC_REALLOC_POSIX): Don't reset REPLACE_REALLOC
to 0 if it is already 1 after gl_FUNC_REALLOC_GNU was executed.
* m4/calloc.m4 (gl_FUNC_CALLOC_POSIX): Don't reset REPLACE_CALLOC
to 0 if it is already 1 after gl_FUNC_CALLOC_GNU was executed.

ChangeLog
m4/calloc.m4
m4/realloc.m4

index 7e7f25813c192deacec2fdeb21aa2083db679e45..314ba87c6239fa3cd9acb46551b580863bc13e4c 100644 (file)
--- a/ChangeLog
+++ b/ChangeLog
@@ -1,5 +1,11 @@
 2021-05-09  Bruno Haible  <bruno@clisp.org>
 
+       {realloc,calloc}-gnu: Fix autoconf macro (regression 2021-04-18).
+       * m4/realloc.m4 (gl_FUNC_REALLOC_POSIX): Don't reset REPLACE_REALLOC
+       to 0 if it is already 1 after gl_FUNC_REALLOC_GNU was executed.
+       * m4/calloc.m4 (gl_FUNC_CALLOC_POSIX): Don't reset REPLACE_CALLOC
+       to 0 if it is already 1 after gl_FUNC_CALLOC_GNU was executed.
+
        {malloc,realloc,calloc}-gnu: Fix autoconf macro (regression 2021-04-18).
        * m4/malloc.m4 (gl_FUNC_MALLOC_GNU): Don't assume that
        _AC_FUNC_MALLOC_IF expands to a single shell statement.
index 7575a69a7e2199fb6c4889d560aac917e9e48b98..fe12b15d090d75a0410432fc08fb2e01ce31f3ee 100644 (file)
@@ -1,4 +1,4 @@
-# calloc.m4 serial 26
+# calloc.m4 serial 27
 
 # Copyright (C) 2004-2021 Free Software Foundation, Inc.
 # This file is free software; the Free Software Foundation
@@ -72,7 +72,9 @@ AC_DEFUN([gl_FUNC_CALLOC_POSIX],
 [
   AC_REQUIRE([gl_STDLIB_H_DEFAULTS])
   AC_REQUIRE([gl_FUNC_MALLOC_POSIX])
-  REPLACE_CALLOC=$REPLACE_MALLOC
+  if test $REPLACE_MALLOC = 1; then
+    REPLACE_CALLOC=1
+  fi
   dnl Although in theory we should also test for size_t overflow,
   dnl in practice testing for ptrdiff_t overflow suffices
   dnl since PTRDIFF_MAX <= SIZE_MAX on all known Gnulib porting targets.
index 99259178484d3df28e46efa7642292a388afcaa0..0abc4185ed09d7f0085b00aa06630bd59a59162d 100644 (file)
@@ -1,4 +1,4 @@
-# realloc.m4 serial 23
+# realloc.m4 serial 24
 dnl Copyright (C) 2007, 2009-2021 Free Software Foundation, Inc.
 dnl This file is free software; the Free Software Foundation
 dnl gives unlimited permission to copy and/or distribute it,
@@ -57,5 +57,7 @@ AC_DEFUN([gl_FUNC_REALLOC_POSIX],
 [
   AC_REQUIRE([gl_STDLIB_H_DEFAULTS])
   AC_REQUIRE([gl_FUNC_MALLOC_POSIX])
-  REPLACE_REALLOC=$REPLACE_MALLOC
+  if test $REPLACE_MALLOC = 1; then
+    REPLACE_REALLOC=1
+  fi
 ])