Basic iOS support
This commit is contained in:
@@ -20,6 +20,7 @@ pub use self::signal::{SA_NODEFER, SA_NOCLDWAIT, SA_SIGINFO, SIGCHLD};
|
||||
use libc;
|
||||
|
||||
#[cfg(target_os = "macos")]
|
||||
#[cfg(target_os = "ios")]
|
||||
#[cfg(target_os = "freebsd")]
|
||||
pub static FIONBIO: libc::c_ulong = 0x8004667e;
|
||||
#[cfg(target_os = "linux", not(target_arch = "mips"))]
|
||||
@@ -29,6 +30,7 @@ pub static FIONBIO: libc::c_ulong = 0x5421;
|
||||
pub static FIONBIO: libc::c_ulong = 0x667e;
|
||||
|
||||
#[cfg(target_os = "macos")]
|
||||
#[cfg(target_os = "ios")]
|
||||
#[cfg(target_os = "freebsd")]
|
||||
pub static FIOCLEX: libc::c_ulong = 0x20006601;
|
||||
#[cfg(target_os = "linux", not(target_arch = "mips"))]
|
||||
@@ -38,6 +40,7 @@ pub static FIOCLEX: libc::c_ulong = 0x5451;
|
||||
pub static FIOCLEX: libc::c_ulong = 0x6601;
|
||||
|
||||
#[cfg(target_os = "macos")]
|
||||
#[cfg(target_os = "ios")]
|
||||
#[cfg(target_os = "freebsd")]
|
||||
pub static MSG_DONTWAIT: libc::c_int = 0x80;
|
||||
#[cfg(target_os = "linux")]
|
||||
@@ -75,6 +78,7 @@ extern {
|
||||
}
|
||||
|
||||
#[cfg(target_os = "macos")]
|
||||
#[cfg(target_os = "ios")]
|
||||
mod select {
|
||||
pub static FD_SETSIZE: uint = 1024;
|
||||
|
||||
@@ -187,6 +191,7 @@ mod signal {
|
||||
}
|
||||
|
||||
#[cfg(target_os = "macos")]
|
||||
#[cfg(target_os = "ios")]
|
||||
#[cfg(target_os = "freebsd")]
|
||||
mod signal {
|
||||
use libc;
|
||||
@@ -201,6 +206,7 @@ mod signal {
|
||||
pub static SIGCHLD: libc::c_int = 20;
|
||||
|
||||
#[cfg(target_os = "macos")]
|
||||
#[cfg(target_os = "ios")]
|
||||
pub type sigset_t = u32;
|
||||
#[cfg(target_os = "freebsd")]
|
||||
pub struct sigset_t {
|
||||
@@ -219,6 +225,7 @@ mod signal {
|
||||
}
|
||||
|
||||
#[cfg(target_os = "macos")]
|
||||
#[cfg(target_os = "ios")]
|
||||
pub struct sigaction {
|
||||
pub sa_handler: extern fn(libc::c_int),
|
||||
sa_tramp: *mut libc::c_void,
|
||||
|
||||
Reference in New Issue
Block a user