aboutsummaryrefslogtreecommitdiff
path: root/core/sys/posix
diff options
context:
space:
mode:
authorRaphGL <raphfl.dev@gmail.com>2025-06-21 12:12:13 -0100
committerRaphGL <raphfl.dev@gmail.com>2025-06-21 12:12:13 -0100
commite374ace10db3874cc50e4b1c72d75a7f76b18119 (patch)
tree47b44c8126614b03eefbf9a220d64f861ba1657f /core/sys/posix
parent8d37f9de09b3c9ce86f11a9cdcb8983e6085ea3e (diff)
added IS_SUPPORTED to core:sys/posix
Diffstat (limited to 'core/sys/posix')
-rw-r--r--core/sys/posix/posix.odin2
-rw-r--r--core/sys/posix/posix_other.odin10
-rw-r--r--core/sys/posix/posix_unix.odin5
3 files changed, 17 insertions, 0 deletions
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
+