mirror of
https://github.com/odin-lang/Odin.git
synced 2025-12-31 18:32:12 +00:00
Merge pull request #5385 from RaphGL/posix_is_supported
added IS_SUPPORTED to core:sys/posix
This commit is contained in:
@@ -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,
|
||||
|
||||
10
core/sys/posix/posix_other.odin
Normal file
10
core/sys/posix/posix_other.odin
Normal file
@@ -0,0 +1,10 @@
|
||||
#+build !linux
|
||||
#+build !darwin
|
||||
#+build !netbsd
|
||||
#+build !openbsd
|
||||
#+build !freebsd
|
||||
#+build !haiku
|
||||
package posix
|
||||
|
||||
_IS_SUPPORTED :: false
|
||||
|
||||
5
core/sys/posix/posix_unix.odin
Normal file
5
core/sys/posix/posix_unix.odin
Normal file
@@ -0,0 +1,5 @@
|
||||
#+build linux, darwin, netbsd, openbsd, freebsd, haiku
|
||||
package posix
|
||||
|
||||
_IS_SUPPORTED :: true
|
||||
|
||||
Reference in New Issue
Block a user