]> gitweb.factorcode.org Git - factor.git/blob - vm/os-windows-ce.cpp
57e7cc69d03b42fad5e35bf5696574ff5c6b8e7d
[factor.git] / vm / os-windows-ce.cpp
1 #include "master.hpp"
2
3 namespace factor
4 {
5
6 s64 current_micros()
7 {
8         SYSTEMTIME st;
9         FILETIME ft;
10         GetSystemTime(&st);
11         SystemTimeToFileTime(&st, &ft);
12         return (((s64)ft.dwLowDateTime
13                 | (s64)ft.dwHighDateTime<<32) - EPOCH_OFFSET) / 10;
14 }
15
16 char *strerror(int err)
17 {
18         /* strerror() is not defined on WinCE */
19         return "strerror() is not defined on WinCE. Use native I/O.";
20 }
21
22 void flush_icache(cell start, cell end)
23 {
24         FlushInstructionCache(GetCurrentProcess(), 0, 0);
25 }
26
27 char *getenv(char *name)
28 {
29         vm->not_implemented_error();
30         return 0; /* unreachable */
31 }
32
33 PRIMITIVE_FORWARD(os_envs)
34
35 void c_to_factor_toplevel(cell quot)
36 {
37         c_to_factor(quot,vm);
38 }
39
40 void open_console() { }
41
42 }