Paul Eggert wrote: > + * m4/malloc.m4 (_AC_FUNC_MALLOC_IF): > + * m4/realloc.m4 (_AC_FUNC_REALLOC_IF): > + Sync from bleeding-edge Autoconf. All uses changed.
Since the context of evaluation of the third argument of _AC_FUNC_MALLOC_IF, _AC_FUNC_REALLOC_IF is unspecified (and could thus change in the future), and since $gl_cross_guess_normal contains two words, it is safer to double-quote its value. 2024-10-31 Bruno Haible <br...@clisp.org> malloc-gnu, eealloc: Make code more future-proof. * m4/malloc.m4 (gl_FUNC_MALLOC_GNU): Protect evaluation of $gl_cross_guess_normal. * m4/eealloc.m4 (gl_EEMALLOC, gl_EEREALLOC): Likewise. diff --git a/m4/eealloc.m4 b/m4/eealloc.m4 index 42ab030f38..0ad90c687b 100644 --- a/m4/eealloc.m4 +++ b/m4/eealloc.m4 @@ -1,5 +1,5 @@ # eealloc.m4 -# serial 4 +# serial 5 dnl Copyright (C) 2003, 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, @@ -17,7 +17,7 @@ AC_DEFUN([gl_EEMALLOC] _AC_FUNC_MALLOC_IF( [gl_cv_func_malloc_0_nonnull=1], [gl_cv_func_malloc_0_nonnull=0], - [$gl_cross_guess_normal]) + ["$gl_cross_guess_normal"]) AC_DEFINE_UNQUOTED([MALLOC_0_IS_NONNULL], [$gl_cv_func_malloc_0_nonnull], [If malloc(0) is != NULL, define this to 1. Otherwise define this to 0.]) @@ -28,7 +28,7 @@ AC_DEFUN([gl_EEREALLOC] _AC_FUNC_REALLOC_IF( [gl_cv_func_realloc_0_nonnull=1], [gl_cv_func_realloc_0_nonnull=0], - [$gl_cross_guess_normal]) + ["$gl_cross_guess_normal"]) AC_DEFINE_UNQUOTED([REALLOC_0_IS_NONNULL], [$gl_cv_func_realloc_0_nonnull], [If realloc(NULL,0) is != NULL, define this to 1. Otherwise define this to 0.]) diff --git a/m4/malloc.m4 b/m4/malloc.m4 index d7684f418c..d5985fc75f 100644 --- a/m4/malloc.m4 +++ b/m4/malloc.m4 @@ -1,5 +1,5 @@ # malloc.m4 -# serial 37 +# serial 38 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, @@ -62,7 +62,7 @@ AC_DEFUN([gl_FUNC_MALLOC_GNU] REPLACE_MALLOC_FOR_MALLOC_GNU="$REPLACE_MALLOC_FOR_MALLOC_POSIX" if test $REPLACE_MALLOC_FOR_MALLOC_GNU = 0; then _AC_FUNC_MALLOC_IF([], [REPLACE_MALLOC_FOR_MALLOC_GNU=1], - [$gl_cross_guess_normal]) + ["$gl_cross_guess_normal"]) fi ])