diff options
| author | Jeroen van Rijn <Kelimion@users.noreply.github.com> | 2025-06-21 18:26:52 +0200 |
|---|---|---|
| committer | GitHub <noreply@github.com> | 2025-06-21 18:26:52 +0200 |
| commit | 2c0899156d5a89c8a19fbdb55e72a63be57d798c (patch) | |
| tree | 47b44c8126614b03eefbf9a220d64f861ba1657f | |
| parent | 8d37f9de09b3c9ce86f11a9cdcb8983e6085ea3e (diff) | |
| parent | e374ace10db3874cc50e4b1c72d75a7f76b18119 (diff) | |
Merge pull request #5385 from RaphGL/posix_is_supported
added IS_SUPPORTED to core:sys/posix
| -rw-r--r-- | core/sys/posix/posix.odin | 2 | ||||
| -rw-r--r-- | core/sys/posix/posix_other.odin | 10 | ||||
| -rw-r--r-- | core/sys/posix/posix_unix.odin | 5 |
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 + |