]> Savannah Git Hosting - gnulib.git/commitdiff
{malloc,realloc,calloc}-gnu: Fix autoconf macro (regression 2021-04-18).
authorBruno Haible <bruno@clisp.org>
Sun, 9 May 2021 20:10:40 +0000 (22:10 +0200)
committerBruno Haible <bruno@clisp.org>
Sun, 9 May 2021 20:10:40 +0000 (22:10 +0200)
* m4/malloc.m4 (gl_FUNC_MALLOC_GNU): Don't assume that
_AC_FUNC_MALLOC_IF expands to a single shell statement.
* m4/realloc.m4 (gl_FUNC_REALLOC_GNU): Don't assume that
_AC_FUNC_REALLOC_IF expands to a single shell statement.
* m4/calloc.m4 (gl_FUNC_CALLOC_GNU): Don't assume that
_AC_FUNC_CALLOC_IF expands to a single shell statement.

ChangeLog
m4/calloc.m4
m4/malloc.m4
m4/realloc.m4

index b24976a26964d9ab81a585d60d9a7d6c98e417c6..7e7f25813c192deacec2fdeb21aa2083db679e45 100644 (file)
--- a/ChangeLog
+++ b/ChangeLog
@@ -1,3 +1,13 @@
+2021-05-09  Bruno Haible  <bruno@clisp.org>
+
+       {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.
+       * m4/realloc.m4 (gl_FUNC_REALLOC_GNU): Don't assume that
+       _AC_FUNC_REALLOC_IF expands to a single shell statement.
+       * m4/calloc.m4 (gl_FUNC_CALLOC_GNU): Don't assume that
+       _AC_FUNC_CALLOC_IF expands to a single shell statement.
+
 2021-05-09  Bruno Haible  <bruno@clisp.org>
 
        malloc-gnu, realloc-gnu, calloc-gnu: Ensure errno gets set on IRIX.
index 2f0abee0326556c0485a5876d2f7f6569ba0a513..7575a69a7e2199fb6c4889d560aac917e9e48b98 100644 (file)
@@ -1,4 +1,4 @@
-# calloc.m4 serial 25
+# calloc.m4 serial 26
 
 # Copyright (C) 2004-2021 Free Software Foundation, Inc.
 # This file is free software; the Free Software Foundation
@@ -58,7 +58,9 @@ AC_DEFUN([gl_FUNC_CALLOC_GNU],
 [
   AC_REQUIRE([gl_STDLIB_H_DEFAULTS])
   AC_REQUIRE([gl_FUNC_CALLOC_POSIX])
-  test $REPLACE_CALLOC = 1 || _AC_FUNC_CALLOC_IF([], [REPLACE_CALLOC=1])
+  if test $REPLACE_CALLOC = 0; then
+    _AC_FUNC_CALLOC_IF([], [REPLACE_CALLOC=1])
+  fi
 ])# gl_FUNC_CALLOC_GNU
 
 # gl_FUNC_CALLOC_POSIX
index de1b2c66a10f9a079b2d7cac9529b14e3071be75..6fcd4adb67473e367dd4d2c3ecd37e5ca91f4256 100644 (file)
@@ -1,4 +1,4 @@
-# malloc.m4 serial 25
+# malloc.m4 serial 26
 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,
@@ -43,7 +43,9 @@ AC_DEFUN([gl_FUNC_MALLOC_GNU],
 [
   AC_REQUIRE([gl_STDLIB_H_DEFAULTS])
   AC_REQUIRE([gl_FUNC_MALLOC_POSIX])
-  test $REPLACE_MALLOC = 1 || _AC_FUNC_MALLOC_IF([], [REPLACE_MALLOC=1])
+  if test $REPLACE_MALLOC = 0; then
+    _AC_FUNC_MALLOC_IF([], [REPLACE_MALLOC=1])
+  fi
 ])
 
 # gl_FUNC_MALLOC_PTRDIFF
index 8eb6b199f326d03f6fa0f7ee552a038b6ca78967..99259178484d3df28e46efa7642292a388afcaa0 100644 (file)
@@ -1,4 +1,4 @@
-# realloc.m4 serial 22
+# realloc.m4 serial 23
 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,
@@ -43,7 +43,9 @@ AC_DEFUN([gl_FUNC_REALLOC_GNU],
 [
   AC_REQUIRE([gl_STDLIB_H_DEFAULTS])
   AC_REQUIRE([gl_FUNC_REALLOC_POSIX])
-  test $REPLACE_REALLOC = 1 || _AC_FUNC_REALLOC_IF([], [REPLACE_REALLOC=1])
+  if test $REPLACE_REALLOC = 0; then
+    _AC_FUNC_REALLOC_IF([], [REPLACE_REALLOC=1])
+  fi
 ])# gl_FUNC_REALLOC_GNU
 
 # gl_FUNC_REALLOC_POSIX