11 typedef wchar_t vm_char;
13 #define STRING_LITERAL(string) L##string
15 #define MAX_UNICODE_PATH 32768
16 #define VM_C_API extern "C" __declspec(dllexport)
17 #define SSCANF swscanf
19 #define STRNCMP wcsncmp
20 #define STRDUP _wcsdup
21 #define MIN(a,b) ((a)>(b)?(b):(a))
25 #define CELL_FORMAT "%Iu"
26 #define CELL_HEX_FORMAT "%Ix"
27 #define CELL_HEX_PAD_FORMAT "%016Ix"
28 #define FIXNUM_FORMAT "%Id"
30 #define CELL_FORMAT "%lu"
31 #define CELL_HEX_FORMAT "%lx"
32 #define CELL_HEX_PAD_FORMAT "%08lx"
33 #define FIXNUM_FORMAT "%ld"
36 #define OPEN_READ(path) _wfopen(path,L"rb")
37 #define OPEN_WRITE(path) _wfopen(path,L"wb")
39 #define print_native_string(string) wprintf(L"%s",string)
41 /* Difference between Jan 1 00:00:00 1601 and Jan 1 00:00:00 1970 */
42 #define EPOCH_OFFSET 0x019db1ded53e8000LL
45 void ffi_dlopen(dll *dll);
46 void *ffi_dlsym(dll *dll, symbol_char *symbol);
47 void ffi_dlclose(dll *dll);
49 void sleep_micros(u64 msec);
51 inline static void init_signals() {}
52 inline static void early_init() {}
53 const vm_char *vm_executable_path();
54 const vm_char *default_image_path();