eealloc: Use the same cross-compilation guess as malloc-posix.
authorBruno Haible <bruno@clisp.org>
Fri, 1 Nov 2024 11:28:05 +0000 (12:28 +0100)
committerBruno Haible <bruno@clisp.org>
Fri, 1 Nov 2024 11:28:05 +0000 (12:28 +0100)
* 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
m4/eealloc.m4
modules/malloca
modules/regex

index 36e34b048d6d5e7cd1def071c3cb77a55f12d0c8..87ffe5d70c2be48985b912b9c2b716c5105dd1c9 100644 (file)
--- a/ChangeLog
+++ b/ChangeLog
@@ -1,3 +1,11 @@
+2024-11-01  Bruno Haible  <bruno@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.
+       * modules/malloca (Files): Add m4/malloc.m4.
+       * modules/regex (Files): Likewise.
+
 2024-11-01  Bruno Haible  <bruno@clisp.org>
 
        Improve log output of an Autoconf test.
index 0ad90c687b94666c7b36453b8e193ed2a7d51cf7..ee56f81faa00d9d06ce4a304fb766e82d617e6b6 100644 (file)
@@ -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.])
index 6e5fc8d5663fc681c9bdf634b8e5b0748c43016a..ffa5306a0b1021733206cb6864e118d961ee52f9 100644 (file)
@@ -6,6 +6,7 @@ lib/malloca.h
 lib/malloca.c
 m4/malloca.m4
 m4/eealloc.m4
+m4/malloc.m4
 
 Depends-on:
 alloca-opt
index 1fa07229634222feb992b872d1cdd44aa3fa8a8c..ecbfaf4156541a4f9c3c70bbf0eaf1d492d6a6e2 100644 (file)
@@ -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