#[cfg(windows)] pub use funcs::extra::msvcrt::{get_osfhandle, open_osfhandle};
#[cfg(windows)] pub use funcs::extra::winsock::{ioctlsocket};
-#[cfg(target_os = "linux")] #[cfg(target_os = "android")]
-#[cfg(target_os = "freebsd")] #[cfg(target_os = "dragonfly")]
+#[cfg(any(target_os = "linux",
+ target_os = "android",
+ target_os = "freebsd",
+ target_os = "dragonfly"))]
pub use consts::os::posix01::{CLOCK_REALTIME, CLOCK_MONOTONIC};
-#[cfg(target_os = "linux")] #[cfg(target_os = "android")]
+#[cfg(any(target_os = "linux", target_os = "android"))]
pub use funcs::posix01::unistd::{fdatasync};
-#[cfg(target_os = "linux")] #[cfg(target_os = "android")]
+#[cfg(any(target_os = "linux", target_os = "android"))]
pub use types::os::arch::extra::{sockaddr_ll};
-#[cfg(target_os = "linux")] #[cfg(target_os = "android")]
+#[cfg(any(target_os = "linux", target_os = "android"))]
pub use consts::os::extra::{AF_PACKET};
-#[cfg(unix, not(target_os = "freebsd"))]
+#[cfg(all(unix, not(target_os = "freebsd")))]
pub use consts::os::extra::{MAP_STACK};
-#[cfg(target_os = "freebsd")]
-#[cfg(target_os = "dragonfly")]
+#[cfg(any(target_os = "freebsd", target_os = "dragonfly"))]
pub use consts::os::bsd44::{TCP_KEEPIDLE};
-#[cfg(target_os = "macos")]
-#[cfg(target_os = "ios")]
+#[cfg(any(target_os = "macos", target_os = "ios"))]
pub use consts::os::bsd44::{TCP_KEEPALIVE};
-#[cfg(target_os = "macos")]
-#[cfg(target_os = "ios")]
+#[cfg(any(target_os = "macos", target_os = "ios"))]
pub use consts::os::extra::{F_FULLFSYNC};
-#[cfg(target_os = "macos")]
-#[cfg(target_os = "ios")]
+
+#[cfg(any(target_os = "macos", target_os = "ios"))]
pub use types::os::arch::extra::{mach_timebase_info};
// Standard types that are scalar but vary by OS and arch.
- #[cfg(target_os = "linux")]
- #[cfg(target_os = "android")]
+ #[cfg(any(target_os = "linux", target_os = "android"))]
pub mod os {
pub mod common {
pub mod posix01 {
}
}
- #[cfg(target_arch = "x86")]
- #[cfg(target_arch = "arm")]
- #[cfg(target_arch = "mips")]
- #[cfg(target_arch = "mipsel")]
+ #[cfg(any(target_arch = "x86",
+ target_arch = "arm",
+ target_arch = "mips",
+ target_arch = "mipsel"))]
pub mod arch {
pub mod c95 {
pub type c_char = i8;
pub type intptr_t = i32;
pub type uintptr_t = u32;
}
- #[cfg(target_arch = "x86")]
- #[cfg(target_arch = "mips")]
- #[cfg(target_arch = "mipsel")]
+ #[cfg(any(target_arch = "x86",
+ target_arch = "mips",
+ target_arch = "mipsel"))]
pub mod posix88 {
pub type off_t = i32;
pub type dev_t = u64;
pub __size: [u32, ..9]
}
}
- #[cfg(target_arch = "mips")]
- #[cfg(target_arch = "mipsel")]
+ #[cfg(any(target_arch = "mips", target_arch = "mipsel"))]
pub mod posix01 {
use types::os::arch::c95::{c_long, c_ulong, time_t};
use types::os::arch::posix88::{gid_t, ino_t};
}
}
- #[cfg(target_os = "macos")]
- #[cfg(target_os = "ios")]
+ #[cfg(any(target_os = "macos", target_os = "ios"))]
pub mod os {
pub mod common {
pub mod posix01 {
}
}
- #[cfg(target_arch = "arm")]
- #[cfg(target_arch = "x86")]
+ #[cfg(any(target_arch = "arm", target_arch = "x86"))]
pub mod arch {
pub mod c95 {
pub type c_char = i8;
}
- #[cfg(target_os = "linux")]
- #[cfg(target_os = "android")]
+ #[cfg(any(target_os = "linux", target_os = "android"))]
pub mod os {
pub mod c95 {
use types::os::arch::c95::{c_int, c_uint};
}
pub mod c99 {
}
- #[cfg(target_arch = "x86")]
- #[cfg(target_arch = "x86_64")]
- #[cfg(target_arch = "arm")]
+ #[cfg(any(target_arch = "x86",
+ target_arch = "x86_64",
+ target_arch = "arm"))]
pub mod posix88 {
use types::os::arch::c95::c_int;
use types::common::c95::c_void;
pub static EHWPOISON: c_int = 133;
}
- #[cfg(target_arch = "mips")]
- #[cfg(target_arch = "mipsel")]
+ #[cfg(any(target_arch = "mips", target_arch = "mipsel"))]
pub mod posix88 {
use types::os::arch::c95::c_int;
use types::common::c95::c_void;
#[cfg(target_os = "android")]
pub static PTHREAD_STACK_MIN: size_t = 8192;
- #[cfg(target_arch = "arm", target_os = "linux")]
- #[cfg(target_arch = "x86", target_os = "linux")]
- #[cfg(target_arch = "x86_64", target_os = "linux")]
+ #[cfg(all(target_os = "linux",
+ any(target_arch = "arm",
+ target_arch = "x86",
+ target_arch = "x86_64")))]
pub static PTHREAD_STACK_MIN: size_t = 16384;
- #[cfg(target_arch = "mips", target_os = "linux")]
- #[cfg(target_arch = "mipsel", target_os = "linux")]
+ #[cfg(all(target_os = "linux",
+ any(target_arch = "mips", target_arch = "mipsel")))]
pub static PTHREAD_STACK_MIN: size_t = 131072;
pub static CLOCK_REALTIME: c_int = 0;
}
pub mod posix08 {
}
- #[cfg(target_arch = "arm")]
- #[cfg(target_arch = "x86")]
- #[cfg(target_arch = "x86_64")]
+ #[cfg(any(target_arch = "arm",
+ target_arch = "x86",
+ target_arch = "x86_64"))]
pub mod bsd44 {
use types::os::arch::c95::c_int;
pub static SHUT_WR: c_int = 1;
pub static SHUT_RDWR: c_int = 2;
}
- #[cfg(target_arch = "mips")]
- #[cfg(target_arch = "mipsel")]
+ #[cfg(any(target_arch = "mips", target_arch = "mipsel"))]
pub mod bsd44 {
use types::os::arch::c95::c_int;
pub static SHUT_WR: c_int = 1;
pub static SHUT_RDWR: c_int = 2;
}
- #[cfg(target_arch = "x86")]
- #[cfg(target_arch = "x86_64")]
- #[cfg(target_arch = "arm")]
+ #[cfg(any(target_arch = "x86",
+ target_arch = "x86_64",
+ target_arch = "arm"))]
pub mod extra {
use types::os::arch::c95::c_int;
pub static MAP_NONBLOCK : c_int = 0x010000;
pub static MAP_STACK : c_int = 0x020000;
}
- #[cfg(target_arch = "mips")]
- #[cfg(target_arch = "mipsel")]
+ #[cfg(any(target_arch = "mips", target_arch = "mipsel"))]
pub mod extra {
use types::os::arch::c95::c_int;
}
}
- #[cfg(target_os = "freebsd")]
- #[cfg(target_os = "dragonfly")]
+ #[cfg(any(target_os = "freebsd", target_os = "dragonfly"))]
pub mod os {
pub mod c95 {
use types::os::arch::c95::{c_int, c_uint};
#[cfg(target_arch = "arm")]
pub static PTHREAD_STACK_MIN: size_t = 4096;
- #[cfg(target_os = "freebsd", target_arch = "mips")]
- #[cfg(target_os = "freebsd", target_arch = "mipsel")]
- #[cfg(target_os = "freebsd", target_arch = "x86")]
- #[cfg(target_os = "freebsd", target_arch = "x86_64")]
+ #[cfg(all(target_os = "freebsd",
+ any(target_arch = "mips",
+ target_arch = "mipsel",
+ target_arch = "x86",
+ target_arch = "x86_64")))]
pub static PTHREAD_STACK_MIN: size_t = 2048;
#[cfg(target_os = "dragonfly")]
}
}
- #[cfg(target_os = "macos")]
- #[cfg(target_os = "ios")]
+ #[cfg(any(target_os = "macos", target_os = "ios"))]
pub mod os {
pub mod c95 {
use types::os::arch::c95::{c_int, c_uint};
}
}
-
- #[cfg(target_os = "linux")]
- #[cfg(target_os = "android")]
- #[cfg(target_os = "macos")]
- #[cfg(target_os = "ios")]
- #[cfg(target_os = "freebsd")]
- #[cfg(target_os = "dragonfly")]
+ #[cfg(any(target_os = "linux",
+ target_os = "android",
+ target_os = "macos",
+ target_os = "ios",
+ target_os = "freebsd",
+ target_os = "dragonfly"))]
pub mod posix88 {
pub mod stat_ {
use types::os::arch::c95::{c_char, c_int};
pub fn chmod(path: *const c_char, mode: mode_t) -> c_int;
pub fn fchmod(fd: c_int, mode: mode_t) -> c_int;
- #[cfg(target_os = "linux")]
- #[cfg(target_os = "freebsd")]
- #[cfg(target_os = "dragonfly")]
- #[cfg(target_os = "android")]
- #[cfg(target_os = "ios")]
+ #[cfg(any(target_os = "linux",
+ target_os = "freebsd",
+ target_os = "dragonfly",
+ target_os = "android",
+ target_os = "ios"))]
pub fn fstat(fildes: c_int, buf: *mut stat) -> c_int;
#[cfg(target_os = "macos")]
pub fn mkdir(path: *const c_char, mode: mode_t) -> c_int;
pub fn mkfifo(path: *const c_char, mode: mode_t) -> c_int;
- #[cfg(target_os = "linux")]
- #[cfg(target_os = "freebsd")]
- #[cfg(target_os = "dragonfly")]
- #[cfg(target_os = "android")]
- #[cfg(target_os = "ios")]
+ #[cfg(any(target_os = "linux",
+ target_os = "freebsd",
+ target_os = "dragonfly",
+ target_os = "android",
+ target_os = "ios"))]
pub fn stat(path: *const c_char, buf: *mut stat) -> c_int;
#[cfg(target_os = "macos")]
}
- #[cfg(target_os = "linux")]
- #[cfg(target_os = "android")]
- #[cfg(target_os = "macos")]
- #[cfg(target_os = "ios")]
- #[cfg(target_os = "freebsd")]
- #[cfg(target_os = "dragonfly")]
+ #[cfg(any(target_os = "linux",
+ target_os = "android",
+ target_os = "macos",
+ target_os = "ios",
+ target_os = "freebsd",
+ target_os = "dragonfly"))]
pub mod posix01 {
pub mod stat_ {
use types::os::arch::c95::{c_char, c_int};
use types::os::arch::posix01::stat;
extern {
- #[cfg(target_os = "linux")]
- #[cfg(target_os = "freebsd")]
- #[cfg(target_os = "dragonfly")]
- #[cfg(target_os = "android")]
- #[cfg(target_os = "ios")]
+ #[cfg(any(target_os = "linux",
+ target_os = "freebsd",
+ target_os = "dragonfly",
+ target_os = "android",
+ target_os = "ios"))]
pub fn lstat(path: *const c_char, buf: *mut stat) -> c_int;
#[cfg(target_os = "macos")]
pub fn fsync(fd: c_int) -> c_int;
- #[cfg(target_os = "linux")]
- #[cfg(target_os = "android")]
+ #[cfg(any(target_os = "linux", target_os = "android"))]
pub fn fdatasync(fd: c_int) -> c_int;
pub fn setenv(name: *const c_char, val: *const c_char,
}
- #[cfg(target_os = "windows")]
- #[cfg(target_os = "linux")]
- #[cfg(target_os = "android")]
- #[cfg(target_os = "macos")]
- #[cfg(target_os = "ios")]
- #[cfg(target_os = "freebsd")]
- #[cfg(target_os = "dragonfly")]
+ #[cfg(any(target_os = "windows",
+ target_os = "linux",
+ target_os = "android",
+ target_os = "macos",
+ target_os = "ios",
+ target_os = "freebsd",
+ target_os = "dragonfly"))]
pub mod posix08 {
pub mod unistd {
}
}
}
- #[cfg(target_os = "macos")]
- #[cfg(target_os = "ios")]
- #[cfg(target_os = "freebsd")]
- #[cfg(target_os = "dragonfly")]
+ #[cfg(any(target_os = "macos",
+ target_os = "ios",
+ target_os = "freebsd",
+ target_os = "dragonfly"))]
pub mod bsd44 {
use types::common::c95::{c_void};
use types::os::arch::c95::{c_char, c_uchar, c_int, c_uint, c_ulong, size_t};
}
- #[cfg(target_os = "linux")]
- #[cfg(target_os = "android")]
+ #[cfg(any(target_os = "linux", target_os = "android"))]
pub mod bsd44 {
use types::common::c95::{c_void};
use types::os::arch::c95::{c_uchar, c_int, size_t};
pub mod bsd44 {
}
- #[cfg(target_os = "macos")]
- #[cfg(target_os = "ios")]
+ #[cfg(any(target_os = "macos", target_os = "ios"))]
pub mod extra {
use types::os::arch::c95::{c_char, c_int};
}
}
- #[cfg(target_os = "freebsd")]
- #[cfg(target_os = "dragonfly")]
+ #[cfg(any(target_os = "freebsd", target_os = "dragonfly"))]
pub mod extra {
}
- #[cfg(target_os = "linux")]
- #[cfg(target_os = "android")]
+ #[cfg(any(target_os = "linux", target_os = "android"))]
pub mod extra {
}