comparison src/ntheap.h @ 400:a86b2b5e0111 r21-2-30

Import from CVS: tag r21-2-30
author cvs
date Mon, 13 Aug 2007 11:14:34 +0200
parents 74fd4e045ea6
children 501cfd01ee6d
comparison
equal deleted inserted replaced
399:376370fb5946 400:a86b2b5e0111
49 extern int nt_major_version; 49 extern int nt_major_version;
50 extern int nt_minor_version; 50 extern int nt_minor_version;
51 51
52 /* To prevent zero-initialized variables from being placed into the bss 52 /* To prevent zero-initialized variables from being placed into the bss
53 section, use non-zero values to represent an uninitialized state. */ 53 section, use non-zero values to represent an uninitialized state. */
54 #define UNINIT_PTR ((void *) 0xF0A0F0A0) 54 #define UNINIT_PTR ((unsigned char*) 0xF0A0F0A0)
55 #define UNINIT_LONG (0xF0A0F0A0L) 55 #define UNINIT_LONG (0xF0A0F0A0L)
56 56
57 /* Emulation of Unix sbrk(). */ 57 /* Emulation of Unix sbrk(). */
58 extern void *sbrk (unsigned long size); 58 extern void *sbrk (unsigned long size);
59 59
78 78
79 /* ----------------------------------------------------------------- */ 79 /* ----------------------------------------------------------------- */
80 /* Useful routines for manipulating memory-mapped files. */ 80 /* Useful routines for manipulating memory-mapped files. */
81 81
82 typedef struct file_data { 82 typedef struct file_data {
83 const char *name; 83 const char *name;
84 unsigned long size; 84 unsigned long size;
85 HANDLE file; 85 HANDLE file;
86 HANDLE file_mapping; 86 HANDLE file_mapping;
87 unsigned char *file_base; 87 char *file_base;
88 } file_data; 88 } file_data;
89 89
90 #define OFFSET_TO_RVA(var,section) \ 90 #define OFFSET_TO_RVA(var,section) \
91 (section->VirtualAddress + ((DWORD)(var) - section->PointerToRawData)) 91 (section->VirtualAddress + ((DWORD)(var) - section->PointerToRawData))
92 92