[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: [PATCH 03/14] calloc: configure more like malloc
From: |
Bruno Haible |
Subject: |
Re: [PATCH 03/14] calloc: configure more like malloc |
Date: |
Tue, 05 Nov 2024 15:36:48 +0100 |
Paul Eggert wrote:
> + [ac_cv_func_malloc_0_nonnull="guessing yes"],
This variable name is a copy&paste mistake.
> + [# Guess as follows if we don't know.
The previous comment was explaining what $gl_cross_guess_normal represents.
> + ac_cv_func_malloc_0_nonnull=$gl_cross_guess_normal])])])
Same copy&paste mistake.
Fixed as follows. While at it, let me change the cache variable name, to
use prefix 'gl_', not 'ac_'.
2024-11-05 Bruno Haible <bruno@clisp.org>
calloc: Fix configure test (regression yesterday).
* m4/calloc.m4 (gl_FUNC_CALLOC_IF): Fix wrong cache variable name.
Rename cache variable. Restore earlier comment.
diff --git a/m4/calloc.m4 b/m4/calloc.m4
index 6514bd1cf9..a4a006e3d9 100644
--- a/m4/calloc.m4
+++ b/m4/calloc.m4
@@ -1,5 +1,5 @@
# calloc.m4
-# serial 35
+# serial 36
dnl Copyright (C) 2004-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,
@@ -20,7 +20,7 @@ AC_DEFUN([gl_FUNC_CALLOC_IF]
[
AC_REQUIRE([AC_CANONICAL_HOST]) dnl for cross-compiles
AC_CACHE_CHECK([whether calloc (0, n) and calloc (n, 0) return nonnull],
- [ac_cv_func_calloc_0_nonnull],
+ [gl_cv_func_calloc_0_nonnull],
[AC_RUN_IFELSE(
[AC_LANG_PROGRAM(
[[#include <stdlib.h>
@@ -31,17 +31,17 @@ AC_DEFUN([gl_FUNC_CALLOC_IF]
int result = !p;
free (p);
return result;]])],
- [ac_cv_func_calloc_0_nonnull=yes],
- [ac_cv_func_calloc_0_nonnull=no],
+ [gl_cv_func_calloc_0_nonnull=yes],
+ [gl_cv_func_calloc_0_nonnull=no],
[AS_CASE([$host_os],
[# Guess yes on platforms where we know the result.
*-gnu* | freebsd* | netbsd* | openbsd* | bitrig* \
| gnu* | *-musl* | midipix* | midnightbsd* \
| hpux* | solaris* | cygwin* | mingw* | windows* | msys*],
- [ac_cv_func_malloc_0_nonnull="guessing yes"],
- [# Guess as follows if we don't know.
- ac_cv_func_malloc_0_nonnull=$gl_cross_guess_normal])])])
- AS_CASE([$ac_cv_func_calloc_0_nonnull], [*yes], [$1], [$2])
+ [gl_cv_func_calloc_0_nonnull="guessing yes"],
+ [# If we don't know, obey --enable-cross-guesses.
+ gl_cv_func_calloc_0_nonnull="$gl_cross_guess_normal"])])])
+ AS_CASE([$gl_cv_func_calloc_0_nonnull], [*yes], [$1], [$2])
])
- [PATCH 01/14] calloc: depend on stdckdint not xalloc-oversized, Paul Eggert, 2024/11/05
- [PATCH 02/14] malloc-gnu: depend on stdckdint not xalloc-oversized, Paul Eggert, 2024/11/05
- [PATCH 03/14] calloc: configure more like malloc, Paul Eggert, 2024/11/05
- Re: [PATCH 03/14] calloc: configure more like malloc,
Bruno Haible <=
- [PATCH 04/14] calloc, malloc: tune a bit, Paul Eggert, 2024/11/05
- [PATCH 05/14] realloc: don’t require success for nongrowth, Paul Eggert, 2024/11/05
- [PATCH 06/14] stdlib: simplify preprocessor conditionals, Paul Eggert, 2024/11/05
- [PATCH 07/14] realloc-posix: realloc (..., 0) now returns nonnull, Paul Eggert, 2024/11/05
- [PATCH 08/14] realloc-posix: set CHERI bounds, Paul Eggert, 2024/11/05
- [PATCH 09/14] stdlib: make MB_CUR_MAX usable from extern inline, Paul Eggert, 2024/11/05