]> Savannah Git Hosting - gnulib.git/commitdiff
realloc-posix: use _GL_USE_STDLIB_ALLOC
authorPaul Eggert <eggert@cs.ucla.edu>
Mon, 4 Nov 2024 23:31:15 +0000 (15:31 -0800)
committerPaul Eggert <eggert@cs.ucla.edu>
Tue, 5 Nov 2024 05:40:18 +0000 (21:40 -0800)
* 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
lib/realloc.c

index 761061e2b5bda62744f416e3834268c43460a66c..d646381a86b80afcc3912efb09f8fc635d076f47 100644 (file)
--- a/ChangeLog
+++ b/ChangeLog
@@ -1,5 +1,10 @@
 2024-11-04  Paul Eggert  <eggert@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.
index 2f83b04dc959aff2dc33e12ff2ee52f2031209b6..e1c971eb06218ed05044d1ed10e1d5cff87e6ca4 100644 (file)
@@ -18,6 +18,7 @@
 
 /* written by Jim Meyering and Bruno Haible */
 
+#define _GL_USE_STDLIB_ALLOC 1
 #include <config.h>
 
 #include <stdlib.h>
 # 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.  */