summaryrefslogtreecommitdiff
path: root/lib/malloc.c
diff options
context:
space:
mode:
authorBruno Haible <bruno@clisp.org>2021-04-11 22:00:25 +0200
committerBruno Haible <bruno@clisp.org>2021-04-11 22:00:25 +0200
commit2a597a7ae16fb988daa473f8df2468d7188c118a (patch)
treeafeaed06da94200ec34a962aa167688db1e1c013 /lib/malloc.c
parent80a344e3237b878734295cbe696b7f1e4a8541f0 (diff)
downloadgnulib-2a597a7ae16fb988daa473f8df2468d7188c118a.tar.gz
malloc, realloc, calloc: Support restricted library symbols on AIX.
Suggested by Paul Eggert in <https://lists.gnu.org/archive/html/bug-gnulib/2021-04/msg00119.html>. * 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.
Diffstat (limited to 'lib/malloc.c')
-rw-r--r--lib/malloc.c9
1 files changed, 3 insertions, 6 deletions
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 <config.h>
-/* 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