* lib/realloc.c (_GL_USE_STDLIB_ALLOC): New macro, which we can use now that we don’t use malloc. (realloc): Do not undef; no longer needed. --- ChangeLog | 5 +++++ lib/realloc.c | 5 +---- 2 files changed, 6 insertions(+), 4 deletions(-)
diff --git a/ChangeLog b/ChangeLog index 761061e2b5..d646381a86 100644 --- a/ChangeLog +++ b/ChangeLog @@ -1,5 +1,10 @@ 2024-11-04 Paul Eggert <egg...@cs.ucla.edu> + realloc-posix: use _GL_USE_STDLIB_ALLOC + * lib/realloc.c (_GL_USE_STDLIB_ALLOC): + New macro, which we can use now that we don’t use malloc. + (realloc): Do not undef; no longer needed. + stdlib: make MB_CUR_MAX usable from extern inline * lib/stdlib.c: New file. * modules/stdlib (Files, lib_SOURCES): Add it. diff --git a/lib/realloc.c b/lib/realloc.c index 2f83b04dc9..e1c971eb06 100644 --- a/lib/realloc.c +++ b/lib/realloc.c @@ -18,6 +18,7 @@ /* written by Jim Meyering and Bruno Haible */ +#define _GL_USE_STDLIB_ALLOC 1 #include <config.h> #include <stdlib.h> @@ -29,10 +30,6 @@ # include <cheri.h> #endif -/* Call the system's realloc below. This file does not define - _GL_USE_STDLIB_ALLOC because it needs Gnulib's malloc if present. */ -#undef realloc - /* Change the size of an allocated block of memory P to N bytes, with error checking. If P is NULL, use malloc. Otherwise if N is zero, free P and return NULL. */ -- 2.43.0