mirror of
https://git.savannah.gnu.org/git/gnulib.git
synced 2025-08-08 17:22:05 +03:00
malloc-gnu: Allow use as dependency from test modules.
* m4/malloc.m4 (gl_FUNC_MALLOC_GNU): Set REPLACE_MALLOC_FOR_MALLOC_GNU instead of REPLACE_MALLOC. (gl_FUNC_MALLOC_PTRDIFF, gl_FUNC_MALLOC_POSIX): Set REPLACE_MALLOC_FOR_MALLOC_POSIX instead of REPLACE_MALLOC. * m4/calloc.m4 (gl_FUNC_CALLOC_POSIX): Test REPLACE_MALLOC_FOR_MALLOC_POSIX instead of REPLACE_MALLOC. * m4/realloc.m4 (gl_FUNC_REALLOC_POSIX): Likewise. * m4/stdlib_h.m4 (gl_STDLIB_H_REQUIRE_DEFAULTS): Initialize the malloc-gnu module indicator. (gl_STDLIB_H_DEFAULTS): Initialize REPLACE_MALLOC_FOR_MALLOC_GNU, REPLACE_MALLOC_FOR_MALLOC_POSIX, not REPLACE_MALLOC. * modules/stdlib (Makefile.am): Substitute GNULIB_MALLOC_GNU, REPLACE_MALLOC_FOR_MALLOC_GNU, REPLACE_MALLOC_FOR_MALLOC_POSIX, not REPLACE_MALLOC. * modules/malloc-posix (Depends-on, configure.ac): Test REPLACE_MALLOC_FOR_MALLOC_POSIX instead of REPLACE_MALLOC. * modules/malloc-gnu (Comment): Remove section. (Depends-on): Add xalloc-oversized. (configure.ac): Test REPLACE_MALLOC_FOR_MALLOC_GNU instead of REPLACE_MALLOC. Set a module indicator. * lib/stdlib.in.h (malloc): Test REPLACE_MALLOC_FOR_MALLOC_POSIX, REPLACE_MALLOC_FOR_MALLOC_GNU, and the respective module indicators instead of just REPLACE_MALLOC.
This commit is contained in:
@@ -1,22 +1,19 @@
|
||||
Description:
|
||||
malloc() function that is glibc compatible.
|
||||
|
||||
Comment:
|
||||
This module should not be used as a dependency from a test module,
|
||||
otherwise when this module occurs as a tests-related module, it will
|
||||
have side effects on the compilation of the main modules in lib/.
|
||||
|
||||
Files:
|
||||
lib/malloc.c
|
||||
|
||||
Depends-on:
|
||||
malloc-posix
|
||||
xalloc-oversized [test $REPLACE_MALLOC_FOR_MALLOC_GNU = 1]
|
||||
|
||||
configure.ac:
|
||||
gl_FUNC_MALLOC_GNU
|
||||
if test $REPLACE_MALLOC = 1; then
|
||||
if test $REPLACE_MALLOC_FOR_MALLOC_GNU = 1; then
|
||||
AC_LIBOBJ([malloc])
|
||||
fi
|
||||
gl_STDLIB_MODULE_INDICATOR([malloc-gnu])
|
||||
|
||||
Makefile.am:
|
||||
|
||||
|
Reference in New Issue
Block a user