From 23d89b19eeb7d4de36a393ba34aa8c1b6573afa2 Mon Sep 17 00:00:00 2001 From: Bruno Haible Date: Fri, 1 Nov 2024 12:28:05 +0100 Subject: [PATCH] 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. * modules/malloca (Files): Add m4/malloc.m4. * modules/regex (Files): Likewise. --- ChangeLog | 8 ++++++++ m4/eealloc.m4 | 11 ++++++----- modules/malloca | 1 + modules/regex | 1 + 4 files changed, 16 insertions(+), 5 deletions(-) diff --git a/ChangeLog b/ChangeLog index 36e34b048d..87ffe5d70c 100644 --- a/ChangeLog +++ b/ChangeLog @@ -1,3 +1,11 @@ +2024-11-01 Bruno Haible + + 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. + * modules/malloca (Files): Add m4/malloc.m4. + * modules/regex (Files): Likewise. + 2024-11-01 Bruno Haible Improve log output of an Autoconf test. diff --git a/m4/eealloc.m4 b/m4/eealloc.m4 index 0ad90c687b..ee56f81faa 100644 --- a/m4/eealloc.m4 +++ b/m4/eealloc.m4 @@ -1,5 +1,5 @@ # eealloc.m4 -# serial 5 +# serial 6 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,10 +14,11 @@ AC_DEFUN([gl_EEALLOC], 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_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_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.]) diff --git a/modules/malloca b/modules/malloca index 6e5fc8d566..ffa5306a0b 100644 --- a/modules/malloca +++ b/modules/malloca @@ -6,6 +6,7 @@ lib/malloca.h lib/malloca.c m4/malloca.m4 m4/eealloc.m4 +m4/malloc.m4 Depends-on: alloca-opt diff --git a/modules/regex b/modules/regex index 1fa0722963..ecbfaf4156 100644 --- a/modules/regex +++ b/modules/regex @@ -12,6 +12,7 @@ lib/regex_internal.h lib/regexec.c lib/regcomp.c m4/eealloc.m4 +m4/malloc.m4 m4/regex.m4 m4/mbstate_t.m4 -- 2.39.5