From e54c8cd1194ff791d17c7932a6080dda0838d7c8 Mon Sep 17 00:00:00 2001 From: Geoff Voelker Date: Tue, 1 Jul 1997 05:05:45 +0000 Subject: Add pragma to force zero initialized data into .data segment. --- src/w32heap.c | 11 +++++++++++ 1 file changed, 11 insertions(+) (limited to 'src/w32heap.c') diff --git a/src/w32heap.c b/src/w32heap.c index 2a92d059d9..8565999b45 100644 --- a/src/w32heap.c +++ b/src/w32heap.c @@ -66,6 +66,13 @@ cache_system_info (void) syspage_mask = sysinfo_cache.dwPageSize - 1; } +/* Emulate getpagesize. */ +int +getpagesize (void) +{ + return sysinfo_cache.dwPageSize; +} + /* Round ADDRESS up to be aligned with ALIGN. */ unsigned char * round_to_next (unsigned char *address, unsigned long align) @@ -78,6 +85,10 @@ round_to_next (unsigned char *address, unsigned long align) return (unsigned char *) (tmp * align); } +/* Force zero initialized variables to be placed in the .data segment; + MSVC 5.0 otherwise places them in .bss, which breaks the dumping code. */ +#pragma data_seg(".data") + /* Info for keeping track of our heap. */ unsigned char *data_region_base = NULL; unsigned char *data_region_end = NULL; -- cgit v1.2.3