diff options
-rw-r--r-- | dynasm/dasm_x86.h | 6 | ||||
-rw-r--r-- | 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) | |||
154 | #ifdef DASM_CHECKS | 154 | #ifdef DASM_CHECKS |
155 | #define CK(x, st) \ | 155 | #define CK(x, st) \ |
156 | do { if (!(x)) { \ | 156 | do { if (!(x)) { \ |
157 | D->status = DASM_S_##st|(p-D->actionlist-1); return; } } while (0) | 157 | D->status = DASM_S_##st|(int)(p-D->actionlist-1); return; } } while (0) |
158 | #define CKPL(kind, st) \ | 158 | #define CKPL(kind, st) \ |
159 | do { if ((size_t)((char *)pl-(char *)D->kind##labels) >= D->kind##size) { \ | 159 | do { if ((size_t)((char *)pl-(char *)D->kind##labels) >= D->kind##size) { \ |
160 | D->status = DASM_S_RANGE_##st|(p-D->actionlist-1); return; } } while (0) | 160 | D->status=DASM_S_RANGE_##st|(int)(p-D->actionlist-1); return; } } while (0) |
161 | #else | 161 | #else |
162 | #define CK(x, st) ((void)0) | 162 | #define CK(x, st) ((void)0) |
163 | #define CKPL(kind, st) ((void)0) | 163 | #define CKPL(kind, st) ((void)0) |
@@ -463,7 +463,7 @@ int dasm_checkstep(Dst_DECL, int secmatch) | |||
463 | } | 463 | } |
464 | if (D->status == DASM_S_OK && secmatch >= 0 && | 464 | if (D->status == DASM_S_OK && secmatch >= 0 && |
465 | D->section != &D->sections[secmatch]) | 465 | D->section != &D->sections[secmatch]) |
466 | D->status = DASM_S_MATCH_SEC|(D->section-D->sections); | 466 | D->status = DASM_S_MATCH_SEC|(int)(D->section-D->sections); |
467 | return D->status; | 467 | return D->status; |
468 | } | 468 | } |
469 | #endif | 469 | #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 @@ | |||
14 | ** It's a one-shot tool -- any effort fixing this would be wasted. | 14 | ** It's a one-shot tool -- any effort fixing this would be wasted. |
15 | */ | 15 | */ |
16 | 16 | ||
17 | #ifdef LUA_USE_WIN | ||
18 | #include <fcntl.h> | ||
19 | #include <io.h> | ||
20 | #endif | ||
21 | |||
22 | #include "buildvm.h" | 17 | #include "buildvm.h" |
23 | #include "lj_obj.h" | 18 | #include "lj_obj.h" |
24 | #include "lj_gc.h" | 19 | #include "lj_gc.h" |
@@ -28,6 +23,11 @@ | |||
28 | #include "lj_dispatch.h" | 23 | #include "lj_dispatch.h" |
29 | #include "luajit.h" | 24 | #include "luajit.h" |
30 | 25 | ||
26 | #ifdef LUA_USE_WIN | ||
27 | #include <fcntl.h> | ||
28 | #include <io.h> | ||
29 | #endif | ||
30 | |||
31 | /* ------------------------------------------------------------------------ */ | 31 | /* ------------------------------------------------------------------------ */ |
32 | 32 | ||
33 | /* DynASM glue definitions. */ | 33 | /* DynASM glue definitions. */ |