Mercurial > emacs
changeset 18506:bcc706aedcea
Add pragma to force zero initialized
data into .data segment.
author | Geoff Voelker <voelker@cs.washington.edu> |
---|---|
date | Tue, 01 Jul 1997 05:05:45 +0000 |
parents | ca4d948da78d |
children | be4c110cda51 |
files | src/unexw32.c src/w32heap.c |
diffstat | 2 files changed, 15 insertions(+), 0 deletions(-) [+] |
line wrap: on
line diff
--- a/src/unexw32.c Tue Jul 01 05:05:06 1997 +0000 +++ b/src/unexw32.c Tue Jul 01 05:05:45 1997 +0000 @@ -39,6 +39,10 @@ unsigned char *file_base; } file_data; +/* 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") + /* Basically, our "initialized" flag. */ BOOL need_to_recreate_heap = FALSE;
--- a/src/w32heap.c Tue Jul 01 05:05:06 1997 +0000 +++ b/src/w32heap.c Tue Jul 01 05:05:45 1997 +0000 @@ -66,6 +66,13 @@ 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 @@ 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;