]> mj.ucw.cz Git - libucw.git/blobdiff - lib/realloc.c
Fixed compilation rules for Perl modules to avoid unnecessary rebuilds.
[libucw.git] / lib / realloc.c
index 150a3d7bc5593d61d655349a0294a4e3cb3ebe52..6d6b0baf2304b933602f33db7e24cd2ff7a6b033 100644 (file)
@@ -1,5 +1,5 @@
 /*
 /*
- *     Sherlock Library -- Memory Re-allocation
+ *     UCW Library -- Memory Re-allocation
  *
  *     (c) 1997 Martin Mares <mj@ucw.cz>
  *
  *
  *     (c) 1997 Martin Mares <mj@ucw.cz>
  *
 
 #include <stdlib.h>
 
 
 #include <stdlib.h>
 
-#ifndef DMALLOC
+#ifndef DEBUG_DMALLOC
 
 void *
 xrealloc(void *old, uns size)
 {
 
 void *
 xrealloc(void *old, uns size)
 {
+  /* We assume that realloc(NULL, x) works like malloc(x), which is true with the glibc. */
   void *x = realloc(old, size);
   if (!x)
     die("Cannot reallocate %d bytes of memory", size);
   void *x = realloc(old, size);
   if (!x)
     die("Cannot reallocate %d bytes of memory", size);