[asperl] fixups to make it build and pass tests under both compilers
[p5sagit/p5-mst-13.2.git] / malloc.c
index 6b2275c..0e17458 100644 (file)
--- a/malloc.c
+++ b/malloc.c
@@ -178,7 +178,7 @@ static u_short blk_shift[11 - 3] = {256, 128, 64, 32,
 static char *emergency_buffer;
 static MEM_SIZE emergency_buffer_size;
 
-static char *
+static Malloc_t
 emergency_sbrk(size)
     MEM_SIZE size;
 {
@@ -237,14 +237,14 @@ static    union overhead *nextf[NBUCKETS];
 
 #ifdef USE_PERL_SBRK
 #define sbrk(a) Perl_sbrk(a)
-char *  Perl_sbrk _((int size));
+Malloc_t Perl_sbrk _((int size));
 #else 
 #ifdef DONT_DECLARE_STD
 #ifdef I_UNISTD
 #include <unistd.h>
 #endif
 #else
-extern char *sbrk(int);
+extern Malloc_t sbrk(int);
 #endif
 #endif
 
@@ -618,6 +618,9 @@ realloc(void *mp, size_t nbytes)
         *  FIRST_BIG_TWO_POT, but the new one is near the lower end.
         */
        if (was_alloced &&
+#ifdef STRESS_REALLOC
+           0 && /* always do it the hard way */
+#endif
            nbytes <= onb && (nbytes > ( (onb >> 1) - M_OVERHEAD )
 #ifdef TWO_POT_OPTIMIZE
                              || (i == (FIRST_BIG_TWO_POT - 3) 
@@ -777,7 +780,7 @@ static long Perl_sbrk_oldsize;
 #   define PERLSBRK_32_K (1<<15)
 #   define PERLSBRK_64_K (1<<16)
 
-char *
+Malloc_t
 Perl_sbrk(size)
 int size;
 {