diff --git a/core/os/os.odin b/core/os/os.odin index 31bb1f60e..c78b80417 100644 --- a/core/os/os.odin +++ b/core/os/os.odin @@ -4,6 +4,11 @@ import "core:mem" import "core:strconv" import "core:unicode/utf8" + +OS :: ODIN_OS; +ARCH :: ODIN_ARCH; +ENDIAN :: ODIN_ENDIAN; + write_string :: proc(fd: Handle, str: string) -> (int, Errno) { return write(fd, transmute([]byte)str); } diff --git a/core/os/os_386.odin b/core/os/os_386.odin deleted file mode 100644 index c05858f45..000000000 --- a/core/os/os_386.odin +++ /dev/null @@ -1,4 +0,0 @@ -package os; - -ARCH :: "x86"; -ENDIAN :: "little"; diff --git a/core/os/os_amd64.odin b/core/os/os_amd64.odin deleted file mode 100644 index aab98b12c..000000000 --- a/core/os/os_amd64.odin +++ /dev/null @@ -1,4 +0,0 @@ -package os; - -ARCH :: "amd64"; -ENDIAN :: "little"; diff --git a/core/os/os_darwin.odin b/core/os/os_darwin.odin index f9380f11f..9813b9b3b 100644 --- a/core/os/os_darwin.odin +++ b/core/os/os_darwin.odin @@ -7,8 +7,6 @@ import "core:runtime" import "core:strings" import "core:c" -OS :: "darwin"; - Handle :: distinct i32; File_Time :: distinct u64; Errno :: distinct int; diff --git a/core/os/os_essence.odin b/core/os/os_essence.odin index d11c0503b..fffe5e431 100644 --- a/core/os/os_essence.odin +++ b/core/os/os_essence.odin @@ -24,7 +24,7 @@ Textbox :: struct { using element : Element, }; ListView :: struct { using element : Element, }; NumericEntry :: struct { using element : Element, }; Menu :: struct { using element : Element, }; -MenuCallbackFunction :: distinct #type proc (^Element, Generic); +MenuCallbackFunction :: distinct #type proc (^Element, Generic); INSTANCE_TYPE :: Instance; SCANCODE_A :: (0x1C); SCANCODE_B :: (0x32); @@ -2436,5 +2436,3 @@ current_thread_id :: proc "contextless" () -> int { // return int(EsThreadGetID(ES_CURRENT_THREAD)); return -1; } - -OS :: "essence"; diff --git a/core/os/os_js_wasm32.odin b/core/os/os_js_wasm32.odin index 590f73f8c..e4139e59b 100644 --- a/core/os/os_js_wasm32.odin +++ b/core/os/os_js_wasm32.odin @@ -1,8 +1,5 @@ package os -OS :: "js"; - - Handle :: distinct i32; Errno :: distinct i32; diff --git a/core/os/os_linux.odin b/core/os/os_linux.odin index 6134933d5..5fb0cfa3d 100644 --- a/core/os/os_linux.odin +++ b/core/os/os_linux.odin @@ -7,8 +7,6 @@ import "core:runtime" import "core:strings" import "core:c" -OS :: "linux"; - Handle :: distinct i32; File_Time :: distinct u64; Errno :: distinct i32; diff --git a/core/os/os_windows.odin b/core/os/os_windows.odin index 06aea24ed..72916b1e4 100644 --- a/core/os/os_windows.odin +++ b/core/os/os_windows.odin @@ -4,8 +4,6 @@ package os import win32 "core:sys/windows" import "core:intrinsics" -OS :: "windows"; - Handle :: distinct uintptr; File_Time :: distinct u64; Errno :: distinct int; diff --git a/core/runtime/procs_wasm32.odin b/core/runtime/procs_wasm32.odin index 79197d85b..e4471d725 100644 --- a/core/runtime/procs_wasm32.odin +++ b/core/runtime/procs_wasm32.odin @@ -1,3 +1,4 @@ +//+build wasm32 package runtime @(link_name="memset")