I wrote: > 2024-11-01 Bruno Haible <br...@clisp.org> > > eealloc: Use the same cross-compilation guess as malloc-posix. > * m4/eealloc.m4 (gl_EEMALLOC): Invoke gl_CHECK_MALLOC_POSIX, not > _AC_FUNC_MALLOC_IF.
Oops. That part was nonsense. I confused the two (orthogonal) properties of malloc(). Reverted: 2024-11-01 Bruno Haible <br...@clisp.org> eealloc: Revert last change. * m4/eealloc.m4 (gl_EEMALLOC): Invoke _AC_FUNC_MALLOC_IF, not gl_CHECK_MALLOC_POSIX. diff --git a/m4/eealloc.m4 b/m4/eealloc.m4 index ee56f81faa..0ad90c687b 100644 --- a/m4/eealloc.m4 +++ b/m4/eealloc.m4 @@ -1,5 +1,5 @@ # eealloc.m4 -# serial 6 +# 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, @@ -14,11 +14,10 @@ AC_DEFUN([gl_EEALLOC] AC_DEFUN([gl_EEMALLOC], [ - gl_CHECK_MALLOC_POSIX - case "$gl_cv_func_malloc_posix" in - *yes) gl_cv_func_malloc_0_nonnull=1 ;; - *) gl_cv_func_malloc_0_nonnull=0 ;; - esac + _AC_FUNC_MALLOC_IF( + [gl_cv_func_malloc_0_nonnull=1], + [gl_cv_func_malloc_0_nonnull=0], + ["$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.])