From 316ba778dc74385399d7bc10ec0fa1dfb8374e49 Mon Sep 17 00:00:00 2001 From: Bruno Haible Date: Mon, 3 Jan 2022 15:17:02 +0100 Subject: calloc-gnu: Allow use as dependency from test modules. * m4/calloc.m4 (gl_FUNC_CALLOC_GNU): Set REPLACE_CALLOC_FOR_CALLOC_GNU instead of REPLACE_CALLOC. (gl_FUNC_CALLOC_POSIX): Set REPLACE_CALLOC_FOR_CALLOC_POSIX instead of REPLACE_CALLOC. * m4/stdlib_h.m4 (gl_STDLIB_H_REQUIRE_DEFAULTS): Initialize the calloc-gnu module indicator. (gl_STDLIB_H_DEFAULTS): Initialize REPLACE_CALLOC_FOR_CALLOC_GNU, REPLACE_CALLOC_FOR_CALLOC_POSIX, not REPLACE_CALLOC. * modules/stdlib (Makefile.am): Substitute GNULIB_CALLOC_GNU, REPLACE_CALLOC_FOR_CALLOC_GNU, REPLACE_CALLOC_FOR_CALLOC_POSIX, not REPLACE_CALLOC. * modules/calloc-posix (Depends-on, configure.ac): Test REPLACE_CALLOC_FOR_CALLOC_POSIX instead of REPLACE_CALLOC. * modules/calloc-gnu (Depends-on): Add xalloc-oversized. (configure.ac): Test REPLACE_CALLOC_FOR_CALLOC_GNU instead of REPLACE_CALLOC. Set a module indicator. * lib/stdlib.in.h (calloc): Test REPLACE_CALLOC_FOR_CALLOC_POSIX, REPLACE_CALLOC_FOR_CALLOC_GNU, and the respective module indicators instead of just REPLACE_CALLOC. --- modules/calloc-posix | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) (limited to 'modules/calloc-posix') diff --git a/modules/calloc-posix b/modules/calloc-posix index dc9cadd5cb..9ff6913b82 100644 --- a/modules/calloc-posix +++ b/modules/calloc-posix @@ -8,11 +8,11 @@ m4/malloc.m4 Depends-on: stdlib -xalloc-oversized [test $REPLACE_REALLOC = 1] +xalloc-oversized [test $REPLACE_REALLOC_FOR_CALLOC_POSIX = 1] configure.ac: gl_FUNC_CALLOC_POSIX -if test $REPLACE_CALLOC = 1; then +if test $REPLACE_CALLOC_FOR_CALLOC_POSIX = 1; then AC_LIBOBJ([calloc]) fi gl_STDLIB_MODULE_INDICATOR([calloc-posix]) -- cgit v1.2.1