Skip to content

Add Illumos support #138

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Merged
merged 3 commits into from
Jan 17, 2016
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
8 changes: 8 additions & 0 deletions src/unix/bsd/mod.rs
Original file line number Diff line number Diff line change
@@ -280,6 +280,8 @@ pub const FLUSHO: ::tcflag_t = 0x00800000;
pub const PENDIN: ::tcflag_t = 0x20000000;
pub const NOFLSH: ::tcflag_t = 0x80000000;

pub const WNOHANG: ::c_int = 1;

f! {
pub fn FD_CLR(fd: ::c_int, set: *mut fd_set) -> () {
let fd = fd as usize;
@@ -324,6 +326,12 @@ extern {
pub fn kqueue() -> ::c_int;
pub fn unmount(target: *const ::c_char, arg: ::c_int) -> ::c_int;
pub fn syscall(num: ::c_int, ...) -> ::c_int;
#[cfg_attr(target_os = "netbsd", link_name = "__getpwuid_r50")]
pub fn getpwuid_r(uid: ::uid_t,
pwd: *mut passwd,
buf: *mut ::c_char,
buflen: ::size_t,
result: *mut *mut passwd) -> ::c_int;
}

cfg_if! {
10 changes: 3 additions & 7 deletions src/unix/mod.rs
Original file line number Diff line number Diff line change
@@ -99,7 +99,6 @@ s! {
}
}

pub const WNOHANG: ::c_int = 1;
pub const SIG_DFL: sighandler_t = 0 as sighandler_t;
pub const SIG_IGN: sighandler_t = 1 as sighandler_t;
pub const SIG_ERR: sighandler_t = !0 as sighandler_t;
@@ -621,12 +620,6 @@ extern {
addrlen: *mut socklen_t) -> ::ssize_t;
pub fn mkfifo(path: *const c_char, mode: mode_t) -> ::c_int;

#[cfg_attr(target_os = "netbsd", link_name = "__getpwuid_r50")]
pub fn getpwuid_r(uid: ::uid_t,
pwd: *mut passwd,
buf: *mut ::c_char,
buflen: ::size_t,
result: *mut *mut passwd) -> ::c_int;
#[cfg_attr(target_os = "netbsd", link_name = "__sigemptyset14")]
pub fn sigemptyset(set: *mut sigset_t) -> ::c_int;
#[cfg_attr(target_os = "netbsd", link_name = "__sigaddset14")]
@@ -697,6 +690,9 @@ cfg_if! {
target_os = "bitrig"))] {
mod bsd;
pub use self::bsd::*;
} else if #[cfg(target_os = "sunos")] {
mod sunos;
pub use self::sunos::*;
} else {
// ...
}
7 changes: 7 additions & 0 deletions src/unix/notbsd/mod.rs
Original file line number Diff line number Diff line change
@@ -523,6 +523,8 @@ pub const CLONE_DETACHED: ::c_int = 0x400000;
pub const CLONE_UNTRACED: ::c_int = 0x800000;
pub const CLONE_CHILD_SETTID: ::c_int = 0x01000000;

pub const WNOHANG: ::c_int = 1;

f! {
pub fn FD_CLR(fd: ::c_int, set: *mut fd_set) -> () {
let fd = fd as usize;
@@ -564,6 +566,11 @@ f! {
}

extern {
pub fn getpwuid_r(uid: ::uid_t,
pwd: *mut passwd,
buf: *mut ::c_char,
buflen: ::size_t,
result: *mut *mut passwd) -> ::c_int;
pub fn fdatasync(fd: ::c_int) -> ::c_int;
pub fn mincore(addr: *mut ::c_void, len: ::size_t,
vec: *mut ::c_uchar) -> ::c_int;
764 changes: 764 additions & 0 deletions src/unix/sunos/mod.rs

Large diffs are not rendered by default.