From 2a597a7ae16fb988daa473f8df2468d7188c118a Mon Sep 17 00:00:00 2001 From: Bruno Haible Date: Sun, 11 Apr 2021 22:00:25 +0200 Subject: malloc, realloc, calloc: Support restricted library symbols on AIX. Suggested by Paul Eggert in . * lib/malloc.c: Drop the code that intends to collaborate with AC_FUNC_MALLOC. * lib/realloc.c: Drop the code that intends to collaborate with AC_FUNC_REALLOC. * lib/calloc.c: Drop the code that intends to collaborate with the nonexistent macro AC_FUNC_CALLOC. --- lib/malloc.c | 9 +++------ 1 file changed, 3 insertions(+), 6 deletions(-) (limited to 'lib/malloc.c') diff --git a/lib/malloc.c b/lib/malloc.c index 887cddea3e..7b5ae9589d 100644 --- a/lib/malloc.c +++ b/lib/malloc.c @@ -19,12 +19,9 @@ #define _GL_USE_STDLIB_ALLOC 1 #include -/* Only the AC_FUNC_MALLOC macro defines 'malloc' already in config.h. */ -#ifdef malloc -# define NEED_MALLOC_GNU 1 -# undef malloc -/* Whereas the gnulib module 'malloc-gnu' defines HAVE_MALLOC_GNU. */ -#elif GNULIB_MALLOC_GNU && !HAVE_MALLOC_GNU + +/* The gnulib module 'malloc-gnu' defines HAVE_MALLOC_GNU. */ +#if GNULIB_MALLOC_GNU && !HAVE_MALLOC_GNU # define NEED_MALLOC_GNU 1 #endif -- cgit v1.2.1