X-Git-Url: http://git.chise.org/gitweb/?a=blobdiff_plain;f=src%2Fmalloc.c;h=878e3405e8823cd8e88255e107a81be4e92f0bbd;hb=f94fbd3020e40c3685853c905014f2ae310b02c7;hp=bb9092d4bcd49d50b9a6d895269a2ab6e8e31088;hpb=6883ee56ec887c2c48abe5b06b5e66aa74031910;p=chise%2Fxemacs-chise.git.1 diff --git a/src/malloc.c b/src/malloc.c index bb9092d..878e340 100644 --- a/src/malloc.c +++ b/src/malloc.c @@ -166,6 +166,8 @@ what you give them. Help stamp out software-hoarding! */ #endif /* not emacs */ +#include + /* Define getpagesize () if the system does not. */ #include "getpagesize.h" @@ -182,7 +184,7 @@ what you give them. Help stamp out software-hoarding! */ #include #endif /* BSD4_2 */ -#ifdef __STDC_ +#ifdef __STDC__ #ifndef HPUX /* not sure where this for NetBSD should really go and it probably applies to other systems */ @@ -196,13 +198,11 @@ extern char *sbrk (); extern void *sbrk (); #endif /* __STDC__ */ -extern char *start_of_data (); +extern char *start_of_data (void); #ifdef BSD -#ifndef DATA_SEG_BITS #define start_of_data() &etext #endif -#endif #ifndef emacs #define start_of_data() &etext @@ -285,7 +285,7 @@ static struct mhead *nextf[30]; static char busy[30]; /* Number of bytes of writable memory we can expect to be able to get */ -extern unsigned int lim_data; +extern unsigned long lim_data; /* Level number of warnings already issued. 0 -- no warnings issued. @@ -339,7 +339,7 @@ morecore (nu) /* ask system for more memory */ { char *cp; int nblks; - unsigned int siz; + unsigned long siz; int oldmask; #ifdef BSD @@ -525,7 +525,7 @@ malloc (n) /* get a block */ #ifdef rcheck botch ("block on free list clobbered"); #else /* not rcheck */ - abort (); + ABORT (); #endif /* not rcheck */ /* Fill in the info, and if range checking, set up the magic numbers */ @@ -569,7 +569,7 @@ free (mem) #ifndef rcheck if (p -> mh_alloc != ISALLOC) - abort (); + ABORT (); #else /* rcheck */ if (p -> mh_alloc != ISALLOC) @@ -738,7 +738,7 @@ malloc_stats (size) return v; } int -malloc_mem_used () +malloc_mem_used (void) { int i; int size_used; @@ -757,7 +757,7 @@ malloc_mem_used () } int -malloc_mem_free () +malloc_mem_free (void) { int i; int size_unused; @@ -787,7 +787,7 @@ malloc_mem_free () #ifdef USG static void -get_lim_data () +get_lim_data (void) { #ifdef ULIMIT_BREAK_VALUE lim_data = ULIMIT_BREAK_VALUE; @@ -802,7 +802,7 @@ get_lim_data () #ifndef BSD4_2 static void -get_lim_data () +get_lim_data (void) { lim_data = vlimit (LIM_DATA, -1); } @@ -810,7 +810,7 @@ get_lim_data () #else /* BSD4_2 */ static void -get_lim_data () +get_lim_data (void) { struct rlimit XXrlimit;