diff --git a/core/sys/darwin/xnu_system_call_wrappers.odin b/core/sys/darwin/xnu_system_call_wrappers.odin index 99139df6a..43bcb543b 100644 --- a/core/sys/darwin/xnu_system_call_wrappers.odin +++ b/core/sys/darwin/xnu_system_call_wrappers.odin @@ -223,6 +223,11 @@ _Proc_Bsdinfo :: struct { /*--==========================================================================--*/ +/* Get window size */ +TIOCGWINSZ :: 0x40087468 + +/*--==========================================================================--*/ + syscall_fsync :: #force_inline proc "contextless" (fildes: c.int) -> bool { return !(cast(bool)intrinsics.syscall(unix_offset_syscall(.fsync), uintptr(fildes))) } diff --git a/core/sys/freebsd/constants.odin b/core/sys/freebsd/constants.odin new file mode 100644 index 000000000..3188b32d6 --- /dev/null +++ b/core/sys/freebsd/constants.odin @@ -0,0 +1,5 @@ +package sys_freebsd + +/* Get window size */ +TIOCGWINSZ :: 0x40087468 + diff --git a/core/sys/linux/constants.odin b/core/sys/linux/constants.odin index 1010c931a..ceab17f6d 100644 --- a/core/sys/linux/constants.odin +++ b/core/sys/linux/constants.odin @@ -391,4 +391,7 @@ MAP_HUGE_256MB :: transmute(Map_Flags)(u32(28) << MAP_HUGE_SHIFT) MAP_HUGE_512MB :: transmute(Map_Flags)(u32(29) << MAP_HUGE_SHIFT) MAP_HUGE_1GB :: transmute(Map_Flags)(u32(30) << MAP_HUGE_SHIFT) MAP_HUGE_2GB :: transmute(Map_Flags)(u32(31) << MAP_HUGE_SHIFT) -MAP_HUGE_16GB :: transmute(Map_Flags)(u32(34) << MAP_HUGE_SHIFT) \ No newline at end of file +MAP_HUGE_16GB :: transmute(Map_Flags)(u32(34) << MAP_HUGE_SHIFT) + +/* Get window size */ +TIOCGWINSZ :: 0x5413