mirror of
https://github.com/Ed94/Odin.git
synced 2026-08-04 22:58:46 +00:00
Reimplement the Windows OS dependencies in package runtime
This commit is contained in:
@@ -1,21 +1,3 @@
|
||||
//+build !freestanding
|
||||
package runtime
|
||||
|
||||
import "core:os"
|
||||
|
||||
_OS_Errno :: distinct int;
|
||||
_OS_Handle :: os.Handle;
|
||||
|
||||
os_stderr :: proc "contextless" () -> _OS_Handle {
|
||||
return os.stderr;
|
||||
}
|
||||
|
||||
// TODO(bill): reimplement `os.write`
|
||||
os_write :: proc(fd: _OS_Handle, data: []byte) -> (int, _OS_Errno) {
|
||||
n, err := os.write(fd, data);
|
||||
return int(n), _OS_Errno(err);
|
||||
}
|
||||
|
||||
current_thread_id :: proc "contextless" () -> int {
|
||||
return os.current_thread_id();
|
||||
}
|
||||
_OS_Errno :: distinct int;
|
||||
|
||||
Reference in New Issue
Block a user