]> gitweb.factorcode.org Git - factor.git/blob - vm/os-windows-ce.cpp
Merge Phil Dawes' VM work
[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(os_envs)
34 {
35         vm->not_implemented_error();
36 }
37
38 void c_to_factor_toplevel(cell quot)
39 {
40         c_to_factor(quot,vm);
41 }
42
43 void open_console() { }
44
45 }