mirror of
https://github.com/Ed94/Odin.git
synced 2026-08-04 14:48:47 +00:00
Merge branch 'master' into macharena
This commit is contained in:
@@ -8,7 +8,10 @@ when ODIN_OS == .Darwin {
|
||||
} else when ODIN_OS == .FreeBSD || ODIN_OS == .NetBSD {
|
||||
foreign import lib "system:dl"
|
||||
} else {
|
||||
foreign import lib "system:c"
|
||||
foreign import lib {
|
||||
"system:c",
|
||||
"system:dl",
|
||||
}
|
||||
}
|
||||
|
||||
// dlfcn.h - dynamic linking
|
||||
|
||||
@@ -31,7 +31,7 @@ Unimplemented headers:
|
||||
- iso646.h | Impossible
|
||||
- math.h | See `core:c/libc`
|
||||
- mqueue.h | Targets don't seem to have implemented it
|
||||
- regex.h | See `core:regex`
|
||||
- regex.h | See `core:text/regex`
|
||||
- search.h | Not useful in Odin
|
||||
- spawn.h | Use `fork`, `execve`, etc.
|
||||
- stdarg.h | See `core:c/libc`
|
||||
@@ -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,
|
||||
|
||||
@@ -0,0 +1,10 @@
|
||||
#+build !linux
|
||||
#+build !darwin
|
||||
#+build !netbsd
|
||||
#+build !openbsd
|
||||
#+build !freebsd
|
||||
#+build !haiku
|
||||
package posix
|
||||
|
||||
_IS_SUPPORTED :: false
|
||||
|
||||
@@ -0,0 +1,5 @@
|
||||
#+build linux, darwin, netbsd, openbsd, freebsd, haiku
|
||||
package posix
|
||||
|
||||
_IS_SUPPORTED :: true
|
||||
|
||||
Reference in New Issue
Block a user