From e374ace10db3874cc50e4b1c72d75a7f76b18119 Mon Sep 17 00:00:00 2001 From: RaphGL Date: Sat, 21 Jun 2025 12:12:13 -0100 Subject: [PATCH] added IS_SUPPORTED to core:sys/posix --- core/sys/posix/posix.odin | 2 ++ core/sys/posix/posix_other.odin | 10 ++++++++++ core/sys/posix/posix_unix.odin | 5 +++++ 3 files changed, 17 insertions(+) create mode 100644 core/sys/posix/posix_other.odin create mode 100644 core/sys/posix/posix_unix.odin diff --git a/core/sys/posix/posix.odin b/core/sys/posix/posix.odin index 1e6a0aa9b..3dcf36a5e 100644 --- a/core/sys/posix/posix.odin +++ b/core/sys/posix/posix.odin @@ -53,6 +53,8 @@ import "base:intrinsics" import "core:c" +IS_SUPPORTED :: _IS_SUPPORTED + result :: enum c.int { // Use `errno` and `strerror` for more information. FAIL = -1, diff --git a/core/sys/posix/posix_other.odin b/core/sys/posix/posix_other.odin new file mode 100644 index 000000000..88542c56b --- /dev/null +++ b/core/sys/posix/posix_other.odin @@ -0,0 +1,10 @@ +#+build !linux +#+build !darwin +#+build !netbsd +#+build !openbsd +#+build !freebsd +#+build !haiku +package posix + +_IS_SUPPORTED :: false + diff --git a/core/sys/posix/posix_unix.odin b/core/sys/posix/posix_unix.odin new file mode 100644 index 000000000..51580a655 --- /dev/null +++ b/core/sys/posix/posix_unix.odin @@ -0,0 +1,5 @@ +#+build linux, darwin, netbsd, openbsd, freebsd, haiku +package posix + +_IS_SUPPORTED :: true +