mirror of
https://github.com/Ed94/Odin.git
synced 2026-08-01 12:18:15 +00:00
Add other constants to c and libc
This commit is contained in:
@@ -89,6 +89,14 @@ INT16_MIN :: ~INT16_MAX
|
||||
INT32_MIN :: ~INT32_MAX
|
||||
INT64_MIN :: ~INT64_MAX
|
||||
|
||||
SIZE_MAX :: max(size_t)
|
||||
|
||||
PTRDIFF_MIN :: min(ptrdiff_t)
|
||||
PTRDIFF_MAX :: max(ptrdiff_t)
|
||||
|
||||
WCHAR_MIN :: min(wchar_t)
|
||||
WCHAR_MAX :: max(wchar_t)
|
||||
|
||||
NULL :: rawptr(uintptr(0))
|
||||
|
||||
NDEBUG :: !ODIN_DEBUG
|
||||
|
||||
@@ -10,6 +10,9 @@ when ODIN_OS == "windows" {
|
||||
|
||||
sig_atomic_t :: distinct atomic_int
|
||||
|
||||
SIG_ATOMIC_MIN :: min(sig_atomic_t)
|
||||
SIG_ATOMIC_MAX :: max(sig_atomic_t)
|
||||
|
||||
@(default_calling_convention="c")
|
||||
foreign libc {
|
||||
signal :: proc(sig: int, func: proc "c" (int)) -> proc "c" (int) ---
|
||||
|
||||
@@ -38,7 +38,7 @@ foreign libc {
|
||||
strtok :: proc(s1: [^]char, s2: cstring) -> [^]char ---
|
||||
|
||||
// 7.24.6 Miscellaneous functions
|
||||
memset : proc(s: rawptr, c: int, n: size_t) -> rawptr : runtime.memset
|
||||
strerror :: proc(errnum: int) -> [^]char ---
|
||||
strlen :: proc(s: cstring) -> size_t ---
|
||||
}
|
||||
memset : proc "c" (s: rawptr, c: int, n: size_t) -> rawptr : runtime.memset
|
||||
|
||||
Reference in New Issue
Block a user