From b72ae54dc0d2bf63f23f0b9a47238ea96b0239ed Mon Sep 17 00:00:00 2001 From: Mike Pall Date: Sun, 12 Sep 2010 01:33:32 +0200 Subject: [PATCH] Fix broken MSVC build. --- dynasm/dasm_x86.h | 6 +++--- src/buildvm.c | 10 +++++----- 2 files changed, 8 insertions(+), 8 deletions(-) diff --git a/dynasm/dasm_x86.h b/dynasm/dasm_x86.h index 517ee4f6..de542b6b 100644 --- a/dynasm/dasm_x86.h +++ b/dynasm/dasm_x86.h @@ -154,10 +154,10 @@ void dasm_setup(Dst_DECL, const void *actionlist) #ifdef DASM_CHECKS #define CK(x, st) \ do { if (!(x)) { \ - D->status = DASM_S_##st|(p-D->actionlist-1); return; } } while (0) + D->status = DASM_S_##st|(int)(p-D->actionlist-1); return; } } while (0) #define CKPL(kind, st) \ do { if ((size_t)((char *)pl-(char *)D->kind##labels) >= D->kind##size) { \ - D->status = DASM_S_RANGE_##st|(p-D->actionlist-1); return; } } while (0) + D->status=DASM_S_RANGE_##st|(int)(p-D->actionlist-1); return; } } while (0) #else #define CK(x, st) ((void)0) #define CKPL(kind, st) ((void)0) @@ -463,7 +463,7 @@ int dasm_checkstep(Dst_DECL, int secmatch) } if (D->status == DASM_S_OK && secmatch >= 0 && D->section != &D->sections[secmatch]) - D->status = DASM_S_MATCH_SEC|(D->section-D->sections); + D->status = DASM_S_MATCH_SEC|(int)(D->section-D->sections); return D->status; } #endif diff --git a/src/buildvm.c b/src/buildvm.c index c2011070..382550b8 100644 --- a/src/buildvm.c +++ b/src/buildvm.c @@ -14,11 +14,6 @@ ** It's a one-shot tool -- any effort fixing this would be wasted. */ -#ifdef LUA_USE_WIN -#include -#include -#endif - #include "buildvm.h" #include "lj_obj.h" #include "lj_gc.h" @@ -28,6 +23,11 @@ #include "lj_dispatch.h" #include "luajit.h" +#ifdef LUA_USE_WIN +#include +#include +#endif + /* ------------------------------------------------------------------------ */ /* DynASM glue definitions. */