summaryrefslogtreecommitdiff
path: root/src/buildvm.c
diff options
context:
space:
mode:
Diffstat (limited to 'src/buildvm.c')
-rw-r--r--src/buildvm.c11
1 files changed, 6 insertions, 5 deletions
diff --git a/src/buildvm.c b/src/buildvm.c
index 382550b8..72e612c1 100644
--- a/src/buildvm.c
+++ b/src/buildvm.c
@@ -23,7 +23,7 @@
23#include "lj_dispatch.h" 23#include "lj_dispatch.h"
24#include "luajit.h" 24#include "luajit.h"
25 25
26#ifdef LUA_USE_WIN 26#if defined(_WIN32)
27#include <fcntl.h> 27#include <fcntl.h>
28#include <io.h> 28#include <io.h>
29#endif 29#endif
@@ -64,11 +64,12 @@ static int collect_reloc(BuildCtx *ctx, uint8_t *addr, int idx, int type);
64#define DASM_ALIGNED_WRITES 1 64#define DASM_ALIGNED_WRITES 1
65 65
66/* Embed architecture-specific DynASM encoder and backend. */ 66/* Embed architecture-specific DynASM encoder and backend. */
67#if LJ_TARGET_X86ORX64 67#if LJ_TARGET_X86
68#include "../dynasm/dasm_x86.h" 68#include "../dynasm/dasm_x86.h"
69#if LJ_32
70#include "buildvm_x86.h" 69#include "buildvm_x86.h"
71#elif defined(_WIN64) 70#elif LJ_TARGET_X64
71#include "../dynasm/dasm_x86.h"
72#if LJ_ABI_WIN
72#include "buildvm_x64win.h" 73#include "buildvm_x64win.h"
73#else 74#else
74#include "buildvm_x64.h" 75#include "buildvm_x64.h"
@@ -449,7 +450,7 @@ int main(int argc, char **argv)
449 450
450 if (ctx->outname[0] == '-' && ctx->outname[1] == '\0') { 451 if (ctx->outname[0] == '-' && ctx->outname[1] == '\0') {
451 ctx->fp = stdout; 452 ctx->fp = stdout;
452#ifdef LUA_USE_WIN 453#if defined(_WIN32)
453 if (binmode) 454 if (binmode)
454 _setmode(_fileno(stdout), _O_BINARY); /* Yuck. */ 455 _setmode(_fileno(stdout), _O_BINARY); /* Yuck. */
455#endif 456#endif