From 9dacaefd49f5e4eb0f90d05046051272538e2845 Mon Sep 17 00:00:00 2001 From: "hyunghwan.chung" Date: Thu, 28 Mar 2019 23:52:56 +0000 Subject: [PATCH] minor changes on win32 code --- moo/lib/std.c | 11 ++++++++++- 1 file changed, 10 insertions(+), 1 deletion(-) diff --git a/moo/lib/std.c b/moo/lib/std.c index b94c4ae..edc24bc 100644 --- a/moo/lib/std.c +++ b/moo/lib/std.c @@ -42,7 +42,7 @@ # define WIN32_LEAN_AND_MEAN # include -# include +//# include # include # include # include @@ -62,6 +62,10 @@ # define XPOLLERR POLLERR # define XPOLLHUP POLLHUP +#if !defined(SIZE_T) +# define SIZE_T unsigned long int +#endif + #elif defined(__OS2__) # define INCL_DOSMODULEMGR # define INCL_DOSPROCESS @@ -655,6 +659,9 @@ static void* alloc_heap (moo_t* moo, moo_oow_t size) } token_adjusted = 1; +#if !defined(MEM_LARGE_PAGES) +# define MEM_LARGE_PAGES (0x20000000) +#endif ptr = VirtualAlloc(MOO_NULL, actual_size, MEM_COMMIT | MEM_RESERVE | MEM_LARGE_PAGES, PAGE_READWRITE); if (!ptr) goto oops; @@ -3150,7 +3157,9 @@ static const wchar_t* msw_exception_opname (const ULONG opcode) static LONG WINAPI msw_exception_filter (struct _EXCEPTION_POINTERS* exinfo) { HMODULE mod; +#if defined(_WIN32_WINNT) && (_WIN32_WINNT >= 0x0501) MODULEINFO modinfo; +#endif DWORD excode; static wchar_t exmsg[256]; static wchar_t expath[128];