From: Bruno Haible Date: Sun, 9 May 2021 20:10:40 +0000 (+0200) Subject: {malloc,realloc,calloc}-gnu: Fix autoconf macro (regression 2021-04-18). X-Git-Tag: v1.0~2901 X-Git-Url: https://gitweb.git.savannah.gnu.org/gitweb/?a=commitdiff_plain;h=ba08ac6df93ae9c5fbdcc424a184150e7caed4f2;p=gnulib.git {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. --- diff --git a/ChangeLog b/ChangeLog index b24976a269..7e7f25813c 100644 --- a/ChangeLog +++ b/ChangeLog @@ -1,3 +1,13 @@ +2021-05-09 Bruno Haible + + {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 malloc-gnu, realloc-gnu, calloc-gnu: Ensure errno gets set on IRIX. diff --git a/m4/calloc.m4 b/m4/calloc.m4 index 2f0abee032..7575a69a7e 100644 --- a/m4/calloc.m4 +++ b/m4/calloc.m4 @@ -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 diff --git a/m4/malloc.m4 b/m4/malloc.m4 index de1b2c66a1..6fcd4adb67 100644 --- a/m4/malloc.m4 +++ b/m4/malloc.m4 @@ -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 diff --git a/m4/realloc.m4 b/m4/realloc.m4 index 8eb6b199f3..9925917848 100644 --- a/m4/realloc.m4 +++ b/m4/realloc.m4 @@ -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