From 2e4f64777739a60d7362bb71795135374a954dbb Mon Sep 17 00:00:00 2001 From: Andrew Innes Date: Tue, 22 Aug 2000 23:31:00 +0000 Subject: [!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*. --- src/w32heap.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) (limited to 'src/w32heap.c') diff --git a/src/w32heap.c b/src/w32heap.c index 69144b25038..e564a4efedc 100644 --- a/src/w32heap.c +++ b/src/w32heap.c @@ -30,7 +30,7 @@ Boston, MA 02111-1307, USA. #include "lisp.h" /* for VALMASK */ #undef RVA_TO_PTR -#define RVA_TO_PTR(rva) ((DWORD)(rva) + (DWORD)GetModuleHandle (NULL)) +#define RVA_TO_PTR(rva) ((unsigned char *)((DWORD)(rva) + (DWORD)GetModuleHandle (NULL))) /* This gives us the page size and the size of the allocation unit on NT. */ SYSTEM_INFO sysinfo_cache; @@ -275,7 +275,7 @@ round_heap (unsigned long align) sbrk (need_to_alloc); } -#if (_MSC_VER >= 1000) +#if (_MSC_VER >= 1000 && !defined(USE_CRT_DLL)) /* MSVC 4.2 invokes these functions from mainCRTStartup to initialize a heap via HeapCreate. They are normally defined by the runtime, -- cgit v1.2.1