]> gitweb.factorcode.org Git - factor.git/blob - vm/os-windows.h
d5a36ceabb07aefd3b3f6a1722aee6eddc4a2e50
[factor.git] / vm / os-windows.h
1 #include <windows.h>
2 #include <ctype.h>
3
4 #define FACTOR_OS_STRING "windows"
5
6 #define DLLEXPORT __declspec(dllexport)
7 #define SETJMP setjmp
8 #define LONGJMP longjmp
9 #define JMP_BUF jmp_buf
10
11 /* Difference between Jan 1 00:00:00 1601 and Jan 1 00:00:00 1970 */
12 #define EPOCH_OFFSET 0x019db1ded53e8000LL
13
14 char *buffer_to_c_string(char *buffer);
15 F_STRING *get_error_message(void);
16 DLLEXPORT char *error_message(DWORD id);
17
18 INLINE void init_ffi(void) {}
19 void ffi_dlopen(F_DLL *dll, bool error);
20 void *ffi_dlsym(F_DLL *dll, char *symbol, bool error);
21 void ffi_dlclose(F_DLL *dll);
22
23 void primitive_open_file(void);
24 void primitive_stat(void);
25 void primitive_read_dir(void);
26 void primitive_cwd(void);
27 void primitive_cd(void);
28
29 INLINE void init_signals(void) {}
30 INLINE void early_init(void) {}
31 const char *default_image_path(void);
32 long getpagesize (void);
33
34 s64 current_millis(void);
35
36 INLINE void reset_stdio(void) {}