From 3ba9dca25043b6cb2ba35c63e3b55c7a1993bf8c Mon Sep 17 00:00:00 2001 From: Bruno Haible Date: Sun, 9 Sep 2007 17:38:23 +0000 Subject: [PATCH] Oops, avoid an infinite recursion. --- lib/calloc.c | 3 +++ lib/malloc.c | 3 +++ lib/realloc.c | 4 ++++ 3 files changed, 10 insertions(+) diff --git a/lib/calloc.c b/lib/calloc.c index 0b92d2ffe..72045dbf1 100644 --- a/lib/calloc.c +++ b/lib/calloc.c @@ -30,6 +30,9 @@ #include +/* Call the system's calloc below. */ +#undef calloc + /* Allocate and zero-fill an NxS-byte block of memory from the heap. If N or S is zero, allocate and zero-fill a 1-byte block. */ diff --git a/lib/malloc.c b/lib/malloc.c index b6ecf3746..eba131d1f 100644 --- a/lib/malloc.c +++ b/lib/malloc.c @@ -30,6 +30,9 @@ #include +/* 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 a68f144bd..b1c04508c 100644 --- a/lib/realloc.c +++ b/lib/realloc.c @@ -30,6 +30,10 @@ #include +/* 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. */ -- 2.11.0