]> git.ipfire.org Git - thirdparty/LuaJIT.git/commitdiff
Fix broken MSVC build.
authorMike Pall <mike>
Sat, 11 Sep 2010 23:33:32 +0000 (01:33 +0200)
committerMike Pall <mike>
Sat, 11 Sep 2010 23:33:32 +0000 (01:33 +0200)
dynasm/dasm_x86.h
src/buildvm.c

index 517ee4f6595e3c65e4daa7af18d6cc96511f8069..de542b6b912283d80d73bcfc09e4c466d8fc46e9 100644 (file)
@@ -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
index c201107004648df9dc09b7ca7c74a0b1e8fe3848..382550b82f6513c659ea1047715a91e0c4190743 100644 (file)
 ** 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 "lj_obj.h"
 #include "lj_gc.h"
 #include "lj_dispatch.h"
 #include "luajit.h"
 
+#ifdef LUA_USE_WIN
+#include <fcntl.h>
+#include <io.h>
+#endif
+
 /* ------------------------------------------------------------------------ */
 
 /* DynASM glue definitions. */