X-Git-Url: http://git.chise.org/gitweb/?a=blobdiff_plain;f=src%2Fntheap.c;h=9372dd12fec20ba9538e17090cc6172baabf22c4;hb=296255bdcdce5a2c39b20475bad2ac2ba25bfb84;hp=8f9984e8e264db23385d402e01fc50819ab20041;hpb=81572e9b4653c5545c2eb43e87dec439f356c19c;p=chise%2Fxemacs-chise.git- diff --git a/src/ntheap.c b/src/ntheap.c index 8f9984e..9372dd1 100644 --- a/src/ntheap.c +++ b/src/ntheap.c @@ -38,38 +38,10 @@ unsigned long syspage_mask = 0; int edata; int etext; -/* The major and minor versions of NT. */ -int nt_major_version; -int nt_minor_version; - -/* Distinguish between Windows NT and Windows 95. */ -int os_subtype; - /* Cache information describing the NT system for later use. */ void cache_system_info (void) { - union - { - struct info - { - char major; - char minor; - short platform; - } info; - DWORD data; - } version; - - /* Cache the version of the operating system. */ - version.data = GetVersion (); - nt_major_version = version.info.major; - nt_minor_version = version.info.minor; - - if (version.info.platform & 0x8000) - os_subtype = OS_WIN95; - else - os_subtype = OS_NT; - /* Cache page size, allocation unit, processor type, etc. */ GetSystemInfo (&sysinfo_cache); syspage_mask = sysinfo_cache.dwPageSize - 1; @@ -108,7 +80,7 @@ get_data_end (void) return data_region_end; } -static char * +static unsigned char * allocate_heap (void) { /* The base address for our GNU malloc heap is chosen in conjunction @@ -172,7 +144,7 @@ allocate_heap (void) PAGE_NOACCESS); #endif - return ptr; + return (unsigned char*) ptr; } @@ -248,14 +220,14 @@ sbrk (unsigned long increment) return result; } -#if !defined (CANNOT_DUMP) && !defined(HEAP_IN_DATA) +#if !defined (CANNOT_DUMP) && !defined(HEAP_IN_DATA) && !defined(PDUMP) /* Recreate the heap from the data that was dumped to the executable. EXECUTABLE_PATH tells us where to find the executable. */ void recreate_heap (char *executable_path) { - unsigned char *tmp; + void *tmp; /* First reserve the upper part of our heap. (We reserve first because there have been problems in the past where doing the