mirror of
https://github.com/Ed94/Odin.git
synced 2026-08-07 08:08:50 +00:00
Strip semicolons; Make odin strip-semicolon replace .. with ..= if used as a binary operator
This commit is contained in:
+21
-21
@@ -8,36 +8,36 @@ when ODIN_OS == "windows" {
|
||||
foreign import libc "system:c"
|
||||
}
|
||||
|
||||
sig_atomic_t :: distinct atomic_int;
|
||||
sig_atomic_t :: distinct atomic_int
|
||||
|
||||
@(default_calling_convention="c")
|
||||
foreign libc {
|
||||
signal :: proc(sig: int, func: proc "c" (int)) -> proc "c" (int) ---;
|
||||
raise :: proc(sig: int) -> int ---;
|
||||
signal :: proc(sig: int, func: proc "c" (int)) -> proc "c" (int) ---
|
||||
raise :: proc(sig: int) -> int ---
|
||||
}
|
||||
|
||||
when ODIN_OS == "windows" {
|
||||
SIG_ERR :: rawptr(~uintptr(0));
|
||||
SIG_DFL :: rawptr(uintptr(0));
|
||||
SIG_IGN :: rawptr(uintptr(1));
|
||||
SIG_ERR :: rawptr(~uintptr(0))
|
||||
SIG_DFL :: rawptr(uintptr(0))
|
||||
SIG_IGN :: rawptr(uintptr(1))
|
||||
|
||||
SIGABRT :: 22;
|
||||
SIGFPE :: 8;
|
||||
SIGILL :: 4;
|
||||
SIGINT :: 2;
|
||||
SIGSEGV :: 11;
|
||||
SIGTERM :: 15;
|
||||
SIGABRT :: 22
|
||||
SIGFPE :: 8
|
||||
SIGILL :: 4
|
||||
SIGINT :: 2
|
||||
SIGSEGV :: 11
|
||||
SIGTERM :: 15
|
||||
}
|
||||
|
||||
when ODIN_OS == "linux" || ODIN_OS == "freebsd" || ODIN_OS == "darwin" {
|
||||
SIG_ERR :: rawptr(~uintptr(0));
|
||||
SIG_DFL :: rawptr(uintptr(0));
|
||||
SIG_IGN :: rawptr(uintptr(1));
|
||||
SIG_ERR :: rawptr(~uintptr(0))
|
||||
SIG_DFL :: rawptr(uintptr(0))
|
||||
SIG_IGN :: rawptr(uintptr(1))
|
||||
|
||||
SIGABRT :: 6;
|
||||
SIGFPE :: 8;
|
||||
SIGILL :: 4;
|
||||
SIGINT :: 2;
|
||||
SIGSEGV :: 11;
|
||||
SIGTERM :: 15;
|
||||
SIGABRT :: 6
|
||||
SIGFPE :: 8
|
||||
SIGILL :: 4
|
||||
SIGINT :: 2
|
||||
SIGSEGV :: 11
|
||||
SIGTERM :: 15
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user