From: Bruno Haible Date: Sun, 9 Sep 2007 17:38:23 +0000 (+0000) Subject: Oops, avoid an infinite recursion. X-Git-Url: https://pintos-os.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=3ba9dca25043b6cb2ba35c63e3b55c7a1993bf8c;p=pspp Oops, avoid an infinite recursion. --- diff --git a/lib/calloc.c b/lib/calloc.c index 0b92d2ffeb..72045dbf16 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 b6ecf37466..eba131d1f2 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 a68f144bd3..b1c04508c8 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. */