From 98589876259e19f13eab81b033ced95bbb6deca0 Mon Sep 17 00:00:00 2001 From: Jorge Aparicio Date: Fri, 30 Dec 2016 01:33:51 -0500 Subject: [PATCH 1/3] [WIP] sparc64-linux support --- src/unix/notbsd/linux/mod.rs | 13 +- src/unix/notbsd/linux/other/b64/mod.rs | 6 + src/unix/notbsd/linux/other/b64/sparc64.rs | 178 ++++++++ src/unix/notbsd/linux/other/mod.rs | 449 ++++++++++++++++++++- src/unix/notbsd/mod.rs | 66 +++ 5 files changed, 703 insertions(+), 9 deletions(-) create mode 100644 src/unix/notbsd/linux/other/b64/sparc64.rs diff --git a/src/unix/notbsd/linux/mod.rs b/src/unix/notbsd/linux/mod.rs index f7e7fdacd1281..cf013b043d172 100644 --- a/src/unix/notbsd/linux/mod.rs +++ b/src/unix/notbsd/linux/mod.rs @@ -87,10 +87,12 @@ s! { pub struct pthread_mutexattr_t { #[cfg(any(target_arch = "x86_64", target_arch = "powerpc64", - target_arch = "mips64", target_arch = "s390x"))] + target_arch = "mips64", target_arch = "s390x", + target_arch = "sparc64"))] __align: [::c_int; 0], #[cfg(not(any(target_arch = "x86_64", target_arch = "powerpc64", - target_arch = "mips64", target_arch = "s390x")))] + target_arch = "mips64", target_arch = "s390x", + target_arch = "sparc64")))] __align: [::c_long; 0], size: [u8; __SIZEOF_PTHREAD_MUTEXATTR_T], } @@ -248,6 +250,7 @@ pub const ABMON_10: ::nl_item = 0x20017; pub const ABMON_11: ::nl_item = 0x20018; pub const ABMON_12: ::nl_item = 0x20019; +#[cfg(not(target_arch = "sparc64"))] pub const CLONE_NEWCGROUP: ::c_int = 0x02000000; pub const MON_1: ::nl_item = 0x2001A; @@ -500,11 +503,17 @@ pub const EPOLLONESHOT: ::c_int = 0x40000000; pub const QFMT_VFS_OLD: ::c_int = 1; pub const QFMT_VFS_V0: ::c_int = 2; +#[cfg(not(target_arch = "sparc64"))] pub const SFD_CLOEXEC: ::c_int = 0x080000; +#[cfg(target_arch = "sparc64")] +pub const SFD_CLOEXEC: ::c_int = 0x400000; pub const EFD_SEMAPHORE: ::c_int = 0x1; +#[cfg(not(target_arch = "sparc64"))] pub const NCCS: usize = 32; +#[cfg(target_arch = "sparc64")] +pub const NCCS: usize = 17; pub const LOG_NFACILITIES: ::c_int = 24; diff --git a/src/unix/notbsd/linux/other/b64/mod.rs b/src/unix/notbsd/linux/other/b64/mod.rs index 352dba843d2b5..a08049d6676c5 100644 --- a/src/unix/notbsd/linux/other/b64/mod.rs +++ b/src/unix/notbsd/linux/other/b64/mod.rs @@ -4,7 +4,10 @@ pub type c_long = i64; pub type c_ulong = u64; pub type clock_t = i64; pub type time_t = i64; +#[cfg(not(target_arch = "sparc64"))] pub type suseconds_t = i64; +#[cfg(target_arch = "sparc64")] +pub type suseconds_t = i32; pub type ino_t = u64; pub type off_t = i64; pub type blkcnt_t = i64; @@ -56,6 +59,9 @@ cfg_if! { } else if #[cfg(any(target_arch = "powerpc64"))] { mod powerpc64; pub use self::powerpc64::*; + } else if #[cfg(any(target_arch = "sparc64"))] { + mod sparc64; + pub use self::sparc64::*; } else if #[cfg(any(target_arch = "x86_64"))] { mod x86_64; pub use self::x86_64::*; diff --git a/src/unix/notbsd/linux/other/b64/sparc64.rs b/src/unix/notbsd/linux/other/b64/sparc64.rs new file mode 100644 index 0000000000000..b4c5e0acaab6b --- /dev/null +++ b/src/unix/notbsd/linux/other/b64/sparc64.rs @@ -0,0 +1,178 @@ +//! SPARC64-specific definitions for 64-bit linux-like values + +pub type c_char = i8; +pub type wchar_t = i32; +pub type nlink_t = u32; +pub type blksize_t = i64; + +s! { + pub struct stat { + pub st_dev: ::dev_t, + __pad0: u64, + pub st_ino: ::ino_t, + pub st_mode: ::mode_t, + pub st_nlink: ::nlink_t, + pub st_uid: ::uid_t, + pub st_gid: ::gid_t, + pub st_rdev: ::dev_t, + __pad1: u64, + pub st_size: ::off_t, + pub st_blksize: ::blksize_t, + pub st_blocks: ::blkcnt_t, + pub st_atime: ::time_t, + pub st_atime_nsec: ::c_long, + pub st_mtime: ::time_t, + pub st_mtime_nsec: ::c_long, + pub st_ctime: ::time_t, + pub st_ctime_nsec: ::c_long, + __unused: [::c_long; 2], + } + + pub struct stat64 { + pub st_dev: ::dev_t, + __pad0: u64, + pub st_ino: ::ino64_t, + pub st_mode: ::mode_t, + pub st_nlink: ::nlink_t, + pub st_uid: ::uid_t, + pub st_gid: ::gid_t, + pub st_rdev: ::dev_t, + __pad2: ::c_int, + pub st_size: ::off64_t, + pub st_blksize: ::blksize_t, + pub st_blocks: ::blkcnt64_t, + pub st_atime: ::time_t, + pub st_atime_nsec: ::c_long, + pub st_mtime: ::time_t, + pub st_mtime_nsec: ::c_long, + pub st_ctime: ::time_t, + pub st_ctime_nsec: ::c_long, + __reserved: [::c_long; 2], + } + + pub struct pthread_attr_t { + __size: [u64; 7] + } + + pub struct ipc_perm { + pub __key: ::key_t, + pub uid: ::uid_t, + pub gid: ::gid_t, + pub cuid: ::uid_t, + pub cgid: ::gid_t, + pub mode: ::mode_t, + __pad0: u16, + pub __seq: ::c_ushort, + __unused1: ::c_ulonglong, + __unused2: ::c_ulonglong, + } + + pub struct shmid_ds { + pub shm_perm: ::ipc_perm, + pub shm_atime: ::time_t, + pub shm_dtime: ::time_t, + pub shm_ctime: ::time_t, + pub shm_segsz: ::size_t, + pub shm_cpid: ::pid_t, + pub shm_lpid: ::pid_t, + pub shm_nattch: ::shmatt_t, + __reserved1: ::c_ulong, + __reserved2: ::c_ulong + } +} + +pub const __SIZEOF_PTHREAD_CONDATTR_T: usize = 4; +pub const __SIZEOF_PTHREAD_MUTEX_T: usize = 40; +pub const __SIZEOF_PTHREAD_MUTEXATTR_T: usize = 4; + +pub const O_DIRECTORY: ::c_int = 0o200000; +pub const O_NOFOLLOW: ::c_int = 0o400000; +pub const O_DIRECT: ::c_int = 0x100000; + +pub const MAP_LOCKED: ::c_int = 0x0100; +pub const MAP_NORESERVE: ::c_int = 0x00040; + +pub const EDEADLOCK: ::c_int = 108; + +pub const SO_PEERCRED: ::c_int = 0x40; +pub const SO_RCVLOWAT: ::c_int = 0x800; +pub const SO_SNDLOWAT: ::c_int = 0x1000; +pub const SO_RCVTIMEO: ::c_int = 0x2000; +pub const SO_SNDTIMEO: ::c_int = 0x4000; + +pub const FIOCLEX: ::c_ulong = 0x20006601; +pub const FIONBIO: ::c_ulong = 0x8004667e; + +pub const SYS_gettid: ::c_long = 143; +pub const SYS_perf_event_open: ::c_long = 327; + +pub const MCL_CURRENT: ::c_int = 0x2000; +pub const MCL_FUTURE: ::c_int = 0x4000; + +pub const SIGSTKSZ: ::size_t = 16384; +pub const CBAUD: ::tcflag_t = 0x0000100f; +pub const TAB1: ::c_int = 0x800; +pub const TAB2: ::c_int = 0x1000; +pub const TAB3: ::c_int = 0x1800; +pub const CR1: ::c_int = 0x200; +pub const CR2: ::c_int = 0x400; +pub const CR3: ::c_int = 0x600; +pub const FF1: ::c_int = 0x8000; +pub const BS1: ::c_int = 0x2000; +pub const VT1: ::c_int = 0x4000; +pub const VWERASE: usize = 0xe; +pub const VREPRINT: usize = 0xc; +pub const VSUSP: usize = 0xa; +pub const VSTART: usize = 0x8; +pub const VSTOP: usize = 0x9; +pub const VDISCARD: usize = 0xd; +pub const VTIME: usize = 0x5; +pub const IXON: ::tcflag_t = 0x400; +pub const IXOFF: ::tcflag_t = 0x1000; +pub const ONLCR: ::tcflag_t = 0x4; +pub const CSIZE: ::tcflag_t = 0x30; +pub const CS6: ::tcflag_t = 0x10; +pub const CS7: ::tcflag_t = 0x20; +pub const CS8: ::tcflag_t = 0x30; +pub const CSTOPB: ::tcflag_t = 0x40; +pub const CREAD: ::tcflag_t = 0x80; +pub const PARENB: ::tcflag_t = 0x100; +pub const PARODD: ::tcflag_t = 0x200; +pub const HUPCL: ::tcflag_t = 0x400; +pub const CLOCAL: ::tcflag_t = 0x800; +pub const ECHOKE: ::tcflag_t = 0x800; +pub const ECHOE: ::tcflag_t = 0x10; +pub const ECHOK: ::tcflag_t = 0x20; +pub const ECHONL: ::tcflag_t = 0x40; +pub const ECHOPRT: ::tcflag_t = 0x400; +pub const ECHOCTL: ::tcflag_t = 0x200; +pub const ISIG: ::tcflag_t = 0x1; +pub const ICANON: ::tcflag_t = 0x2; +pub const PENDIN: ::tcflag_t = 0x4000; +pub const NOFLSH: ::tcflag_t = 0x80; + +pub const VEOL: usize = 5; +pub const VEOL2: usize = 6; +pub const VMIN: usize = 4; +pub const IEXTEN: ::tcflag_t = 0x8000; +pub const TOSTOP: ::tcflag_t = 0x100; +pub const FLUSHO: ::tcflag_t = 0x2000; +pub const EXTPROC: ::tcflag_t = 0x10000; +pub const TCGETS: ::c_ulong = 0x40245408; +pub const TCSETS: ::c_ulong = 0x80245409; +pub const TCSETSW: ::c_ulong = 0x8024540a; +pub const TCSETSF: ::c_ulong = 0x8024540b; +pub const TCGETA: ::c_ulong = 0x40125401; +pub const TCSETA: ::c_ulong = 0x80125402; +pub const TCSETAW: ::c_ulong = 0x80125403; +pub const TCSETAF: ::c_ulong = 0x80125404; +pub const TCSBRK: ::c_ulong = 0x20005405; +pub const TCXONC: ::c_ulong = 0x20005406; +pub const TCFLSH: ::c_ulong = 0x20005407; +pub const TIOCINQ: ::c_ulong = 0x4004667f; +pub const TIOCGPGRP: ::c_ulong = 0x40047483; +pub const TIOCSPGRP: ::c_ulong = 0x80047482; +pub const TIOCOUTQ: ::c_ulong = 0x40047473; +pub const TIOCGWINSZ: ::c_ulong = 0x40087468; +pub const TIOCSWINSZ: ::c_ulong = 0x80087467; +pub const FIONREAD: ::c_ulong = 0x4004667f; diff --git a/src/unix/notbsd/linux/other/mod.rs b/src/unix/notbsd/linux/other/mod.rs index 0a957d1fc7e8a..b26362bb7c3ef 100644 --- a/src/unix/notbsd/linux/other/mod.rs +++ b/src/unix/notbsd/linux/other/mod.rs @@ -42,14 +42,14 @@ s! { pub ut_host: [::c_char; __UT_HOSTSIZE], pub ut_exit: __exit_status, - #[cfg(any(target_arch = "aarch64", target_pointer_width = "32"))] + #[cfg(any(target_arch = "aarch64", target_arch = "sparc64", target_pointer_width = "32"))] pub ut_session: ::c_long, - #[cfg(any(target_arch = "aarch64", target_pointer_width = "32"))] + #[cfg(any(target_arch = "aarch64", target_arch = "sparc64", target_pointer_width = "32"))] pub ut_tv: ::timeval, - #[cfg(not(any(target_arch = "aarch64", target_pointer_width = "32")))] + #[cfg(not(any(target_arch = "aarch64", target_arch = "sparc64", target_pointer_width = "32")))] pub ut_session: ::int32_t, - #[cfg(not(any(target_arch = "aarch64", target_pointer_width = "32")))] + #[cfg(not(any(target_arch = "aarch64", target_arch = "sparc64", target_pointer_width = "32")))] pub ut_tv: __timeval, pub ut_addr_v6: [::int32_t; 4], @@ -59,6 +59,8 @@ s! { pub struct sigaction { pub sa_sigaction: ::sighandler_t, pub sa_mask: ::sigset_t, + #[cfg(target_arch = "sparc64")] + __reserved0: ::c_int, pub sa_flags: ::c_int, _restorer: *mut ::c_void, } @@ -135,7 +137,9 @@ s! { pub c_lflag: ::tcflag_t, pub c_line: ::cc_t, pub c_cc: [::cc_t; ::NCCS], + #[cfg(not(target_arch = "sparc64"))] pub c_ispeed: ::speed_t, + #[cfg(not(target_arch = "sparc64"))] pub c_ospeed: ::speed_t, } @@ -172,23 +176,56 @@ pub const DEAD_PROCESS: ::c_short = 8; pub const ACCOUNTING: ::c_short = 9; pub const RLIMIT_RSS: ::c_int = 5; +#[cfg(not(target_arch = "sparc64"))] pub const RLIMIT_NOFILE: ::c_int = 7; +#[cfg(target_arch = "sparc64")] +pub const RLIMIT_NOFILE: ::c_int = 6; pub const RLIMIT_AS: ::c_int = 9; +#[cfg(not(target_arch = "sparc64"))] pub const RLIMIT_NPROC: ::c_int = 6; +#[cfg(target_arch = "sparc64")] +pub const RLIMIT_NPROC: ::c_int = 7; pub const RLIMIT_MEMLOCK: ::c_int = 8; pub const RLIM_INFINITY: ::rlim_t = !0; pub const RLIMIT_RTTIME: ::c_int = 15; pub const RLIMIT_NLIMITS: ::c_int = 16; +#[cfg(not(target_arch = "sparc64"))] pub const O_APPEND: ::c_int = 1024; +#[cfg(target_arch = "sparc64")] +pub const O_APPEND: ::c_int = 0x8; +#[cfg(not(target_arch = "sparc64"))] pub const O_CREAT: ::c_int = 64; +#[cfg(target_arch = "sparc64")] +pub const O_CREAT: ::c_int = 0x200; +#[cfg(not(target_arch = "sparc64"))] pub const O_EXCL: ::c_int = 128; +#[cfg(target_arch = "sparc64")] +pub const O_EXCL: ::c_int = 0x800; +#[cfg(not(target_arch = "sparc64"))] pub const O_NOCTTY: ::c_int = 256; +#[cfg(target_arch = "sparc64")] +pub const O_NOCTTY: ::c_int = 0x8000; +#[cfg(not(target_arch = "sparc64"))] pub const O_NONBLOCK: ::c_int = 2048; +#[cfg(target_arch = "sparc64")] +pub const O_NONBLOCK: ::c_int = 0x4000; +#[cfg(not(target_arch = "sparc64"))] pub const O_SYNC: ::c_int = 1052672; +#[cfg(target_arch = "sparc64")] +pub const O_SYNC: ::c_int = 0x802000; +#[cfg(not(target_arch = "sparc64"))] pub const O_RSYNC: ::c_int = 1052672; +#[cfg(target_arch = "sparc64")] +pub const O_RSYNC: ::c_int = 0x802000; +#[cfg(not(target_arch = "sparc64"))] pub const O_DSYNC: ::c_int = 4096; +#[cfg(target_arch = "sparc64")] +pub const O_DSYNC: ::c_int = 0x2000; +#[cfg(not(target_arch = "sparc64"))] pub const O_FSYNC: ::c_int = 0x101000; +#[cfg(target_arch = "sparc64")] +pub const O_FSYNC: ::c_int = 0x802000; pub const SOCK_NONBLOCK: ::c_int = O_NONBLOCK; @@ -219,116 +256,392 @@ pub const LC_ALL_MASK: ::c_int = ::LC_CTYPE_MASK pub const MAP_ANON: ::c_int = 0x0020; pub const MAP_ANONYMOUS: ::c_int = 0x0020; +#[cfg(not(target_arch = "sparc64"))] pub const MAP_GROWSDOWN: ::c_int = 0x0100; +#[cfg(target_arch = "sparc64")] +pub const MAP_GROWSDOWN: ::c_int = 0x0200; pub const MAP_DENYWRITE: ::c_int = 0x0800; pub const MAP_EXECUTABLE: ::c_int = 0x01000; pub const MAP_POPULATE: ::c_int = 0x08000; pub const MAP_NONBLOCK: ::c_int = 0x010000; pub const MAP_STACK: ::c_int = 0x020000; +#[cfg(not(target_arch = "sparc64"))] pub const EDEADLK: ::c_int = 35; +#[cfg(target_arch = "sparc64")] +pub const EDEADLK: ::c_int = 78; +#[cfg(not(target_arch = "sparc64"))] pub const ENAMETOOLONG: ::c_int = 36; +#[cfg(target_arch = "sparc64")] +pub const ENAMETOOLONG: ::c_int = 63; +#[cfg(not(target_arch = "sparc64"))] pub const ENOLCK: ::c_int = 37; +#[cfg(target_arch = "sparc64")] +pub const ENOLCK: ::c_int = 79; +#[cfg(not(target_arch = "sparc64"))] pub const ENOSYS: ::c_int = 38; +#[cfg(target_arch = "sparc64")] +pub const ENOSYS: ::c_int = 90; +#[cfg(not(target_arch = "sparc64"))] pub const ENOTEMPTY: ::c_int = 39; +#[cfg(target_arch = "sparc64")] +pub const ENOTEMPTY: ::c_int = 66; +#[cfg(not(target_arch = "sparc64"))] pub const ELOOP: ::c_int = 40; +#[cfg(target_arch = "sparc64")] +pub const ELOOP: ::c_int = 62; +#[cfg(not(target_arch = "sparc64"))] pub const ENOMSG: ::c_int = 42; +#[cfg(target_arch = "sparc64")] +pub const ENOMSG: ::c_int = 75; +#[cfg(not(target_arch = "sparc64"))] pub const EIDRM: ::c_int = 43; +#[cfg(target_arch = "sparc64")] +pub const EIDRM: ::c_int = 77; +#[cfg(not(target_arch = "sparc64"))] pub const ECHRNG: ::c_int = 44; +#[cfg(target_arch = "sparc64")] +pub const ECHRNG: ::c_int = 94; +#[cfg(not(target_arch = "sparc64"))] pub const EL2NSYNC: ::c_int = 45; +#[cfg(target_arch = "sparc64")] +pub const EL2NSYNC: ::c_int = 95; +#[cfg(not(target_arch = "sparc64"))] pub const EL3HLT: ::c_int = 46; +#[cfg(target_arch = "sparc64")] +pub const EL3HLT: ::c_int = 96; +#[cfg(not(target_arch = "sparc64"))] pub const EL3RST: ::c_int = 47; +#[cfg(target_arch = "sparc64")] +pub const EL3RST: ::c_int = 97; +#[cfg(not(target_arch = "sparc64"))] pub const ELNRNG: ::c_int = 48; +#[cfg(target_arch = "sparc64")] +pub const ELNRNG: ::c_int = 98; +#[cfg(not(target_arch = "sparc64"))] pub const EUNATCH: ::c_int = 49; +#[cfg(target_arch = "sparc64")] +pub const EUNATCH: ::c_int = 99; +#[cfg(not(target_arch = "sparc64"))] pub const ENOCSI: ::c_int = 50; +#[cfg(target_arch = "sparc64")] +pub const ENOCSI: ::c_int = 100; +#[cfg(not(target_arch = "sparc64"))] pub const EL2HLT: ::c_int = 51; +#[cfg(target_arch = "sparc64")] +pub const EL2HLT: ::c_int = 101; +#[cfg(not(target_arch = "sparc64"))] pub const EBADE: ::c_int = 52; +#[cfg(target_arch = "sparc64")] +pub const EBADE: ::c_int = 102; +#[cfg(not(target_arch = "sparc64"))] pub const EBADR: ::c_int = 53; +#[cfg(target_arch = "sparc64")] +pub const EBADR: ::c_int = 103; +#[cfg(not(target_arch = "sparc64"))] pub const EXFULL: ::c_int = 54; +#[cfg(target_arch = "sparc64")] +pub const EXFULL: ::c_int = 104; +#[cfg(not(target_arch = "sparc64"))] pub const ENOANO: ::c_int = 55; +#[cfg(target_arch = "sparc64")] +pub const ENOANO: ::c_int = 105; +#[cfg(not(target_arch = "sparc64"))] pub const EBADRQC: ::c_int = 56; +#[cfg(target_arch = "sparc64")] +pub const EBADRQC: ::c_int = 106; +#[cfg(not(target_arch = "sparc64"))] pub const EBADSLT: ::c_int = 57; +#[cfg(target_arch = "sparc64")] +pub const EBADSLT: ::c_int = 107; +#[cfg(not(target_arch = "sparc64"))] pub const EMULTIHOP: ::c_int = 72; +#[cfg(target_arch = "sparc64")] +pub const EMULTIHOP: ::c_int = 87; +#[cfg(not(target_arch = "sparc64"))] pub const EOVERFLOW: ::c_int = 75; +#[cfg(target_arch = "sparc64")] +pub const EOVERFLOW: ::c_int = 92; +#[cfg(not(target_arch = "sparc64"))] pub const ENOTUNIQ: ::c_int = 76; +#[cfg(target_arch = "sparc64")] +pub const ENOTUNIQ: ::c_int = 115; +#[cfg(not(target_arch = "sparc64"))] pub const EBADFD: ::c_int = 77; +#[cfg(target_arch = "sparc64")] +pub const EBADFD: ::c_int = 93; +#[cfg(not(target_arch = "sparc64"))] pub const EBADMSG: ::c_int = 74; +#[cfg(target_arch = "sparc64")] +pub const EBADMSG: ::c_int = 76; +#[cfg(not(target_arch = "sparc64"))] pub const EREMCHG: ::c_int = 78; +#[cfg(target_arch = "sparc64")] +pub const EREMCHG: ::c_int = 89; +#[cfg(not(target_arch = "sparc64"))] pub const ELIBACC: ::c_int = 79; +#[cfg(target_arch = "sparc64")] +pub const ELIBACC: ::c_int = 114; +#[cfg(not(target_arch = "sparc64"))] pub const ELIBBAD: ::c_int = 80; +#[cfg(target_arch = "sparc64")] +pub const ELIBBAD: ::c_int = 112; +#[cfg(not(target_arch = "sparc64"))] pub const ELIBSCN: ::c_int = 81; +#[cfg(target_arch = "sparc64")] +pub const ELIBSCN: ::c_int = 124; +#[cfg(not(target_arch = "sparc64"))] pub const ELIBMAX: ::c_int = 82; +#[cfg(target_arch = "sparc64")] +pub const ELIBMAX: ::c_int = 123; +#[cfg(not(target_arch = "sparc64"))] pub const ELIBEXEC: ::c_int = 83; +#[cfg(target_arch = "sparc64")] +pub const ELIBEXEC: ::c_int = 110; +#[cfg(not(target_arch = "sparc64"))] pub const EILSEQ: ::c_int = 84; +#[cfg(target_arch = "sparc64")] +pub const EILSEQ: ::c_int = 122; +#[cfg(not(target_arch = "sparc64"))] pub const ERESTART: ::c_int = 85; +#[cfg(target_arch = "sparc64")] +pub const ERESTART: ::c_int = 116; +#[cfg(not(target_arch = "sparc64"))] pub const ESTRPIPE: ::c_int = 86; +#[cfg(target_arch = "sparc64")] +pub const ESTRPIPE: ::c_int = 91; +#[cfg(not(target_arch = "sparc64"))] pub const EUSERS: ::c_int = 87; +#[cfg(target_arch = "sparc64")] +pub const EUSERS: ::c_int = 68; +#[cfg(not(target_arch = "sparc64"))] pub const ENOTSOCK: ::c_int = 88; +#[cfg(target_arch = "sparc64")] +pub const ENOTSOCK: ::c_int = 38; +#[cfg(not(target_arch = "sparc64"))] pub const EDESTADDRREQ: ::c_int = 89; +#[cfg(target_arch = "sparc64")] +pub const EDESTADDRREQ: ::c_int = 39; +#[cfg(not(target_arch = "sparc64"))] pub const EMSGSIZE: ::c_int = 90; +#[cfg(target_arch = "sparc64")] +pub const EMSGSIZE: ::c_int = 40; +#[cfg(not(target_arch = "sparc64"))] pub const EPROTOTYPE: ::c_int = 91; +#[cfg(target_arch = "sparc64")] +pub const EPROTOTYPE: ::c_int = 41; +#[cfg(not(target_arch = "sparc64"))] pub const ENOPROTOOPT: ::c_int = 92; +#[cfg(target_arch = "sparc64")] +pub const ENOPROTOOPT: ::c_int = 42; +#[cfg(not(target_arch = "sparc64"))] pub const EPROTONOSUPPORT: ::c_int = 93; +#[cfg(target_arch = "sparc64")] +pub const EPROTONOSUPPORT: ::c_int = 43; +#[cfg(not(target_arch = "sparc64"))] pub const ESOCKTNOSUPPORT: ::c_int = 94; +#[cfg(target_arch = "sparc64")] +pub const ESOCKTNOSUPPORT: ::c_int = 44; +#[cfg(not(target_arch = "sparc64"))] pub const EOPNOTSUPP: ::c_int = 95; +#[cfg(target_arch = "sparc64")] +pub const EOPNOTSUPP: ::c_int = 45; pub const ENOTSUP: ::c_int = EOPNOTSUPP; +#[cfg(not(target_arch = "sparc64"))] pub const EPFNOSUPPORT: ::c_int = 96; +#[cfg(target_arch = "sparc64")] +pub const EPFNOSUPPORT: ::c_int = 46; +#[cfg(not(target_arch = "sparc64"))] pub const EAFNOSUPPORT: ::c_int = 97; +#[cfg(target_arch = "sparc64")] +pub const EAFNOSUPPORT: ::c_int = 47; +#[cfg(not(target_arch = "sparc64"))] pub const EADDRINUSE: ::c_int = 98; +#[cfg(target_arch = "sparc64")] +pub const EADDRINUSE: ::c_int = 48; +#[cfg(not(target_arch = "sparc64"))] pub const EADDRNOTAVAIL: ::c_int = 99; +#[cfg(target_arch = "sparc64")] +pub const EADDRNOTAVAIL: ::c_int = 49; +#[cfg(not(target_arch = "sparc64"))] pub const ENETDOWN: ::c_int = 100; +#[cfg(target_arch = "sparc64")] +pub const ENETDOWN: ::c_int = 50; +#[cfg(not(target_arch = "sparc64"))] pub const ENETUNREACH: ::c_int = 101; +#[cfg(target_arch = "sparc64")] +pub const ENETUNREACH: ::c_int = 51; +#[cfg(not(target_arch = "sparc64"))] pub const ENETRESET: ::c_int = 102; +#[cfg(target_arch = "sparc64")] +pub const ENETRESET: ::c_int = 52; +#[cfg(not(target_arch = "sparc64"))] pub const ECONNABORTED: ::c_int = 103; +#[cfg(target_arch = "sparc64")] +pub const ECONNABORTED: ::c_int = 53; +#[cfg(not(target_arch = "sparc64"))] pub const ECONNRESET: ::c_int = 104; +#[cfg(target_arch = "sparc64")] +pub const ECONNRESET: ::c_int = 54; +#[cfg(not(target_arch = "sparc64"))] pub const ENOBUFS: ::c_int = 105; +#[cfg(target_arch = "sparc64")] +pub const ENOBUFS: ::c_int = 55; +#[cfg(not(target_arch = "sparc64"))] pub const EISCONN: ::c_int = 106; +#[cfg(target_arch = "sparc64")] +pub const EISCONN: ::c_int = 56; +#[cfg(not(target_arch = "sparc64"))] pub const ENOTCONN: ::c_int = 107; +#[cfg(target_arch = "sparc64")] +pub const ENOTCONN: ::c_int = 57; +#[cfg(not(target_arch = "sparc64"))] pub const ESHUTDOWN: ::c_int = 108; +#[cfg(target_arch = "sparc64")] +pub const ESHUTDOWN: ::c_int = 58; +#[cfg(not(target_arch = "sparc64"))] pub const ETOOMANYREFS: ::c_int = 109; +#[cfg(target_arch = "sparc64")] +pub const ETOOMANYREFS: ::c_int = 59; +#[cfg(not(target_arch = "sparc64"))] pub const ETIMEDOUT: ::c_int = 110; +#[cfg(target_arch = "sparc64")] +pub const ETIMEDOUT: ::c_int = 60; +#[cfg(not(target_arch = "sparc64"))] pub const ECONNREFUSED: ::c_int = 111; +#[cfg(target_arch = "sparc64")] +pub const ECONNREFUSED: ::c_int = 61; +#[cfg(not(target_arch = "sparc64"))] pub const EHOSTDOWN: ::c_int = 112; +#[cfg(target_arch = "sparc64")] +pub const EHOSTDOWN: ::c_int = 64; +#[cfg(not(target_arch = "sparc64"))] pub const EHOSTUNREACH: ::c_int = 113; +#[cfg(target_arch = "sparc64")] +pub const EHOSTUNREACH: ::c_int = 65; +#[cfg(not(target_arch = "sparc64"))] pub const EALREADY: ::c_int = 114; +#[cfg(target_arch = "sparc64")] +pub const EALREADY: ::c_int = 37; +#[cfg(not(target_arch = "sparc64"))] pub const EINPROGRESS: ::c_int = 115; +#[cfg(target_arch = "sparc64")] +pub const EINPROGRESS: ::c_int = 36; +#[cfg(not(target_arch = "sparc64"))] pub const ESTALE: ::c_int = 116; +#[cfg(target_arch = "sparc64")] +pub const ESTALE: ::c_int = 70; pub const EUCLEAN: ::c_int = 117; pub const ENOTNAM: ::c_int = 118; pub const ENAVAIL: ::c_int = 119; pub const EISNAM: ::c_int = 120; pub const EREMOTEIO: ::c_int = 121; +#[cfg(not(target_arch = "sparc64"))] pub const EDQUOT: ::c_int = 122; +#[cfg(target_arch = "sparc64")] +pub const EDQUOT: ::c_int = 69; +#[cfg(not(target_arch = "sparc64"))] pub const ENOMEDIUM: ::c_int = 123; +#[cfg(target_arch = "sparc64")] +pub const ENOMEDIUM: ::c_int = 125; +#[cfg(not(target_arch = "sparc64"))] pub const EMEDIUMTYPE: ::c_int = 124; +#[cfg(target_arch = "sparc64")] +pub const EMEDIUMTYPE: ::c_int = 126; +#[cfg(not(target_arch = "sparc64"))] pub const ECANCELED: ::c_int = 125; +#[cfg(target_arch = "sparc64")] +pub const ECANCELED: ::c_int = 127; +#[cfg(not(target_arch = "sparc64"))] pub const ENOKEY: ::c_int = 126; +#[cfg(target_arch = "sparc64")] +pub const ENOKEY: ::c_int = 128; +#[cfg(not(target_arch = "sparc64"))] pub const EKEYEXPIRED: ::c_int = 127; +#[cfg(target_arch = "sparc64")] +pub const EKEYEXPIRED: ::c_int = 129; +#[cfg(not(target_arch = "sparc64"))] pub const EKEYREVOKED: ::c_int = 128; +#[cfg(target_arch = "sparc64")] +pub const EKEYREVOKED: ::c_int = 130; +#[cfg(not(target_arch = "sparc64"))] pub const EKEYREJECTED: ::c_int = 129; +#[cfg(target_arch = "sparc64")] +pub const EKEYREJECTED: ::c_int = 131; +#[cfg(not(target_arch = "sparc64"))] pub const EOWNERDEAD: ::c_int = 130; +#[cfg(target_arch = "sparc64")] +pub const EOWNERDEAD: ::c_int = 132; +#[cfg(not(target_arch = "sparc64"))] pub const ENOTRECOVERABLE: ::c_int = 131; +#[cfg(target_arch = "sparc64")] +pub const ENOTRECOVERABLE: ::c_int = 133; +#[cfg(not(target_arch = "sparc64"))] pub const EHWPOISON: ::c_int = 133; +#[cfg(target_arch = "sparc64")] +pub const EHWPOISON: ::c_int = 135; +#[cfg(not(target_arch = "sparc64"))] pub const ERFKILL: ::c_int = 132; +#[cfg(target_arch = "sparc64")] +pub const ERFKILL: ::c_int = 134; pub const SOCK_STREAM: ::c_int = 1; pub const SOCK_DGRAM: ::c_int = 2; pub const SOCK_SEQPACKET: ::c_int = 5; +#[cfg(not(target_arch = "sparc64"))] pub const SOL_SOCKET: ::c_int = 1; +#[cfg(target_arch = "sparc64")] +pub const SOL_SOCKET: ::c_int = 0xffff; +#[cfg(not(target_arch = "sparc64"))] pub const SO_REUSEADDR: ::c_int = 2; +#[cfg(target_arch = "sparc64")] +pub const SO_REUSEADDR: ::c_int = 4; +#[cfg(not(target_arch = "sparc64"))] pub const SO_TYPE: ::c_int = 3; +#[cfg(target_arch = "sparc64")] +pub const SO_TYPE: ::c_int = 0x1008; +#[cfg(not(target_arch = "sparc64"))] pub const SO_ERROR: ::c_int = 4; +#[cfg(target_arch = "sparc64")] +pub const SO_ERROR: ::c_int = 0x1007; +#[cfg(not(target_arch = "sparc64"))] pub const SO_DONTROUTE: ::c_int = 5; +#[cfg(target_arch = "sparc64")] +pub const SO_DONTROUTE: ::c_int = 16; +#[cfg(not(target_arch = "sparc64"))] pub const SO_BROADCAST: ::c_int = 6; +#[cfg(target_arch = "sparc64")] +pub const SO_BROADCAST: ::c_int = 32; +#[cfg(not(target_arch = "sparc64"))] pub const SO_SNDBUF: ::c_int = 7; +#[cfg(target_arch = "sparc64")] +pub const SO_SNDBUF: ::c_int = 0x1001; +#[cfg(not(target_arch = "sparc64"))] pub const SO_RCVBUF: ::c_int = 8; +#[cfg(target_arch = "sparc64")] +pub const SO_RCVBUF: ::c_int = 0x1002; +#[cfg(not(target_arch = "sparc64"))] pub const SO_KEEPALIVE: ::c_int = 9; +#[cfg(target_arch = "sparc64")] +pub const SO_KEEPALIVE: ::c_int = 8; +#[cfg(not(target_arch = "sparc64"))] pub const SO_OOBINLINE: ::c_int = 10; +#[cfg(target_arch = "sparc64")] +pub const SO_OOBINLINE: ::c_int = 0x100; +#[cfg(not(target_arch = "sparc64"))] pub const SO_LINGER: ::c_int = 13; +#[cfg(target_arch = "sparc64")] +pub const SO_LINGER: ::c_int = 128; +#[cfg(not(target_arch = "sparc64"))] pub const SO_REUSEPORT: ::c_int = 15; +#[cfg(target_arch = "sparc64")] +pub const SO_REUSEPORT: ::c_int = 0x200; +#[cfg(not(target_arch = "sparc64"))] pub const SO_ACCEPTCONN: ::c_int = 30; +#[cfg(target_arch = "sparc64")] +pub const SO_ACCEPTCONN: ::c_int = 0x8000; pub const TCP_COOKIE_TRANSACTIONS: ::c_int = 15; pub const TCP_THIN_LINEAR_TIMEOUTS: ::c_int = 16; @@ -341,21 +654,62 @@ pub const TCP_REPAIR_OPTIONS: ::c_int = 22; pub const TCP_FASTOPEN: ::c_int = 23; pub const TCP_TIMESTAMP: ::c_int = 24; +#[cfg(not(target_arch = "sparc64"))] pub const SA_ONSTACK: ::c_int = 0x08000000; +#[cfg(target_arch = "sparc64")] +pub const SA_ONSTACK: ::c_int = 1; +#[cfg(not(target_arch = "sparc64"))] pub const SA_SIGINFO: ::c_int = 0x00000004; +#[cfg(target_arch = "sparc64")] +pub const SA_SIGINFO: ::c_int = 0x200; +#[cfg(not(target_arch = "sparc64"))] pub const SA_NOCLDWAIT: ::c_int = 0x00000002; +#[cfg(target_arch = "sparc64")] +pub const SA_NOCLDWAIT: ::c_int = 0x100; +#[cfg(not(target_arch = "sparc64"))] pub const SIGCHLD: ::c_int = 17; +#[cfg(target_arch = "sparc64")] +pub const SIGCHLD: ::c_int = 20; +#[cfg(not(target_arch = "sparc64"))] pub const SIGBUS: ::c_int = 7; +#[cfg(target_arch = "sparc64")] +pub const SIGBUS: ::c_int = 10; +#[cfg(not(target_arch = "sparc64"))] pub const SIGUSR1: ::c_int = 10; +#[cfg(target_arch = "sparc64")] +pub const SIGUSR1: ::c_int = 30; +#[cfg(not(target_arch = "sparc64"))] pub const SIGUSR2: ::c_int = 12; +#[cfg(target_arch = "sparc64")] +pub const SIGUSR2: ::c_int = 31; +#[cfg(not(target_arch = "sparc64"))] pub const SIGCONT: ::c_int = 18; +#[cfg(target_arch = "sparc64")] +pub const SIGCONT: ::c_int = 19; +#[cfg(not(target_arch = "sparc64"))] pub const SIGSTOP: ::c_int = 19; +#[cfg(target_arch = "sparc64")] +pub const SIGSTOP: ::c_int = 17; +#[cfg(not(target_arch = "sparc64"))] pub const SIGTSTP: ::c_int = 20; +#[cfg(target_arch = "sparc64")] +pub const SIGTSTP: ::c_int = 18; +#[cfg(not(target_arch = "sparc64"))] pub const SIGURG: ::c_int = 23; +#[cfg(target_arch = "sparc64")] +pub const SIGURG: ::c_int = 16; +#[cfg(not(target_arch = "sparc64"))] pub const SIGIO: ::c_int = 29; +#[cfg(target_arch = "sparc64")] +pub const SIGIO: ::c_int = 23; +#[cfg(not(target_arch = "sparc64"))] pub const SIGSYS: ::c_int = 31; +#[cfg(target_arch = "sparc64")] +pub const SIGSYS: ::c_int = 12; +#[cfg(not(target_arch = "sparc64"))] pub const SIGSTKFLT: ::c_int = 16; +#[cfg(not(target_arch = "sparc64"))] pub const SIGUNUSED: ::c_int = 31; pub const SIGTTIN: ::c_int = 21; pub const SIGTTOU: ::c_int = 22; @@ -364,18 +718,39 @@ pub const SIGXFSZ: ::c_int = 25; pub const SIGVTALRM: ::c_int = 26; pub const SIGPROF: ::c_int = 27; pub const SIGWINCH: ::c_int = 28; +#[cfg(not(target_arch = "sparc64"))] pub const SIGPOLL: ::c_int = 29; +#[cfg(target_arch = "sparc64")] +pub const SIGPOLL: ::c_int = 23; +#[cfg(not(target_arch = "sparc64"))] pub const SIGPWR: ::c_int = 30; +#[cfg(target_arch = "sparc64")] +pub const SIGPWR: ::c_int = 29; +#[cfg(not(target_arch = "sparc64"))] pub const SIG_SETMASK: ::c_int = 2; +#[cfg(target_arch = "sparc64")] +pub const SIG_SETMASK: ::c_int = 4; +#[cfg(not(target_arch = "sparc64"))] pub const SIG_BLOCK: ::c_int = 0x000000; +#[cfg(target_arch = "sparc64")] +pub const SIG_BLOCK: ::c_int = 1; +#[cfg(not(target_arch = "sparc64"))] pub const SIG_UNBLOCK: ::c_int = 0x01; +#[cfg(target_arch = "sparc64")] +pub const SIG_UNBLOCK: ::c_int = 2; pub const SIGEV_THREAD_ID: ::c_int = 4; pub const POLLRDNORM: ::c_short = 0x040; +#[cfg(not(target_arch = "sparc64"))] pub const POLLWRNORM: ::c_short = 0x100; +#[cfg(target_arch = "sparc64")] +pub const POLLWRNORM: ::c_short = 4; pub const POLLRDBAND: ::c_short = 0x080; +#[cfg(not(target_arch = "sparc64"))] pub const POLLWRBAND: ::c_short = 0x200; +#[cfg(target_arch = "sparc64")] +pub const POLLWRBAND: ::c_short = 0x100; pub const FALLOC_FL_KEEP_SIZE: ::c_int = 0x01; pub const FALLOC_FL_PUNCH_HOLE: ::c_int = 0x02; @@ -388,8 +763,14 @@ pub const POSIX_FADV_NOREUSE: ::c_int = 5; pub const POSIX_MADV_DONTNEED: ::c_int = 4; pub const _SC_2_C_VERSION: ::c_int = 96; pub const O_ACCMODE: ::c_int = 3; +#[cfg(not(target_arch = "sparc64"))] pub const O_ASYNC: ::c_int = 0x2000; +#[cfg(target_arch = "sparc64")] +pub const O_ASYNC: ::c_int = 0x40; +#[cfg(not(target_arch = "sparc64"))] pub const O_NDELAY: ::c_int = 0x800; +#[cfg(target_arch = "sparc64")] +pub const O_NDELAY: ::c_int = 0x4004; pub const ST_RELATIME: ::c_ulong = 4096; pub const NI_MAXHOST: ::socklen_t = 1025; @@ -438,7 +819,10 @@ pub const PTRACE_CONT: ::c_uint = 7; pub const PTRACE_KILL: ::c_uint = 8; pub const PTRACE_SINGLESTEP: ::c_uint = 9; pub const PTRACE_ATTACH: ::c_uint = 16; +#[cfg(not(target_arch = "sparc64"))] pub const PTRACE_DETACH: ::c_uint = 17; +#[cfg(target_arch = "sparc64")] +pub const PTRACE_DETACH: ::c_uint = 11; pub const PTRACE_SYSCALL: ::c_uint = 24; pub const PTRACE_SETOPTIONS: ::c_uint = 0x4200; pub const PTRACE_GETEVENTMSG: ::c_uint = 0x4201; @@ -460,36 +844,84 @@ pub const MADV_HUGEPAGE: ::c_int = 14; pub const MADV_NOHUGEPAGE: ::c_int = 15; pub const MAP_HUGETLB: ::c_int = 0x040000; +#[cfg(not(target_arch = "sparc64"))] pub const EFD_NONBLOCK: ::c_int = 0x800; +#[cfg(target_arch = "sparc64")] +pub const EFD_NONBLOCK: ::c_int = 0x4000; +#[cfg(not(target_arch = "sparc64"))] pub const F_GETLK: ::c_int = 5; +#[cfg(target_arch = "sparc64")] +pub const F_GETLK: ::c_int = 7; +#[cfg(not(target_arch = "sparc64"))] pub const F_GETOWN: ::c_int = 9; +#[cfg(target_arch = "sparc64")] +pub const F_GETOWN: ::c_int = 5; +#[cfg(not(target_arch = "sparc64"))] pub const F_SETOWN: ::c_int = 8; +#[cfg(target_arch = "sparc64")] +pub const F_SETOWN: ::c_int = 6; +#[cfg(not(target_arch = "sparc64"))] pub const F_SETLK: ::c_int = 6; +#[cfg(target_arch = "sparc64")] +pub const F_SETLK: ::c_int = 8; +#[cfg(not(target_arch = "sparc64"))] pub const F_SETLKW: ::c_int = 7; +#[cfg(target_arch = "sparc64")] +pub const F_SETLKW: ::c_int = 9; pub const SEEK_DATA: ::c_int = 3; pub const SEEK_HOLE: ::c_int = 4; +#[cfg(not(target_arch = "sparc64"))] pub const SFD_NONBLOCK: ::c_int = 0x0800; +#[cfg(target_arch = "sparc64")] +pub const SFD_NONBLOCK: ::c_int = 0x4000; pub const TCSANOW: ::c_int = 0; pub const TCSADRAIN: ::c_int = 1; pub const TCSAFLUSH: ::c_int = 2; -pub const TIOCGSOFTCAR: ::c_ulong = 0x5419; -pub const TIOCSSOFTCAR: ::c_ulong = 0x541A; +pub const TIOCGSOFTCAR: ::c_ulong = 0x40047464; +pub const TIOCSSOFTCAR: ::c_ulong = 0x80047465; pub const TIOCLINUX: ::c_ulong = 0x541C; pub const TIOCGSERIAL: ::c_ulong = 0x541E; +#[cfg(not(target_arch = "sparc64"))] pub const TIOCEXCL: ::c_ulong = 0x540C; +#[cfg(target_arch = "sparc64")] +pub const TIOCEXCL: ::c_ulong = 0x2000740d; +#[cfg(not(target_arch = "sparc64"))] pub const TIOCNXCL: ::c_ulong = 0x540D; +#[cfg(target_arch = "sparc64")] +pub const TIOCNXCL: ::c_ulong = 0x2000740e; +#[cfg(not(target_arch = "sparc64"))] pub const TIOCSCTTY: ::c_ulong = 0x540E; +#[cfg(target_arch = "sparc64")] +pub const TIOCSCTTY: ::c_ulong = 0x20007484; +#[cfg(not(target_arch = "sparc64"))] pub const TIOCSTI: ::c_ulong = 0x5412; +#[cfg(target_arch = "sparc64")] +pub const TIOCSTI: ::c_ulong = 0x80017472; +#[cfg(not(target_arch = "sparc64"))] pub const TIOCMGET: ::c_ulong = 0x5415; +#[cfg(target_arch = "sparc64")] +pub const TIOCMGET: ::c_ulong = 0x4004746a; +#[cfg(not(target_arch = "sparc64"))] pub const TIOCMBIS: ::c_ulong = 0x5416; +#[cfg(target_arch = "sparc64")] +pub const TIOCMBIS: ::c_ulong = 0x8004746c; +#[cfg(not(target_arch = "sparc64"))] pub const TIOCMBIC: ::c_ulong = 0x5417; +#[cfg(target_arch = "sparc64")] +pub const TIOCMBIC: ::c_ulong = 0x8004746b; +#[cfg(not(target_arch = "sparc64"))] pub const TIOCMSET: ::c_ulong = 0x5418; +#[cfg(target_arch = "sparc64")] +pub const TIOCMSET: ::c_ulong = 0x8004746d; +#[cfg(not(target_arch = "sparc64"))] pub const TIOCCONS: ::c_ulong = 0x541D; +#[cfg(target_arch = "sparc64")] +pub const TIOCCONS: ::c_ulong = 0x20007424; pub const RTLD_DEEPBIND: ::c_int = 0x8; pub const RTLD_GLOBAL: ::c_int = 0x100; @@ -577,6 +1009,8 @@ cfg_if! { if #[cfg(any(target_arch = "arm", target_arch = "x86", target_arch = "x86_64"))] { pub const PTHREAD_STACK_MIN: ::size_t = 16384; + } else if #[cfg(target_arch = "sparc64")] { + pub const PTHREAD_STACK_MIN: ::size_t = 0x6000; } else { pub const PTHREAD_STACK_MIN: ::size_t = 131072; } @@ -639,7 +1073,8 @@ cfg_if! { pub use self::b32::*; } else if #[cfg(any(target_arch = "x86_64", target_arch = "aarch64", - target_arch = "powerpc64"))] { + target_arch = "powerpc64", + target_arch = "sparc64"))] { mod b64; pub use self::b64::*; } else { diff --git a/src/unix/notbsd/mod.rs b/src/unix/notbsd/mod.rs index f08081485518b..b78e13c01464f 100644 --- a/src/unix/notbsd/mod.rs +++ b/src/unix/notbsd/mod.rs @@ -253,8 +253,14 @@ pub const RUSAGE_SELF: ::c_int = 0; pub const O_RDONLY: ::c_int = 0; pub const O_WRONLY: ::c_int = 1; pub const O_RDWR: ::c_int = 2; +#[cfg(not(all(target_arch = "sparc64", target_os = "linux")))] pub const O_TRUNC: ::c_int = 512; +#[cfg(all(target_arch = "sparc64", target_os = "linux"))] +pub const O_TRUNC: ::c_int = 0x400; +#[cfg(not(all(target_arch = "sparc64", target_os = "linux")))] pub const O_CLOEXEC: ::c_int = 0x80000; +#[cfg(all(target_arch = "sparc64", target_os = "linux"))] +pub const O_CLOEXEC: ::c_int = 0x400000; pub const SOCK_CLOEXEC: ::c_int = O_CLOEXEC; @@ -395,20 +401,62 @@ pub const EDOM: ::c_int = 33; pub const ERANGE: ::c_int = 34; pub const EWOULDBLOCK: ::c_int = EAGAIN; +#[cfg(not(all(target_arch = "sparc64", target_os = "linux")))] pub const EBFONT: ::c_int = 59; +#[cfg(all(target_arch = "sparc64", target_os = "linux"))] +pub const EBFONT: ::c_int = 109; +#[cfg(not(all(target_arch = "sparc64", target_os = "linux")))] pub const ENOSTR: ::c_int = 60; +#[cfg(all(target_arch = "sparc64", target_os = "linux"))] +pub const ENOSTR: ::c_int = 72; +#[cfg(not(all(target_arch = "sparc64", target_os = "linux")))] pub const ENODATA: ::c_int = 61; +#[cfg(all(target_arch = "sparc64", target_os = "linux"))] +pub const ENODATA: ::c_int = 111; +#[cfg(not(all(target_arch = "sparc64", target_os = "linux")))] pub const ETIME: ::c_int = 62; +#[cfg(all(target_arch = "sparc64", target_os = "linux"))] +pub const ETIME: ::c_int = 73; +#[cfg(not(all(target_arch = "sparc64", target_os = "linux")))] pub const ENOSR: ::c_int = 63; +#[cfg(all(target_arch = "sparc64", target_os = "linux"))] +pub const ENOSR: ::c_int = 74; +#[cfg(not(all(target_arch = "sparc64", target_os = "linux")))] pub const ENONET: ::c_int = 64; +#[cfg(all(target_arch = "sparc64", target_os = "linux"))] +pub const ENONET: ::c_int = 80; +#[cfg(not(all(target_arch = "sparc64", target_os = "linux")))] pub const ENOPKG: ::c_int = 65; +#[cfg(all(target_arch = "sparc64", target_os = "linux"))] +pub const ENOPKG: ::c_int = 113; +#[cfg(not(all(target_arch = "sparc64", target_os = "linux")))] pub const EREMOTE: ::c_int = 66; +#[cfg(all(target_arch = "sparc64", target_os = "linux"))] +pub const EREMOTE: ::c_int = 71; +#[cfg(not(all(target_arch = "sparc64", target_os = "linux")))] pub const ENOLINK: ::c_int = 67; +#[cfg(all(target_arch = "sparc64", target_os = "linux"))] +pub const ENOLINK: ::c_int = 82; +#[cfg(not(all(target_arch = "sparc64", target_os = "linux")))] pub const EADV: ::c_int = 68; +#[cfg(all(target_arch = "sparc64", target_os = "linux"))] +pub const EADV: ::c_int = 83; +#[cfg(not(all(target_arch = "sparc64", target_os = "linux")))] pub const ESRMNT: ::c_int = 69; +#[cfg(all(target_arch = "sparc64", target_os = "linux"))] +pub const ESRMNT: ::c_int = 84; +#[cfg(not(all(target_arch = "sparc64", target_os = "linux")))] pub const ECOMM: ::c_int = 70; +#[cfg(all(target_arch = "sparc64", target_os = "linux"))] +pub const ECOMM: ::c_int = 85; +#[cfg(not(all(target_arch = "sparc64", target_os = "linux")))] pub const EPROTO: ::c_int = 71; +#[cfg(all(target_arch = "sparc64", target_os = "linux"))] +pub const EPROTO: ::c_int = 86; +#[cfg(not(all(target_arch = "sparc64", target_os = "linux")))] pub const EDOTDOT: ::c_int = 73; +#[cfg(all(target_arch = "sparc64", target_os = "linux"))] +pub const EDOTDOT: ::c_int = 88; pub const AF_PACKET: ::c_int = 17; pub const IPPROTO_RAW: ::c_int = 255; @@ -496,10 +544,22 @@ pub const LOCK_EX: ::c_int = 2; pub const LOCK_NB: ::c_int = 4; pub const LOCK_UN: ::c_int = 8; +#[cfg(not(all(target_arch = "sparc64", target_os = "linux")))] pub const SA_NODEFER: ::c_int = 0x40000000; +#[cfg(all(target_arch = "sparc64", target_os = "linux"))] +pub const SA_NODEFER: ::c_int = 0x20; +#[cfg(not(all(target_arch = "sparc64", target_os = "linux")))] pub const SA_RESETHAND: ::c_int = 0x80000000; +#[cfg(all(target_arch = "sparc64", target_os = "linux"))] +pub const SA_RESETHAND: ::c_int = 0x4; +#[cfg(not(all(target_arch = "sparc64", target_os = "linux")))] pub const SA_RESTART: ::c_int = 0x10000000; +#[cfg(all(target_arch = "sparc64", target_os = "linux"))] +pub const SA_RESTART: ::c_int = 0x2; +#[cfg(not(all(target_arch = "sparc64", target_os = "linux")))] pub const SA_NOCLDSTOP: ::c_int = 0x00000001; +#[cfg(all(target_arch = "sparc64", target_os = "linux"))] +pub const SA_NOCLDSTOP: ::c_int = 0x00000008; pub const SS_ONSTACK: ::c_int = 1; pub const SS_DISABLE: ::c_int = 2; @@ -524,7 +584,10 @@ pub const EPOLL_CTL_ADD: ::c_int = 1; pub const EPOLL_CTL_MOD: ::c_int = 3; pub const EPOLL_CTL_DEL: ::c_int = 2; +#[cfg(not(all(target_arch = "sparc64", target_os = "linux")))] pub const EPOLL_CLOEXEC: ::c_int = 0x80000; +#[cfg(all(target_arch = "sparc64", target_os = "linux"))] +pub const EPOLL_CLOEXEC: ::c_int = 0x400000; pub const MNT_DETACH: ::c_int = 0x2; pub const MNT_EXPIRE: ::c_int = 0x4; @@ -543,7 +606,10 @@ pub const QIF_USAGE: ::uint32_t = 10; pub const QIF_TIMES: ::uint32_t = 48; pub const QIF_ALL: ::uint32_t = 63; +#[cfg(not(all(target_arch = "sparc64", target_os = "linux")))] pub const EFD_CLOEXEC: ::c_int = 0x80000; +#[cfg(all(target_arch = "sparc64", target_os = "linux"))] +pub const EFD_CLOEXEC: ::c_int = 0x400000; pub const MNT_FORCE: ::c_int = 0x1; From 540d140af813e3d1bb742a91d20e591fdb44408d Mon Sep 17 00:00:00 2001 From: Jorge Aparicio Date: Sat, 31 Dec 2016 16:40:13 -0500 Subject: [PATCH 2/3] less cfg, way more code --- src/unix/notbsd/android/mod.rs | 29 +- src/unix/notbsd/linux/mips/mod.rs | 34 ++ src/unix/notbsd/linux/mod.rs | 13 - src/unix/notbsd/linux/musl/mod.rs | 34 ++ src/unix/notbsd/linux/other/b32/mod.rs | 192 ++++++ src/unix/notbsd/linux/other/b64/aarch64.rs | 194 +++++++ src/unix/notbsd/linux/other/b64/mod.rs | 4 - src/unix/notbsd/linux/other/b64/powerpc64.rs | 194 +++++++ src/unix/notbsd/linux/other/b64/sparc64.rs | 188 ++++++ src/unix/notbsd/linux/other/b64/x86_64.rs | 194 +++++++ src/unix/notbsd/linux/other/mod.rs | 579 ------------------- src/unix/notbsd/linux/s390x.rs | 34 ++ src/unix/notbsd/mod.rs | 92 --- 13 files changed, 1092 insertions(+), 689 deletions(-) diff --git a/src/unix/notbsd/android/mod.rs b/src/unix/notbsd/android/mod.rs index ede8ca47be4ed..8a1b565d620fe 100644 --- a/src/unix/notbsd/android/mod.rs +++ b/src/unix/notbsd/android/mod.rs @@ -137,6 +137,34 @@ s! { } } +pub const O_TRUNC: ::c_int = 512; + +pub const O_CLOEXEC: ::c_int = 0x80000; + +pub const EBFONT: ::c_int = 59; +pub const ENOSTR: ::c_int = 60; +pub const ENODATA: ::c_int = 61; +pub const ETIME: ::c_int = 62; +pub const ENOSR: ::c_int = 63; +pub const ENONET: ::c_int = 64; +pub const ENOPKG: ::c_int = 65; +pub const EREMOTE: ::c_int = 66; +pub const ENOLINK: ::c_int = 67; +pub const EADV: ::c_int = 68; +pub const ESRMNT: ::c_int = 69; +pub const ECOMM: ::c_int = 70; +pub const EPROTO: ::c_int = 71; +pub const EDOTDOT: ::c_int = 73; + +pub const SA_NODEFER: ::c_int = 0x40000000; +pub const SA_RESETHAND: ::c_int = 0x80000000; +pub const SA_RESTART: ::c_int = 0x10000000; +pub const SA_NOCLDSTOP: ::c_int = 0x00000001; + +pub const EPOLL_CLOEXEC: ::c_int = 0x80000; + +pub const EFD_CLOEXEC: ::c_int = 0x80000; + pub const USER_PROCESS: ::c_short = 7; pub const BUFSIZ: ::c_uint = 1024; @@ -227,7 +255,6 @@ pub const FIOCLEX: ::c_int = 0x5451; pub const SA_ONSTACK: ::c_ulong = 0x08000000; pub const SA_SIGINFO: ::c_ulong = 0x00000004; pub const SA_NOCLDWAIT: ::c_ulong = 0x00000002; - pub const SIGCHLD: ::c_int = 17; pub const SIGBUS: ::c_int = 7; pub const SIGUSR1: ::c_int = 10; diff --git a/src/unix/notbsd/linux/mips/mod.rs b/src/unix/notbsd/linux/mips/mod.rs index 7952e3a40d70e..48e773088e798 100644 --- a/src/unix/notbsd/linux/mips/mod.rs +++ b/src/unix/notbsd/linux/mips/mod.rs @@ -1,3 +1,37 @@ +pub const CLONE_NEWCGROUP: ::c_int = 0x02000000; + +pub const SFD_CLOEXEC: ::c_int = 0x080000; + +pub const NCCS: usize = 32; + +pub const O_TRUNC: ::c_int = 512; + +pub const O_CLOEXEC: ::c_int = 0x80000; + +pub const EBFONT: ::c_int = 59; +pub const ENOSTR: ::c_int = 60; +pub const ENODATA: ::c_int = 61; +pub const ETIME: ::c_int = 62; +pub const ENOSR: ::c_int = 63; +pub const ENONET: ::c_int = 64; +pub const ENOPKG: ::c_int = 65; +pub const EREMOTE: ::c_int = 66; +pub const ENOLINK: ::c_int = 67; +pub const EADV: ::c_int = 68; +pub const ESRMNT: ::c_int = 69; +pub const ECOMM: ::c_int = 70; +pub const EPROTO: ::c_int = 71; +pub const EDOTDOT: ::c_int = 73; + +pub const SA_NODEFER: ::c_int = 0x40000000; +pub const SA_RESETHAND: ::c_int = 0x80000000; +pub const SA_RESTART: ::c_int = 0x10000000; +pub const SA_NOCLDSTOP: ::c_int = 0x00000001; + +pub const EPOLL_CLOEXEC: ::c_int = 0x80000; + +pub const EFD_CLOEXEC: ::c_int = 0x80000; + pub const BUFSIZ: ::c_uint = 8192; pub const TMP_MAX: ::c_uint = 238328; pub const FOPEN_MAX: ::c_uint = 16; diff --git a/src/unix/notbsd/linux/mod.rs b/src/unix/notbsd/linux/mod.rs index cf013b043d172..cf91b05c4f544 100644 --- a/src/unix/notbsd/linux/mod.rs +++ b/src/unix/notbsd/linux/mod.rs @@ -250,9 +250,6 @@ pub const ABMON_10: ::nl_item = 0x20017; pub const ABMON_11: ::nl_item = 0x20018; pub const ABMON_12: ::nl_item = 0x20019; -#[cfg(not(target_arch = "sparc64"))] -pub const CLONE_NEWCGROUP: ::c_int = 0x02000000; - pub const MON_1: ::nl_item = 0x2001A; pub const MON_2: ::nl_item = 0x2001B; pub const MON_3: ::nl_item = 0x2001C; @@ -503,18 +500,8 @@ pub const EPOLLONESHOT: ::c_int = 0x40000000; pub const QFMT_VFS_OLD: ::c_int = 1; pub const QFMT_VFS_V0: ::c_int = 2; -#[cfg(not(target_arch = "sparc64"))] -pub const SFD_CLOEXEC: ::c_int = 0x080000; -#[cfg(target_arch = "sparc64")] -pub const SFD_CLOEXEC: ::c_int = 0x400000; - pub const EFD_SEMAPHORE: ::c_int = 0x1; -#[cfg(not(target_arch = "sparc64"))] -pub const NCCS: usize = 32; -#[cfg(target_arch = "sparc64")] -pub const NCCS: usize = 17; - pub const LOG_NFACILITIES: ::c_int = 24; pub const SEM_FAILED: *mut ::sem_t = 0 as *mut sem_t; diff --git a/src/unix/notbsd/linux/musl/mod.rs b/src/unix/notbsd/linux/musl/mod.rs index e80850608e45d..ff8e59b08aeb5 100644 --- a/src/unix/notbsd/linux/musl/mod.rs +++ b/src/unix/notbsd/linux/musl/mod.rs @@ -87,6 +87,40 @@ s! { } } +pub const CLONE_NEWCGROUP: ::c_int = 0x02000000; + +pub const SFD_CLOEXEC: ::c_int = 0x080000; + +pub const NCCS: usize = 32; + +pub const O_TRUNC: ::c_int = 512; + +pub const O_CLOEXEC: ::c_int = 0x80000; + +pub const EBFONT: ::c_int = 59; +pub const ENOSTR: ::c_int = 60; +pub const ENODATA: ::c_int = 61; +pub const ETIME: ::c_int = 62; +pub const ENOSR: ::c_int = 63; +pub const ENONET: ::c_int = 64; +pub const ENOPKG: ::c_int = 65; +pub const EREMOTE: ::c_int = 66; +pub const ENOLINK: ::c_int = 67; +pub const EADV: ::c_int = 68; +pub const ESRMNT: ::c_int = 69; +pub const ECOMM: ::c_int = 70; +pub const EPROTO: ::c_int = 71; +pub const EDOTDOT: ::c_int = 73; + +pub const SA_NODEFER: ::c_int = 0x40000000; +pub const SA_RESETHAND: ::c_int = 0x80000000; +pub const SA_RESTART: ::c_int = 0x10000000; +pub const SA_NOCLDSTOP: ::c_int = 0x00000001; + +pub const EPOLL_CLOEXEC: ::c_int = 0x80000; + +pub const EFD_CLOEXEC: ::c_int = 0x80000; + pub const BUFSIZ: ::c_uint = 1024; pub const TMP_MAX: ::c_uint = 10000; pub const FOPEN_MAX: ::c_uint = 1000; diff --git a/src/unix/notbsd/linux/other/b32/mod.rs b/src/unix/notbsd/linux/other/b32/mod.rs index 48c3502ada1b6..ac70a001562be 100644 --- a/src/unix/notbsd/linux/other/b32/mod.rs +++ b/src/unix/notbsd/linux/other/b32/mod.rs @@ -63,6 +63,198 @@ s! { } } +pub const RLIMIT_NOFILE: ::c_int = 7; +pub const RLIMIT_NPROC: ::c_int = 6; + +pub const O_APPEND: ::c_int = 1024; +pub const O_CREAT: ::c_int = 64; +pub const O_EXCL: ::c_int = 128; +pub const O_NOCTTY: ::c_int = 256; +pub const O_NONBLOCK: ::c_int = 2048; +pub const O_SYNC: ::c_int = 1052672; +pub const O_RSYNC: ::c_int = 1052672; +pub const O_DSYNC: ::c_int = 4096; +pub const O_FSYNC: ::c_int = 0x101000; + +pub const MAP_GROWSDOWN: ::c_int = 0x0100; + +pub const EDEADLK: ::c_int = 35; +pub const ENAMETOOLONG: ::c_int = 36; +pub const ENOLCK: ::c_int = 37; +pub const ENOSYS: ::c_int = 38; +pub const ENOTEMPTY: ::c_int = 39; +pub const ELOOP: ::c_int = 40; +pub const ENOMSG: ::c_int = 42; +pub const EIDRM: ::c_int = 43; +pub const ECHRNG: ::c_int = 44; +pub const EL2NSYNC: ::c_int = 45; +pub const EL3HLT: ::c_int = 46; +pub const EL3RST: ::c_int = 47; +pub const ELNRNG: ::c_int = 48; +pub const EUNATCH: ::c_int = 49; +pub const ENOCSI: ::c_int = 50; +pub const EL2HLT: ::c_int = 51; +pub const EBADE: ::c_int = 52; +pub const EBADR: ::c_int = 53; +pub const EXFULL: ::c_int = 54; +pub const ENOANO: ::c_int = 55; +pub const EBADRQC: ::c_int = 56; +pub const EBADSLT: ::c_int = 57; +pub const EMULTIHOP: ::c_int = 72; +pub const EOVERFLOW: ::c_int = 75; +pub const ENOTUNIQ: ::c_int = 76; +pub const EBADFD: ::c_int = 77; +pub const EBADMSG: ::c_int = 74; +pub const EREMCHG: ::c_int = 78; +pub const ELIBACC: ::c_int = 79; +pub const ELIBBAD: ::c_int = 80; +pub const ELIBSCN: ::c_int = 81; +pub const ELIBMAX: ::c_int = 82; +pub const ELIBEXEC: ::c_int = 83; +pub const EILSEQ: ::c_int = 84; +pub const ERESTART: ::c_int = 85; +pub const ESTRPIPE: ::c_int = 86; +pub const EUSERS: ::c_int = 87; +pub const ENOTSOCK: ::c_int = 88; +pub const EDESTADDRREQ: ::c_int = 89; +pub const EMSGSIZE: ::c_int = 90; +pub const EPROTOTYPE: ::c_int = 91; +pub const ENOPROTOOPT: ::c_int = 92; +pub const EPROTONOSUPPORT: ::c_int = 93; +pub const ESOCKTNOSUPPORT: ::c_int = 94; +pub const EOPNOTSUPP: ::c_int = 95; +pub const EPFNOSUPPORT: ::c_int = 96; +pub const EAFNOSUPPORT: ::c_int = 97; +pub const EADDRINUSE: ::c_int = 98; +pub const EADDRNOTAVAIL: ::c_int = 99; +pub const ENETDOWN: ::c_int = 100; +pub const ENETUNREACH: ::c_int = 101; +pub const ENETRESET: ::c_int = 102; +pub const ECONNABORTED: ::c_int = 103; +pub const ECONNRESET: ::c_int = 104; +pub const ENOBUFS: ::c_int = 105; +pub const EISCONN: ::c_int = 106; +pub const ENOTCONN: ::c_int = 107; +pub const ESHUTDOWN: ::c_int = 108; +pub const ETOOMANYREFS: ::c_int = 109; +pub const ETIMEDOUT: ::c_int = 110; +pub const ECONNREFUSED: ::c_int = 111; +pub const EHOSTDOWN: ::c_int = 112; +pub const EHOSTUNREACH: ::c_int = 113; +pub const EALREADY: ::c_int = 114; +pub const EINPROGRESS: ::c_int = 115; +pub const ESTALE: ::c_int = 116; +pub const EDQUOT: ::c_int = 122; +pub const ENOMEDIUM: ::c_int = 123; +pub const EMEDIUMTYPE: ::c_int = 124; +pub const ECANCELED: ::c_int = 125; +pub const ENOKEY: ::c_int = 126; +pub const EKEYEXPIRED: ::c_int = 127; +pub const EKEYREVOKED: ::c_int = 128; +pub const EKEYREJECTED: ::c_int = 129; +pub const EOWNERDEAD: ::c_int = 130; +pub const ENOTRECOVERABLE: ::c_int = 131; +pub const EHWPOISON: ::c_int = 133; +pub const ERFKILL: ::c_int = 132; + +pub const SOL_SOCKET: ::c_int = 1; + +pub const SO_REUSEADDR: ::c_int = 2; +pub const SO_TYPE: ::c_int = 3; +pub const SO_ERROR: ::c_int = 4; +pub const SO_DONTROUTE: ::c_int = 5; +pub const SO_BROADCAST: ::c_int = 6; +pub const SO_SNDBUF: ::c_int = 7; +pub const SO_RCVBUF: ::c_int = 8; +pub const SO_KEEPALIVE: ::c_int = 9; +pub const SO_OOBINLINE: ::c_int = 10; +pub const SO_LINGER: ::c_int = 13; +pub const SO_REUSEPORT: ::c_int = 15; +pub const SO_ACCEPTCONN: ::c_int = 30; + +pub const SA_ONSTACK: ::c_int = 0x08000000; +pub const SA_SIGINFO: ::c_int = 0x00000004; +pub const SA_NOCLDWAIT: ::c_int = 0x00000002; + +pub const SIGCHLD: ::c_int = 17; +pub const SIGBUS: ::c_int = 7; +pub const SIGUSR1: ::c_int = 10; +pub const SIGUSR2: ::c_int = 12; +pub const SIGCONT: ::c_int = 18; +pub const SIGSTOP: ::c_int = 19; +pub const SIGTSTP: ::c_int = 20; +pub const SIGURG: ::c_int = 23; +pub const SIGIO: ::c_int = 29; +pub const SIGSYS: ::c_int = 31; +pub const SIGSTKFLT: ::c_int = 16; +pub const SIGUNUSED: ::c_int = 31; +pub const SIGPOLL: ::c_int = 29; +pub const SIGPWR: ::c_int = 30; +pub const SIG_SETMASK: ::c_int = 2; +pub const SIG_BLOCK: ::c_int = 0x000000; +pub const SIG_UNBLOCK: ::c_int = 0x01; + +pub const POLLWRNORM: ::c_short = 0x100; +pub const POLLWRBAND: ::c_short = 0x200; + +pub const O_ASYNC: ::c_int = 0x2000; +pub const O_NDELAY: ::c_int = 0x800; + +pub const PTRACE_DETACH: ::c_uint = 17; + +pub const EFD_NONBLOCK: ::c_int = 0x800; + +pub const F_GETLK: ::c_int = 5; +pub const F_GETOWN: ::c_int = 9; +pub const F_SETOWN: ::c_int = 8; +pub const F_SETLK: ::c_int = 6; +pub const F_SETLKW: ::c_int = 7; + +pub const SFD_NONBLOCK: ::c_int = 0x0800; + +pub const TIOCEXCL: ::c_ulong = 0x540C; +pub const TIOCNXCL: ::c_ulong = 0x540D; +pub const TIOCSCTTY: ::c_ulong = 0x540E; +pub const TIOCSTI: ::c_ulong = 0x5412; +pub const TIOCMGET: ::c_ulong = 0x5415; +pub const TIOCMBIS: ::c_ulong = 0x5416; +pub const TIOCMBIC: ::c_ulong = 0x5417; +pub const TIOCMSET: ::c_ulong = 0x5418; +pub const TIOCCONS: ::c_ulong = 0x541D; +pub const CLONE_NEWCGROUP: ::c_int = 0x02000000; + +pub const SFD_CLOEXEC: ::c_int = 0x080000; + +pub const NCCS: usize = 32; + +pub const O_TRUNC: ::c_int = 512; + +pub const O_CLOEXEC: ::c_int = 0x80000; + +pub const EBFONT: ::c_int = 59; +pub const ENOSTR: ::c_int = 60; +pub const ENODATA: ::c_int = 61; +pub const ETIME: ::c_int = 62; +pub const ENOSR: ::c_int = 63; +pub const ENONET: ::c_int = 64; +pub const ENOPKG: ::c_int = 65; +pub const EREMOTE: ::c_int = 66; +pub const ENOLINK: ::c_int = 67; +pub const EADV: ::c_int = 68; +pub const ESRMNT: ::c_int = 69; +pub const ECOMM: ::c_int = 70; +pub const EPROTO: ::c_int = 71; +pub const EDOTDOT: ::c_int = 73; + +pub const SA_NODEFER: ::c_int = 0x40000000; +pub const SA_RESETHAND: ::c_int = 0x80000000; +pub const SA_RESTART: ::c_int = 0x10000000; +pub const SA_NOCLDSTOP: ::c_int = 0x00000001; + +pub const EPOLL_CLOEXEC: ::c_int = 0x80000; + +pub const EFD_CLOEXEC: ::c_int = 0x80000; + pub const __SIZEOF_PTHREAD_CONDATTR_T: usize = 4; pub const __SIZEOF_PTHREAD_MUTEX_T: usize = 24; pub const __SIZEOF_PTHREAD_RWLOCK_T: usize = 32; diff --git a/src/unix/notbsd/linux/other/b64/aarch64.rs b/src/unix/notbsd/linux/other/b64/aarch64.rs index 1da95b10203d6..13b739953e700 100644 --- a/src/unix/notbsd/linux/other/b64/aarch64.rs +++ b/src/unix/notbsd/linux/other/b64/aarch64.rs @@ -4,6 +4,7 @@ pub type c_char = u8; pub type wchar_t = u32; pub type nlink_t = u32; pub type blksize_t = i32; +pub type suseconds_t = i64; s! { pub struct stat { @@ -81,6 +82,199 @@ s! { } } +pub const RLIMIT_NOFILE: ::c_int = 7; +pub const RLIMIT_NPROC: ::c_int = 6; + +pub const O_APPEND: ::c_int = 1024; +pub const O_CREAT: ::c_int = 64; +pub const O_EXCL: ::c_int = 128; +pub const O_NOCTTY: ::c_int = 256; +pub const O_NONBLOCK: ::c_int = 2048; +pub const O_SYNC: ::c_int = 1052672; +pub const O_RSYNC: ::c_int = 1052672; +pub const O_DSYNC: ::c_int = 4096; +pub const O_FSYNC: ::c_int = 0x101000; + +pub const MAP_GROWSDOWN: ::c_int = 0x0100; + +pub const EDEADLK: ::c_int = 35; +pub const ENAMETOOLONG: ::c_int = 36; +pub const ENOLCK: ::c_int = 37; +pub const ENOSYS: ::c_int = 38; +pub const ENOTEMPTY: ::c_int = 39; +pub const ELOOP: ::c_int = 40; +pub const ENOMSG: ::c_int = 42; +pub const EIDRM: ::c_int = 43; +pub const ECHRNG: ::c_int = 44; +pub const EL2NSYNC: ::c_int = 45; +pub const EL3HLT: ::c_int = 46; +pub const EL3RST: ::c_int = 47; +pub const ELNRNG: ::c_int = 48; +pub const EUNATCH: ::c_int = 49; +pub const ENOCSI: ::c_int = 50; +pub const EL2HLT: ::c_int = 51; +pub const EBADE: ::c_int = 52; +pub const EBADR: ::c_int = 53; +pub const EXFULL: ::c_int = 54; +pub const ENOANO: ::c_int = 55; +pub const EBADRQC: ::c_int = 56; +pub const EBADSLT: ::c_int = 57; +pub const EMULTIHOP: ::c_int = 72; +pub const EOVERFLOW: ::c_int = 75; +pub const ENOTUNIQ: ::c_int = 76; +pub const EBADFD: ::c_int = 77; +pub const EBADMSG: ::c_int = 74; +pub const EREMCHG: ::c_int = 78; +pub const ELIBACC: ::c_int = 79; +pub const ELIBBAD: ::c_int = 80; +pub const ELIBSCN: ::c_int = 81; +pub const ELIBMAX: ::c_int = 82; +pub const ELIBEXEC: ::c_int = 83; +pub const EILSEQ: ::c_int = 84; +pub const ERESTART: ::c_int = 85; +pub const ESTRPIPE: ::c_int = 86; +pub const EUSERS: ::c_int = 87; +pub const ENOTSOCK: ::c_int = 88; +pub const EDESTADDRREQ: ::c_int = 89; +pub const EMSGSIZE: ::c_int = 90; +pub const EPROTOTYPE: ::c_int = 91; +pub const ENOPROTOOPT: ::c_int = 92; +pub const EPROTONOSUPPORT: ::c_int = 93; +pub const ESOCKTNOSUPPORT: ::c_int = 94; +pub const EOPNOTSUPP: ::c_int = 95; +pub const EPFNOSUPPORT: ::c_int = 96; +pub const EAFNOSUPPORT: ::c_int = 97; +pub const EADDRINUSE: ::c_int = 98; +pub const EADDRNOTAVAIL: ::c_int = 99; +pub const ENETDOWN: ::c_int = 100; +pub const ENETUNREACH: ::c_int = 101; +pub const ENETRESET: ::c_int = 102; +pub const ECONNABORTED: ::c_int = 103; +pub const ECONNRESET: ::c_int = 104; +pub const ENOBUFS: ::c_int = 105; +pub const EISCONN: ::c_int = 106; +pub const ENOTCONN: ::c_int = 107; +pub const ESHUTDOWN: ::c_int = 108; +pub const ETOOMANYREFS: ::c_int = 109; +pub const ETIMEDOUT: ::c_int = 110; +pub const ECONNREFUSED: ::c_int = 111; +pub const EHOSTDOWN: ::c_int = 112; +pub const EHOSTUNREACH: ::c_int = 113; +pub const EALREADY: ::c_int = 114; +pub const EINPROGRESS: ::c_int = 115; +pub const ESTALE: ::c_int = 116; +pub const EDQUOT: ::c_int = 122; +pub const ENOMEDIUM: ::c_int = 123; +pub const EMEDIUMTYPE: ::c_int = 124; +pub const ECANCELED: ::c_int = 125; +pub const ENOKEY: ::c_int = 126; +pub const EKEYEXPIRED: ::c_int = 127; +pub const EKEYREVOKED: ::c_int = 128; +pub const EKEYREJECTED: ::c_int = 129; +pub const EOWNERDEAD: ::c_int = 130; +pub const ENOTRECOVERABLE: ::c_int = 131; +pub const EHWPOISON: ::c_int = 133; +pub const ERFKILL: ::c_int = 132; + +pub const SOL_SOCKET: ::c_int = 1; + +pub const SO_REUSEADDR: ::c_int = 2; +pub const SO_TYPE: ::c_int = 3; +pub const SO_ERROR: ::c_int = 4; +pub const SO_DONTROUTE: ::c_int = 5; +pub const SO_BROADCAST: ::c_int = 6; +pub const SO_SNDBUF: ::c_int = 7; +pub const SO_RCVBUF: ::c_int = 8; +pub const SO_KEEPALIVE: ::c_int = 9; +pub const SO_OOBINLINE: ::c_int = 10; +pub const SO_LINGER: ::c_int = 13; +pub const SO_REUSEPORT: ::c_int = 15; +pub const SO_ACCEPTCONN: ::c_int = 30; + +pub const SA_ONSTACK: ::c_int = 0x08000000; +pub const SA_SIGINFO: ::c_int = 0x00000004; +pub const SA_NOCLDWAIT: ::c_int = 0x00000002; + +pub const SIGCHLD: ::c_int = 17; +pub const SIGBUS: ::c_int = 7; +pub const SIGUSR1: ::c_int = 10; +pub const SIGUSR2: ::c_int = 12; +pub const SIGCONT: ::c_int = 18; +pub const SIGSTOP: ::c_int = 19; +pub const SIGTSTP: ::c_int = 20; +pub const SIGURG: ::c_int = 23; +pub const SIGIO: ::c_int = 29; +pub const SIGSYS: ::c_int = 31; +pub const SIGSTKFLT: ::c_int = 16; +pub const SIGUNUSED: ::c_int = 31; +pub const SIGPOLL: ::c_int = 29; +pub const SIGPWR: ::c_int = 30; +pub const SIG_SETMASK: ::c_int = 2; +pub const SIG_BLOCK: ::c_int = 0x000000; +pub const SIG_UNBLOCK: ::c_int = 0x01; + +pub const POLLWRNORM: ::c_short = 0x100; +pub const POLLWRBAND: ::c_short = 0x200; + +pub const O_ASYNC: ::c_int = 0x2000; +pub const O_NDELAY: ::c_int = 0x800; + +pub const PTRACE_DETACH: ::c_uint = 17; + +pub const EFD_NONBLOCK: ::c_int = 0x800; + +pub const F_GETLK: ::c_int = 5; +pub const F_GETOWN: ::c_int = 9; +pub const F_SETOWN: ::c_int = 8; +pub const F_SETLK: ::c_int = 6; +pub const F_SETLKW: ::c_int = 7; + +pub const SFD_NONBLOCK: ::c_int = 0x0800; + +pub const TIOCEXCL: ::c_ulong = 0x540C; +pub const TIOCNXCL: ::c_ulong = 0x540D; +pub const TIOCSCTTY: ::c_ulong = 0x540E; +pub const TIOCSTI: ::c_ulong = 0x5412; +pub const TIOCMGET: ::c_ulong = 0x5415; +pub const TIOCMBIS: ::c_ulong = 0x5416; +pub const TIOCMBIC: ::c_ulong = 0x5417; +pub const TIOCMSET: ::c_ulong = 0x5418; +pub const TIOCCONS: ::c_ulong = 0x541D; + +pub const CLONE_NEWCGROUP: ::c_int = 0x02000000; + +pub const SFD_CLOEXEC: ::c_int = 0x080000; + +pub const NCCS: usize = 32; + +pub const O_TRUNC: ::c_int = 512; + +pub const O_CLOEXEC: ::c_int = 0x80000; + +pub const EBFONT: ::c_int = 59; +pub const ENOSTR: ::c_int = 60; +pub const ENODATA: ::c_int = 61; +pub const ETIME: ::c_int = 62; +pub const ENOSR: ::c_int = 63; +pub const ENONET: ::c_int = 64; +pub const ENOPKG: ::c_int = 65; +pub const EREMOTE: ::c_int = 66; +pub const ENOLINK: ::c_int = 67; +pub const EADV: ::c_int = 68; +pub const ESRMNT: ::c_int = 69; +pub const ECOMM: ::c_int = 70; +pub const EPROTO: ::c_int = 71; +pub const EDOTDOT: ::c_int = 73; + +pub const SA_NODEFER: ::c_int = 0x40000000; +pub const SA_RESETHAND: ::c_int = 0x80000000; +pub const SA_RESTART: ::c_int = 0x10000000; +pub const SA_NOCLDSTOP: ::c_int = 0x00000001; + +pub const EPOLL_CLOEXEC: ::c_int = 0x80000; + +pub const EFD_CLOEXEC: ::c_int = 0x80000; + pub const __SIZEOF_PTHREAD_CONDATTR_T: usize = 8; pub const __SIZEOF_PTHREAD_MUTEX_T: usize = 48; pub const __SIZEOF_PTHREAD_MUTEXATTR_T: usize = 8; diff --git a/src/unix/notbsd/linux/other/b64/mod.rs b/src/unix/notbsd/linux/other/b64/mod.rs index a08049d6676c5..2fcec73a89461 100644 --- a/src/unix/notbsd/linux/other/b64/mod.rs +++ b/src/unix/notbsd/linux/other/b64/mod.rs @@ -4,10 +4,6 @@ pub type c_long = i64; pub type c_ulong = u64; pub type clock_t = i64; pub type time_t = i64; -#[cfg(not(target_arch = "sparc64"))] -pub type suseconds_t = i64; -#[cfg(target_arch = "sparc64")] -pub type suseconds_t = i32; pub type ino_t = u64; pub type off_t = i64; pub type blkcnt_t = i64; diff --git a/src/unix/notbsd/linux/other/b64/powerpc64.rs b/src/unix/notbsd/linux/other/b64/powerpc64.rs index c5ce962e39aa1..233dd51286bed 100644 --- a/src/unix/notbsd/linux/other/b64/powerpc64.rs +++ b/src/unix/notbsd/linux/other/b64/powerpc64.rs @@ -4,6 +4,7 @@ pub type c_char = u8; pub type wchar_t = i32; pub type nlink_t = u64; pub type blksize_t = i64; +pub type suseconds_t = i64; s! { pub struct stat { @@ -79,6 +80,199 @@ s! { } } +pub const RLIMIT_NOFILE: ::c_int = 7; +pub const RLIMIT_NPROC: ::c_int = 6; + +pub const O_APPEND: ::c_int = 1024; +pub const O_CREAT: ::c_int = 64; +pub const O_EXCL: ::c_int = 128; +pub const O_NOCTTY: ::c_int = 256; +pub const O_NONBLOCK: ::c_int = 2048; +pub const O_SYNC: ::c_int = 1052672; +pub const O_RSYNC: ::c_int = 1052672; +pub const O_DSYNC: ::c_int = 4096; +pub const O_FSYNC: ::c_int = 0x101000; + +pub const MAP_GROWSDOWN: ::c_int = 0x0100; + +pub const EDEADLK: ::c_int = 35; +pub const ENAMETOOLONG: ::c_int = 36; +pub const ENOLCK: ::c_int = 37; +pub const ENOSYS: ::c_int = 38; +pub const ENOTEMPTY: ::c_int = 39; +pub const ELOOP: ::c_int = 40; +pub const ENOMSG: ::c_int = 42; +pub const EIDRM: ::c_int = 43; +pub const ECHRNG: ::c_int = 44; +pub const EL2NSYNC: ::c_int = 45; +pub const EL3HLT: ::c_int = 46; +pub const EL3RST: ::c_int = 47; +pub const ELNRNG: ::c_int = 48; +pub const EUNATCH: ::c_int = 49; +pub const ENOCSI: ::c_int = 50; +pub const EL2HLT: ::c_int = 51; +pub const EBADE: ::c_int = 52; +pub const EBADR: ::c_int = 53; +pub const EXFULL: ::c_int = 54; +pub const ENOANO: ::c_int = 55; +pub const EBADRQC: ::c_int = 56; +pub const EBADSLT: ::c_int = 57; +pub const EMULTIHOP: ::c_int = 72; +pub const EOVERFLOW: ::c_int = 75; +pub const ENOTUNIQ: ::c_int = 76; +pub const EBADFD: ::c_int = 77; +pub const EBADMSG: ::c_int = 74; +pub const EREMCHG: ::c_int = 78; +pub const ELIBACC: ::c_int = 79; +pub const ELIBBAD: ::c_int = 80; +pub const ELIBSCN: ::c_int = 81; +pub const ELIBMAX: ::c_int = 82; +pub const ELIBEXEC: ::c_int = 83; +pub const EILSEQ: ::c_int = 84; +pub const ERESTART: ::c_int = 85; +pub const ESTRPIPE: ::c_int = 86; +pub const EUSERS: ::c_int = 87; +pub const ENOTSOCK: ::c_int = 88; +pub const EDESTADDRREQ: ::c_int = 89; +pub const EMSGSIZE: ::c_int = 90; +pub const EPROTOTYPE: ::c_int = 91; +pub const ENOPROTOOPT: ::c_int = 92; +pub const EPROTONOSUPPORT: ::c_int = 93; +pub const ESOCKTNOSUPPORT: ::c_int = 94; +pub const EOPNOTSUPP: ::c_int = 95; +pub const EPFNOSUPPORT: ::c_int = 96; +pub const EAFNOSUPPORT: ::c_int = 97; +pub const EADDRINUSE: ::c_int = 98; +pub const EADDRNOTAVAIL: ::c_int = 99; +pub const ENETDOWN: ::c_int = 100; +pub const ENETUNREACH: ::c_int = 101; +pub const ENETRESET: ::c_int = 102; +pub const ECONNABORTED: ::c_int = 103; +pub const ECONNRESET: ::c_int = 104; +pub const ENOBUFS: ::c_int = 105; +pub const EISCONN: ::c_int = 106; +pub const ENOTCONN: ::c_int = 107; +pub const ESHUTDOWN: ::c_int = 108; +pub const ETOOMANYREFS: ::c_int = 109; +pub const ETIMEDOUT: ::c_int = 110; +pub const ECONNREFUSED: ::c_int = 111; +pub const EHOSTDOWN: ::c_int = 112; +pub const EHOSTUNREACH: ::c_int = 113; +pub const EALREADY: ::c_int = 114; +pub const EINPROGRESS: ::c_int = 115; +pub const ESTALE: ::c_int = 116; +pub const EDQUOT: ::c_int = 122; +pub const ENOMEDIUM: ::c_int = 123; +pub const EMEDIUMTYPE: ::c_int = 124; +pub const ECANCELED: ::c_int = 125; +pub const ENOKEY: ::c_int = 126; +pub const EKEYEXPIRED: ::c_int = 127; +pub const EKEYREVOKED: ::c_int = 128; +pub const EKEYREJECTED: ::c_int = 129; +pub const EOWNERDEAD: ::c_int = 130; +pub const ENOTRECOVERABLE: ::c_int = 131; +pub const EHWPOISON: ::c_int = 133; +pub const ERFKILL: ::c_int = 132; + +pub const SOL_SOCKET: ::c_int = 1; + +pub const SO_REUSEADDR: ::c_int = 2; +pub const SO_TYPE: ::c_int = 3; +pub const SO_ERROR: ::c_int = 4; +pub const SO_DONTROUTE: ::c_int = 5; +pub const SO_BROADCAST: ::c_int = 6; +pub const SO_SNDBUF: ::c_int = 7; +pub const SO_RCVBUF: ::c_int = 8; +pub const SO_KEEPALIVE: ::c_int = 9; +pub const SO_OOBINLINE: ::c_int = 10; +pub const SO_LINGER: ::c_int = 13; +pub const SO_REUSEPORT: ::c_int = 15; +pub const SO_ACCEPTCONN: ::c_int = 30; + +pub const SA_ONSTACK: ::c_int = 0x08000000; +pub const SA_SIGINFO: ::c_int = 0x00000004; +pub const SA_NOCLDWAIT: ::c_int = 0x00000002; + +pub const SIGCHLD: ::c_int = 17; +pub const SIGBUS: ::c_int = 7; +pub const SIGUSR1: ::c_int = 10; +pub const SIGUSR2: ::c_int = 12; +pub const SIGCONT: ::c_int = 18; +pub const SIGSTOP: ::c_int = 19; +pub const SIGTSTP: ::c_int = 20; +pub const SIGURG: ::c_int = 23; +pub const SIGIO: ::c_int = 29; +pub const SIGSYS: ::c_int = 31; +pub const SIGSTKFLT: ::c_int = 16; +pub const SIGUNUSED: ::c_int = 31; +pub const SIGPOLL: ::c_int = 29; +pub const SIGPWR: ::c_int = 30; +pub const SIG_SETMASK: ::c_int = 2; +pub const SIG_BLOCK: ::c_int = 0x000000; +pub const SIG_UNBLOCK: ::c_int = 0x01; + +pub const POLLWRNORM: ::c_short = 0x100; +pub const POLLWRBAND: ::c_short = 0x200; + +pub const O_ASYNC: ::c_int = 0x2000; +pub const O_NDELAY: ::c_int = 0x800; + +pub const PTRACE_DETACH: ::c_uint = 17; + +pub const EFD_NONBLOCK: ::c_int = 0x800; + +pub const F_GETLK: ::c_int = 5; +pub const F_GETOWN: ::c_int = 9; +pub const F_SETOWN: ::c_int = 8; +pub const F_SETLK: ::c_int = 6; +pub const F_SETLKW: ::c_int = 7; + +pub const SFD_NONBLOCK: ::c_int = 0x0800; + +pub const TIOCEXCL: ::c_ulong = 0x540C; +pub const TIOCNXCL: ::c_ulong = 0x540D; +pub const TIOCSCTTY: ::c_ulong = 0x540E; +pub const TIOCSTI: ::c_ulong = 0x5412; +pub const TIOCMGET: ::c_ulong = 0x5415; +pub const TIOCMBIS: ::c_ulong = 0x5416; +pub const TIOCMBIC: ::c_ulong = 0x5417; +pub const TIOCMSET: ::c_ulong = 0x5418; +pub const TIOCCONS: ::c_ulong = 0x541D; + +pub const CLONE_NEWCGROUP: ::c_int = 0x02000000; + +pub const SFD_CLOEXEC: ::c_int = 0x080000; + +pub const NCCS: usize = 32; + +pub const O_TRUNC: ::c_int = 512; + +pub const O_CLOEXEC: ::c_int = 0x80000; + +pub const EBFONT: ::c_int = 59; +pub const ENOSTR: ::c_int = 60; +pub const ENODATA: ::c_int = 61; +pub const ETIME: ::c_int = 62; +pub const ENOSR: ::c_int = 63; +pub const ENONET: ::c_int = 64; +pub const ENOPKG: ::c_int = 65; +pub const EREMOTE: ::c_int = 66; +pub const ENOLINK: ::c_int = 67; +pub const EADV: ::c_int = 68; +pub const ESRMNT: ::c_int = 69; +pub const ECOMM: ::c_int = 70; +pub const EPROTO: ::c_int = 71; +pub const EDOTDOT: ::c_int = 73; + +pub const SA_NODEFER: ::c_int = 0x40000000; +pub const SA_RESETHAND: ::c_int = 0x80000000; +pub const SA_RESTART: ::c_int = 0x10000000; +pub const SA_NOCLDSTOP: ::c_int = 0x00000001; + +pub const EPOLL_CLOEXEC: ::c_int = 0x80000; + +pub const EFD_CLOEXEC: ::c_int = 0x80000; + pub const __SIZEOF_PTHREAD_CONDATTR_T: usize = 4; pub const __SIZEOF_PTHREAD_MUTEX_T: usize = 40; pub const __SIZEOF_PTHREAD_MUTEXATTR_T: usize = 4; diff --git a/src/unix/notbsd/linux/other/b64/sparc64.rs b/src/unix/notbsd/linux/other/b64/sparc64.rs index b4c5e0acaab6b..a6379bd0daf98 100644 --- a/src/unix/notbsd/linux/other/b64/sparc64.rs +++ b/src/unix/notbsd/linux/other/b64/sparc64.rs @@ -4,6 +4,7 @@ pub type c_char = i8; pub type wchar_t = i32; pub type nlink_t = u32; pub type blksize_t = i64; +pub type suseconds_t = i32; s! { pub struct stat { @@ -81,6 +82,193 @@ s! { } } +pub const RLIMIT_NOFILE: ::c_int = 6; +pub const RLIMIT_NPROC: ::c_int = 7; + +pub const O_APPEND: ::c_int = 0x8; +pub const O_CREAT: ::c_int = 0x200; +pub const O_EXCL: ::c_int = 0x800; +pub const O_NOCTTY: ::c_int = 0x8000; +pub const O_NONBLOCK: ::c_int = 0x4000; +pub const O_SYNC: ::c_int = 0x802000; +pub const O_RSYNC: ::c_int = 0x802000; +pub const O_DSYNC: ::c_int = 0x2000; +pub const O_FSYNC: ::c_int = 0x802000; + +pub const MAP_GROWSDOWN: ::c_int = 0x0200; + +pub const EDEADLK: ::c_int = 78; +pub const ENAMETOOLONG: ::c_int = 63; +pub const ENOLCK: ::c_int = 79; +pub const ENOSYS: ::c_int = 90; +pub const ENOTEMPTY: ::c_int = 66; +pub const ELOOP: ::c_int = 62; +pub const ENOMSG: ::c_int = 75; +pub const EIDRM: ::c_int = 77; +pub const ECHRNG: ::c_int = 94; +pub const EL2NSYNC: ::c_int = 95; +pub const EL3HLT: ::c_int = 96; +pub const EL3RST: ::c_int = 97; +pub const ELNRNG: ::c_int = 98; +pub const EUNATCH: ::c_int = 99; +pub const ENOCSI: ::c_int = 100; +pub const EL2HLT: ::c_int = 101; +pub const EBADE: ::c_int = 102; +pub const EBADR: ::c_int = 103; +pub const EXFULL: ::c_int = 104; +pub const ENOANO: ::c_int = 105; +pub const EBADRQC: ::c_int = 106; +pub const EBADSLT: ::c_int = 107; +pub const EMULTIHOP: ::c_int = 87; +pub const EOVERFLOW: ::c_int = 92; +pub const ENOTUNIQ: ::c_int = 115; +pub const EBADFD: ::c_int = 93; +pub const EBADMSG: ::c_int = 76; +pub const EREMCHG: ::c_int = 89; +pub const ELIBACC: ::c_int = 114; +pub const ELIBBAD: ::c_int = 112; +pub const ELIBSCN: ::c_int = 124; +pub const ELIBMAX: ::c_int = 123; +pub const ELIBEXEC: ::c_int = 110; +pub const EILSEQ: ::c_int = 122; +pub const ERESTART: ::c_int = 116; +pub const ESTRPIPE: ::c_int = 91; +pub const EUSERS: ::c_int = 68; +pub const ENOTSOCK: ::c_int = 38; +pub const EDESTADDRREQ: ::c_int = 39; +pub const EMSGSIZE: ::c_int = 40; +pub const EPROTOTYPE: ::c_int = 41; +pub const ENOPROTOOPT: ::c_int = 42; +pub const EPROTONOSUPPORT: ::c_int = 43; +pub const ESOCKTNOSUPPORT: ::c_int = 44; +pub const EOPNOTSUPP: ::c_int = 45; +pub const EPFNOSUPPORT: ::c_int = 46; +pub const EAFNOSUPPORT: ::c_int = 47; +pub const EADDRINUSE: ::c_int = 48; +pub const EADDRNOTAVAIL: ::c_int = 49; +pub const ENETDOWN: ::c_int = 50; +pub const ENETUNREACH: ::c_int = 51; +pub const ENETRESET: ::c_int = 52; +pub const ECONNABORTED: ::c_int = 53; +pub const ECONNRESET: ::c_int = 54; +pub const ENOBUFS: ::c_int = 55; +pub const EISCONN: ::c_int = 56; +pub const ENOTCONN: ::c_int = 57; +pub const ESHUTDOWN: ::c_int = 58; +pub const ETOOMANYREFS: ::c_int = 59; +pub const ETIMEDOUT: ::c_int = 60; +pub const ECONNREFUSED: ::c_int = 61; +pub const EHOSTDOWN: ::c_int = 64; +pub const EHOSTUNREACH: ::c_int = 65; +pub const EALREADY: ::c_int = 37; +pub const EINPROGRESS: ::c_int = 36; +pub const ESTALE: ::c_int = 70; +pub const EDQUOT: ::c_int = 69; +pub const ENOMEDIUM: ::c_int = 125; +pub const EMEDIUMTYPE: ::c_int = 126; +pub const ECANCELED: ::c_int = 127; +pub const ENOKEY: ::c_int = 128; +pub const EKEYEXPIRED: ::c_int = 129; +pub const EKEYREVOKED: ::c_int = 130; +pub const EKEYREJECTED: ::c_int = 131; +pub const EOWNERDEAD: ::c_int = 132; +pub const ENOTRECOVERABLE: ::c_int = 133; +pub const EHWPOISON: ::c_int = 135; +pub const ERFKILL: ::c_int = 134; + +pub const SOL_SOCKET: ::c_int = 0xffff; + +pub const SO_REUSEADDR: ::c_int = 4; +pub const SO_TYPE: ::c_int = 0x1008; +pub const SO_ERROR: ::c_int = 0x1007; +pub const SO_DONTROUTE: ::c_int = 16; +pub const SO_BROADCAST: ::c_int = 32; +pub const SO_SNDBUF: ::c_int = 0x1001; +pub const SO_RCVBUF: ::c_int = 0x1002; +pub const SO_KEEPALIVE: ::c_int = 8; +pub const SO_OOBINLINE: ::c_int = 0x100; +pub const SO_LINGER: ::c_int = 128; +pub const SO_REUSEPORT: ::c_int = 0x200; +pub const SO_ACCEPTCONN: ::c_int = 0x8000; + +pub const SA_ONSTACK: ::c_int = 1; +pub const SA_SIGINFO: ::c_int = 0x200; +pub const SA_NOCLDWAIT: ::c_int = 0x100; + +pub const SIGCHLD: ::c_int = 20; +pub const SIGBUS: ::c_int = 10; +pub const SIGUSR1: ::c_int = 30; +pub const SIGUSR2: ::c_int = 31; +pub const SIGCONT: ::c_int = 19; +pub const SIGSTOP: ::c_int = 17; +pub const SIGTSTP: ::c_int = 18; +pub const SIGURG: ::c_int = 16; +pub const SIGIO: ::c_int = 23; +pub const SIGSYS: ::c_int = 12; +pub const SIGPOLL: ::c_int = 23; +pub const SIGPWR: ::c_int = 29; +pub const SIG_SETMASK: ::c_int = 4; +pub const SIG_BLOCK: ::c_int = 1; +pub const SIG_UNBLOCK: ::c_int = 2; + +pub const POLLWRNORM: ::c_short = 4; +pub const POLLWRBAND: ::c_short = 0x100; + +pub const O_ASYNC: ::c_int = 0x40; +pub const O_NDELAY: ::c_int = 0x4004; + +pub const PTRACE_DETACH: ::c_uint = 11; + +pub const EFD_NONBLOCK: ::c_int = 0x4000; + +pub const F_GETLK: ::c_int = 7; +pub const F_GETOWN: ::c_int = 5; +pub const F_SETOWN: ::c_int = 6; +pub const F_SETLK: ::c_int = 8; +pub const F_SETLKW: ::c_int = 9; + +pub const SFD_NONBLOCK: ::c_int = 0x4000; + +pub const TIOCEXCL: ::c_ulong = 0x2000740d; +pub const TIOCNXCL: ::c_ulong = 0x2000740e; +pub const TIOCSCTTY: ::c_ulong = 0x20007484; +pub const TIOCSTI: ::c_ulong = 0x80017472; +pub const TIOCMGET: ::c_ulong = 0x4004746a; +pub const TIOCMBIS: ::c_ulong = 0x8004746c; +pub const TIOCMBIC: ::c_ulong = 0x8004746b; +pub const TIOCMSET: ::c_ulong = 0x8004746d; +pub const TIOCCONS: ::c_ulong = 0x20007424; + +pub const SFD_CLOEXEC: ::c_int = 0x400000; + +pub const NCCS: usize = 17; +pub const O_TRUNC: ::c_int = 0x400; + +pub const O_CLOEXEC: ::c_int = 0x400000; + +pub const EBFONT: ::c_int = 109; +pub const ENOSTR: ::c_int = 72; +pub const ENODATA: ::c_int = 111; +pub const ETIME: ::c_int = 73; +pub const ENOSR: ::c_int = 74; +pub const ENONET: ::c_int = 80; +pub const ENOPKG: ::c_int = 113; +pub const EREMOTE: ::c_int = 71; +pub const ENOLINK: ::c_int = 82; +pub const EADV: ::c_int = 83; +pub const ESRMNT: ::c_int = 84; +pub const ECOMM: ::c_int = 85; +pub const EPROTO: ::c_int = 86; +pub const EDOTDOT: ::c_int = 88; + +pub const SA_NODEFER: ::c_int = 0x20; +pub const SA_RESETHAND: ::c_int = 0x4; +pub const SA_RESTART: ::c_int = 0x2; +pub const SA_NOCLDSTOP: ::c_int = 0x00000008; + +pub const EPOLL_CLOEXEC: ::c_int = 0x400000; + +pub const EFD_CLOEXEC: ::c_int = 0x400000; pub const __SIZEOF_PTHREAD_CONDATTR_T: usize = 4; pub const __SIZEOF_PTHREAD_MUTEX_T: usize = 40; pub const __SIZEOF_PTHREAD_MUTEXATTR_T: usize = 4; diff --git a/src/unix/notbsd/linux/other/b64/x86_64.rs b/src/unix/notbsd/linux/other/b64/x86_64.rs index 69295e6d5ded8..5b48ee7629d57 100644 --- a/src/unix/notbsd/linux/other/b64/x86_64.rs +++ b/src/unix/notbsd/linux/other/b64/x86_64.rs @@ -5,6 +5,7 @@ pub type wchar_t = i32; pub type nlink_t = u64; pub type blksize_t = i64; pub type greg_t = i64; +pub type suseconds_t = i64; s! { pub struct stat { @@ -120,6 +121,199 @@ s! { } } +pub const RLIMIT_NOFILE: ::c_int = 7; +pub const RLIMIT_NPROC: ::c_int = 6; + +pub const O_APPEND: ::c_int = 1024; +pub const O_CREAT: ::c_int = 64; +pub const O_EXCL: ::c_int = 128; +pub const O_NOCTTY: ::c_int = 256; +pub const O_NONBLOCK: ::c_int = 2048; +pub const O_SYNC: ::c_int = 1052672; +pub const O_RSYNC: ::c_int = 1052672; +pub const O_DSYNC: ::c_int = 4096; +pub const O_FSYNC: ::c_int = 0x101000; + +pub const MAP_GROWSDOWN: ::c_int = 0x0100; + +pub const EDEADLK: ::c_int = 35; +pub const ENAMETOOLONG: ::c_int = 36; +pub const ENOLCK: ::c_int = 37; +pub const ENOSYS: ::c_int = 38; +pub const ENOTEMPTY: ::c_int = 39; +pub const ELOOP: ::c_int = 40; +pub const ENOMSG: ::c_int = 42; +pub const EIDRM: ::c_int = 43; +pub const ECHRNG: ::c_int = 44; +pub const EL2NSYNC: ::c_int = 45; +pub const EL3HLT: ::c_int = 46; +pub const EL3RST: ::c_int = 47; +pub const ELNRNG: ::c_int = 48; +pub const EUNATCH: ::c_int = 49; +pub const ENOCSI: ::c_int = 50; +pub const EL2HLT: ::c_int = 51; +pub const EBADE: ::c_int = 52; +pub const EBADR: ::c_int = 53; +pub const EXFULL: ::c_int = 54; +pub const ENOANO: ::c_int = 55; +pub const EBADRQC: ::c_int = 56; +pub const EBADSLT: ::c_int = 57; +pub const EMULTIHOP: ::c_int = 72; +pub const EOVERFLOW: ::c_int = 75; +pub const ENOTUNIQ: ::c_int = 76; +pub const EBADFD: ::c_int = 77; +pub const EBADMSG: ::c_int = 74; +pub const EREMCHG: ::c_int = 78; +pub const ELIBACC: ::c_int = 79; +pub const ELIBBAD: ::c_int = 80; +pub const ELIBSCN: ::c_int = 81; +pub const ELIBMAX: ::c_int = 82; +pub const ELIBEXEC: ::c_int = 83; +pub const EILSEQ: ::c_int = 84; +pub const ERESTART: ::c_int = 85; +pub const ESTRPIPE: ::c_int = 86; +pub const EUSERS: ::c_int = 87; +pub const ENOTSOCK: ::c_int = 88; +pub const EDESTADDRREQ: ::c_int = 89; +pub const EMSGSIZE: ::c_int = 90; +pub const EPROTOTYPE: ::c_int = 91; +pub const ENOPROTOOPT: ::c_int = 92; +pub const EPROTONOSUPPORT: ::c_int = 93; +pub const ESOCKTNOSUPPORT: ::c_int = 94; +pub const EOPNOTSUPP: ::c_int = 95; +pub const EPFNOSUPPORT: ::c_int = 96; +pub const EAFNOSUPPORT: ::c_int = 97; +pub const EADDRINUSE: ::c_int = 98; +pub const EADDRNOTAVAIL: ::c_int = 99; +pub const ENETDOWN: ::c_int = 100; +pub const ENETUNREACH: ::c_int = 101; +pub const ENETRESET: ::c_int = 102; +pub const ECONNABORTED: ::c_int = 103; +pub const ECONNRESET: ::c_int = 104; +pub const ENOBUFS: ::c_int = 105; +pub const EISCONN: ::c_int = 106; +pub const ENOTCONN: ::c_int = 107; +pub const ESHUTDOWN: ::c_int = 108; +pub const ETOOMANYREFS: ::c_int = 109; +pub const ETIMEDOUT: ::c_int = 110; +pub const ECONNREFUSED: ::c_int = 111; +pub const EHOSTDOWN: ::c_int = 112; +pub const EHOSTUNREACH: ::c_int = 113; +pub const EALREADY: ::c_int = 114; +pub const EINPROGRESS: ::c_int = 115; +pub const ESTALE: ::c_int = 116; +pub const EDQUOT: ::c_int = 122; +pub const ENOMEDIUM: ::c_int = 123; +pub const EMEDIUMTYPE: ::c_int = 124; +pub const ECANCELED: ::c_int = 125; +pub const ENOKEY: ::c_int = 126; +pub const EKEYEXPIRED: ::c_int = 127; +pub const EKEYREVOKED: ::c_int = 128; +pub const EKEYREJECTED: ::c_int = 129; +pub const EOWNERDEAD: ::c_int = 130; +pub const ENOTRECOVERABLE: ::c_int = 131; +pub const EHWPOISON: ::c_int = 133; +pub const ERFKILL: ::c_int = 132; + +pub const SOL_SOCKET: ::c_int = 1; + +pub const SO_REUSEADDR: ::c_int = 2; +pub const SO_TYPE: ::c_int = 3; +pub const SO_ERROR: ::c_int = 4; +pub const SO_DONTROUTE: ::c_int = 5; +pub const SO_BROADCAST: ::c_int = 6; +pub const SO_SNDBUF: ::c_int = 7; +pub const SO_RCVBUF: ::c_int = 8; +pub const SO_KEEPALIVE: ::c_int = 9; +pub const SO_OOBINLINE: ::c_int = 10; +pub const SO_LINGER: ::c_int = 13; +pub const SO_REUSEPORT: ::c_int = 15; +pub const SO_ACCEPTCONN: ::c_int = 30; + +pub const SA_ONSTACK: ::c_int = 0x08000000; +pub const SA_SIGINFO: ::c_int = 0x00000004; +pub const SA_NOCLDWAIT: ::c_int = 0x00000002; + +pub const SIGCHLD: ::c_int = 17; +pub const SIGBUS: ::c_int = 7; +pub const SIGUSR1: ::c_int = 10; +pub const SIGUSR2: ::c_int = 12; +pub const SIGCONT: ::c_int = 18; +pub const SIGSTOP: ::c_int = 19; +pub const SIGTSTP: ::c_int = 20; +pub const SIGURG: ::c_int = 23; +pub const SIGIO: ::c_int = 29; +pub const SIGSYS: ::c_int = 31; +pub const SIGSTKFLT: ::c_int = 16; +pub const SIGUNUSED: ::c_int = 31; +pub const SIGPOLL: ::c_int = 29; +pub const SIGPWR: ::c_int = 30; +pub const SIG_SETMASK: ::c_int = 2; +pub const SIG_BLOCK: ::c_int = 0x000000; +pub const SIG_UNBLOCK: ::c_int = 0x01; + +pub const POLLWRNORM: ::c_short = 0x100; +pub const POLLWRBAND: ::c_short = 0x200; + +pub const O_ASYNC: ::c_int = 0x2000; +pub const O_NDELAY: ::c_int = 0x800; + +pub const PTRACE_DETACH: ::c_uint = 17; + +pub const EFD_NONBLOCK: ::c_int = 0x800; + +pub const F_GETLK: ::c_int = 5; +pub const F_GETOWN: ::c_int = 9; +pub const F_SETOWN: ::c_int = 8; +pub const F_SETLK: ::c_int = 6; +pub const F_SETLKW: ::c_int = 7; + +pub const SFD_NONBLOCK: ::c_int = 0x0800; + +pub const TIOCEXCL: ::c_ulong = 0x540C; +pub const TIOCNXCL: ::c_ulong = 0x540D; +pub const TIOCSCTTY: ::c_ulong = 0x540E; +pub const TIOCSTI: ::c_ulong = 0x5412; +pub const TIOCMGET: ::c_ulong = 0x5415; +pub const TIOCMBIS: ::c_ulong = 0x5416; +pub const TIOCMBIC: ::c_ulong = 0x5417; +pub const TIOCMSET: ::c_ulong = 0x5418; +pub const TIOCCONS: ::c_ulong = 0x541D; + +pub const CLONE_NEWCGROUP: ::c_int = 0x02000000; + +pub const SFD_CLOEXEC: ::c_int = 0x080000; + +pub const NCCS: usize = 32; + +pub const O_TRUNC: ::c_int = 512; + +pub const O_CLOEXEC: ::c_int = 0x80000; + +pub const EBFONT: ::c_int = 59; +pub const ENOSTR: ::c_int = 60; +pub const ENODATA: ::c_int = 61; +pub const ETIME: ::c_int = 62; +pub const ENOSR: ::c_int = 63; +pub const ENONET: ::c_int = 64; +pub const ENOPKG: ::c_int = 65; +pub const EREMOTE: ::c_int = 66; +pub const ENOLINK: ::c_int = 67; +pub const EADV: ::c_int = 68; +pub const ESRMNT: ::c_int = 69; +pub const ECOMM: ::c_int = 70; +pub const EPROTO: ::c_int = 71; +pub const EDOTDOT: ::c_int = 73; + +pub const SA_NODEFER: ::c_int = 0x40000000; +pub const SA_RESETHAND: ::c_int = 0x80000000; +pub const SA_RESTART: ::c_int = 0x10000000; +pub const SA_NOCLDSTOP: ::c_int = 0x00000001; + +pub const EPOLL_CLOEXEC: ::c_int = 0x80000; + +pub const EFD_CLOEXEC: ::c_int = 0x80000; + pub const __SIZEOF_PTHREAD_CONDATTR_T: usize = 4; pub const __SIZEOF_PTHREAD_MUTEX_T: usize = 40; pub const __SIZEOF_PTHREAD_MUTEXATTR_T: usize = 4; diff --git a/src/unix/notbsd/linux/other/mod.rs b/src/unix/notbsd/linux/other/mod.rs index b26362bb7c3ef..3a64de6bf5736 100644 --- a/src/unix/notbsd/linux/other/mod.rs +++ b/src/unix/notbsd/linux/other/mod.rs @@ -176,57 +176,12 @@ pub const DEAD_PROCESS: ::c_short = 8; pub const ACCOUNTING: ::c_short = 9; pub const RLIMIT_RSS: ::c_int = 5; -#[cfg(not(target_arch = "sparc64"))] -pub const RLIMIT_NOFILE: ::c_int = 7; -#[cfg(target_arch = "sparc64")] -pub const RLIMIT_NOFILE: ::c_int = 6; pub const RLIMIT_AS: ::c_int = 9; -#[cfg(not(target_arch = "sparc64"))] -pub const RLIMIT_NPROC: ::c_int = 6; -#[cfg(target_arch = "sparc64")] -pub const RLIMIT_NPROC: ::c_int = 7; pub const RLIMIT_MEMLOCK: ::c_int = 8; pub const RLIM_INFINITY: ::rlim_t = !0; pub const RLIMIT_RTTIME: ::c_int = 15; pub const RLIMIT_NLIMITS: ::c_int = 16; -#[cfg(not(target_arch = "sparc64"))] -pub const O_APPEND: ::c_int = 1024; -#[cfg(target_arch = "sparc64")] -pub const O_APPEND: ::c_int = 0x8; -#[cfg(not(target_arch = "sparc64"))] -pub const O_CREAT: ::c_int = 64; -#[cfg(target_arch = "sparc64")] -pub const O_CREAT: ::c_int = 0x200; -#[cfg(not(target_arch = "sparc64"))] -pub const O_EXCL: ::c_int = 128; -#[cfg(target_arch = "sparc64")] -pub const O_EXCL: ::c_int = 0x800; -#[cfg(not(target_arch = "sparc64"))] -pub const O_NOCTTY: ::c_int = 256; -#[cfg(target_arch = "sparc64")] -pub const O_NOCTTY: ::c_int = 0x8000; -#[cfg(not(target_arch = "sparc64"))] -pub const O_NONBLOCK: ::c_int = 2048; -#[cfg(target_arch = "sparc64")] -pub const O_NONBLOCK: ::c_int = 0x4000; -#[cfg(not(target_arch = "sparc64"))] -pub const O_SYNC: ::c_int = 1052672; -#[cfg(target_arch = "sparc64")] -pub const O_SYNC: ::c_int = 0x802000; -#[cfg(not(target_arch = "sparc64"))] -pub const O_RSYNC: ::c_int = 1052672; -#[cfg(target_arch = "sparc64")] -pub const O_RSYNC: ::c_int = 0x802000; -#[cfg(not(target_arch = "sparc64"))] -pub const O_DSYNC: ::c_int = 4096; -#[cfg(target_arch = "sparc64")] -pub const O_DSYNC: ::c_int = 0x2000; -#[cfg(not(target_arch = "sparc64"))] -pub const O_FSYNC: ::c_int = 0x101000; -#[cfg(target_arch = "sparc64")] -pub const O_FSYNC: ::c_int = 0x802000; - pub const SOCK_NONBLOCK: ::c_int = O_NONBLOCK; pub const LC_PAPER: ::c_int = 7; @@ -256,393 +211,23 @@ pub const LC_ALL_MASK: ::c_int = ::LC_CTYPE_MASK pub const MAP_ANON: ::c_int = 0x0020; pub const MAP_ANONYMOUS: ::c_int = 0x0020; -#[cfg(not(target_arch = "sparc64"))] -pub const MAP_GROWSDOWN: ::c_int = 0x0100; -#[cfg(target_arch = "sparc64")] -pub const MAP_GROWSDOWN: ::c_int = 0x0200; pub const MAP_DENYWRITE: ::c_int = 0x0800; pub const MAP_EXECUTABLE: ::c_int = 0x01000; pub const MAP_POPULATE: ::c_int = 0x08000; pub const MAP_NONBLOCK: ::c_int = 0x010000; pub const MAP_STACK: ::c_int = 0x020000; -#[cfg(not(target_arch = "sparc64"))] -pub const EDEADLK: ::c_int = 35; -#[cfg(target_arch = "sparc64")] -pub const EDEADLK: ::c_int = 78; -#[cfg(not(target_arch = "sparc64"))] -pub const ENAMETOOLONG: ::c_int = 36; -#[cfg(target_arch = "sparc64")] -pub const ENAMETOOLONG: ::c_int = 63; -#[cfg(not(target_arch = "sparc64"))] -pub const ENOLCK: ::c_int = 37; -#[cfg(target_arch = "sparc64")] -pub const ENOLCK: ::c_int = 79; -#[cfg(not(target_arch = "sparc64"))] -pub const ENOSYS: ::c_int = 38; -#[cfg(target_arch = "sparc64")] -pub const ENOSYS: ::c_int = 90; -#[cfg(not(target_arch = "sparc64"))] -pub const ENOTEMPTY: ::c_int = 39; -#[cfg(target_arch = "sparc64")] -pub const ENOTEMPTY: ::c_int = 66; -#[cfg(not(target_arch = "sparc64"))] -pub const ELOOP: ::c_int = 40; -#[cfg(target_arch = "sparc64")] -pub const ELOOP: ::c_int = 62; -#[cfg(not(target_arch = "sparc64"))] -pub const ENOMSG: ::c_int = 42; -#[cfg(target_arch = "sparc64")] -pub const ENOMSG: ::c_int = 75; -#[cfg(not(target_arch = "sparc64"))] -pub const EIDRM: ::c_int = 43; -#[cfg(target_arch = "sparc64")] -pub const EIDRM: ::c_int = 77; -#[cfg(not(target_arch = "sparc64"))] -pub const ECHRNG: ::c_int = 44; -#[cfg(target_arch = "sparc64")] -pub const ECHRNG: ::c_int = 94; -#[cfg(not(target_arch = "sparc64"))] -pub const EL2NSYNC: ::c_int = 45; -#[cfg(target_arch = "sparc64")] -pub const EL2NSYNC: ::c_int = 95; -#[cfg(not(target_arch = "sparc64"))] -pub const EL3HLT: ::c_int = 46; -#[cfg(target_arch = "sparc64")] -pub const EL3HLT: ::c_int = 96; -#[cfg(not(target_arch = "sparc64"))] -pub const EL3RST: ::c_int = 47; -#[cfg(target_arch = "sparc64")] -pub const EL3RST: ::c_int = 97; -#[cfg(not(target_arch = "sparc64"))] -pub const ELNRNG: ::c_int = 48; -#[cfg(target_arch = "sparc64")] -pub const ELNRNG: ::c_int = 98; -#[cfg(not(target_arch = "sparc64"))] -pub const EUNATCH: ::c_int = 49; -#[cfg(target_arch = "sparc64")] -pub const EUNATCH: ::c_int = 99; -#[cfg(not(target_arch = "sparc64"))] -pub const ENOCSI: ::c_int = 50; -#[cfg(target_arch = "sparc64")] -pub const ENOCSI: ::c_int = 100; -#[cfg(not(target_arch = "sparc64"))] -pub const EL2HLT: ::c_int = 51; -#[cfg(target_arch = "sparc64")] -pub const EL2HLT: ::c_int = 101; -#[cfg(not(target_arch = "sparc64"))] -pub const EBADE: ::c_int = 52; -#[cfg(target_arch = "sparc64")] -pub const EBADE: ::c_int = 102; -#[cfg(not(target_arch = "sparc64"))] -pub const EBADR: ::c_int = 53; -#[cfg(target_arch = "sparc64")] -pub const EBADR: ::c_int = 103; -#[cfg(not(target_arch = "sparc64"))] -pub const EXFULL: ::c_int = 54; -#[cfg(target_arch = "sparc64")] -pub const EXFULL: ::c_int = 104; -#[cfg(not(target_arch = "sparc64"))] -pub const ENOANO: ::c_int = 55; -#[cfg(target_arch = "sparc64")] -pub const ENOANO: ::c_int = 105; -#[cfg(not(target_arch = "sparc64"))] -pub const EBADRQC: ::c_int = 56; -#[cfg(target_arch = "sparc64")] -pub const EBADRQC: ::c_int = 106; -#[cfg(not(target_arch = "sparc64"))] -pub const EBADSLT: ::c_int = 57; -#[cfg(target_arch = "sparc64")] -pub const EBADSLT: ::c_int = 107; -#[cfg(not(target_arch = "sparc64"))] -pub const EMULTIHOP: ::c_int = 72; -#[cfg(target_arch = "sparc64")] -pub const EMULTIHOP: ::c_int = 87; -#[cfg(not(target_arch = "sparc64"))] -pub const EOVERFLOW: ::c_int = 75; -#[cfg(target_arch = "sparc64")] -pub const EOVERFLOW: ::c_int = 92; -#[cfg(not(target_arch = "sparc64"))] -pub const ENOTUNIQ: ::c_int = 76; -#[cfg(target_arch = "sparc64")] -pub const ENOTUNIQ: ::c_int = 115; -#[cfg(not(target_arch = "sparc64"))] -pub const EBADFD: ::c_int = 77; -#[cfg(target_arch = "sparc64")] -pub const EBADFD: ::c_int = 93; -#[cfg(not(target_arch = "sparc64"))] -pub const EBADMSG: ::c_int = 74; -#[cfg(target_arch = "sparc64")] -pub const EBADMSG: ::c_int = 76; -#[cfg(not(target_arch = "sparc64"))] -pub const EREMCHG: ::c_int = 78; -#[cfg(target_arch = "sparc64")] -pub const EREMCHG: ::c_int = 89; -#[cfg(not(target_arch = "sparc64"))] -pub const ELIBACC: ::c_int = 79; -#[cfg(target_arch = "sparc64")] -pub const ELIBACC: ::c_int = 114; -#[cfg(not(target_arch = "sparc64"))] -pub const ELIBBAD: ::c_int = 80; -#[cfg(target_arch = "sparc64")] -pub const ELIBBAD: ::c_int = 112; -#[cfg(not(target_arch = "sparc64"))] -pub const ELIBSCN: ::c_int = 81; -#[cfg(target_arch = "sparc64")] -pub const ELIBSCN: ::c_int = 124; -#[cfg(not(target_arch = "sparc64"))] -pub const ELIBMAX: ::c_int = 82; -#[cfg(target_arch = "sparc64")] -pub const ELIBMAX: ::c_int = 123; -#[cfg(not(target_arch = "sparc64"))] -pub const ELIBEXEC: ::c_int = 83; -#[cfg(target_arch = "sparc64")] -pub const ELIBEXEC: ::c_int = 110; -#[cfg(not(target_arch = "sparc64"))] -pub const EILSEQ: ::c_int = 84; -#[cfg(target_arch = "sparc64")] -pub const EILSEQ: ::c_int = 122; -#[cfg(not(target_arch = "sparc64"))] -pub const ERESTART: ::c_int = 85; -#[cfg(target_arch = "sparc64")] -pub const ERESTART: ::c_int = 116; -#[cfg(not(target_arch = "sparc64"))] -pub const ESTRPIPE: ::c_int = 86; -#[cfg(target_arch = "sparc64")] -pub const ESTRPIPE: ::c_int = 91; -#[cfg(not(target_arch = "sparc64"))] -pub const EUSERS: ::c_int = 87; -#[cfg(target_arch = "sparc64")] -pub const EUSERS: ::c_int = 68; -#[cfg(not(target_arch = "sparc64"))] -pub const ENOTSOCK: ::c_int = 88; -#[cfg(target_arch = "sparc64")] -pub const ENOTSOCK: ::c_int = 38; -#[cfg(not(target_arch = "sparc64"))] -pub const EDESTADDRREQ: ::c_int = 89; -#[cfg(target_arch = "sparc64")] -pub const EDESTADDRREQ: ::c_int = 39; -#[cfg(not(target_arch = "sparc64"))] -pub const EMSGSIZE: ::c_int = 90; -#[cfg(target_arch = "sparc64")] -pub const EMSGSIZE: ::c_int = 40; -#[cfg(not(target_arch = "sparc64"))] -pub const EPROTOTYPE: ::c_int = 91; -#[cfg(target_arch = "sparc64")] -pub const EPROTOTYPE: ::c_int = 41; -#[cfg(not(target_arch = "sparc64"))] -pub const ENOPROTOOPT: ::c_int = 92; -#[cfg(target_arch = "sparc64")] -pub const ENOPROTOOPT: ::c_int = 42; -#[cfg(not(target_arch = "sparc64"))] -pub const EPROTONOSUPPORT: ::c_int = 93; -#[cfg(target_arch = "sparc64")] -pub const EPROTONOSUPPORT: ::c_int = 43; -#[cfg(not(target_arch = "sparc64"))] -pub const ESOCKTNOSUPPORT: ::c_int = 94; -#[cfg(target_arch = "sparc64")] -pub const ESOCKTNOSUPPORT: ::c_int = 44; -#[cfg(not(target_arch = "sparc64"))] -pub const EOPNOTSUPP: ::c_int = 95; -#[cfg(target_arch = "sparc64")] -pub const EOPNOTSUPP: ::c_int = 45; pub const ENOTSUP: ::c_int = EOPNOTSUPP; -#[cfg(not(target_arch = "sparc64"))] -pub const EPFNOSUPPORT: ::c_int = 96; -#[cfg(target_arch = "sparc64")] -pub const EPFNOSUPPORT: ::c_int = 46; -#[cfg(not(target_arch = "sparc64"))] -pub const EAFNOSUPPORT: ::c_int = 97; -#[cfg(target_arch = "sparc64")] -pub const EAFNOSUPPORT: ::c_int = 47; -#[cfg(not(target_arch = "sparc64"))] -pub const EADDRINUSE: ::c_int = 98; -#[cfg(target_arch = "sparc64")] -pub const EADDRINUSE: ::c_int = 48; -#[cfg(not(target_arch = "sparc64"))] -pub const EADDRNOTAVAIL: ::c_int = 99; -#[cfg(target_arch = "sparc64")] -pub const EADDRNOTAVAIL: ::c_int = 49; -#[cfg(not(target_arch = "sparc64"))] -pub const ENETDOWN: ::c_int = 100; -#[cfg(target_arch = "sparc64")] -pub const ENETDOWN: ::c_int = 50; -#[cfg(not(target_arch = "sparc64"))] -pub const ENETUNREACH: ::c_int = 101; -#[cfg(target_arch = "sparc64")] -pub const ENETUNREACH: ::c_int = 51; -#[cfg(not(target_arch = "sparc64"))] -pub const ENETRESET: ::c_int = 102; -#[cfg(target_arch = "sparc64")] -pub const ENETRESET: ::c_int = 52; -#[cfg(not(target_arch = "sparc64"))] -pub const ECONNABORTED: ::c_int = 103; -#[cfg(target_arch = "sparc64")] -pub const ECONNABORTED: ::c_int = 53; -#[cfg(not(target_arch = "sparc64"))] -pub const ECONNRESET: ::c_int = 104; -#[cfg(target_arch = "sparc64")] -pub const ECONNRESET: ::c_int = 54; -#[cfg(not(target_arch = "sparc64"))] -pub const ENOBUFS: ::c_int = 105; -#[cfg(target_arch = "sparc64")] -pub const ENOBUFS: ::c_int = 55; -#[cfg(not(target_arch = "sparc64"))] -pub const EISCONN: ::c_int = 106; -#[cfg(target_arch = "sparc64")] -pub const EISCONN: ::c_int = 56; -#[cfg(not(target_arch = "sparc64"))] -pub const ENOTCONN: ::c_int = 107; -#[cfg(target_arch = "sparc64")] -pub const ENOTCONN: ::c_int = 57; -#[cfg(not(target_arch = "sparc64"))] -pub const ESHUTDOWN: ::c_int = 108; -#[cfg(target_arch = "sparc64")] -pub const ESHUTDOWN: ::c_int = 58; -#[cfg(not(target_arch = "sparc64"))] -pub const ETOOMANYREFS: ::c_int = 109; -#[cfg(target_arch = "sparc64")] -pub const ETOOMANYREFS: ::c_int = 59; -#[cfg(not(target_arch = "sparc64"))] -pub const ETIMEDOUT: ::c_int = 110; -#[cfg(target_arch = "sparc64")] -pub const ETIMEDOUT: ::c_int = 60; -#[cfg(not(target_arch = "sparc64"))] -pub const ECONNREFUSED: ::c_int = 111; -#[cfg(target_arch = "sparc64")] -pub const ECONNREFUSED: ::c_int = 61; -#[cfg(not(target_arch = "sparc64"))] -pub const EHOSTDOWN: ::c_int = 112; -#[cfg(target_arch = "sparc64")] -pub const EHOSTDOWN: ::c_int = 64; -#[cfg(not(target_arch = "sparc64"))] -pub const EHOSTUNREACH: ::c_int = 113; -#[cfg(target_arch = "sparc64")] -pub const EHOSTUNREACH: ::c_int = 65; -#[cfg(not(target_arch = "sparc64"))] -pub const EALREADY: ::c_int = 114; -#[cfg(target_arch = "sparc64")] -pub const EALREADY: ::c_int = 37; -#[cfg(not(target_arch = "sparc64"))] -pub const EINPROGRESS: ::c_int = 115; -#[cfg(target_arch = "sparc64")] -pub const EINPROGRESS: ::c_int = 36; -#[cfg(not(target_arch = "sparc64"))] -pub const ESTALE: ::c_int = 116; -#[cfg(target_arch = "sparc64")] -pub const ESTALE: ::c_int = 70; pub const EUCLEAN: ::c_int = 117; pub const ENOTNAM: ::c_int = 118; pub const ENAVAIL: ::c_int = 119; pub const EISNAM: ::c_int = 120; pub const EREMOTEIO: ::c_int = 121; -#[cfg(not(target_arch = "sparc64"))] -pub const EDQUOT: ::c_int = 122; -#[cfg(target_arch = "sparc64")] -pub const EDQUOT: ::c_int = 69; -#[cfg(not(target_arch = "sparc64"))] -pub const ENOMEDIUM: ::c_int = 123; -#[cfg(target_arch = "sparc64")] -pub const ENOMEDIUM: ::c_int = 125; -#[cfg(not(target_arch = "sparc64"))] -pub const EMEDIUMTYPE: ::c_int = 124; -#[cfg(target_arch = "sparc64")] -pub const EMEDIUMTYPE: ::c_int = 126; -#[cfg(not(target_arch = "sparc64"))] -pub const ECANCELED: ::c_int = 125; -#[cfg(target_arch = "sparc64")] -pub const ECANCELED: ::c_int = 127; -#[cfg(not(target_arch = "sparc64"))] -pub const ENOKEY: ::c_int = 126; -#[cfg(target_arch = "sparc64")] -pub const ENOKEY: ::c_int = 128; -#[cfg(not(target_arch = "sparc64"))] -pub const EKEYEXPIRED: ::c_int = 127; -#[cfg(target_arch = "sparc64")] -pub const EKEYEXPIRED: ::c_int = 129; -#[cfg(not(target_arch = "sparc64"))] -pub const EKEYREVOKED: ::c_int = 128; -#[cfg(target_arch = "sparc64")] -pub const EKEYREVOKED: ::c_int = 130; -#[cfg(not(target_arch = "sparc64"))] -pub const EKEYREJECTED: ::c_int = 129; -#[cfg(target_arch = "sparc64")] -pub const EKEYREJECTED: ::c_int = 131; -#[cfg(not(target_arch = "sparc64"))] -pub const EOWNERDEAD: ::c_int = 130; -#[cfg(target_arch = "sparc64")] -pub const EOWNERDEAD: ::c_int = 132; -#[cfg(not(target_arch = "sparc64"))] -pub const ENOTRECOVERABLE: ::c_int = 131; -#[cfg(target_arch = "sparc64")] -pub const ENOTRECOVERABLE: ::c_int = 133; -#[cfg(not(target_arch = "sparc64"))] -pub const EHWPOISON: ::c_int = 133; -#[cfg(target_arch = "sparc64")] -pub const EHWPOISON: ::c_int = 135; -#[cfg(not(target_arch = "sparc64"))] -pub const ERFKILL: ::c_int = 132; -#[cfg(target_arch = "sparc64")] -pub const ERFKILL: ::c_int = 134; pub const SOCK_STREAM: ::c_int = 1; pub const SOCK_DGRAM: ::c_int = 2; pub const SOCK_SEQPACKET: ::c_int = 5; -#[cfg(not(target_arch = "sparc64"))] -pub const SOL_SOCKET: ::c_int = 1; -#[cfg(target_arch = "sparc64")] -pub const SOL_SOCKET: ::c_int = 0xffff; - -#[cfg(not(target_arch = "sparc64"))] -pub const SO_REUSEADDR: ::c_int = 2; -#[cfg(target_arch = "sparc64")] -pub const SO_REUSEADDR: ::c_int = 4; -#[cfg(not(target_arch = "sparc64"))] -pub const SO_TYPE: ::c_int = 3; -#[cfg(target_arch = "sparc64")] -pub const SO_TYPE: ::c_int = 0x1008; -#[cfg(not(target_arch = "sparc64"))] -pub const SO_ERROR: ::c_int = 4; -#[cfg(target_arch = "sparc64")] -pub const SO_ERROR: ::c_int = 0x1007; -#[cfg(not(target_arch = "sparc64"))] -pub const SO_DONTROUTE: ::c_int = 5; -#[cfg(target_arch = "sparc64")] -pub const SO_DONTROUTE: ::c_int = 16; -#[cfg(not(target_arch = "sparc64"))] -pub const SO_BROADCAST: ::c_int = 6; -#[cfg(target_arch = "sparc64")] -pub const SO_BROADCAST: ::c_int = 32; -#[cfg(not(target_arch = "sparc64"))] -pub const SO_SNDBUF: ::c_int = 7; -#[cfg(target_arch = "sparc64")] -pub const SO_SNDBUF: ::c_int = 0x1001; -#[cfg(not(target_arch = "sparc64"))] -pub const SO_RCVBUF: ::c_int = 8; -#[cfg(target_arch = "sparc64")] -pub const SO_RCVBUF: ::c_int = 0x1002; -#[cfg(not(target_arch = "sparc64"))] -pub const SO_KEEPALIVE: ::c_int = 9; -#[cfg(target_arch = "sparc64")] -pub const SO_KEEPALIVE: ::c_int = 8; -#[cfg(not(target_arch = "sparc64"))] -pub const SO_OOBINLINE: ::c_int = 10; -#[cfg(target_arch = "sparc64")] -pub const SO_OOBINLINE: ::c_int = 0x100; -#[cfg(not(target_arch = "sparc64"))] -pub const SO_LINGER: ::c_int = 13; -#[cfg(target_arch = "sparc64")] -pub const SO_LINGER: ::c_int = 128; -#[cfg(not(target_arch = "sparc64"))] -pub const SO_REUSEPORT: ::c_int = 15; -#[cfg(target_arch = "sparc64")] -pub const SO_REUSEPORT: ::c_int = 0x200; -#[cfg(not(target_arch = "sparc64"))] -pub const SO_ACCEPTCONN: ::c_int = 30; -#[cfg(target_arch = "sparc64")] -pub const SO_ACCEPTCONN: ::c_int = 0x8000; - pub const TCP_COOKIE_TRANSACTIONS: ::c_int = 15; pub const TCP_THIN_LINEAR_TIMEOUTS: ::c_int = 16; pub const TCP_THIN_DUPACK: ::c_int = 17; @@ -654,63 +239,6 @@ pub const TCP_REPAIR_OPTIONS: ::c_int = 22; pub const TCP_FASTOPEN: ::c_int = 23; pub const TCP_TIMESTAMP: ::c_int = 24; -#[cfg(not(target_arch = "sparc64"))] -pub const SA_ONSTACK: ::c_int = 0x08000000; -#[cfg(target_arch = "sparc64")] -pub const SA_ONSTACK: ::c_int = 1; -#[cfg(not(target_arch = "sparc64"))] -pub const SA_SIGINFO: ::c_int = 0x00000004; -#[cfg(target_arch = "sparc64")] -pub const SA_SIGINFO: ::c_int = 0x200; -#[cfg(not(target_arch = "sparc64"))] -pub const SA_NOCLDWAIT: ::c_int = 0x00000002; -#[cfg(target_arch = "sparc64")] -pub const SA_NOCLDWAIT: ::c_int = 0x100; - -#[cfg(not(target_arch = "sparc64"))] -pub const SIGCHLD: ::c_int = 17; -#[cfg(target_arch = "sparc64")] -pub const SIGCHLD: ::c_int = 20; -#[cfg(not(target_arch = "sparc64"))] -pub const SIGBUS: ::c_int = 7; -#[cfg(target_arch = "sparc64")] -pub const SIGBUS: ::c_int = 10; -#[cfg(not(target_arch = "sparc64"))] -pub const SIGUSR1: ::c_int = 10; -#[cfg(target_arch = "sparc64")] -pub const SIGUSR1: ::c_int = 30; -#[cfg(not(target_arch = "sparc64"))] -pub const SIGUSR2: ::c_int = 12; -#[cfg(target_arch = "sparc64")] -pub const SIGUSR2: ::c_int = 31; -#[cfg(not(target_arch = "sparc64"))] -pub const SIGCONT: ::c_int = 18; -#[cfg(target_arch = "sparc64")] -pub const SIGCONT: ::c_int = 19; -#[cfg(not(target_arch = "sparc64"))] -pub const SIGSTOP: ::c_int = 19; -#[cfg(target_arch = "sparc64")] -pub const SIGSTOP: ::c_int = 17; -#[cfg(not(target_arch = "sparc64"))] -pub const SIGTSTP: ::c_int = 20; -#[cfg(target_arch = "sparc64")] -pub const SIGTSTP: ::c_int = 18; -#[cfg(not(target_arch = "sparc64"))] -pub const SIGURG: ::c_int = 23; -#[cfg(target_arch = "sparc64")] -pub const SIGURG: ::c_int = 16; -#[cfg(not(target_arch = "sparc64"))] -pub const SIGIO: ::c_int = 29; -#[cfg(target_arch = "sparc64")] -pub const SIGIO: ::c_int = 23; -#[cfg(not(target_arch = "sparc64"))] -pub const SIGSYS: ::c_int = 31; -#[cfg(target_arch = "sparc64")] -pub const SIGSYS: ::c_int = 12; -#[cfg(not(target_arch = "sparc64"))] -pub const SIGSTKFLT: ::c_int = 16; -#[cfg(not(target_arch = "sparc64"))] -pub const SIGUNUSED: ::c_int = 31; pub const SIGTTIN: ::c_int = 21; pub const SIGTTOU: ::c_int = 22; pub const SIGXCPU: ::c_int = 24; @@ -718,39 +246,11 @@ pub const SIGXFSZ: ::c_int = 25; pub const SIGVTALRM: ::c_int = 26; pub const SIGPROF: ::c_int = 27; pub const SIGWINCH: ::c_int = 28; -#[cfg(not(target_arch = "sparc64"))] -pub const SIGPOLL: ::c_int = 29; -#[cfg(target_arch = "sparc64")] -pub const SIGPOLL: ::c_int = 23; -#[cfg(not(target_arch = "sparc64"))] -pub const SIGPWR: ::c_int = 30; -#[cfg(target_arch = "sparc64")] -pub const SIGPWR: ::c_int = 29; -#[cfg(not(target_arch = "sparc64"))] -pub const SIG_SETMASK: ::c_int = 2; -#[cfg(target_arch = "sparc64")] -pub const SIG_SETMASK: ::c_int = 4; -#[cfg(not(target_arch = "sparc64"))] -pub const SIG_BLOCK: ::c_int = 0x000000; -#[cfg(target_arch = "sparc64")] -pub const SIG_BLOCK: ::c_int = 1; -#[cfg(not(target_arch = "sparc64"))] -pub const SIG_UNBLOCK: ::c_int = 0x01; -#[cfg(target_arch = "sparc64")] -pub const SIG_UNBLOCK: ::c_int = 2; pub const SIGEV_THREAD_ID: ::c_int = 4; pub const POLLRDNORM: ::c_short = 0x040; -#[cfg(not(target_arch = "sparc64"))] -pub const POLLWRNORM: ::c_short = 0x100; -#[cfg(target_arch = "sparc64")] -pub const POLLWRNORM: ::c_short = 4; pub const POLLRDBAND: ::c_short = 0x080; -#[cfg(not(target_arch = "sparc64"))] -pub const POLLWRBAND: ::c_short = 0x200; -#[cfg(target_arch = "sparc64")] -pub const POLLWRBAND: ::c_short = 0x100; pub const FALLOC_FL_KEEP_SIZE: ::c_int = 0x01; pub const FALLOC_FL_PUNCH_HOLE: ::c_int = 0x02; @@ -763,14 +263,6 @@ pub const POSIX_FADV_NOREUSE: ::c_int = 5; pub const POSIX_MADV_DONTNEED: ::c_int = 4; pub const _SC_2_C_VERSION: ::c_int = 96; pub const O_ACCMODE: ::c_int = 3; -#[cfg(not(target_arch = "sparc64"))] -pub const O_ASYNC: ::c_int = 0x2000; -#[cfg(target_arch = "sparc64")] -pub const O_ASYNC: ::c_int = 0x40; -#[cfg(not(target_arch = "sparc64"))] -pub const O_NDELAY: ::c_int = 0x800; -#[cfg(target_arch = "sparc64")] -pub const O_NDELAY: ::c_int = 0x4004; pub const ST_RELATIME: ::c_ulong = 4096; pub const NI_MAXHOST: ::socklen_t = 1025; @@ -819,10 +311,6 @@ pub const PTRACE_CONT: ::c_uint = 7; pub const PTRACE_KILL: ::c_uint = 8; pub const PTRACE_SINGLESTEP: ::c_uint = 9; pub const PTRACE_ATTACH: ::c_uint = 16; -#[cfg(not(target_arch = "sparc64"))] -pub const PTRACE_DETACH: ::c_uint = 17; -#[cfg(target_arch = "sparc64")] -pub const PTRACE_DETACH: ::c_uint = 11; pub const PTRACE_SYSCALL: ::c_uint = 24; pub const PTRACE_SETOPTIONS: ::c_uint = 0x4200; pub const PTRACE_GETEVENTMSG: ::c_uint = 0x4201; @@ -844,40 +332,9 @@ pub const MADV_HUGEPAGE: ::c_int = 14; pub const MADV_NOHUGEPAGE: ::c_int = 15; pub const MAP_HUGETLB: ::c_int = 0x040000; -#[cfg(not(target_arch = "sparc64"))] -pub const EFD_NONBLOCK: ::c_int = 0x800; -#[cfg(target_arch = "sparc64")] -pub const EFD_NONBLOCK: ::c_int = 0x4000; - -#[cfg(not(target_arch = "sparc64"))] -pub const F_GETLK: ::c_int = 5; -#[cfg(target_arch = "sparc64")] -pub const F_GETLK: ::c_int = 7; -#[cfg(not(target_arch = "sparc64"))] -pub const F_GETOWN: ::c_int = 9; -#[cfg(target_arch = "sparc64")] -pub const F_GETOWN: ::c_int = 5; -#[cfg(not(target_arch = "sparc64"))] -pub const F_SETOWN: ::c_int = 8; -#[cfg(target_arch = "sparc64")] -pub const F_SETOWN: ::c_int = 6; -#[cfg(not(target_arch = "sparc64"))] -pub const F_SETLK: ::c_int = 6; -#[cfg(target_arch = "sparc64")] -pub const F_SETLK: ::c_int = 8; -#[cfg(not(target_arch = "sparc64"))] -pub const F_SETLKW: ::c_int = 7; -#[cfg(target_arch = "sparc64")] -pub const F_SETLKW: ::c_int = 9; - pub const SEEK_DATA: ::c_int = 3; pub const SEEK_HOLE: ::c_int = 4; -#[cfg(not(target_arch = "sparc64"))] -pub const SFD_NONBLOCK: ::c_int = 0x0800; -#[cfg(target_arch = "sparc64")] -pub const SFD_NONBLOCK: ::c_int = 0x4000; - pub const TCSANOW: ::c_int = 0; pub const TCSADRAIN: ::c_int = 1; pub const TCSAFLUSH: ::c_int = 2; @@ -886,42 +343,6 @@ pub const TIOCGSOFTCAR: ::c_ulong = 0x40047464; pub const TIOCSSOFTCAR: ::c_ulong = 0x80047465; pub const TIOCLINUX: ::c_ulong = 0x541C; pub const TIOCGSERIAL: ::c_ulong = 0x541E; -#[cfg(not(target_arch = "sparc64"))] -pub const TIOCEXCL: ::c_ulong = 0x540C; -#[cfg(target_arch = "sparc64")] -pub const TIOCEXCL: ::c_ulong = 0x2000740d; -#[cfg(not(target_arch = "sparc64"))] -pub const TIOCNXCL: ::c_ulong = 0x540D; -#[cfg(target_arch = "sparc64")] -pub const TIOCNXCL: ::c_ulong = 0x2000740e; -#[cfg(not(target_arch = "sparc64"))] -pub const TIOCSCTTY: ::c_ulong = 0x540E; -#[cfg(target_arch = "sparc64")] -pub const TIOCSCTTY: ::c_ulong = 0x20007484; -#[cfg(not(target_arch = "sparc64"))] -pub const TIOCSTI: ::c_ulong = 0x5412; -#[cfg(target_arch = "sparc64")] -pub const TIOCSTI: ::c_ulong = 0x80017472; -#[cfg(not(target_arch = "sparc64"))] -pub const TIOCMGET: ::c_ulong = 0x5415; -#[cfg(target_arch = "sparc64")] -pub const TIOCMGET: ::c_ulong = 0x4004746a; -#[cfg(not(target_arch = "sparc64"))] -pub const TIOCMBIS: ::c_ulong = 0x5416; -#[cfg(target_arch = "sparc64")] -pub const TIOCMBIS: ::c_ulong = 0x8004746c; -#[cfg(not(target_arch = "sparc64"))] -pub const TIOCMBIC: ::c_ulong = 0x5417; -#[cfg(target_arch = "sparc64")] -pub const TIOCMBIC: ::c_ulong = 0x8004746b; -#[cfg(not(target_arch = "sparc64"))] -pub const TIOCMSET: ::c_ulong = 0x5418; -#[cfg(target_arch = "sparc64")] -pub const TIOCMSET: ::c_ulong = 0x8004746d; -#[cfg(not(target_arch = "sparc64"))] -pub const TIOCCONS: ::c_ulong = 0x541D; -#[cfg(target_arch = "sparc64")] -pub const TIOCCONS: ::c_ulong = 0x20007424; pub const RTLD_DEEPBIND: ::c_int = 0x8; pub const RTLD_GLOBAL: ::c_int = 0x100; diff --git a/src/unix/notbsd/linux/s390x.rs b/src/unix/notbsd/linux/s390x.rs index 12321b018f893..b646647b255d4 100644 --- a/src/unix/notbsd/linux/s390x.rs +++ b/src/unix/notbsd/linux/s390x.rs @@ -273,6 +273,40 @@ s! { } } +pub const CLONE_NEWCGROUP: ::c_int = 0x02000000; + +pub const SFD_CLOEXEC: ::c_int = 0x080000; + +pub const NCCS: usize = 32; + +pub const O_TRUNC: ::c_int = 512; + +pub const O_CLOEXEC: ::c_int = 0x80000; + +pub const EBFONT: ::c_int = 59; +pub const ENOSTR: ::c_int = 60; +pub const ENODATA: ::c_int = 61; +pub const ETIME: ::c_int = 62; +pub const ENOSR: ::c_int = 63; +pub const ENONET: ::c_int = 64; +pub const ENOPKG: ::c_int = 65; +pub const EREMOTE: ::c_int = 66; +pub const ENOLINK: ::c_int = 67; +pub const EADV: ::c_int = 68; +pub const ESRMNT: ::c_int = 69; +pub const ECOMM: ::c_int = 70; +pub const EPROTO: ::c_int = 71; +pub const EDOTDOT: ::c_int = 73; + +pub const SA_NODEFER: ::c_int = 0x40000000; +pub const SA_RESETHAND: ::c_int = 0x80000000; +pub const SA_RESTART: ::c_int = 0x10000000; +pub const SA_NOCLDSTOP: ::c_int = 0x00000001; + +pub const EPOLL_CLOEXEC: ::c_int = 0x80000; + +pub const EFD_CLOEXEC: ::c_int = 0x80000; + pub const POSIX_FADV_DONTNEED: ::c_int = 6; pub const POSIX_FADV_NOREUSE: ::c_int = 7; diff --git a/src/unix/notbsd/mod.rs b/src/unix/notbsd/mod.rs index b78e13c01464f..fc01dbed30057 100644 --- a/src/unix/notbsd/mod.rs +++ b/src/unix/notbsd/mod.rs @@ -253,14 +253,6 @@ pub const RUSAGE_SELF: ::c_int = 0; pub const O_RDONLY: ::c_int = 0; pub const O_WRONLY: ::c_int = 1; pub const O_RDWR: ::c_int = 2; -#[cfg(not(all(target_arch = "sparc64", target_os = "linux")))] -pub const O_TRUNC: ::c_int = 512; -#[cfg(all(target_arch = "sparc64", target_os = "linux"))] -pub const O_TRUNC: ::c_int = 0x400; -#[cfg(not(all(target_arch = "sparc64", target_os = "linux")))] -pub const O_CLOEXEC: ::c_int = 0x80000; -#[cfg(all(target_arch = "sparc64", target_os = "linux"))] -pub const O_CLOEXEC: ::c_int = 0x400000; pub const SOCK_CLOEXEC: ::c_int = O_CLOEXEC; @@ -401,63 +393,6 @@ pub const EDOM: ::c_int = 33; pub const ERANGE: ::c_int = 34; pub const EWOULDBLOCK: ::c_int = EAGAIN; -#[cfg(not(all(target_arch = "sparc64", target_os = "linux")))] -pub const EBFONT: ::c_int = 59; -#[cfg(all(target_arch = "sparc64", target_os = "linux"))] -pub const EBFONT: ::c_int = 109; -#[cfg(not(all(target_arch = "sparc64", target_os = "linux")))] -pub const ENOSTR: ::c_int = 60; -#[cfg(all(target_arch = "sparc64", target_os = "linux"))] -pub const ENOSTR: ::c_int = 72; -#[cfg(not(all(target_arch = "sparc64", target_os = "linux")))] -pub const ENODATA: ::c_int = 61; -#[cfg(all(target_arch = "sparc64", target_os = "linux"))] -pub const ENODATA: ::c_int = 111; -#[cfg(not(all(target_arch = "sparc64", target_os = "linux")))] -pub const ETIME: ::c_int = 62; -#[cfg(all(target_arch = "sparc64", target_os = "linux"))] -pub const ETIME: ::c_int = 73; -#[cfg(not(all(target_arch = "sparc64", target_os = "linux")))] -pub const ENOSR: ::c_int = 63; -#[cfg(all(target_arch = "sparc64", target_os = "linux"))] -pub const ENOSR: ::c_int = 74; -#[cfg(not(all(target_arch = "sparc64", target_os = "linux")))] -pub const ENONET: ::c_int = 64; -#[cfg(all(target_arch = "sparc64", target_os = "linux"))] -pub const ENONET: ::c_int = 80; -#[cfg(not(all(target_arch = "sparc64", target_os = "linux")))] -pub const ENOPKG: ::c_int = 65; -#[cfg(all(target_arch = "sparc64", target_os = "linux"))] -pub const ENOPKG: ::c_int = 113; -#[cfg(not(all(target_arch = "sparc64", target_os = "linux")))] -pub const EREMOTE: ::c_int = 66; -#[cfg(all(target_arch = "sparc64", target_os = "linux"))] -pub const EREMOTE: ::c_int = 71; -#[cfg(not(all(target_arch = "sparc64", target_os = "linux")))] -pub const ENOLINK: ::c_int = 67; -#[cfg(all(target_arch = "sparc64", target_os = "linux"))] -pub const ENOLINK: ::c_int = 82; -#[cfg(not(all(target_arch = "sparc64", target_os = "linux")))] -pub const EADV: ::c_int = 68; -#[cfg(all(target_arch = "sparc64", target_os = "linux"))] -pub const EADV: ::c_int = 83; -#[cfg(not(all(target_arch = "sparc64", target_os = "linux")))] -pub const ESRMNT: ::c_int = 69; -#[cfg(all(target_arch = "sparc64", target_os = "linux"))] -pub const ESRMNT: ::c_int = 84; -#[cfg(not(all(target_arch = "sparc64", target_os = "linux")))] -pub const ECOMM: ::c_int = 70; -#[cfg(all(target_arch = "sparc64", target_os = "linux"))] -pub const ECOMM: ::c_int = 85; -#[cfg(not(all(target_arch = "sparc64", target_os = "linux")))] -pub const EPROTO: ::c_int = 71; -#[cfg(all(target_arch = "sparc64", target_os = "linux"))] -pub const EPROTO: ::c_int = 86; -#[cfg(not(all(target_arch = "sparc64", target_os = "linux")))] -pub const EDOTDOT: ::c_int = 73; -#[cfg(all(target_arch = "sparc64", target_os = "linux"))] -pub const EDOTDOT: ::c_int = 88; - pub const AF_PACKET: ::c_int = 17; pub const IPPROTO_RAW: ::c_int = 255; @@ -544,23 +479,6 @@ pub const LOCK_EX: ::c_int = 2; pub const LOCK_NB: ::c_int = 4; pub const LOCK_UN: ::c_int = 8; -#[cfg(not(all(target_arch = "sparc64", target_os = "linux")))] -pub const SA_NODEFER: ::c_int = 0x40000000; -#[cfg(all(target_arch = "sparc64", target_os = "linux"))] -pub const SA_NODEFER: ::c_int = 0x20; -#[cfg(not(all(target_arch = "sparc64", target_os = "linux")))] -pub const SA_RESETHAND: ::c_int = 0x80000000; -#[cfg(all(target_arch = "sparc64", target_os = "linux"))] -pub const SA_RESETHAND: ::c_int = 0x4; -#[cfg(not(all(target_arch = "sparc64", target_os = "linux")))] -pub const SA_RESTART: ::c_int = 0x10000000; -#[cfg(all(target_arch = "sparc64", target_os = "linux"))] -pub const SA_RESTART: ::c_int = 0x2; -#[cfg(not(all(target_arch = "sparc64", target_os = "linux")))] -pub const SA_NOCLDSTOP: ::c_int = 0x00000001; -#[cfg(all(target_arch = "sparc64", target_os = "linux"))] -pub const SA_NOCLDSTOP: ::c_int = 0x00000008; - pub const SS_ONSTACK: ::c_int = 1; pub const SS_DISABLE: ::c_int = 2; @@ -584,11 +502,6 @@ pub const EPOLL_CTL_ADD: ::c_int = 1; pub const EPOLL_CTL_MOD: ::c_int = 3; pub const EPOLL_CTL_DEL: ::c_int = 2; -#[cfg(not(all(target_arch = "sparc64", target_os = "linux")))] -pub const EPOLL_CLOEXEC: ::c_int = 0x80000; -#[cfg(all(target_arch = "sparc64", target_os = "linux"))] -pub const EPOLL_CLOEXEC: ::c_int = 0x400000; - pub const MNT_DETACH: ::c_int = 0x2; pub const MNT_EXPIRE: ::c_int = 0x4; @@ -606,11 +519,6 @@ pub const QIF_USAGE: ::uint32_t = 10; pub const QIF_TIMES: ::uint32_t = 48; pub const QIF_ALL: ::uint32_t = 63; -#[cfg(not(all(target_arch = "sparc64", target_os = "linux")))] -pub const EFD_CLOEXEC: ::c_int = 0x80000; -#[cfg(all(target_arch = "sparc64", target_os = "linux"))] -pub const EFD_CLOEXEC: ::c_int = 0x400000; - pub const MNT_FORCE: ::c_int = 0x1; pub const Q_SYNC: ::c_int = 0x800001; From 67615b49d5ea47c69207987dbb6cff8297821a8b Mon Sep 17 00:00:00 2001 From: Jorge Aparicio Date: Sat, 31 Dec 2016 20:00:49 -0500 Subject: [PATCH 3/3] tidy and last minute fixes --- src/unix/notbsd/linux/other/b32/mod.rs | 3 +++ src/unix/notbsd/linux/other/b64/aarch64.rs | 3 +++ src/unix/notbsd/linux/other/b64/powerpc64.rs | 3 +++ src/unix/notbsd/linux/other/b64/sparc64.rs | 3 +++ src/unix/notbsd/linux/other/b64/x86_64.rs | 3 +++ src/unix/notbsd/linux/other/mod.rs | 18 ++++++++++++------ 6 files changed, 27 insertions(+), 6 deletions(-) diff --git a/src/unix/notbsd/linux/other/b32/mod.rs b/src/unix/notbsd/linux/other/b32/mod.rs index ac70a001562be..0f936c7e2444e 100644 --- a/src/unix/notbsd/linux/other/b32/mod.rs +++ b/src/unix/notbsd/linux/other/b32/mod.rs @@ -63,6 +63,9 @@ s! { } } +pub const TIOCGSOFTCAR: ::c_ulong = 0x5419; +pub const TIOCSSOFTCAR: ::c_ulong = 0x541A; + pub const RLIMIT_NOFILE: ::c_int = 7; pub const RLIMIT_NPROC: ::c_int = 6; diff --git a/src/unix/notbsd/linux/other/b64/aarch64.rs b/src/unix/notbsd/linux/other/b64/aarch64.rs index 13b739953e700..cb0e1a6979e0b 100644 --- a/src/unix/notbsd/linux/other/b64/aarch64.rs +++ b/src/unix/notbsd/linux/other/b64/aarch64.rs @@ -82,6 +82,9 @@ s! { } } +pub const TIOCGSOFTCAR: ::c_ulong = 0x5419; +pub const TIOCSSOFTCAR: ::c_ulong = 0x541A; + pub const RLIMIT_NOFILE: ::c_int = 7; pub const RLIMIT_NPROC: ::c_int = 6; diff --git a/src/unix/notbsd/linux/other/b64/powerpc64.rs b/src/unix/notbsd/linux/other/b64/powerpc64.rs index 233dd51286bed..a5fad66dd1ea2 100644 --- a/src/unix/notbsd/linux/other/b64/powerpc64.rs +++ b/src/unix/notbsd/linux/other/b64/powerpc64.rs @@ -80,6 +80,9 @@ s! { } } +pub const TIOCGSOFTCAR: ::c_ulong = 0x5419; +pub const TIOCSSOFTCAR: ::c_ulong = 0x541A; + pub const RLIMIT_NOFILE: ::c_int = 7; pub const RLIMIT_NPROC: ::c_int = 6; diff --git a/src/unix/notbsd/linux/other/b64/sparc64.rs b/src/unix/notbsd/linux/other/b64/sparc64.rs index a6379bd0daf98..a1ac4f5389ded 100644 --- a/src/unix/notbsd/linux/other/b64/sparc64.rs +++ b/src/unix/notbsd/linux/other/b64/sparc64.rs @@ -82,6 +82,9 @@ s! { } } +pub const TIOCGSOFTCAR: ::c_ulong = 0x40047464; +pub const TIOCSSOFTCAR: ::c_ulong = 0x80047465; + pub const RLIMIT_NOFILE: ::c_int = 6; pub const RLIMIT_NPROC: ::c_int = 7; diff --git a/src/unix/notbsd/linux/other/b64/x86_64.rs b/src/unix/notbsd/linux/other/b64/x86_64.rs index 5b48ee7629d57..d7bf149caa7ee 100644 --- a/src/unix/notbsd/linux/other/b64/x86_64.rs +++ b/src/unix/notbsd/linux/other/b64/x86_64.rs @@ -121,6 +121,9 @@ s! { } } +pub const TIOCGSOFTCAR: ::c_ulong = 0x5419; +pub const TIOCSSOFTCAR: ::c_ulong = 0x541A; + pub const RLIMIT_NOFILE: ::c_int = 7; pub const RLIMIT_NPROC: ::c_int = 6; diff --git a/src/unix/notbsd/linux/other/mod.rs b/src/unix/notbsd/linux/other/mod.rs index 3a64de6bf5736..3beb7886f3477 100644 --- a/src/unix/notbsd/linux/other/mod.rs +++ b/src/unix/notbsd/linux/other/mod.rs @@ -42,14 +42,22 @@ s! { pub ut_host: [::c_char; __UT_HOSTSIZE], pub ut_exit: __exit_status, - #[cfg(any(target_arch = "aarch64", target_arch = "sparc64", target_pointer_width = "32"))] + #[cfg(any(target_arch = "aarch64", + target_arch = "sparc64", + target_pointer_width = "32"))] pub ut_session: ::c_long, - #[cfg(any(target_arch = "aarch64", target_arch = "sparc64", target_pointer_width = "32"))] + #[cfg(any(target_arch = "aarch64", + target_arch = "sparc64", + target_pointer_width = "32"))] pub ut_tv: ::timeval, - #[cfg(not(any(target_arch = "aarch64", target_arch = "sparc64", target_pointer_width = "32")))] + #[cfg(not(any(target_arch = "aarch64", + target_arch = "sparc64", + target_pointer_width = "32")))] pub ut_session: ::int32_t, - #[cfg(not(any(target_arch = "aarch64", target_arch = "sparc64", target_pointer_width = "32")))] + #[cfg(not(any(target_arch = "aarch64", + target_arch = "sparc64", + target_pointer_width = "32")))] pub ut_tv: __timeval, pub ut_addr_v6: [::int32_t; 4], @@ -339,8 +347,6 @@ pub const TCSANOW: ::c_int = 0; pub const TCSADRAIN: ::c_int = 1; pub const TCSAFLUSH: ::c_int = 2; -pub const TIOCGSOFTCAR: ::c_ulong = 0x40047464; -pub const TIOCSSOFTCAR: ::c_ulong = 0x80047465; pub const TIOCLINUX: ::c_ulong = 0x541C; pub const TIOCGSERIAL: ::c_ulong = 0x541E;