8 typedef wchar_t F_CHAR;
10 #define from_native_string from_u16_string
11 #define unbox_native_string unbox_u16_string
12 #define string_to_native_alien(string) string_to_u16_alien(string,true)
14 #define STRING_LITERAL(string) L##string
16 #define MAX_UNICODE_PATH 32768
17 #define DLLEXPORT __declspec(dllexport)
18 #define SSCANF swscanf
20 #define STRNCMP wcsncmp
21 #define STRDUP _wcsdup
22 #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
44 F_STRING *get_error_message(void);
45 DLLEXPORT F_CHAR *error_message(DWORD id);
46 void windows_error(void);
49 void ffi_dlopen(F_DLL *dll);
50 void *ffi_dlsym(F_DLL *dll, F_SYMBOL *symbol);
51 void ffi_dlclose(F_DLL *dll);
53 void sleep_micros(u64 msec);
55 INLINE void init_signals(void) {}
56 INLINE void early_init(void) {}
57 const F_CHAR *vm_executable_path(void);
58 const F_CHAR *default_image_path(void);
59 long getpagesize (void);
61 s64 current_micros(void);