don't write along symlinks into a read only source tree (was Re: [ID 20010129.006...
[p5sagit/p5-mst-13.2.git] / malloc.c
index 5d9652e..4f7289f 100644 (file)
--- a/malloc.c
+++ b/malloc.c
@@ -886,16 +886,12 @@ static    union overhead *nextf[NBUCKETS];
 #endif
 
 #ifdef USE_PERL_SBRK
-#define sbrk(a) Perl_sbrk(a)
+# define sbrk(a) Perl_sbrk(a)
 Malloc_t Perl_sbrk (int size);
-#else 
-#ifdef DONT_DECLARE_STD
-#ifdef I_UNISTD
-#include <unistd.h>
-#endif
 #else
+# ifndef HAS_SBRK_PROTO /* <unistd.h> usually takes care of this */
 extern Malloc_t sbrk(int);
-#endif
+# endif
 #endif
 
 #ifdef DEBUGGING_MSTATS
@@ -1100,7 +1096,7 @@ Perl_malloc(register size_t nbytes)
 
        DEBUG_m(PerlIO_printf(Perl_debug_log,
                              "0x%"UVxf": (%05lu) malloc %ld bytes\n",
-                             PTR2UV(p+1), (unsigned long)(PL_an++),
+                             PTR2UV(p), (unsigned long)(PL_an++),
                              (long)size));
 
        /* remove from linked list */