comparison src/w32heap.c @ 31111:14beb147ec06

[!USE_CRT_DLL]: Don't define _heap_init and _heap_term unless we are linking with a static CRT. (RVA_TO_PTR): Cast result to unsigned char*.
author Andrew Innes <andrewi@gnu.org>
date Tue, 22 Aug 2000 23:31:00 +0000
parents fb9574318fa0
children 38e1998861ff
comparison
equal deleted inserted replaced
31110:9feda85db5d6 31111:14beb147ec06
28 28
29 #include "w32heap.h" 29 #include "w32heap.h"
30 #include "lisp.h" /* for VALMASK */ 30 #include "lisp.h" /* for VALMASK */
31 31
32 #undef RVA_TO_PTR 32 #undef RVA_TO_PTR
33 #define RVA_TO_PTR(rva) ((DWORD)(rva) + (DWORD)GetModuleHandle (NULL)) 33 #define RVA_TO_PTR(rva) ((unsigned char *)((DWORD)(rva) + (DWORD)GetModuleHandle (NULL)))
34 34
35 /* This gives us the page size and the size of the allocation unit on NT. */ 35 /* This gives us the page size and the size of the allocation unit on NT. */
36 SYSTEM_INFO sysinfo_cache; 36 SYSTEM_INFO sysinfo_cache;
37 37
38 /* This gives us version, build, and platform identification. */ 38 /* This gives us version, build, and platform identification. */
273 273
274 if (need_to_alloc) 274 if (need_to_alloc)
275 sbrk (need_to_alloc); 275 sbrk (need_to_alloc);
276 } 276 }
277 277
278 #if (_MSC_VER >= 1000) 278 #if (_MSC_VER >= 1000 && !defined(USE_CRT_DLL))
279 279
280 /* MSVC 4.2 invokes these functions from mainCRTStartup to initialize 280 /* MSVC 4.2 invokes these functions from mainCRTStartup to initialize
281 a heap via HeapCreate. They are normally defined by the runtime, 281 a heap via HeapCreate. They are normally defined by the runtime,
282 but we override them here so that the unnecessary HeapCreate call 282 but we override them here so that the unnecessary HeapCreate call
283 is not performed. */ 283 is not performed. */