Remove core:os dependency completely from base:runtime

This commit is contained in:
gingerBill
2024-01-28 23:11:38 +00:00
parent 038086d1d9
commit 535b8a9483
4 changed files with 24 additions and 21 deletions
+1 -1
View File
@@ -255,7 +255,7 @@ W_OK :: 2 // Test for write permission
R_OK :: 4 // Test for read permission
foreign libc {
@(link_name="__error") __errno_location :: proc() -> ^int ---
@(link_name="__error") __errno_location :: proc() -> ^c.int ---
@(link_name="open") _unix_open :: proc(path: cstring, flags: c.int, mode: c.int) -> Handle ---
@(link_name="close") _unix_close :: proc(fd: Handle) -> c.int ---
+2 -2
View File
@@ -246,7 +246,7 @@ AT_REMOVEDIR :: 0x08
@(default_calling_convention="c")
foreign libc {
@(link_name="__errno") __errno :: proc() -> ^int ---
@(link_name="__error") __error :: proc() -> ^c.int ---
@(link_name="fork") _unix_fork :: proc() -> pid_t ---
@(link_name="getthrid") _unix_getthrid :: proc() -> int ---
@@ -296,7 +296,7 @@ is_path_separator :: proc(r: rune) -> bool {
}
get_last_error :: proc "contextless" () -> int {
return __errno()^
return __error()^
}
fork :: proc() -> (Pid, Errno) {