Fix +build tag logic

This commit is contained in:
gingerBill
2020-09-15 12:45:44 +01:00
parent b94dde2817
commit 9d976b04bc
3 changed files with 48 additions and 48 deletions
@@ -0,0 +1,21 @@
//+build freestanding
package runtime
_OS_Errno :: distinct int;
_OS_Handle :: distinct uintptr;
os_stdout :: proc "contextless" () -> _OS_Handle {
return 1;
}
os_stderr :: proc "contextless" () -> _OS_Handle {
return 2;
}
// TODO(bill): reimplement `os.write`
os_write :: proc(fd: _OS_Handle, data: []byte) -> (int, _OS_Errno) {
return 0, -1;
}
current_thread_id :: proc "contextless" () -> int {
return 0;
}