summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorPaul Eggert <eggert@cs.ucla.edu>2021-04-16 17:06:21 -0700
committerPaul Eggert <eggert@cs.ucla.edu>2021-04-16 17:07:29 -0700
commit6664b43d03eb5acf0ac25c5570be6b8ecdd2ebde (patch)
tree12aa42aac30933095913278ff718860a0f1fff83
parent9ca3600636304e6ff644a51a0f606a2ef3509920 (diff)
downloadgnulib-6664b43d03eb5acf0ac25c5570be6b8ecdd2ebde.tar.gz
gnulib-6664b43d03eb5acf0ac25c5570be6b8ecdd2ebde.tar.bz2
malloc, realloc: fix recently-introduced #undef typos
* lib/malloc.c (malloc): * lib/realloc.c (malloc, realloc): #undef before using.
-rw-r--r--ChangeLog6
-rw-r--r--lib/malloc.c3
-rw-r--r--lib/realloc.c4
3 files changed, 13 insertions, 0 deletions
diff --git a/ChangeLog b/ChangeLog
index 7c519ee44e..3207c22cf5 100644
--- a/ChangeLog
+++ b/ChangeLog
@@ -1,3 +1,9 @@
+2021-04-16 Paul Eggert <eggert@cs.ucla.edu>
+
+ malloc, realloc: fix recently-introduced #undef typos
+ * lib/malloc.c (malloc):
+ * lib/realloc.c (malloc, realloc): #undef before using.
+
2021-04-14 Bruno Haible <bruno@clisp.org>
hamt tests: Fix link error.
diff --git a/lib/malloc.c b/lib/malloc.c
index 7b5ae9589d..272b8b9f44 100644
--- a/lib/malloc.c
+++ b/lib/malloc.c
@@ -33,6 +33,9 @@
# include <errno.h>
+/* Call the system's malloc below. */
+# undef malloc
+
/* Allocate an N-byte block of memory from the heap.
If N is zero, allocate a 1-byte block. */
diff --git a/lib/realloc.c b/lib/realloc.c
index 3bf1bea2d9..c3e3cdfc55 100644
--- a/lib/realloc.c
+++ b/lib/realloc.c
@@ -40,6 +40,10 @@
# include <errno.h>
+/* Call the system's malloc and realloc below. */
+# undef malloc
+# undef realloc
+
/* Change the size of an allocated block of memory P to N bytes,
with error checking. If N is zero, change it to 1. If P is NULL,
use malloc. */

Return to:

Send suggestions and report system problems to the System administrator.