=== modified file 'lib-src/update-game-score.c' --- lib-src/update-game-score.c 2011-11-17 09:09:20 +0000 +++ lib-src/update-game-score.c 2011-12-31 14:09:29 +0000 @@ -46,10 +46,7 @@ #include #endif #include - -/* Needed for SunOS4, for instance. */ -extern char *optarg; -extern int optind, opterr; +#include static int usage (int err) NO_RETURN; === modified file 'src/gmalloc.c' --- src/gmalloc.c 2011-09-09 01:06:52 +0000 +++ src/gmalloc.c 2011-12-31 14:36:48 +0000 @@ -455,8 +455,7 @@ /* Aligned allocation. */ static __ptr_t align PP ((__malloc_size_t)); static __ptr_t -align (size) - __malloc_size_t size; +align (__malloc_size_t size) { __ptr_t result; unsigned long int adj; @@ -490,9 +489,7 @@ If we cannot get space at END, fail and return 0. */ static __ptr_t get_contiguous_space PP ((__malloc_ptrdiff_t, __ptr_t)); static __ptr_t -get_contiguous_space (size, position) - __malloc_ptrdiff_t size; - __ptr_t position; +get_contiguous_space (__malloc_ptrdiff_t size, __ptr_t position) { __ptr_t before; __ptr_t after; @@ -548,21 +545,21 @@ int _malloc_thread_enabled_p; static void -malloc_atfork_handler_prepare () +malloc_atfork_handler_prepare (void) { LOCK (); LOCK_ALIGNED_BLOCKS (); } static void -malloc_atfork_handler_parent () +malloc_atfork_handler_parent (void) { UNLOCK_ALIGNED_BLOCKS (); UNLOCK (); } static void -malloc_atfork_handler_child () +malloc_atfork_handler_child (void) { UNLOCK_ALIGNED_BLOCKS (); UNLOCK (); @@ -570,7 +567,7 @@ /* Set up mutexes and make malloc etc. thread-safe. */ void -malloc_enable_thread () +malloc_enable_thread (void) { if (_malloc_thread_enabled_p) return; @@ -589,7 +586,7 @@ #endif static void -malloc_initialize_1 () +malloc_initialize_1 (void) { #ifdef GC_MCHECK mcheck (NULL); @@ -630,7 +627,7 @@ main will call malloc which calls this function. That is before any threads or signal handlers has been set up, so we don't need thread protection. */ int -__malloc_initialize () +__malloc_initialize (void) { if (__malloc_initialized) return 0; @@ -646,8 +643,7 @@ growing the heap info table as necessary. */ static __ptr_t morecore_nolock PP ((__malloc_size_t)); static __ptr_t -morecore_nolock (size) - __malloc_size_t size; +morecore_nolock (__malloc_size_t size) { __ptr_t result; malloc_info *newinfo, *oldinfo; @@ -760,8 +756,7 @@ /* Allocate memory from the heap. */ __ptr_t -_malloc_internal_nolock (size) - __malloc_size_t size; +_malloc_internal_nolock (__malloc_size_t size) { __ptr_t result; __malloc_size_t block, blocks, lastblocks, start; @@ -960,8 +955,7 @@ } __ptr_t -_malloc_internal (size) - __malloc_size_t size; +_malloc_internal (__malloc_size_t size) { __ptr_t result; @@ -973,8 +967,7 @@ } __ptr_t -malloc (size) - __malloc_size_t size; +malloc (__malloc_size_t size) { __ptr_t (*hook) (__malloc_size_t); @@ -999,23 +992,19 @@ and _realloc. Make them use the GNU functions. */ __ptr_t -_malloc (size) - __malloc_size_t size; +_malloc (__malloc_size_t size) { return malloc (size); } void -_free (ptr) - __ptr_t ptr; +_free (__ptr_t ptr) { free (ptr); } __ptr_t -_realloc (ptr, size) - __ptr_t ptr; - __malloc_size_t size; +_realloc (__ptr_t ptr, __malloc_size_t size) { return realloc (ptr, size); } @@ -1058,8 +1047,7 @@ /* Return memory to the heap. Like `_free_internal' but don't lock mutex. */ void -_free_internal_nolock (ptr) - __ptr_t ptr; +_free_internal_nolock (__ptr_t ptr) { int type; __malloc_size_t block, blocks; @@ -1076,7 +1064,7 @@ return; #ifdef CYGWIN - if (ptr < _heapbase) + if ((char*) ptr < _heapbase) /* We're being asked to free something in the static heap. */ return; #endif @@ -1313,8 +1301,7 @@ /* Return memory to the heap. Like `free' but don't call a __free_hook if there is one. */ void -_free_internal (ptr) - __ptr_t ptr; +_free_internal (__ptr_t ptr) { LOCK (); _free_internal_nolock (ptr); @@ -1324,8 +1311,7 @@ /* Return memory to the heap. */ void -free (ptr) - __ptr_t ptr; +free (__ptr_t ptr) { void (*hook) (__ptr_t) = __free_hook; @@ -1340,8 +1326,7 @@ weak_alias (free, cfree) #else void -cfree (ptr) - __ptr_t ptr; +cfree (__ptr_t ptr) { free (ptr); } @@ -1381,9 +1366,7 @@ data. */ #ifdef CYGWIN __ptr_t -special_realloc (ptr, size) - __ptr_t ptr; - __malloc_size_t size; +special_realloc (__ptr_t ptr, __malloc_size_t size) { __ptr_t result; int type; @@ -1411,9 +1394,7 @@ new region. This module has incestuous knowledge of the internals of both free and malloc. */ __ptr_t -_realloc_internal_nolock (ptr, size) - __ptr_t ptr; - __malloc_size_t size; +_realloc_internal_nolock (__ptr_t ptr, __malloc_size_t size) { __ptr_t result; int type; @@ -1428,7 +1409,7 @@ return _malloc_internal_nolock (size); #ifdef CYGWIN - if (ptr < _heapbase) + if ((char*) ptr < _heapbase) /* ptr points into the static heap */ return special_realloc (ptr, size); #endif @@ -1535,9 +1516,7 @@ } __ptr_t -_realloc_internal (ptr, size) - __ptr_t ptr; - __malloc_size_t size; +_realloc_internal (__ptr_t ptr, __malloc_size_t size) { __ptr_t result; @@ -1549,9 +1528,7 @@ } __ptr_t -realloc (ptr, size) - __ptr_t ptr; - __malloc_size_t size; +realloc (__ptr_t ptr, __malloc_size_t size) { __ptr_t (*hook) (__ptr_t, __malloc_size_t); @@ -1589,9 +1566,7 @@ /* Allocate an array of NMEMB elements each SIZE bytes long. The entire array is initialized to zeros. */ __ptr_t -calloc (nmemb, size) - register __malloc_size_t nmemb; - register __malloc_size_t size; +calloc (register __malloc_size_t nmemb, register __malloc_size_t size) { register __ptr_t result = malloc (nmemb * size); @@ -1643,8 +1618,7 @@ and return the start of data space, or NULL on errors. If INCREMENT is negative, shrink data space. */ __ptr_t -__default_morecore (increment) - __malloc_ptrdiff_t increment; +__default_morecore (__malloc_ptrdiff_t increment) { __ptr_t result; #if defined (CYGWIN) @@ -1684,9 +1658,7 @@ __malloc_size_t __alignment)); __ptr_t -memalign (alignment, size) - __malloc_size_t alignment; - __malloc_size_t size; +memalign (__malloc_size_t alignment, __malloc_size_t size) { __ptr_t result; unsigned long int adj, lastadj; @@ -1767,10 +1739,8 @@ #endif int -posix_memalign (memptr, alignment, size) - __ptr_t *memptr; - __malloc_size_t alignment; - __malloc_size_t size; +posix_memalign (__ptr_t *memptr, __malloc_size_t alignment, + __malloc_size_t size) { __ptr_t mem; @@ -1841,8 +1811,7 @@ static __malloc_size_t pagesize; __ptr_t -valloc (size) - __malloc_size_t size; +valloc (__malloc_size_t size) { if (pagesize == 0) pagesize = __getpagesize (); @@ -1935,8 +1904,7 @@ static void freehook (__ptr_t); static void -freehook (ptr) - __ptr_t ptr; +freehook (__ptr_t ptr) { struct hdr *hdr; @@ -1957,8 +1925,7 @@ static __ptr_t mallochook (__malloc_size_t); static __ptr_t -mallochook (size) - __malloc_size_t size; +mallochook (__malloc_size_t size) { struct hdr *hdr; @@ -1977,9 +1944,7 @@ static __ptr_t reallochook (__ptr_t, __malloc_size_t); static __ptr_t -reallochook (ptr, size) - __ptr_t ptr; - __malloc_size_t size; +reallochook (__ptr_t ptr, __malloc_size_t size) { struct hdr *hdr = NULL; __malloc_size_t osize = 0; === modified file 'src/unexcw.c' --- src/unexcw.c 2011-08-16 13:27:12 +0000 +++ src/unexcw.c 2011-12-31 13:52:57 +0000 @@ -31,6 +31,8 @@ #define DOTEXE ".exe" +extern void report_sheap_usage (int); + extern int bss_sbrk_did_unexec; extern int __malloc_initialized;