Fix broken MSVC build.

This commit is contained in:
Mike Pall 2010-09-12 01:33:32 +02:00
parent 90f22760af
commit b72ae54dc0
2 changed files with 8 additions and 8 deletions

View File

@ -154,10 +154,10 @@ void dasm_setup(Dst_DECL, const void *actionlist)
#ifdef DASM_CHECKS #ifdef DASM_CHECKS
#define CK(x, st) \ #define CK(x, st) \
do { if (!(x)) { \ 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) \ #define CKPL(kind, st) \
do { if ((size_t)((char *)pl-(char *)D->kind##labels) >= D->kind##size) { \ 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 #else
#define CK(x, st) ((void)0) #define CK(x, st) ((void)0)
#define CKPL(kind, 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 && if (D->status == DASM_S_OK && secmatch >= 0 &&
D->section != &D->sections[secmatch]) 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; return D->status;
} }
#endif #endif

View File

@ -14,11 +14,6 @@
** It's a one-shot tool -- any effort fixing this would be wasted. ** It's a one-shot tool -- any effort fixing this would be wasted.
*/ */
#ifdef LUA_USE_WIN
#include <fcntl.h>
#include <io.h>
#endif
#include "buildvm.h" #include "buildvm.h"
#include "lj_obj.h" #include "lj_obj.h"
#include "lj_gc.h" #include "lj_gc.h"
@ -28,6 +23,11 @@
#include "lj_dispatch.h" #include "lj_dispatch.h"
#include "luajit.h" #include "luajit.h"
#ifdef LUA_USE_WIN
#include <fcntl.h>
#include <io.h>
#endif
/* ------------------------------------------------------------------------ */ /* ------------------------------------------------------------------------ */
/* DynASM glue definitions. */ /* DynASM glue definitions. */