aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorbors <bors@rust-lang.org>2019-06-06 19:20:29 +0000
committerbors <bors@rust-lang.org>2019-06-06 19:20:29 +0000
commit9aa66dc0af4fae1d84b9c12c8581a1aeb7ed3b38 (patch)
tree546312990492aedca102c91614bc285178f214b0
parentce7e3a7e866dd7109a971b694a2bf58bd08f101a (diff)
parentfbe38dd0ab5c8ff6db58d77080de3adca1aa17fc (diff)
downloadlibc-9aa66dc0af4fae1d84b9c12c8581a1aeb7ed3b38.tar.gz
Auto merge of #1390 - gnzlbg:ref_gnu, r=gnzlbg
Refactor the GNU module
-rw-r--r--src/unix/linux_like/linux/gnu/align.rs (renamed from src/unix/linux_like/linux/mips/align.rs)0
-rw-r--r--src/unix/linux_like/linux/gnu/b32/arm.rs (renamed from src/unix/linux_like/linux/other/b32/arm.rs)251
-rw-r--r--src/unix/linux_like/linux/gnu/b32/mips.rs (renamed from src/unix/linux_like/linux/mips/mips32.rs)581
-rw-r--r--src/unix/linux_like/linux/gnu/b32/mod.rs (renamed from src/unix/linux_like/linux/other/b32/mod.rs)195
-rw-r--r--src/unix/linux_like/linux/gnu/b32/powerpc.rs (renamed from src/unix/linux_like/linux/other/b32/powerpc.rs)250
-rw-r--r--src/unix/linux_like/linux/gnu/b32/x86.rs (renamed from src/unix/linux_like/linux/other/b32/x86.rs)251
-rw-r--r--src/unix/linux_like/linux/gnu/b64/aarch64.rs (renamed from src/unix/linux_like/linux/other/b64/aarch64.rs)103
-rw-r--r--src/unix/linux_like/linux/gnu/b64/mips64.rs (renamed from src/unix/linux_like/linux/mips/mips64.rs)559
-rw-r--r--src/unix/linux_like/linux/gnu/b64/mod.rs (renamed from src/unix/linux_like/linux/other/b64/mod.rs)19
-rw-r--r--src/unix/linux_like/linux/gnu/b64/powerpc64.rs (renamed from src/unix/linux_like/linux/other/b64/powerpc64.rs)101
-rw-r--r--src/unix/linux_like/linux/gnu/b64/s390x.rs (renamed from src/unix/linux_like/linux/s390x/mod.rs)568
-rw-r--r--src/unix/linux_like/linux/gnu/b64/sparc64.rs (renamed from src/unix/linux_like/linux/other/b64/sparc64.rs)101
-rw-r--r--src/unix/linux_like/linux/gnu/b64/x86_64/mod.rs (renamed from src/unix/linux_like/linux/other/b64/x86_64.rs)111
-rw-r--r--src/unix/linux_like/linux/gnu/b64/x86_64/not_x32.rs (renamed from src/unix/linux_like/linux/other/b64/not_x32.rs)0
-rw-r--r--src/unix/linux_like/linux/gnu/b64/x86_64/x32.rs (renamed from src/unix/linux_like/linux/other/b64/x32.rs)0
-rw-r--r--src/unix/linux_like/linux/gnu/mod.rs (renamed from src/unix/linux_like/linux/other/mod.rs)139
-rw-r--r--src/unix/linux_like/linux/gnu/no_align.rs (renamed from src/unix/linux_like/linux/mips/no_align.rs)0
-rw-r--r--src/unix/linux_like/linux/mips/mod.rs1008
-rw-r--r--src/unix/linux_like/linux/mod.rs13
-rw-r--r--src/unix/linux_like/linux/other/align.rs13
-rw-r--r--src/unix/linux_like/linux/other/no_align.rs10
-rw-r--r--src/unix/linux_like/linux/s390x/align.rs10
-rw-r--r--src/unix/linux_like/linux/s390x/no_align.rs7
23 files changed, 2175 insertions, 2115 deletions
diff --git a/src/unix/linux_like/linux/mips/align.rs b/src/unix/linux_like/linux/gnu/align.rs
index 4a0e0746..4a0e0746 100644
--- a/src/unix/linux_like/linux/mips/align.rs
+++ b/src/unix/linux_like/linux/gnu/align.rs
diff --git a/src/unix/linux_like/linux/other/b32/arm.rs b/src/unix/linux_like/linux/gnu/b32/arm.rs
index a2d190d6..2c1ecf97 100644
--- a/src/unix/linux_like/linux/other/b32/arm.rs
+++ b/src/unix/linux_like/linux/gnu/b32/arm.rs
@@ -2,6 +2,37 @@ pub type c_char = u8;
pub type wchar_t = u32;
s! {
+ pub struct sigaction {
+ pub sa_sigaction: ::sighandler_t,
+ pub sa_mask: ::sigset_t,
+ pub sa_flags: ::c_int,
+ pub sa_restorer: ::Option<extern fn()>,
+ }
+
+ pub struct statfs {
+ pub f_type: ::__fsword_t,
+ pub f_bsize: ::__fsword_t,
+ pub f_blocks: ::fsblkcnt_t,
+ pub f_bfree: ::fsblkcnt_t,
+ pub f_bavail: ::fsblkcnt_t,
+
+ pub f_files: ::fsfilcnt_t,
+ pub f_ffree: ::fsfilcnt_t,
+ pub f_fsid: ::fsid_t,
+
+ pub f_namelen: ::__fsword_t,
+ pub f_frsize: ::__fsword_t,
+ f_spare: [::__fsword_t; 5],
+ }
+
+ pub struct flock {
+ pub l_type: ::c_short,
+ pub l_whence: ::c_short,
+ pub l_start: ::off_t,
+ pub l_len: ::off_t,
+ pub l_pid: ::pid_t,
+ }
+
pub struct ipc_perm {
pub __key: ::key_t,
pub uid: ::uid_t,
@@ -112,18 +143,169 @@ s! {
pub c_ispeed: ::speed_t,
pub c_ospeed: ::speed_t,
}
+
+ pub struct siginfo_t {
+ pub si_signo: ::c_int,
+ pub si_errno: ::c_int,
+ pub si_code: ::c_int,
+ #[doc(hidden)]
+ #[deprecated(
+ since="0.2.54",
+ note="Please leave a comment on \
+ https://github.com/rust-lang/libc/pull/1316 if you're using \
+ this field"
+ )]
+ pub _pad: [::c_int; 29],
+ _align: [usize; 0],
+ }
+
+ pub struct stack_t {
+ pub ss_sp: *mut ::c_void,
+ pub ss_flags: ::c_int,
+ pub ss_size: ::size_t
+ }
}
+pub const RLIM_INFINITY: ::rlim_t = !0;
+pub const VEOF: usize = 4;
+pub const RTLD_DEEPBIND: ::c_int = 0x8;
+pub const RTLD_GLOBAL: ::c_int = 0x100;
+pub const RTLD_NOLOAD: ::c_int = 0x4;
pub const O_DIRECT: ::c_int = 0x10000;
pub const O_DIRECTORY: ::c_int = 0x4000;
pub const O_NOFOLLOW: ::c_int = 0x8000;
pub const O_LARGEFILE: ::c_int = 0o400000;
+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 O_ASYNC: ::c_int = 0x2000;
+pub const O_NDELAY: ::c_int = 0x800;
+pub const RLIMIT_NOFILE: ::__rlimit_resource_t = 7;
+pub const RLIMIT_NPROC: ::__rlimit_resource_t = 6;
+pub const RLIMIT_RSS: ::__rlimit_resource_t = 5;
+pub const RLIMIT_AS: ::__rlimit_resource_t = 9;
+pub const RLIMIT_MEMLOCK: ::__rlimit_resource_t = 8;
+pub const MADV_SOFT_OFFLINE: ::c_int = 101;
pub const MAP_LOCKED: ::c_int = 0x02000;
pub const MAP_NORESERVE: ::c_int = 0x04000;
+pub const MAP_ANON: ::c_int = 0x0020;
+pub const MAP_ANONYMOUS: ::c_int = 0x0020;
+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;
+pub const MAP_HUGETLB: ::c_int = 0x040000;
+pub const MAP_GROWSDOWN: ::c_int = 0x0100;
+
+pub const SOL_SOCKET: ::c_int = 1;
pub const EDEADLOCK: ::c_int = 35;
+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;
+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 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 SO_PROTOCOL: ::c_int = 38;
+pub const SO_DOMAIN: ::c_int = 39;
pub const SO_PASSCRED: ::c_int = 16;
pub const SO_PEERCRED: ::c_int = 17;
pub const SO_RCVLOWAT: ::c_int = 18;
@@ -133,12 +315,56 @@ pub const SO_SNDTIMEO: ::c_int = 21;
pub const SO_SNDBUFFORCE: ::c_int = 32;
pub const SO_RCVBUFFORCE: ::c_int = 33;
+pub const SA_SIGINFO: ::c_int = 0x00000004;
+pub const SA_NOCLDWAIT: ::c_int = 0x00000002;
+
+pub const SOCK_STREAM: ::c_int = 1;
+pub const SOCK_DGRAM: ::c_int = 2;
+
pub const FIOCLEX: ::c_ulong = 0x5451;
pub const FIONBIO: ::c_ulong = 0x5421;
pub const MCL_CURRENT: ::c_int = 0x0001;
pub const MCL_FUTURE: ::c_int = 0x0002;
+pub const POLLWRNORM: ::c_short = 0x100;
+pub const POLLWRBAND: ::c_short = 0x200;
+
+pub const F_GETLK: ::c_int = 5;
+pub const F_GETOWN: ::c_int = 9;
+pub const F_SETOWN: ::c_int = 8;
+
+pub const EFD_NONBLOCK: ::c_int = 0x800;
+pub const SFD_NONBLOCK: ::c_int = 0x0800;
+
+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;
+#[deprecated(
+ since = "0.2.55",
+ note = "Use SIGSYS instead"
+)]
+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 SIGTTIN: ::c_int = 21;
+pub const SIGTTOU: ::c_int = 22;
+pub const SIGXCPU: ::c_int = 24;
+pub const SIGXFSZ: ::c_int = 25;
+pub const SIGVTALRM: ::c_int = 26;
+pub const SIGPROF: ::c_int = 27;
+pub const SIGWINCH: ::c_int = 28;
pub const SIGSTKSZ: ::size_t = 8192;
pub const MINSIGSTKSZ: ::size_t = 2048;
pub const CBAUD: ::tcflag_t = 0o0010017;
@@ -256,6 +482,31 @@ pub const TIOCGRS485: ::c_int = 0x542E;
pub const TIOCSRS485: ::c_int = 0x542F;
pub const FIONREAD: ::c_ulong = 0x541B;
+pub const TIOCGSOFTCAR: ::c_ulong = 0x5419;
+pub const TIOCSSOFTCAR: ::c_ulong = 0x541A;
+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 TCSANOW: ::c_int = 0;
+pub const TCSADRAIN: ::c_int = 1;
+pub const TCSAFLUSH: ::c_int = 2;
+
+pub const TIOCLINUX: ::c_ulong = 0x541C;
+pub const TIOCGSERIAL: ::c_ulong = 0x541E;
+pub const TIOCM_ST: ::c_int = 0x008;
+pub const TIOCM_SR: ::c_int = 0x010;
+pub const TIOCM_CTS: ::c_int = 0x020;
+pub const TIOCM_CAR: ::c_int = 0x040;
+pub const TIOCM_RNG: ::c_int = 0x080;
+pub const TIOCM_DSR: ::c_int = 0x100;
+
// Syscall table
pub const SYS_restart_syscall: ::c_long = 0;
pub const SYS_exit: ::c_long = 1;
diff --git a/src/unix/linux_like/linux/mips/mips32.rs b/src/unix/linux_like/linux/gnu/b32/mips.rs
index d9d55891..69374ed2 100644
--- a/src/unix/linux_like/linux/mips/mips32.rs
+++ b/src/unix/linux_like/linux/gnu/b32/mips.rs
@@ -1,60 +1,7 @@
-use pthread_mutex_t;
-
pub type c_char = i8;
-pub type c_long = i32;
-pub type c_ulong = u32;
-pub type clock_t = i32;
-pub type time_t = i32;
-pub type suseconds_t = i32;
pub type wchar_t = i32;
-pub type off_t = i32;
-pub type ino_t = u32;
-pub type blkcnt_t = i32;
-pub type blksize_t = i32;
-pub type nlink_t = u32;
-pub type __u64 = ::c_ulonglong;
s! {
- pub struct aiocb {
- pub aio_fildes: ::c_int,
- pub aio_lio_opcode: ::c_int,
- pub aio_reqprio: ::c_int,
- pub aio_buf: *mut ::c_void,
- pub aio_nbytes: ::size_t,
- pub aio_sigevent: ::sigevent,
- __next_prio: *mut aiocb,
- __abs_prio: ::c_int,
- __policy: ::c_int,
- __error_code: ::c_int,
- __return_value: ::ssize_t,
- pub aio_offset: off_t,
- __unused1: [::c_char; 4],
- __glibc_reserved: [::c_char; 32]
- }
-
- pub struct stat {
- pub st_dev: ::c_ulong,
- st_pad1: [::c_long; 3],
- 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: ::c_ulong,
- pub st_pad2: [::c_long; 2],
- pub st_size: ::off_t,
- st_pad3: ::c_long,
- 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,
- pub st_blksize: ::blksize_t,
- pub st_blocks: ::blkcnt_t,
- st_pad5: [::c_long; 14],
- }
-
pub struct stat64 {
pub st_dev: ::c_ulong,
st_pad1: [::c_long; 3],
@@ -78,6 +25,21 @@ s! {
st_pad5: [::c_long; 14],
}
+ pub struct statfs {
+ pub f_type: ::c_long,
+ pub f_bsize: ::c_long,
+ pub f_frsize: ::c_long,
+ pub f_blocks: ::fsblkcnt_t,
+ pub f_bfree: ::fsblkcnt_t,
+ pub f_files: ::fsblkcnt_t,
+ pub f_ffree: ::fsblkcnt_t,
+ pub f_bavail: ::fsblkcnt_t,
+ pub f_fsid: ::fsid_t,
+
+ pub f_namelen: ::c_long,
+ f_spare: [::c_long; 6],
+ }
+
pub struct statfs64 {
pub f_type: ::c_long,
pub f_bsize: ::c_long,
@@ -93,22 +55,6 @@ s! {
pub f_spare: [::c_long; 5],
}
- pub struct statvfs {
- pub f_bsize: ::c_ulong,
- pub f_frsize: ::c_ulong,
- pub f_blocks: ::fsblkcnt_t,
- pub f_bfree: ::fsblkcnt_t,
- pub f_bavail: ::fsblkcnt_t,
- pub f_files: ::fsfilcnt_t,
- pub f_ffree: ::fsfilcnt_t,
- pub f_favail: ::fsfilcnt_t,
- pub f_fsid: ::c_ulong,
- __f_unused: ::c_int,
- pub f_flag: ::c_ulong,
- pub f_namemax: ::c_ulong,
- __f_spare: [::c_int; 6],
- }
-
pub struct statvfs64 {
pub f_bsize: ::c_ulong,
pub f_frsize: ::c_ulong,
@@ -125,14 +71,10 @@ s! {
__f_spare: [::c_int; 6],
}
- pub struct pthread_attr_t {
- __size: [u32; 9]
- }
-
pub struct sigaction {
pub sa_flags: ::c_int,
pub sa_sigaction: ::sighandler_t,
- pub sa_mask: sigset_t,
+ pub sa_mask: ::sigset_t,
pub sa_restorer: ::Option<extern fn()>,
_resv: [::c_int; 1],
}
@@ -143,10 +85,6 @@ s! {
pub ss_flags: ::c_int,
}
- pub struct sigset_t {
- __val: [::c_ulong; 32],
- }
-
pub struct siginfo_t {
pub si_signo: ::c_int,
pub si_code: ::c_int,
@@ -206,46 +144,6 @@ s! {
__glibc_reserved5: ::c_ulong,
}
- pub struct statfs {
- pub f_type: ::c_long,
- pub f_bsize: ::c_long,
- pub f_frsize: ::c_long,
- pub f_blocks: ::fsblkcnt_t,
- pub f_bfree: ::fsblkcnt_t,
- pub f_files: ::fsblkcnt_t,
- pub f_ffree: ::fsblkcnt_t,
- pub f_bavail: ::fsblkcnt_t,
- pub f_fsid: ::fsid_t,
-
- pub f_namelen: ::c_long,
- f_spare: [::c_long; 6],
- }
-
- pub struct msghdr {
- pub msg_name: *mut ::c_void,
- pub msg_namelen: ::socklen_t,
- pub msg_iov: *mut ::iovec,
- pub msg_iovlen: ::size_t,
- pub msg_control: *mut ::c_void,
- pub msg_controllen: ::size_t,
- pub msg_flags: ::c_int,
- }
-
- pub struct cmsghdr {
- pub cmsg_len: ::size_t,
- pub cmsg_level: ::c_int,
- pub cmsg_type: ::c_int,
- }
-
- pub struct termios {
- pub c_iflag: ::tcflag_t,
- pub c_oflag: ::tcflag_t,
- pub c_cflag: ::tcflag_t,
- pub c_lflag: ::tcflag_t,
- pub c_line: ::cc_t,
- pub c_cc: [::cc_t; ::NCCS],
- }
-
pub struct flock {
pub l_type: ::c_short,
pub l_whence: ::c_short,
@@ -256,85 +154,20 @@ s! {
pad: [::c_long; 4],
}
- pub struct sysinfo {
- pub uptime: ::c_long,
- pub loads: [::c_ulong; 3],
- pub totalram: ::c_ulong,
- pub freeram: ::c_ulong,
- pub sharedram: ::c_ulong,
- pub bufferram: ::c_ulong,
- pub totalswap: ::c_ulong,
- pub freeswap: ::c_ulong,
- pub procs: ::c_ushort,
- pub pad: ::c_ushort,
- pub totalhigh: ::c_ulong,
- pub freehigh: ::c_ulong,
- pub mem_unit: ::c_uint,
- pub _f: [::c_char; 8],
+ pub struct termios2 {
+ pub c_iflag: ::tcflag_t,
+ pub c_oflag: ::tcflag_t,
+ pub c_cflag: ::tcflag_t,
+ pub c_lflag: ::tcflag_t,
+ pub c_line: ::cc_t,
+ pub c_cc: [::cc_t; 23],
+ pub c_ispeed: ::speed_t,
+ pub c_ospeed: ::speed_t,
}
}
-pub const __SIZEOF_PTHREAD_CONDATTR_T: usize = 4;
-pub const __SIZEOF_PTHREAD_MUTEX_T: usize = 24;
-pub const __SIZEOF_PTHREAD_RWLOCK_T: usize = 32;
-pub const __SIZEOF_PTHREAD_MUTEXATTR_T: usize = 4;
-pub const __SIZEOF_PTHREAD_RWLOCKATTR_T: usize = 8;
-
-align_const! {
- #[cfg(target_endian = "little")]
- pub const PTHREAD_RECURSIVE_MUTEX_INITIALIZER_NP: ::pthread_mutex_t =
- pthread_mutex_t {
- size: [
- 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 1, 0, 0, 0, 0, 0, 0, 0, 0,
- 0, 0, 0,
- ],
- };
- #[cfg(target_endian = "little")]
- pub const PTHREAD_ERRORCHECK_MUTEX_INITIALIZER_NP: ::pthread_mutex_t =
- pthread_mutex_t {
- size: [
- 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 2, 0, 0, 0, 0, 0, 0, 0, 0,
- 0, 0, 0,
- ],
- };
- #[cfg(target_endian = "little")]
- pub const PTHREAD_ADAPTIVE_MUTEX_INITIALIZER_NP: ::pthread_mutex_t =
- pthread_mutex_t {
- size: [
- 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 3, 0, 0, 0, 0, 0, 0, 0, 0,
- 0, 0, 0,
- ],
- };
- #[cfg(target_endian = "big")]
- pub const PTHREAD_RECURSIVE_MUTEX_INITIALIZER_NP: ::pthread_mutex_t =
- pthread_mutex_t {
- size: [
- 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 1, 0, 0, 0, 0, 0,
- 0, 0, 0,
- ],
- };
- #[cfg(target_endian = "big")]
- pub const PTHREAD_ERRORCHECK_MUTEX_INITIALIZER_NP: ::pthread_mutex_t =
- pthread_mutex_t {
- size: [
- 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 2, 0, 0, 0, 0, 0,
- 0, 0, 0,
- ],
- };
- #[cfg(target_endian = "big")]
- pub const PTHREAD_ADAPTIVE_MUTEX_INITIALIZER_NP: ::pthread_mutex_t =
- pthread_mutex_t {
- size: [
- 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 3, 0, 0, 0, 0, 0,
- 0, 0, 0,
- ],
- };
-}
-
pub const O_LARGEFILE: ::c_int = 0x2000;
-pub const RLIM_INFINITY: ::rlim_t = 0x7fffffff;
-
pub const SYS_syscall: ::c_long = 4000 + 0;
pub const SYS_exit: ::c_long = 4000 + 1;
pub const SYS_fork: ::c_long = 4000 + 2;
@@ -693,3 +526,367 @@ pub const SYS_pwritev2: ::c_long = 4000 + 362;
pub const SYS_pkey_mprotect: ::c_long = 4000 + 363;
pub const SYS_pkey_alloc: ::c_long = 4000 + 364;
pub const SYS_pkey_free: ::c_long = 4000 + 365;
+
+pub const O_DIRECT: ::c_int = 0x8000;
+pub const O_DIRECTORY: ::c_int = 0x10000;
+pub const O_NOFOLLOW: ::c_int = 0x20000;
+
+pub const RLIM_INFINITY: ::rlim_t = 0x7fffffff;
+pub const RLIMIT_NOFILE: ::__rlimit_resource_t = 5;
+pub const RLIMIT_AS: ::__rlimit_resource_t = 6;
+pub const RLIMIT_RSS: ::__rlimit_resource_t = 7;
+pub const RLIMIT_NPROC: ::__rlimit_resource_t = 8;
+pub const RLIMIT_MEMLOCK: ::__rlimit_resource_t = 9;
+
+pub const O_APPEND: ::c_int = 8;
+pub const O_CREAT: ::c_int = 256;
+pub const O_EXCL: ::c_int = 1024;
+pub const O_NOCTTY: ::c_int = 2048;
+pub const O_NONBLOCK: ::c_int = 128;
+pub const O_SYNC: ::c_int = 0x4010;
+pub const O_RSYNC: ::c_int = 0x4010;
+pub const O_DSYNC: ::c_int = 0x10;
+pub const O_FSYNC: ::c_int = 0x4010;
+pub const O_ASYNC: ::c_int = 0x1000;
+pub const O_NDELAY: ::c_int = 0x80;
+
+pub const EDEADLK: ::c_int = 45;
+pub const ENAMETOOLONG: ::c_int = 78;
+pub const ENOLCK: ::c_int = 46;
+pub const ENOSYS: ::c_int = 89;
+pub const ENOTEMPTY: ::c_int = 93;
+pub const ELOOP: ::c_int = 90;
+pub const ENOMSG: ::c_int = 35;
+pub const EIDRM: ::c_int = 36;
+pub const ECHRNG: ::c_int = 37;
+pub const EL2NSYNC: ::c_int = 38;
+pub const EL3HLT: ::c_int = 39;
+pub const EL3RST: ::c_int = 40;
+pub const ELNRNG: ::c_int = 41;
+pub const EUNATCH: ::c_int = 42;
+pub const ENOCSI: ::c_int = 43;
+pub const EL2HLT: ::c_int = 44;
+pub const EBADE: ::c_int = 50;
+pub const EBADR: ::c_int = 51;
+pub const EXFULL: ::c_int = 52;
+pub const ENOANO: ::c_int = 53;
+pub const EBADRQC: ::c_int = 54;
+pub const EBADSLT: ::c_int = 55;
+pub const EDEADLOCK: ::c_int = 56;
+pub const EMULTIHOP: ::c_int = 74;
+pub const EOVERFLOW: ::c_int = 79;
+pub const ENOTUNIQ: ::c_int = 80;
+pub const EBADFD: ::c_int = 81;
+pub const EBADMSG: ::c_int = 77;
+pub const EREMCHG: ::c_int = 82;
+pub const ELIBACC: ::c_int = 83;
+pub const ELIBBAD: ::c_int = 84;
+pub const ELIBSCN: ::c_int = 85;
+pub const ELIBMAX: ::c_int = 86;
+pub const ELIBEXEC: ::c_int = 87;
+pub const EILSEQ: ::c_int = 88;
+pub const ERESTART: ::c_int = 91;
+pub const ESTRPIPE: ::c_int = 92;
+pub const EUSERS: ::c_int = 94;
+pub const ENOTSOCK: ::c_int = 95;
+pub const EDESTADDRREQ: ::c_int = 96;
+pub const EMSGSIZE: ::c_int = 97;
+pub const EPROTOTYPE: ::c_int = 98;
+pub const ENOPROTOOPT: ::c_int = 99;
+pub const EPROTONOSUPPORT: ::c_int = 120;
+pub const ESOCKTNOSUPPORT: ::c_int = 121;
+pub const EOPNOTSUPP: ::c_int = 122;
+pub const EPFNOSUPPORT: ::c_int = 123;
+pub const EAFNOSUPPORT: ::c_int = 124;
+pub const EADDRINUSE: ::c_int = 125;
+pub const EADDRNOTAVAIL: ::c_int = 126;
+pub const ENETDOWN: ::c_int = 127;
+pub const ENETUNREACH: ::c_int = 128;
+pub const ENETRESET: ::c_int = 129;
+pub const ECONNABORTED: ::c_int = 130;
+pub const ECONNRESET: ::c_int = 131;
+pub const ENOBUFS: ::c_int = 132;
+pub const EISCONN: ::c_int = 133;
+pub const ENOTCONN: ::c_int = 134;
+pub const ESHUTDOWN: ::c_int = 143;
+pub const ETOOMANYREFS: ::c_int = 144;
+pub const ETIMEDOUT: ::c_int = 145;
+pub const ECONNREFUSED: ::c_int = 146;
+pub const EHOSTDOWN: ::c_int = 147;
+pub const EHOSTUNREACH: ::c_int = 148;
+pub const EALREADY: ::c_int = 149;
+pub const EINPROGRESS: ::c_int = 150;
+pub const ESTALE: ::c_int = 151;
+pub const EUCLEAN: ::c_int = 135;
+pub const ENOTNAM: ::c_int = 137;
+pub const ENAVAIL: ::c_int = 138;
+pub const EISNAM: ::c_int = 139;
+pub const EREMOTEIO: ::c_int = 140;
+pub const EDQUOT: ::c_int = 1133;
+pub const ENOMEDIUM: ::c_int = 159;
+pub const EMEDIUMTYPE: ::c_int = 160;
+pub const ECANCELED: ::c_int = 158;
+pub const ENOKEY: ::c_int = 161;
+pub const EKEYEXPIRED: ::c_int = 162;
+pub const EKEYREVOKED: ::c_int = 163;
+pub const EKEYREJECTED: ::c_int = 164;
+pub const EOWNERDEAD: ::c_int = 165;
+pub const ENOTRECOVERABLE: ::c_int = 166;
+pub const ERFKILL: ::c_int = 167;
+
+pub const MAP_NORESERVE: ::c_int = 0x400;
+pub const MAP_ANON: ::c_int = 0x800;
+pub const MAP_ANONYMOUS: ::c_int = 0x800;
+pub const MAP_GROWSDOWN: ::c_int = 0x1000;
+pub const MAP_DENYWRITE: ::c_int = 0x2000;
+pub const MAP_EXECUTABLE: ::c_int = 0x4000;
+pub const MAP_LOCKED: ::c_int = 0x8000;
+pub const MAP_POPULATE: ::c_int = 0x10000;
+pub const MAP_NONBLOCK: ::c_int = 0x20000;
+pub const MAP_STACK: ::c_int = 0x40000;
+
+pub const SOCK_STREAM: ::c_int = 2;
+pub const SOCK_DGRAM: ::c_int = 1;
+
+pub const SOL_SOCKET: ::c_int = 0xffff;
+
+pub const SO_REUSEADDR: ::c_int = 0x0004;
+pub const SO_KEEPALIVE: ::c_int = 0x0008;
+pub const SO_DONTROUTE: ::c_int = 0x0010;
+pub const SO_BROADCAST: ::c_int = 0x0020;
+pub const SO_LINGER: ::c_int = 0x0080;
+pub const SO_OOBINLINE: ::c_int = 0x0100;
+pub const SO_REUSEPORT: ::c_int = 0x0200;
+pub const SO_TYPE: ::c_int = 0x1008;
+pub const SO_STYLE: ::c_int = SO_TYPE;
+pub const SO_ERROR: ::c_int = 0x1007;
+pub const SO_SNDBUF: ::c_int = 0x1001;
+pub const SO_RCVBUF: ::c_int = 0x1002;
+pub const SO_SNDLOWAT: ::c_int = 0x1003;
+pub const SO_RCVLOWAT: ::c_int = 0x1004;
+pub const SO_SNDTIMEO: ::c_int = 0x1005;
+pub const SO_RCVTIMEO: ::c_int = 0x1006;
+pub const SO_ACCEPTCONN: ::c_int = 0x1009;
+pub const SO_PROTOCOL: ::c_int = 0x1028;
+pub const SO_DOMAIN: ::c_int = 0x1029;
+pub const SO_NO_CHECK: ::c_int = 11;
+pub const SO_PASSCRED: ::c_int = 17;
+pub const SO_PEERCRED: ::c_int = 18;
+pub const SO_SECURITY_AUTHENTICATION: ::c_int = 22;
+pub const SO_SECURITY_ENCRYPTION_TRANSPORT: ::c_int = 23;
+pub const SO_SECURITY_ENCRYPTION_NETWORK: ::c_int = 24;
+pub const SO_ATTACH_FILTER: ::c_int = 26;
+pub const SO_DETACH_FILTER: ::c_int = 27;
+pub const SO_GET_FILTER: ::c_int = SO_ATTACH_FILTER;
+pub const SO_PEERNAME: ::c_int = 28;
+pub const SO_PEERSEC: ::c_int = 30;
+pub const SO_SNDBUFFORCE: ::c_int = 31;
+pub const SO_RCVBUFFORCE: ::c_int = 33;
+pub const SO_PASSSEC: ::c_int = 34;
+pub const SO_TIMESTAMPNS: ::c_int = 35;
+pub const SCM_TIMESTAMPNS: ::c_int = SO_TIMESTAMPNS;
+
+pub const SO_WIFI_STATUS: ::c_int = 41;
+pub const SCM_WIFI_STATUS: ::c_int = SO_WIFI_STATUS;
+pub const SO_NOFCS: ::c_int = 43;
+pub const SO_LOCK_FILTER: ::c_int = 44;
+pub const SO_SELECT_ERR_QUEUE: ::c_int = 45;
+pub const SO_MAX_PACING_RATE: ::c_int = 47;
+pub const SO_BPF_EXTENSIONS: ::c_int = 48;
+pub const SO_INCOMING_CPU: ::c_int = 49;
+pub const SO_ATTACH_BPF: ::c_int = 50;
+pub const SO_DETACH_BPF: ::c_int = SO_DETACH_FILTER;
+
+pub const FIOCLEX: ::c_ulong = 0x6601;
+pub const FIONBIO: ::c_ulong = 0x667e;
+
+pub const SA_SIGINFO: ::c_int = 0x00000008;
+pub const SA_NOCLDWAIT: ::c_int = 0x00010000;
+
+pub const SIGCHLD: ::c_int = 18;
+pub const SIGBUS: ::c_int = 10;
+pub const SIGTTIN: ::c_int = 26;
+pub const SIGTTOU: ::c_int = 27;
+pub const SIGXCPU: ::c_int = 30;
+pub const SIGXFSZ: ::c_int = 31;
+pub const SIGVTALRM: ::c_int = 28;
+pub const SIGPROF: ::c_int = 29;
+pub const SIGWINCH: ::c_int = 20;
+pub const SIGUSR1: ::c_int = 16;
+pub const SIGUSR2: ::c_int = 17;
+pub const SIGCONT: ::c_int = 25;
+pub const SIGSTOP: ::c_int = 23;
+pub const SIGTSTP: ::c_int = 24;
+pub const SIGURG: ::c_int = 21;
+pub const SIGIO: ::c_int = 22;
+pub const SIGSYS: ::c_int = 12;
+pub const SIGPOLL: ::c_int = 22;
+pub const SIGPWR: ::c_int = 19;
+pub const SIG_SETMASK: ::c_int = 3;
+pub const SIG_BLOCK: ::c_int = 0x1;
+pub const SIG_UNBLOCK: ::c_int = 0x2;
+
+pub const POLLWRNORM: ::c_short = 0x004;
+pub const POLLWRBAND: ::c_short = 0x100;
+
+pub const VEOF: usize = 16;
+pub const VEOL: usize = 17;
+pub const VEOL2: usize = 6;
+pub const VMIN: usize = 4;
+pub const IEXTEN: ::tcflag_t = 0x00000100;
+pub const TOSTOP: ::tcflag_t = 0x00008000;
+pub const FLUSHO: ::tcflag_t = 0x00002000;
+pub const EXTPROC: ::tcflag_t = 0o200000;
+pub const TCSANOW: ::c_int = 0x540e;
+pub const TCSADRAIN: ::c_int = 0x540f;
+pub const TCSAFLUSH: ::c_int = 0x5410;
+
+pub const PTRACE_GETFPXREGS: ::c_uint = 18;
+pub const PTRACE_SETFPXREGS: ::c_uint = 19;
+
+pub const MAP_HUGETLB: ::c_int = 0x080000;
+
+pub const EFD_NONBLOCK: ::c_int = 0x80;
+
+pub const F_GETLK: ::c_int = 14;
+pub const F_GETOWN: ::c_int = 23;
+pub const F_SETOWN: ::c_int = 24;
+
+pub const SFD_NONBLOCK: ::c_int = 0x80;
+
+pub const TCGETS: ::c_ulong = 0x540d;
+pub const TCSETS: ::c_ulong = 0x540e;
+pub const TCSETSW: ::c_ulong = 0x540f;
+pub const TCSETSF: ::c_ulong = 0x5410;
+pub const TCGETA: ::c_ulong = 0x5401;
+pub const TCSETA: ::c_ulong = 0x5402;
+pub const TCSETAW: ::c_ulong = 0x5403;
+pub const TCSETAF: ::c_ulong = 0x5404;
+pub const TCSBRK: ::c_ulong = 0x5405;
+pub const TCXONC: ::c_ulong = 0x5406;
+pub const TCFLSH: ::c_ulong = 0x5407;
+pub const TIOCGSOFTCAR: ::c_ulong = 0x5481;
+pub const TIOCSSOFTCAR: ::c_ulong = 0x5482;
+pub const TIOCINQ: ::c_ulong = 0x467f;
+pub const TIOCLINUX: ::c_ulong = 0x5483;
+pub const TIOCGSERIAL: ::c_ulong = 0x5484;
+pub const TIOCEXCL: ::c_ulong = 0x740d;
+pub const TIOCNXCL: ::c_ulong = 0x740e;
+pub const TIOCSCTTY: ::c_ulong = 0x5480;
+pub const TIOCGPGRP: ::c_ulong = 0x40047477;
+pub const TIOCSPGRP: ::c_ulong = 0x80047476;
+pub const TIOCOUTQ: ::c_ulong = 0x7472;
+pub const TIOCSTI: ::c_ulong = 0x5472;
+pub const TIOCGWINSZ: ::c_ulong = 0x40087468;
+pub const TIOCSWINSZ: ::c_ulong = 0x80087467;
+pub const TIOCMGET: ::c_ulong = 0x741d;
+pub const TIOCMBIS: ::c_ulong = 0x741b;
+pub const TIOCMBIC: ::c_ulong = 0x741c;
+pub const TIOCMSET: ::c_ulong = 0x741a;
+pub const FIONREAD: ::c_ulong = 0x467f;
+pub const TIOCCONS: ::c_ulong = 0x80047478;
+
+pub const RTLD_DEEPBIND: ::c_int = 0x10;
+pub const RTLD_GLOBAL: ::c_int = 0x4;
+pub const RTLD_NOLOAD: ::c_int = 0x8;
+
+pub const MCL_CURRENT: ::c_int = 0x0001;
+pub const MCL_FUTURE: ::c_int = 0x0002;
+
+pub const SIGSTKSZ: ::size_t = 8192;
+pub const MINSIGSTKSZ: ::size_t = 2048;
+pub const CBAUD: ::tcflag_t = 0o0010017;
+pub const TAB1: ::tcflag_t = 0x00000800;
+pub const TAB2: ::tcflag_t = 0x00001000;
+pub const TAB3: ::tcflag_t = 0x00001800;
+pub const CR1: ::tcflag_t = 0x00000200;
+pub const CR2: ::tcflag_t = 0x00000400;
+pub const CR3: ::tcflag_t = 0x00000600;
+pub const FF1: ::tcflag_t = 0x00008000;
+pub const BS1: ::tcflag_t = 0x00002000;
+pub const VT1: ::tcflag_t = 0x00004000;
+pub const VWERASE: usize = 14;
+pub const VREPRINT: usize = 12;
+pub const VSUSP: usize = 10;
+pub const VSTART: usize = 8;
+pub const VSTOP: usize = 9;
+pub const VDISCARD: usize = 13;
+pub const VTIME: usize = 5;
+pub const IXON: ::tcflag_t = 0x00000400;
+pub const IXOFF: ::tcflag_t = 0x00001000;
+pub const ONLCR: ::tcflag_t = 0x4;
+pub const CSIZE: ::tcflag_t = 0x00000030;
+pub const CS6: ::tcflag_t = 0x00000010;
+pub const CS7: ::tcflag_t = 0x00000020;
+pub const CS8: ::tcflag_t = 0x00000030;
+pub const CSTOPB: ::tcflag_t = 0x00000040;
+pub const CREAD: ::tcflag_t = 0x00000080;
+pub const PARENB: ::tcflag_t = 0x00000100;
+pub const PARODD: ::tcflag_t = 0x00000200;
+pub const HUPCL: ::tcflag_t = 0x00000400;
+pub const CLOCAL: ::tcflag_t = 0x00000800;
+pub const ECHOKE: ::tcflag_t = 0x00000800;
+pub const ECHOE: ::tcflag_t = 0x00000010;
+pub const ECHOK: ::tcflag_t = 0x00000020;
+pub const ECHONL: ::tcflag_t = 0x00000040;
+pub const ECHOPRT: ::tcflag_t = 0x00000400;
+pub const ECHOCTL: ::tcflag_t = 0x00000200;
+pub const ISIG: ::tcflag_t = 0x00000001;
+pub const ICANON: ::tcflag_t = 0x00000002;
+pub const PENDIN: ::tcflag_t = 0x00004000;
+pub const NOFLSH: ::tcflag_t = 0x00000080;
+pub const CIBAUD: ::tcflag_t = 0o02003600000;
+pub const CBAUDEX: ::tcflag_t = 0o010000;
+pub const VSWTC: usize = 7;
+pub const OLCUC: ::tcflag_t = 0o000002;
+pub const NLDLY: ::tcflag_t = 0o000400;
+pub const CRDLY: ::tcflag_t = 0o003000;
+pub const TABDLY: ::tcflag_t = 0o014000;
+pub const BSDLY: ::tcflag_t = 0o020000;
+pub const FFDLY: ::tcflag_t = 0o100000;
+pub const VTDLY: ::tcflag_t = 0o040000;
+pub const XTABS: ::tcflag_t = 0o014000;
+
+pub const B0: ::speed_t = 0o000000;
+pub const B50: ::speed_t = 0o000001;
+pub const B75: ::speed_t = 0o000002;
+pub const B110: ::speed_t = 0o000003;
+pub const B134: ::speed_t = 0o000004;
+pub const B150: ::speed_t = 0o000005;
+pub const B200: ::speed_t = 0o000006;
+pub const B300: ::speed_t = 0o000007;
+pub const B600: ::speed_t = 0o000010;
+pub const B1200: ::speed_t = 0o000011;
+pub const B1800: ::speed_t = 0o000012;
+pub const B2400: ::speed_t = 0o000013;
+pub const B4800: ::speed_t = 0o000014;
+pub const B9600: ::speed_t = 0o000015;
+pub const B19200: ::speed_t = 0o000016;
+pub const B38400: ::speed_t = 0o000017;
+pub const EXTA: ::speed_t = B19200;
+pub const EXTB: ::speed_t = B38400;
+pub const BOTHER: ::speed_t = 0o010000;
+pub const B57600: ::speed_t = 0o010001;
+pub const B115200: ::speed_t = 0o010002;
+pub const B230400: ::speed_t = 0o010003;
+pub const B460800: ::speed_t = 0o010004;
+pub const B500000: ::speed_t = 0o010005;
+pub const B576000: ::speed_t = 0o010006;
+pub const B921600: ::speed_t = 0o010007;
+pub const B1000000: ::speed_t = 0o010010;
+pub const B1152000: ::speed_t = 0o010011;
+pub const B1500000: ::speed_t = 0o010012;
+pub const B2000000: ::speed_t = 0o010013;
+pub const B2500000: ::speed_t = 0o010014;
+pub const B3000000: ::speed_t = 0o010015;
+pub const B3500000: ::speed_t = 0o010016;
+pub const B4000000: ::speed_t = 0o010017;
+
+pub const TIOCM_ST: ::c_int = 0x010;
+pub const TIOCM_SR: ::c_int = 0x020;
+pub const TIOCM_CTS: ::c_int = 0x040;
+pub const TIOCM_CAR: ::c_int = 0x100;
+pub const TIOCM_RNG: ::c_int = 0x200;
+pub const TIOCM_DSR: ::c_int = 0x400;
+
+pub const EHWPOISON: ::c_int = 168;
diff --git a/src/unix/linux_like/linux/other/b32/mod.rs b/src/unix/linux_like/linux/gnu/b32/mod.rs
index 08c0ed23..2e584f21 100644
--- a/src/unix/linux_like/linux/other/b32/mod.rs
+++ b/src/unix/linux_like/linux/gnu/b32/mod.rs
@@ -10,7 +10,6 @@ pub type suseconds_t = i32;
pub type ino_t = u32;
pub type off_t = i32;
pub type blkcnt_t = i32;
-pub type __fsword_t = i32;
pub type fsblkcnt_t = ::c_ulong;
pub type fsfilcnt_t = ::c_ulong;
@@ -21,20 +20,38 @@ pub type msglen_t = ::c_ulong;
pub type blksize_t = i32;
pub type nlink_t = u32;
pub type __u64 = ::c_ulonglong;
+pub type __fsword_t = i32;
s! {
pub struct stat {
+ #[cfg(not(target_arch = "mips"))]
pub st_dev: ::dev_t,
+ #[cfg(target_arch = "mips")]
+ pub st_dev: ::c_ulong,
+
+ #[cfg(not(target_arch = "mips"))]
__pad1: ::c_short,
+ #[cfg(target_arch = "mips")]
+ st_pad1: [::c_long; 3],
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,
+ #[cfg(not(target_arch = "mips"))]
pub st_rdev: ::dev_t,
+ #[cfg(target_arch = "mips")]
+ pub st_rdev: ::c_ulong,
+ #[cfg(not(target_arch = "mips"))]
__pad2: ::c_short,
+ #[cfg(target_arch = "mips")]
+ st_pad2: [::c_long; 2],
pub st_size: ::off_t,
+ #[cfg(target_arch = "mips")]
+ st_pad3: ::c_long,
+ #[cfg(not(target_arch = "mips"))]
pub st_blksize: ::blksize_t,
+ #[cfg(not(target_arch = "mips"))]
pub st_blocks: ::blkcnt_t,
pub st_atime: ::time_t,
pub st_atime_nsec: ::c_long,
@@ -42,8 +59,16 @@ s! {
pub st_mtime_nsec: ::c_long,
pub st_ctime: ::time_t,
pub st_ctime_nsec: ::c_long,
+ #[cfg(not(target_arch = "mips"))]
__unused4: ::c_long,
+ #[cfg(not(target_arch = "mips"))]
__unused5: ::c_long,
+ #[cfg(target_arch = "mips")]
+ pub st_blksize: ::blksize_t,
+ #[cfg(target_arch = "mips")]
+ pub st_blocks: ::blkcnt_t,
+ #[cfg(target_arch = "mips")]
+ st_pad5: [::c_long; 14],
}
pub struct statvfs {
@@ -80,6 +105,10 @@ s! {
pub totalswap: ::c_ulong,
pub freeswap: ::c_ulong,
pub procs: ::c_ushort,
+ #[deprecated(
+ since = "0.2.58",
+ note = "This padding field might become private in the future"
+ )]
pub pad: ::c_ushort,
pub totalhigh: ::c_ulong,
pub freehigh: ::c_ulong,
@@ -88,170 +117,25 @@ s! {
}
}
-pub const TIOCGSOFTCAR: ::c_ulong = 0x5419;
-pub const TIOCSSOFTCAR: ::c_ulong = 0x541A;
-
-pub const RLIMIT_NOFILE: ::__rlimit_resource_t = 7;
-pub const RLIMIT_NPROC: ::__rlimit_resource_t = 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 O_NOATIME: ::c_int = 0o1000000;
pub const O_PATH: ::c_int = 0o10000000;
pub const O_TMPFILE: ::c_int = 0o20000000 | O_DIRECTORY;
-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_PRIORITY: ::c_int = 12;
-pub const SO_LINGER: ::c_int = 13;
pub const SO_BSDCOMPAT: ::c_int = 14;
-pub const SO_REUSEPORT: ::c_int = 15;
pub const SO_BINDTODEVICE: ::c_int = 25;
pub const SO_TIMESTAMP: ::c_int = 29;
-pub const SO_ACCEPTCONN: ::c_int = 30;
pub const SO_MARK: ::c_int = 36;
-pub const SO_PROTOCOL: ::c_int = 38;
-pub const SO_DOMAIN: ::c_int = 39;
pub const SO_RXQ_OVFL: ::c_int = 40;
pub const SO_PEEK_OFF: ::c_int = 42;
pub const SO_BUSY_POLL: ::c_int = 46;
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;
-#[deprecated(
- since = "0.2.55",
- note = "Use SIGSYS instead"
-)]
-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 POSIX_FADV_DONTNEED: ::c_int = 4;
+pub const POSIX_FADV_NOREUSE: ::c_int = 5;
-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;
@@ -259,18 +143,6 @@ pub const F_RDLCK: ::c_int = 0;
pub const F_WRLCK: ::c_int = 1;
pub const F_UNLCK: ::c_int = 2;
-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 SFD_CLOEXEC: ::c_int = 0x080000;
pub const NCCS: usize = 32;
@@ -383,6 +255,9 @@ cfg_if! {
} else if #[cfg(target_arch = "arm")] {
mod arm;
pub use self::arm::*;
+ } else if #[cfg(target_arch = "mips")] {
+ mod mips;
+ pub use self::mips::*;
} else if #[cfg(target_arch = "powerpc")] {
mod powerpc;
pub use self::powerpc::*;
diff --git a/src/unix/linux_like/linux/other/b32/powerpc.rs b/src/unix/linux_like/linux/gnu/b32/powerpc.rs
index a64f0752..66a8097c 100644
--- a/src/unix/linux_like/linux/other/b32/powerpc.rs
+++ b/src/unix/linux_like/linux/gnu/b32/powerpc.rs
@@ -2,6 +2,37 @@ pub type c_char = u8;
pub type wchar_t = i32;
s! {
+ pub struct sigaction {
+ pub sa_sigaction: ::sighandler_t,
+ pub sa_mask: ::sigset_t,
+ pub sa_flags: ::c_int,
+ pub sa_restorer: ::Option<extern fn()>,
+ }
+
+ pub struct statfs {
+ pub f_type: ::__fsword_t,
+ pub f_bsize: ::__fsword_t,
+ pub f_blocks: ::fsblkcnt_t,
+ pub f_bfree: ::fsblkcnt_t,
+ pub f_bavail: ::fsblkcnt_t,
+
+ pub f_files: ::fsfilcnt_t,
+ pub f_ffree: ::fsfilcnt_t,
+ pub f_fsid: ::fsid_t,
+
+ pub f_namelen: ::__fsword_t,
+ pub f_frsize: ::__fsword_t,
+ f_spare: [::__fsword_t; 5],
+ }
+
+ pub struct flock {
+ pub l_type: ::c_short,
+ pub l_whence: ::c_short,
+ pub l_start: ::off_t,
+ pub l_len: ::off_t,
+ pub l_pid: ::pid_t,
+ }
+
pub struct ipc_perm {
__key: ::key_t,
pub uid: ::uid_t,
@@ -101,18 +132,181 @@ s! {
__glibc_reserved4: ::c_ulong,
__glibc_reserved5: ::c_ulong,
}
+
+ pub struct siginfo_t {
+ pub si_signo: ::c_int,
+ pub si_errno: ::c_int,
+ pub si_code: ::c_int,
+ #[doc(hidden)]
+ #[deprecated(
+ since="0.2.54",
+ note="Please leave a comment on \
+ https://github.com/rust-lang/libc/pull/1316 if you're using \
+ this field"
+ )]
+ pub _pad: [::c_int; 29],
+ _align: [usize; 0],
+ }
+
+ pub struct stack_t {
+ pub ss_sp: *mut ::c_void,
+ pub ss_flags: ::c_int,
+ pub ss_size: ::size_t
+ }
}
+pub const RLIM_INFINITY: ::rlim_t = !0;
+pub const VEOF: usize = 4;
+pub const RTLD_DEEPBIND: ::c_int = 0x8;
+pub const RTLD_GLOBAL: ::c_int = 0x100;
+pub const RTLD_NOLOAD: ::c_int = 0x4;
pub const O_DIRECT: ::c_int = 0x20000;
pub const O_DIRECTORY: ::c_int = 0x4000;
pub const O_NOFOLLOW: ::c_int = 0x8000;
pub const O_LARGEFILE: ::c_int = 0o200000;
+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 O_ASYNC: ::c_int = 0x2000;
+pub const O_NDELAY: ::c_int = 0x800;
+pub const RLIMIT_NOFILE: ::__rlimit_resource_t = 7;
+pub const RLIMIT_NPROC: ::__rlimit_resource_t = 6;
+pub const RLIMIT_RSS: ::__rlimit_resource_t = 5;
+pub const RLIMIT_AS: ::__rlimit_resource_t = 9;
+pub const RLIMIT_MEMLOCK: ::__rlimit_resource_t = 8;
+pub const TCSANOW: ::c_int = 0;
+pub const TCSADRAIN: ::c_int = 1;
+pub const TCSAFLUSH: ::c_int = 2;
+
+pub const TIOCLINUX: ::c_ulong = 0x541C;
+pub const TIOCGSERIAL: ::c_ulong = 0x541E;
+pub const TIOCM_ST: ::c_int = 0x008;
+pub const TIOCM_SR: ::c_int = 0x010;
+pub const TIOCM_CTS: ::c_int = 0x020;
+pub const TIOCM_CAR: ::c_int = 0x040;
+pub const TIOCM_RNG: ::c_int = 0x080;
+pub const TIOCM_DSR: ::c_int = 0x100;
+pub const MADV_SOFT_OFFLINE: ::c_int = 101;
pub const MAP_LOCKED: ::c_int = 0x00080;
pub const MAP_NORESERVE: ::c_int = 0x00040;
+pub const MAP_ANON: ::c_int = 0x0020;
+pub const MAP_ANONYMOUS: ::c_int = 0x0020;
+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;
+pub const MAP_HUGETLB: ::c_int = 0x040000;
+pub const MAP_GROWSDOWN: ::c_int = 0x0100;
+
+pub const SOL_SOCKET: ::c_int = 1;
pub const EDEADLOCK: ::c_int = 58;
+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;
+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 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 SO_PROTOCOL: ::c_int = 38;
+pub const SO_DOMAIN: ::c_int = 39;
pub const SO_SNDBUFFORCE: ::c_int = 32;
pub const SO_RCVBUFFORCE: ::c_int = 33;
pub const SO_NO_CHECK: ::c_int = 11;
@@ -123,12 +317,68 @@ pub const SO_SNDTIMEO: ::c_int = 19;
pub const SO_PASSCRED: ::c_int = 20;
pub const SO_PEERCRED: ::c_int = 21;
+pub const SA_SIGINFO: ::c_int = 0x00000004;
+pub const SA_NOCLDWAIT: ::c_int = 0x00000002;
+
+pub const SOCK_STREAM: ::c_int = 1;
+pub const SOCK_DGRAM: ::c_int = 2;
+
pub const FIOCLEX: ::c_ulong = 0x20006601;
pub const FIONBIO: ::c_ulong = 0x8004667e;
pub const MCL_CURRENT: ::c_int = 0x2000;
pub const MCL_FUTURE: ::c_int = 0x4000;
+pub const POLLWRNORM: ::c_short = 0x100;
+pub const POLLWRBAND: ::c_short = 0x200;
+
+pub const F_GETLK: ::c_int = 5;
+pub const F_GETOWN: ::c_int = 9;
+pub const F_SETOWN: ::c_int = 8;
+
+pub const EFD_NONBLOCK: ::c_int = 0x800;
+pub const SFD_NONBLOCK: ::c_int = 0x0800;
+
+pub const TIOCGSOFTCAR: ::c_ulong = 0x5419;
+pub const TIOCSSOFTCAR: ::c_ulong = 0x541A;
+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 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;
+#[deprecated(
+ since = "0.2.55",
+ note = "Use SIGSYS instead"
+)]
+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 SIGTTIN: ::c_int = 21;
+pub const SIGTTOU: ::c_int = 22;
+pub const SIGXCPU: ::c_int = 24;
+pub const SIGXFSZ: ::c_int = 25;
+pub const SIGVTALRM: ::c_int = 26;
+pub const SIGPROF: ::c_int = 27;
+pub const SIGWINCH: ::c_int = 28;
pub const SIGSTKSZ: ::size_t = 0x4000;
pub const MINSIGSTKSZ: ::size_t = 4096;
pub const CBAUD: ::tcflag_t = 0xff;
diff --git a/src/unix/linux_like/linux/other/b32/x86.rs b/src/unix/linux_like/linux/gnu/b32/x86.rs
index 00f1f1a1..47a35123 100644
--- a/src/unix/linux_like/linux/other/b32/x86.rs
+++ b/src/unix/linux_like/linux/gnu/b32/x86.rs
@@ -3,6 +3,37 @@ pub type wchar_t = i32;
pub type greg_t = i32;
s! {
+ pub struct sigaction {
+ pub sa_sigaction: ::sighandler_t,
+ pub sa_mask: ::sigset_t,
+ pub sa_flags: ::c_int,
+ pub sa_restorer: ::Option<extern fn()>,
+ }
+
+ pub struct statfs {
+ pub f_type: ::__fsword_t,
+ pub f_bsize: ::__fsword_t,
+ pub f_blocks: ::fsblkcnt_t,
+ pub f_bfree: ::fsblkcnt_t,
+ pub f_bavail: ::fsblkcnt_t,
+
+ pub f_files: ::fsfilcnt_t,
+ pub f_ffree: ::fsfilcnt_t,
+ pub f_fsid: ::fsid_t,
+
+ pub f_namelen: ::__fsword_t,
+ pub f_frsize: ::__fsword_t,
+ f_spare: [::__fsword_t; 5],
+ }
+
+ pub struct flock {
+ pub l_type: ::c_short,
+ pub l_whence: ::c_short,
+ pub l_start: ::off_t,
+ pub l_len: ::off_t,
+ pub l_pid: ::pid_t,
+ }
+
pub struct _libc_fpreg {
pub significand: [u16; 4],
pub exponent: u16,
@@ -186,6 +217,27 @@ s! {
pub c_ispeed: ::speed_t,
pub c_ospeed: ::speed_t,
}
+
+ pub struct siginfo_t {
+ pub si_signo: ::c_int,
+ pub si_errno: ::c_int,
+ pub si_code: ::c_int,
+ #[doc(hidden)]
+ #[deprecated(
+ since="0.2.54",
+ note="Please leave a comment on \
+ https://github.com/rust-lang/libc/pull/1316 if you're using \
+ this field"
+ )]
+ pub _pad: [::c_int; 29],
+ _align: [usize; 0],
+ }
+
+ pub struct stack_t {
+ pub ss_sp: *mut ::c_void,
+ pub ss_flags: ::c_int,
+ pub ss_size: ::size_t
+ }
}
s_no_extra_traits!{
@@ -315,17 +367,147 @@ cfg_if! {
}
}
+pub const RLIM_INFINITY: ::rlim_t = !0;
+pub const VEOF: usize = 4;
+pub const RTLD_DEEPBIND: ::c_int = 0x8;
+pub const RTLD_GLOBAL: ::c_int = 0x100;
+pub const RTLD_NOLOAD: ::c_int = 0x4;
pub const O_DIRECT: ::c_int = 0x4000;
pub const O_DIRECTORY: ::c_int = 0x10000;
pub const O_NOFOLLOW: ::c_int = 0x20000;
pub const O_LARGEFILE: ::c_int = 0o0100000;
+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 O_ASYNC: ::c_int = 0x2000;
+pub const O_NDELAY: ::c_int = 0x800;
+pub const RLIMIT_NOFILE: ::__rlimit_resource_t = 7;
+pub const RLIMIT_NPROC: ::__rlimit_resource_t = 6;
+pub const RLIMIT_RSS: ::__rlimit_resource_t = 5;
+pub const RLIMIT_AS: ::__rlimit_resource_t = 9;
+pub const RLIMIT_MEMLOCK: ::__rlimit_resource_t = 8;
+pub const SOL_SOCKET: ::c_int = 1;
+
+pub const MADV_SOFT_OFFLINE: ::c_int = 101;
pub const MAP_LOCKED: ::c_int = 0x02000;
pub const MAP_NORESERVE: ::c_int = 0x04000;
pub const MAP_32BIT: ::c_int = 0x0040;
+pub const MAP_ANON: ::c_int = 0x0020;
+pub const MAP_ANONYMOUS: ::c_int = 0x0020;
+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;
+pub const MAP_HUGETLB: ::c_int = 0x040000;
+pub const MAP_GROWSDOWN: ::c_int = 0x0100;
pub const EDEADLOCK: ::c_int = 35;
+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;
+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 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 SO_PROTOCOL: ::c_int = 38;
+pub const SO_DOMAIN: ::c_int = 39;
pub const SO_SNDBUFFORCE: ::c_int = 32;
pub const SO_RCVBUFFORCE: ::c_int = 33;
pub const SO_NO_CHECK: ::c_int = 11;
@@ -336,6 +518,16 @@ pub const SO_SNDLOWAT: ::c_int = 19;
pub const SO_RCVTIMEO: ::c_int = 20;
pub const SO_SNDTIMEO: ::c_int = 21;
+pub const SA_SIGINFO: ::c_int = 0x00000004;
+pub const SA_NOCLDWAIT: ::c_int = 0x00000002;
+
+pub const SOCK_STREAM: ::c_int = 1;
+pub const SOCK_DGRAM: ::c_int = 2;
+
+pub const F_GETLK: ::c_int = 5;
+pub const F_GETOWN: ::c_int = 9;
+pub const F_SETOWN: ::c_int = 8;
+
pub const FIOCLEX: ::c_ulong = 0x5451;
pub const FIONBIO: ::c_ulong = 0x5421;
@@ -345,6 +537,40 @@ pub const PTRACE_SETFPXREGS: ::c_uint = 19;
pub const MCL_CURRENT: ::c_int = 0x0001;
pub const MCL_FUTURE: ::c_int = 0x0002;
+pub const POLLWRNORM: ::c_short = 0x100;
+pub const POLLWRBAND: ::c_short = 0x200;
+
+pub const EFD_NONBLOCK: ::c_int = 0x800;
+pub const SFD_NONBLOCK: ::c_int = 0x0800;
+
+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;
+#[deprecated(
+ since = "0.2.55",
+ note = "Use SIGSYS instead"
+)]
+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 SIGTTIN: ::c_int = 21;
+pub const SIGTTOU: ::c_int = 22;
+pub const SIGXCPU: ::c_int = 24;
+pub const SIGXFSZ: ::c_int = 25;
+pub const SIGVTALRM: ::c_int = 26;
+pub const SIGPROF: ::c_int = 27;
+pub const SIGWINCH: ::c_int = 28;
pub const SIGSTKSZ: ::size_t = 8192;
pub const MINSIGSTKSZ: ::size_t = 2048;
pub const CBAUD: ::tcflag_t = 0o0010017;
@@ -399,6 +625,18 @@ pub const FFDLY: ::tcflag_t = 0o100000;
pub const VTDLY: ::tcflag_t = 0o040000;
pub const XTABS: ::tcflag_t = 0o014000;
+pub const TIOCGSOFTCAR: ::c_ulong = 0x5419;
+pub const TIOCSSOFTCAR: ::c_ulong = 0x541A;
+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 B0: ::speed_t = 0o000000;
pub const B50: ::speed_t = 0o000001;
pub const B75: ::speed_t = 0o000002;
@@ -462,6 +700,19 @@ pub const TIOCGRS485: ::c_int = 0x542E;
pub const TIOCSRS485: ::c_int = 0x542F;
pub const FIONREAD: ::c_ulong = 0x541B;
+pub const TCSANOW: ::c_int = 0;
+pub const TCSADRAIN: ::c_int = 1;
+pub const TCSAFLUSH: ::c_int = 2;
+
+pub const TIOCLINUX: ::c_ulong = 0x541C;
+pub const TIOCGSERIAL: ::c_ulong = 0x541E;
+pub const TIOCM_ST: ::c_int = 0x008;
+pub const TIOCM_SR: ::c_int = 0x010;
+pub const TIOCM_CTS: ::c_int = 0x020;
+pub const TIOCM_CAR: ::c_int = 0x040;
+pub const TIOCM_RNG: ::c_int = 0x080;
+pub const TIOCM_DSR: ::c_int = 0x100;
+
// Syscall table
pub const SYS_restart_syscall: ::c_long = 0;
pub const SYS_exit: ::c_long = 1;
diff --git a/src/unix/linux_like/linux/other/b64/aarch64.rs b/src/unix/linux_like/linux/gnu/b64/aarch64.rs
index 9699a7d4..eaed8609 100644
--- a/src/unix/linux_like/linux/other/b64/aarch64.rs
+++ b/src/unix/linux_like/linux/gnu/b64/aarch64.rs
@@ -12,6 +12,39 @@ pub type suseconds_t = i64;
pub type __u64 = ::c_ulonglong;
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,
+ pub sa_restorer: ::Option<extern fn()>,
+ }
+
+ pub struct statfs {
+ pub f_type: ::__fsword_t,
+ pub f_bsize: ::__fsword_t,
+ pub f_blocks: ::fsblkcnt_t,
+ pub f_bfree: ::fsblkcnt_t,
+ pub f_bavail: ::fsblkcnt_t,
+
+ pub f_files: ::fsfilcnt_t,
+ pub f_ffree: ::fsfilcnt_t,
+ pub f_fsid: ::fsid_t,
+
+ pub f_namelen: ::__fsword_t,
+ pub f_frsize: ::__fsword_t,
+ f_spare: [::__fsword_t; 5],
+ }
+
+ pub struct flock {
+ pub l_type: ::c_short,
+ pub l_whence: ::c_short,
+ pub l_start: ::off_t,
+ pub l_len: ::off_t,
+ pub l_pid: ::pid_t,
+ }
+
pub struct stat {
pub st_dev: ::dev_t,
pub st_ino: ::ino_t,
@@ -141,15 +174,44 @@ s! {
pub c_ispeed: ::speed_t,
pub c_ospeed: ::speed_t,
}
+
+ pub struct siginfo_t {
+ pub si_signo: ::c_int,
+ pub si_errno: ::c_int,
+ pub si_code: ::c_int,
+ #[doc(hidden)]
+ #[deprecated(
+ since="0.2.54",
+ note="Please leave a comment on \
+ https://github.com/rust-lang/libc/pull/1316 if you're using \
+ this field"
+ )]
+ pub _pad: [::c_int; 29],
+ _align: [usize; 0],
+ }
+
+ pub struct stack_t {
+ pub ss_sp: *mut ::c_void,
+ pub ss_flags: ::c_int,
+ pub ss_size: ::size_t
+ }
}
+pub const VEOF: usize = 4;
pub const __SIZEOF_PTHREAD_RWLOCK_T: usize = 56;
+pub const RTLD_DEEPBIND: ::c_int = 0x8;
+pub const RTLD_GLOBAL: ::c_int = 0x100;
+pub const RTLD_NOLOAD: ::c_int = 0x4;
+
pub const TIOCGSOFTCAR: ::c_ulong = 0x5419;
pub const TIOCSSOFTCAR: ::c_ulong = 0x541A;
pub const TIOCGRS485: ::c_int = 0x542E;
pub const TIOCSRS485: ::c_int = 0x542F;
+pub const RLIMIT_RSS: ::__rlimit_resource_t = 5;
+pub const RLIMIT_AS: ::__rlimit_resource_t = 9;
+pub const RLIMIT_MEMLOCK: ::__rlimit_resource_t = 8;
pub const RLIMIT_NOFILE: ::__rlimit_resource_t = 7;
pub const RLIMIT_NPROC: ::__rlimit_resource_t = 6;
@@ -166,8 +228,14 @@ pub const O_NOATIME: ::c_int = 0o1000000;
pub const O_PATH: ::c_int = 0o10000000;
pub const O_TMPFILE: ::c_int = 0o20000000 | O_DIRECTORY;
+pub const MADV_SOFT_OFFLINE: ::c_int = 101;
pub const MAP_GROWSDOWN: ::c_int = 0x0100;
+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;
pub const EDEADLK: ::c_int = 35;
pub const ENAMETOOLONG: ::c_int = 36;
pub const ENOLCK: ::c_int = 37;
@@ -247,6 +315,9 @@ pub const ENOTRECOVERABLE: ::c_int = 131;
pub const EHWPOISON: ::c_int = 133;
pub const ERFKILL: ::c_int = 132;
+pub const POSIX_FADV_DONTNEED: ::c_int = 4;
+pub const POSIX_FADV_NOREUSE: ::c_int = 5;
+
pub const SOL_SOCKET: ::c_int = 1;
pub const SO_REUSEADDR: ::c_int = 2;
@@ -302,10 +373,20 @@ pub const SO_INCOMING_CPU: ::c_int = 49;
pub const SO_ATTACH_BPF: ::c_int = 50;
pub const SO_DETACH_BPF: ::c_int = SO_DETACH_FILTER;
+pub const SOCK_STREAM: ::c_int = 1;
+pub const SOCK_DGRAM: ::c_int = 2;
+
pub const SA_ONSTACK: ::c_int = 0x08000000;
pub const SA_SIGINFO: ::c_int = 0x00000004;
pub const SA_NOCLDWAIT: ::c_int = 0x00000002;
+pub const SIGTTIN: ::c_int = 21;
+pub const SIGTTOU: ::c_int = 22;
+pub const SIGXCPU: ::c_int = 24;
+pub const SIGXFSZ: ::c_int = 25;
+pub const SIGVTALRM: ::c_int = 26;
+pub const SIGPROF: ::c_int = 27;
+pub const SIGWINCH: ::c_int = 28;
pub const SIGCHLD: ::c_int = 17;
pub const SIGBUS: ::c_int = 7;
pub const SIGUSR1: ::c_int = 10;
@@ -360,6 +441,13 @@ pub const TIOCMBIC: ::c_ulong = 0x5417;
pub const TIOCMSET: ::c_ulong = 0x5418;
pub const TIOCCONS: ::c_ulong = 0x541D;
+pub const TIOCM_ST: ::c_int = 0x008;
+pub const TIOCM_SR: ::c_int = 0x010;
+pub const TIOCM_CTS: ::c_int = 0x020;
+pub const TIOCM_CAR: ::c_int = 0x040;
+pub const TIOCM_RNG: ::c_int = 0x080;
+pub const TIOCM_DSR: ::c_int = 0x100;
+
pub const SFD_CLOEXEC: ::c_int = 0x080000;
pub const NCCS: usize = 32;
@@ -429,6 +517,14 @@ pub const O_NOFOLLOW: ::c_int = 0x8000;
pub const MAP_LOCKED: ::c_int = 0x02000;
pub const MAP_NORESERVE: ::c_int = 0x04000;
+pub const MAP_ANON: ::c_int = 0x0020;
+pub const MAP_ANONYMOUS: ::c_int = 0x0020;
+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;
+pub const MAP_HUGETLB: ::c_int = 0x040000;
pub const EDEADLOCK: ::c_int = 35;
@@ -553,6 +649,13 @@ pub const TIOCGWINSZ: ::c_ulong = 0x5413;
pub const TIOCSWINSZ: ::c_ulong = 0x5414;
pub const FIONREAD: ::c_ulong = 0x541B;
+pub const TCSANOW: ::c_int = 0;
+pub const TCSADRAIN: ::c_int = 1;
+pub const TCSAFLUSH: ::c_int = 2;
+
+pub const TIOCLINUX: ::c_ulong = 0x541C;
+pub const TIOCGSERIAL: ::c_ulong = 0x541E;
+
// Syscall table
pub const SYS_io_setup: ::c_long = 0;
pub const SYS_io_destroy: ::c_long = 1;
diff --git a/src/unix/linux_like/linux/mips/mips64.rs b/src/unix/linux_like/linux/gnu/b64/mips64.rs
index f480e50a..706faae8 100644
--- a/src/unix/linux_like/linux/mips/mips64.rs
+++ b/src/unix/linux_like/linux/gnu/b64/mips64.rs
@@ -1,36 +1,15 @@
use pthread_mutex_t;
-pub type blkcnt_t = i64;
pub type blksize_t = i64;
pub type c_char = i8;
pub type c_long = i64;
pub type c_ulong = u64;
-pub type ino_t = u64;
pub type nlink_t = u64;
-pub type off_t = i64;
pub type suseconds_t = i64;
-pub type time_t = i64;
pub type wchar_t = i32;
-pub type clock_t = i64;
pub type __u64 = ::c_ulong;
s! {
- pub struct aiocb {
- pub aio_fildes: ::c_int,
- pub aio_lio_opcode: ::c_int,
- pub aio_reqprio: ::c_int,
- pub aio_buf: *mut ::c_void,
- pub aio_nbytes: ::size_t,
- pub aio_sigevent: ::sigevent,
- __next_prio: *mut aiocb,
- __abs_prio: ::c_int,
- __policy: ::c_int,
- __error_code: ::c_int,
- __return_value: ::ssize_t,
- pub aio_offset: off_t,
- __glibc_reserved: [::c_char; 32]
- }
-
pub struct stat {
pub st_dev: ::c_ulong,
st_pad1: [::c_long; 2],
@@ -55,6 +34,29 @@ s! {
st_pad5: [::c_long; 7],
}
+ pub struct statfs {
+ pub f_type: ::c_long,
+ pub f_bsize: ::c_long,
+ pub f_frsize: ::c_long,
+ pub f_blocks: ::fsblkcnt_t,
+ pub f_bfree: ::fsblkcnt_t,
+ pub f_files: ::fsblkcnt_t,
+ pub f_ffree: ::fsblkcnt_t,
+ pub f_bavail: ::fsblkcnt_t,
+ pub f_fsid: ::fsid_t,
+
+ pub f_namelen: ::c_long,
+ f_spare: [::c_long; 6],
+ }
+
+ pub struct flock {
+ pub l_type: ::c_short,
+ pub l_whence: ::c_short,
+ pub l_start: ::off_t,
+ pub l_len: ::off_t,
+ pub l_pid: ::pid_t,
+ }
+
pub struct stat64 {
pub st_dev: ::c_ulong,
st_pad1: [::c_long; 2],
@@ -130,7 +132,7 @@ s! {
pub struct sigaction {
pub sa_flags: ::c_int,
pub sa_sigaction: ::sighandler_t,
- pub sa_mask: sigset_t,
+ pub sa_mask: ::sigset_t,
pub sa_restorer: ::Option<extern fn()>,
}
@@ -140,10 +142,6 @@ s! {
pub ss_flags: ::c_int,
}
- pub struct sigset_t {
- __size: [::c_ulong; 16],
- }
-
pub struct siginfo_t {
pub si_signo: ::c_int,
pub si_code: ::c_int,
@@ -178,83 +176,15 @@ s! {
__unused5: ::c_ulong
}
- pub struct msqid_ds {
- pub msg_perm: ::ipc_perm,
- pub msg_stime: ::time_t,
- pub msg_rtime: ::time_t,
- pub msg_ctime: ::time_t,
- __msg_cbytes: ::c_ulong,
- pub msg_qnum: ::msgqnum_t,
- pub msg_qbytes: ::msglen_t,
- pub msg_lspid: ::pid_t,
- pub msg_lrpid: ::pid_t,
- __glibc_reserved4: ::c_ulong,
- __glibc_reserved5: ::c_ulong,
- }
-
- pub struct statfs {
- pub f_type: ::c_long,
- pub f_bsize: ::c_long,
- pub f_frsize: ::c_long,
- pub f_blocks: ::fsblkcnt_t,
- pub f_bfree: ::fsblkcnt_t,
- pub f_files: ::fsblkcnt_t,
- pub f_ffree: ::fsblkcnt_t,
- pub f_bavail: ::fsblkcnt_t,
- pub f_fsid: ::fsid_t,
-
- pub f_namelen: ::c_long,
- f_spare: [::c_long; 6],
- }
-
- pub struct msghdr {
- pub msg_name: *mut ::c_void,
- pub msg_namelen: ::socklen_t,
- pub msg_iov: *mut ::iovec,
- pub msg_iovlen: ::size_t,
- pub msg_control: *mut ::c_void,
- pub msg_controllen: ::size_t,
- pub msg_flags: ::c_int,
- }
-
- pub struct cmsghdr {
- pub cmsg_len: ::size_t,
- pub cmsg_level: ::c_int,
- pub cmsg_type: ::c_int,
- }
-
- pub struct termios {
+ pub struct termios2 {
pub c_iflag: ::tcflag_t,
pub c_oflag: ::tcflag_t,
pub c_cflag: ::tcflag_t,
pub c_lflag: ::tcflag_t,
pub c_line: ::cc_t,
- pub c_cc: [::cc_t; ::NCCS],
- }
-
- pub struct flock {
- pub l_type: ::c_short,
- pub l_whence: ::c_short,
- pub l_start: ::off_t,
- pub l_len: ::off_t,
- pub l_pid: ::pid_t,
- }
-
- pub struct sysinfo {
- pub uptime: ::c_long,
- pub loads: [::c_ulong; 3],
- pub totalram: ::c_ulong,
- pub freeram: ::c_ulong,
- pub sharedram: ::c_ulong,
- pub bufferram: ::c_ulong,
- pub totalswap: ::c_ulong,
- pub freeswap: ::c_ulong,
- pub procs: ::c_ushort,
- pub pad: ::c_ushort,
- pub totalhigh: ::c_ulong,
- pub freehigh: ::c_ulong,
- pub mem_unit: ::c_uint,
- pub _f: [::c_char; 0],
+ pub c_cc: [::cc_t; 23],
+ pub c_ispeed: ::speed_t,
+ pub c_ospeed: ::speed_t,
}
}
@@ -262,7 +192,6 @@ pub const __SIZEOF_PTHREAD_CONDATTR_T: usize = 4;
pub const __SIZEOF_PTHREAD_MUTEXATTR_T: usize = 4;
pub const __SIZEOF_PTHREAD_MUTEX_T: usize = 40;
pub const __SIZEOF_PTHREAD_RWLOCK_T: usize = 56;
-pub const __SIZEOF_PTHREAD_RWLOCKATTR_T: usize = 8;
align_const! {
#[cfg(target_endian = "little")]
@@ -315,10 +244,6 @@ align_const! {
};
}
-pub const O_LARGEFILE: ::c_int = 0;
-
-pub const RLIM_INFINITY: ::rlim_t = 0xffff_ffff_ffff_ffff;
-
pub const SYS_read: ::c_long = 5000 + 0;
pub const SYS_write: ::c_long = 5000 + 1;
pub const SYS_open: ::c_long = 5000 + 2;
@@ -643,3 +568,431 @@ pub const SYS_pwritev2: ::c_long = 5000 + 322;
pub const SYS_pkey_mprotect: ::c_long = 5000 + 323;
pub const SYS_pkey_alloc: ::c_long = 5000 + 324;
pub const SYS_pkey_free: ::c_long = 5000 + 325;
+
+pub const SFD_CLOEXEC: ::c_int = 0x080000;
+
+pub const NCCS: usize = 32;
+
+pub const O_TRUNC: ::c_int = 512;
+
+pub const O_NOATIME: ::c_int = 0o1000000;
+pub const O_CLOEXEC: ::c_int = 0x80000;
+pub const O_PATH: ::c_int = 0o10000000;
+pub const O_TMPFILE: ::c_int = 0o20000000 | O_DIRECTORY;
+
+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 POSIX_FADV_DONTNEED: ::c_int = 4;
+pub const POSIX_FADV_NOREUSE: ::c_int = 5;
+
+pub const EPOLL_CLOEXEC: ::c_int = 0x80000;
+
+pub const EFD_CLOEXEC: ::c_int = 0x80000;
+
+pub const O_DIRECT: ::c_int = 0x8000;
+pub const O_DIRECTORY: ::c_int = 0x10000;
+pub const O_NOFOLLOW: ::c_int = 0x20000;
+
+pub const RLIMIT_NOFILE: ::__rlimit_resource_t = 5;
+pub const RLIMIT_AS: ::__rlimit_resource_t = 6;
+pub const RLIMIT_RSS: ::__rlimit_resource_t = 7;
+pub const RLIMIT_NPROC: ::__rlimit_resource_t = 8;
+pub const RLIMIT_MEMLOCK: ::__rlimit_resource_t = 9;
+
+pub const O_APPEND: ::c_int = 8;
+pub const O_CREAT: ::c_int = 256;
+pub const O_EXCL: ::c_int = 1024;
+pub const O_NOCTTY: ::c_int = 2048;
+pub const O_NONBLOCK: ::c_int = 128;
+pub const O_SYNC: ::c_int = 0x4010;
+pub const O_RSYNC: ::c_int = 0x4010;
+pub const O_DSYNC: ::c_int = 0x10;
+pub const O_FSYNC: ::c_int = 0x4010;
+pub const O_ASYNC: ::c_int = 0x1000;
+pub const O_NDELAY: ::c_int = 0x80;
+
+pub const EDEADLK: ::c_int = 45;
+pub const ENAMETOOLONG: ::c_int = 78;
+pub const ENOLCK: ::c_int = 46;
+pub const ENOSYS: ::c_int = 89;
+pub const ENOTEMPTY: ::c_int = 93;
+pub const ELOOP: ::c_int = 90;
+pub const ENOMSG: ::c_int = 35;
+pub const EIDRM: ::c_int = 36;
+pub const ECHRNG: ::c_int = 37;
+pub const EL2NSYNC: ::c_int = 38;
+pub const EL3HLT: ::c_int = 39;
+pub const EL3RST: ::c_int = 40;
+pub const ELNRNG: ::c_int = 41;
+pub const EUNATCH: ::c_int = 42;
+pub const ENOCSI: ::c_int = 43;
+pub const EL2HLT: ::c_int = 44;
+pub const EBADE: ::c_int = 50;
+pub const EBADR: ::c_int = 51;
+pub const EXFULL: ::c_int = 52;
+pub const ENOANO: ::c_int = 53;
+pub const EBADRQC: ::c_int = 54;
+pub const EBADSLT: ::c_int = 55;
+pub const EDEADLOCK: ::c_int = 56;
+pub const EMULTIHOP: ::c_int = 74;
+pub const EOVERFLOW: ::c_int = 79;
+pub const ENOTUNIQ: ::c_int = 80;
+pub const EBADFD: ::c_int = 81;
+pub const EBADMSG: ::c_int = 77;
+pub const EREMCHG: ::c_int = 82;
+pub const ELIBACC: ::c_int = 83;
+pub const ELIBBAD: ::c_int = 84;
+pub const ELIBSCN: ::c_int = 85;
+pub const ELIBMAX: ::c_int = 86;
+pub const ELIBEXEC: ::c_int = 87;
+pub const EILSEQ: ::c_int = 88;
+pub const ERESTART: ::c_int = 91;
+pub const ESTRPIPE: ::c_int = 92;
+pub const EUSERS: ::c_int = 94;
+pub const ENOTSOCK: ::c_int = 95;
+pub const EDESTADDRREQ: ::c_int = 96;
+pub const EMSGSIZE: ::c_int = 97;
+pub const EPROTOTYPE: ::c_int = 98;
+pub const ENOPROTOOPT: ::c_int = 99;
+pub const EPROTONOSUPPORT: ::c_int = 120;
+pub const ESOCKTNOSUPPORT: ::c_int = 121;
+pub const EOPNOTSUPP: ::c_int = 122;
+pub const EPFNOSUPPORT: ::c_int = 123;
+pub const EAFNOSUPPORT: ::c_int = 124;
+pub const EADDRINUSE: ::c_int = 125;
+pub const EADDRNOTAVAIL: ::c_int = 126;
+pub const ENETDOWN: ::c_int = 127;
+pub const ENETUNREACH: ::c_int = 128;
+pub const ENETRESET: ::c_int = 129;
+pub const ECONNABORTED: ::c_int = 130;
+pub const ECONNRESET: ::c_int = 131;
+pub const ENOBUFS: ::c_int = 132;
+pub const EISCONN: ::c_int = 133;
+pub const ENOTCONN: ::c_int = 134;
+pub const ESHUTDOWN: ::c_int = 143;
+pub const ETOOMANYREFS: ::c_int = 144;
+pub const ETIMEDOUT: ::c_int = 145;
+pub const ECONNREFUSED: ::c_int = 146;
+pub const EHOSTDOWN: ::c_int = 147;
+pub const EHOSTUNREACH: ::c_int = 148;
+pub const EALREADY: ::c_int = 149;
+pub const EINPROGRESS: ::c_int = 150;
+pub const ESTALE: ::c_int = 151;
+pub const EUCLEAN: ::c_int = 135;
+pub const ENOTNAM: ::c_int = 137;
+pub const ENAVAIL: ::c_int = 138;
+pub const EISNAM: ::c_int = 139;
+pub const EREMOTEIO: ::c_int = 140;
+pub const EDQUOT: ::c_int = 1133;
+pub const ENOMEDIUM: ::c_int = 159;
+pub const EMEDIUMTYPE: ::c_int = 160;
+pub const ECANCELED: ::c_int = 158;
+pub const ENOKEY: ::c_int = 161;
+pub const EKEYEXPIRED: ::c_int = 162;
+pub const EKEYREVOKED: ::c_int = 163;
+pub const EKEYREJECTED: ::c_int = 164;
+pub const EOWNERDEAD: ::c_int = 165;
+pub const ENOTRECOVERABLE: ::c_int = 166;
+pub const ERFKILL: ::c_int = 167;
+
+pub const MAP_NORESERVE: ::c_int = 0x400;
+pub const MAP_ANON: ::c_int = 0x800;
+pub const MAP_ANONYMOUS: ::c_int = 0x800;
+pub const MAP_GROWSDOWN: ::c_int = 0x1000;
+pub const MAP_DENYWRITE: ::c_int = 0x2000;
+pub const MAP_EXECUTABLE: ::c_int = 0x4000;
+pub const MAP_LOCKED: ::c_int = 0x8000;
+pub const MAP_POPULATE: ::c_int = 0x10000;
+pub const MAP_NONBLOCK: ::c_int = 0x20000;
+pub const MAP_STACK: ::c_int = 0x40000;
+pub const MAP_HUGETLB: ::c_int = 0x080000;
+
+pub const SOCK_STREAM: ::c_int = 2;
+pub const SOCK_DGRAM: ::c_int = 1;
+
+pub const SOL_SOCKET: ::c_int = 0xffff;
+
+pub const SO_REUSEADDR: ::c_int = 0x0004;
+pub const SO_KEEPALIVE: ::c_int = 0x0008;
+pub const SO_DONTROUTE: ::c_int = 0x0010;
+pub const SO_BROADCAST: ::c_int = 0x0020;
+pub const SO_LINGER: ::c_int = 0x0080;
+pub const SO_OOBINLINE: ::c_int = 0x0100;
+pub const SO_REUSEPORT: ::c_int = 0x0200;
+pub const SO_TYPE: ::c_int = 0x1008;
+pub const SO_STYLE: ::c_int = SO_TYPE;
+pub const SO_ERROR: ::c_int = 0x1007;
+pub const SO_SNDBUF: ::c_int = 0x1001;
+pub const SO_RCVBUF: ::c_int = 0x1002;
+pub const SO_SNDLOWAT: ::c_int = 0x1003;
+pub const SO_RCVLOWAT: ::c_int = 0x1004;
+pub const SO_SNDTIMEO: ::c_int = 0x1005;
+pub const SO_RCVTIMEO: ::c_int = 0x1006;
+pub const SO_ACCEPTCONN: ::c_int = 0x1009;
+pub const SO_PROTOCOL: ::c_int = 0x1028;
+pub const SO_DOMAIN: ::c_int = 0x1029;
+pub const SO_NO_CHECK: ::c_int = 11;
+pub const SO_PRIORITY: ::c_int = 12;
+pub const SO_BSDCOMPAT: ::c_int = 14;
+pub const SO_PASSCRED: ::c_int = 17;
+pub const SO_PEERCRED: ::c_int = 18;
+pub const SO_SECURITY_AUTHENTICATION: ::c_int = 22;
+pub const SO_SECURITY_ENCRYPTION_TRANSPORT: ::c_int = 23;
+pub const SO_SECURITY_ENCRYPTION_NETWORK: ::c_int = 24;
+pub const SO_BINDTODEVICE: ::c_int = 25;
+pub const SO_ATTACH_FILTER: ::c_int = 26;
+pub const SO_DETACH_FILTER: ::c_int = 27;
+pub const SO_GET_FILTER: ::c_int = SO_ATTACH_FILTER;
+pub const SO_PEERNAME: ::c_int = 28;
+pub const SO_TIMESTAMP: ::c_int = 29;
+pub const SO_PEERSEC: ::c_int = 30;
+pub const SO_SNDBUFFORCE: ::c_int = 31;
+pub const SO_RCVBUFFORCE: ::c_int = 33;
+pub const SO_PASSSEC: ::c_int = 34;
+pub const SO_TIMESTAMPNS: ::c_int = 35;
+pub const SCM_TIMESTAMPNS: ::c_int = SO_TIMESTAMPNS;
+pub const SO_MARK: ::c_int = 36;
+pub const SO_RXQ_OVFL: ::c_int = 40;
+pub const SO_WIFI_STATUS: ::c_int = 41;
+pub const SCM_WIFI_STATUS: ::c_int = SO_WIFI_STATUS;
+pub const SO_PEEK_OFF: ::c_int = 42;
+pub const SO_NOFCS: ::c_int = 43;
+pub const SO_LOCK_FILTER: ::c_int = 44;
+pub const SO_SELECT_ERR_QUEUE: ::c_int = 45;
+pub const SO_BUSY_POLL: ::c_int = 46;
+pub const SO_MAX_PACING_RATE: ::c_int = 47;
+pub const SO_BPF_EXTENSIONS: ::c_int = 48;
+pub const SO_INCOMING_CPU: ::c_int = 49;
+pub const SO_ATTACH_BPF: ::c_int = 50;
+pub const SO_DETACH_BPF: ::c_int = SO_DETACH_FILTER;
+
+pub const FIOCLEX: ::c_ulong = 0x6601;
+pub const FIONBIO: ::c_ulong = 0x667e;
+
+pub const SA_ONSTACK: ::c_int = 0x08000000;
+pub const SA_SIGINFO: ::c_int = 0x00000008;
+pub const SA_NOCLDWAIT: ::c_int = 0x00010000;
+
+pub const SIGCHLD: ::c_int = 18;
+pub const SIGBUS: ::c_int = 10;
+pub const SIGTTIN: ::c_int = 26;
+pub const SIGTTOU: ::c_int = 27;
+pub const SIGXCPU: ::c_int = 30;
+pub const SIGXFSZ: ::c_int = 31;
+pub const SIGVTALRM: ::c_int = 28;
+pub const SIGPROF: ::c_int = 29;
+pub const SIGWINCH: ::c_int = 20;
+pub const SIGUSR1: ::c_int = 16;
+pub const SIGUSR2: ::c_int = 17;
+pub const SIGCONT: ::c_int = 25;
+pub const SIGSTOP: ::c_int = 23;
+pub const SIGTSTP: ::c_int = 24;
+pub const SIGURG: ::c_int = 21;
+pub const SIGIO: ::c_int = 22;
+pub const SIGSYS: ::c_int = 12;
+pub const SIGPOLL: ::c_int = 22;
+pub const SIGPWR: ::c_int = 19;
+pub const SIG_SETMASK: ::c_int = 3;
+pub const SIG_BLOCK: ::c_int = 0x1;
+pub const SIG_UNBLOCK: ::c_int = 0x2;
+
+pub const POLLWRNORM: ::c_short = 0x004;
+pub const POLLWRBAND: ::c_short = 0x100;
+
+pub const VEOF: usize = 16;
+pub const VEOL: usize = 17;
+pub const VEOL2: usize = 6;
+pub const VMIN: usize = 4;
+pub const IEXTEN: ::tcflag_t = 0x00000100;
+pub const TOSTOP: ::tcflag_t = 0x00008000;
+pub const FLUSHO: ::tcflag_t = 0x00002000;
+pub const EXTPROC: ::tcflag_t = 0o200000;
+pub const TCSANOW: ::c_int = 0x540e;
+pub const TCSADRAIN: ::c_int = 0x540f;
+pub const TCSAFLUSH: ::c_int = 0x5410;
+
+pub const PTRACE_GETFPREGS: ::c_uint = 14;
+pub const PTRACE_SETFPREGS: ::c_uint = 15;
+pub const PTRACE_GETFPXREGS: ::c_uint = 18;
+pub const PTRACE_SETFPXREGS: ::c_uint = 19;
+pub const PTRACE_GETREGS: ::c_uint = 12;
+pub const PTRACE_SETREGS: ::c_uint = 13;
+
+pub const EFD_NONBLOCK: ::c_int = 0x80;
+
+pub const F_RDLCK: ::c_int = 0;
+pub const F_WRLCK: ::c_int = 1;
+pub const F_UNLCK: ::c_int = 2;
+pub const F_GETLK: ::c_int = 14;
+pub const F_GETOWN: ::c_int = 23;
+pub const F_SETOWN: ::c_int = 24;
+pub const F_SETLK: ::c_int = 6;
+pub const F_SETLKW: ::c_int = 7;
+
+pub const SFD_NONBLOCK: ::c_int = 0x80;
+
+pub const TCGETS: ::c_ulong = 0x540d;
+pub const TCSETS: ::c_ulong = 0x540e;
+pub const TCSETSW: ::c_ulong = 0x540f;
+pub const TCSETSF: ::c_ulong = 0x5410;
+pub const TCGETA: ::c_ulong = 0x5401;
+pub const TCSETA: ::c_ulong = 0x5402;
+pub const TCSETAW: ::c_ulong = 0x5403;
+pub const TCSETAF: ::c_ulong = 0x5404;
+pub const TCSBRK: ::c_ulong = 0x5405;
+pub const TCXONC: ::c_ulong = 0x5406;
+pub const TCFLSH: ::c_ulong = 0x5407;
+pub const TIOCGSOFTCAR: ::c_ulong = 0x5481;
+pub const TIOCSSOFTCAR: ::c_ulong = 0x5482;
+pub const TIOCINQ: ::c_ulong = 0x467f;
+pub const TIOCLINUX: ::c_ulong = 0x5483;
+pub const TIOCGSERIAL: ::c_ulong = 0x5484;
+pub const TIOCEXCL: ::c_ulong = 0x740d;
+pub const TIOCNXCL: ::c_ulong = 0x740e;
+pub const TIOCSCTTY: ::c_ulong = 0x5480;
+pub const TIOCGPGRP: ::c_ulong = 0x40047477;
+pub const TIOCSPGRP: ::c_ulong = 0x80047476;
+pub const TIOCOUTQ: ::c_ulong = 0x7472;
+pub const TIOCSTI: ::c_ulong = 0x5472;
+pub const TIOCGWINSZ: ::c_ulong = 0x40087468;
+pub const TIOCSWINSZ: ::c_ulong = 0x80087467;
+pub const TIOCMGET: ::c_ulong = 0x741d;
+pub const TIOCMBIS: ::c_ulong = 0x741b;
+pub const TIOCMBIC: ::c_ulong = 0x741c;
+pub const TIOCMSET: ::c_ulong = 0x741a;
+pub const FIONREAD: ::c_ulong = 0x467f;
+pub const TIOCCONS: ::c_ulong = 0x80047478;
+
+pub const RTLD_DEEPBIND: ::c_int = 0x10;
+pub const RTLD_GLOBAL: ::c_int = 0x4;
+pub const RTLD_NOLOAD: ::c_int = 0x8;
+
+pub const MCL_CURRENT: ::c_int = 0x0001;
+pub const MCL_FUTURE: ::c_int = 0x0002;
+
+pub const SIGSTKSZ: ::size_t = 8192;
+pub const MINSIGSTKSZ: ::size_t = 2048;
+pub const CBAUD: ::tcflag_t = 0o0010017;
+pub const TAB1: ::tcflag_t = 0x00000800;
+pub const TAB2: ::tcflag_t = 0x00001000;
+pub const TAB3: ::tcflag_t = 0x00001800;
+pub const CR1: ::tcflag_t = 0x00000200;
+pub const CR2: ::tcflag_t = 0x00000400;
+pub const CR3: ::tcflag_t = 0x00000600;
+pub const FF1: ::tcflag_t = 0x00008000;
+pub const BS1: ::tcflag_t = 0x00002000;
+pub const VT1: ::tcflag_t = 0x00004000;
+pub const VWERASE: usize = 14;
+pub const VREPRINT: usize = 12;
+pub const VSUSP: usize = 10;
+pub const VSTART: usize = 8;
+pub const VSTOP: usize = 9;
+pub const VDISCARD: usize = 13;
+pub const VTIME: usize = 5;
+pub const IXON: ::tcflag_t = 0x00000400;
+pub const IXOFF: ::tcflag_t = 0x00001000;
+pub const ONLCR: ::tcflag_t = 0x4;
+pub const CSIZE: ::tcflag_t = 0x00000030;
+pub const CS6: ::tcflag_t = 0x00000010;
+pub const CS7: ::tcflag_t = 0x00000020;
+pub const CS8: ::tcflag_t = 0x00000030;
+pub const CSTOPB: ::tcflag_t = 0x00000040;
+pub const CREAD: ::tcflag_t = 0x00000080;
+pub const PARENB: ::tcflag_t = 0x00000100;
+pub const PARODD: ::tcflag_t = 0x00000200;
+pub const HUPCL: ::tcflag_t = 0x00000400;
+pub const CLOCAL: ::tcflag_t = 0x00000800;
+pub const ECHOKE: ::tcflag_t = 0x00000800;
+pub const ECHOE: ::tcflag_t = 0x00000010;
+pub const ECHOK: ::tcflag_t = 0x00000020;
+pub const ECHONL: ::tcflag_t = 0x00000040;
+pub const ECHOPRT: ::tcflag_t = 0x00000400;
+pub const ECHOCTL: ::tcflag_t = 0x00000200;
+pub const ISIG: ::tcflag_t = 0x00000001;
+pub const ICANON: ::tcflag_t = 0x00000002;
+pub const PENDIN: ::tcflag_t = 0x00004000;
+pub const NOFLSH: ::tcflag_t = 0x00000080;
+pub const CIBAUD: ::tcflag_t = 0o02003600000;
+pub const CBAUDEX: ::tcflag_t = 0o010000;
+pub const VSWTC: usize = 7;
+pub const OLCUC: ::tcflag_t = 0o000002;
+pub const NLDLY: ::tcflag_t = 0o000400;
+pub const CRDLY: ::tcflag_t = 0o003000;
+pub const TABDLY: ::tcflag_t = 0o014000;
+pub const BSDLY: ::tcflag_t = 0o020000;
+pub const FFDLY: ::tcflag_t = 0o100000;
+pub const VTDLY: ::tcflag_t = 0o040000;
+pub const XTABS: ::tcflag_t = 0o014000;
+
+pub const B0: ::speed_t = 0o000000;
+pub const B50: ::speed_t = 0o000001;
+pub const B75: ::speed_t = 0o000002;
+pub const B110: ::speed_t = 0o000003;
+pub const B134: ::speed_t = 0o000004;
+pub const B150: ::speed_t = 0o000005;
+pub const B200: ::speed_t = 0o000006;
+pub const B300: ::speed_t = 0o000007;
+pub const B600: ::speed_t = 0o000010;
+pub const B1200: ::speed_t = 0o000011;
+pub const B1800: ::speed_t = 0o000012;
+pub const B2400: ::speed_t = 0o000013;
+pub const B4800: ::speed_t = 0o000014;
+pub const B9600: ::speed_t = 0o000015;
+pub const B19200: ::speed_t = 0o000016;
+pub const B38400: ::speed_t = 0o000017;
+pub const EXTA: ::speed_t = B19200;
+pub const EXTB: ::speed_t = B38400;
+pub const BOTHER: ::speed_t = 0o010000;
+pub const B57600: ::speed_t = 0o010001;
+pub const B115200: ::speed_t = 0o010002;
+pub const B230400: ::speed_t = 0o010003;
+pub const B460800: ::speed_t = 0o010004;
+pub const B500000: ::speed_t = 0o010005;
+pub const B576000: ::speed_t = 0o010006;
+pub const B921600: ::speed_t = 0o010007;
+pub const B1000000: ::speed_t = 0o010010;
+pub const B1152000: ::speed_t = 0o010011;
+pub const B1500000: ::speed_t = 0o010012;
+pub const B2000000: ::speed_t = 0o010013;
+pub const B2500000: ::speed_t = 0o010014;
+pub const B3000000: ::speed_t = 0o010015;
+pub const B3500000: ::speed_t = 0o010016;
+pub const B4000000: ::speed_t = 0o010017;
+
+pub const TIOCM_ST: ::c_int = 0x010;
+pub const TIOCM_SR: ::c_int = 0x020;
+pub const TIOCM_CTS: ::c_int = 0x040;
+pub const TIOCM_CAR: ::c_int = 0x100;
+pub const TIOCM_RNG: ::c_int = 0x200;
+pub const TIOCM_DSR: ::c_int = 0x400;
+
+pub const EHWPOISON: ::c_int = 168;
+
+#[link(name = "util")]
+extern {
+ pub fn sysctl(name: *mut ::c_int,
+ namelen: ::c_int,
+ oldp: *mut ::c_void,
+ oldlenp: *mut ::size_t,
+ newp: *mut ::c_void,
+ newlen: ::size_t)
+ -> ::c_int;
+}
diff --git a/src/unix/linux_like/linux/other/b64/mod.rs b/src/unix/linux_like/linux/gnu/b64/mod.rs
index 7fcf8ba7..c91da0d9 100644
--- a/src/unix/linux_like/linux/other/b64/mod.rs
+++ b/src/unix/linux_like/linux/gnu/b64/mod.rs
@@ -5,13 +5,13 @@ pub type time_t = i64;
pub type ino_t = u64;
pub type off_t = i64;
pub type blkcnt_t = i64;
-pub type __fsword_t = i64;
pub type shmatt_t = u64;
pub type msgqnum_t = u64;
pub type msglen_t = u64;
pub type fsblkcnt_t = u64;
pub type fsfilcnt_t = u64;
pub type rlim_t = u64;
+pub type __fsword_t = i64;
s! {
pub struct sigset_t {
@@ -51,8 +51,10 @@ s! {
__glibc_reserved4: u64,
__glibc_reserved5: u64,
}
+
}
+pub const RLIM_INFINITY: ::rlim_t = !0;
pub const __SIZEOF_PTHREAD_RWLOCKATTR_T: usize = 8;
pub const O_LARGEFILE: ::c_int = 0;
@@ -67,18 +69,15 @@ cfg_if! {
} else if #[cfg(any(target_arch = "sparc64"))] {
mod sparc64;
pub use self::sparc64::*;
+ } else if #[cfg(any(target_arch = "mips64"))] {
+ mod mips64;
+ pub use self::mips64::*;
+ } else if #[cfg(any(target_arch = "s390x"))] {
+ mod s390x;
+ pub use self::s390x::*;
} else if #[cfg(any(target_arch = "x86_64"))] {
mod x86_64;
pub use self::x86_64::*;
- cfg_if! {
- if #[cfg(target_pointer_width = "32")] {
- mod x32;
- pub use self::x32::*;
- } else {
- mod not_x32;
- pub use self::not_x32::*;
- }
- }
} else {
// Unknown target_arch
}
diff --git a/src/unix/linux_like/linux/other/b64/powerpc64.rs b/src/unix/linux_like/linux/gnu/b64/powerpc64.rs
index d4538224..02aad645 100644
--- a/src/unix/linux_like/linux/other/b64/powerpc64.rs
+++ b/src/unix/linux_like/linux/gnu/b64/powerpc64.rs
@@ -12,6 +12,39 @@ pub type suseconds_t = i64;
pub type __u64 = ::c_ulong;
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,
+ pub sa_restorer: ::Option<extern fn()>,
+ }
+
+ pub struct statfs {
+ pub f_type: ::__fsword_t,
+ pub f_bsize: ::__fsword_t,
+ pub f_blocks: ::fsblkcnt_t,
+ pub f_bfree: ::fsblkcnt_t,
+ pub f_bavail: ::fsblkcnt_t,
+
+ pub f_files: ::fsfilcnt_t,
+ pub f_ffree: ::fsfilcnt_t,
+ pub f_fsid: ::fsid_t,
+
+ pub f_namelen: ::__fsword_t,
+ pub f_frsize: ::__fsword_t,
+ f_spare: [::__fsword_t; 5],
+ }
+
+ pub struct flock {
+ pub l_type: ::c_short,
+ pub l_whence: ::c_short,
+ pub l_start: ::off_t,
+ pub l_len: ::off_t,
+ pub l_pid: ::pid_t,
+ }
+
pub struct stat {
pub st_dev: ::dev_t,
pub st_ino: ::ino_t,
@@ -128,13 +161,44 @@ s! {
__unused4: ::c_ulong,
__unused5: ::c_ulong
}
+
+ pub struct siginfo_t {
+ pub si_signo: ::c_int,
+ pub si_errno: ::c_int,
+ pub si_code: ::c_int,
+ #[doc(hidden)]
+ #[deprecated(
+ since="0.2.54",
+ note="Please leave a comment on \
+ https://github.com/rust-lang/libc/pull/1316 if you're using \
+ this field"
+ )]
+ pub _pad: [::c_int; 29],
+ _align: [usize; 0],
+ }
+
+ pub struct stack_t {
+ pub ss_sp: *mut ::c_void,
+ pub ss_flags: ::c_int,
+ pub ss_size: ::size_t
+ }
}
+pub const POSIX_FADV_DONTNEED: ::c_int = 4;
+pub const POSIX_FADV_NOREUSE: ::c_int = 5;
+
+pub const RTLD_DEEPBIND: ::c_int = 0x8;
+pub const RTLD_GLOBAL: ::c_int = 0x100;
+pub const RTLD_NOLOAD: ::c_int = 0x4;
+pub const VEOF: usize = 4;
pub const __SIZEOF_PTHREAD_RWLOCK_T: usize = 56;
pub const TIOCGSOFTCAR: ::c_ulong = 0x5419;
pub const TIOCSSOFTCAR: ::c_ulong = 0x541A;
+pub const RLIMIT_RSS: ::__rlimit_resource_t = 5;
+pub const RLIMIT_AS: ::__rlimit_resource_t = 9;
+pub const RLIMIT_MEMLOCK: ::__rlimit_resource_t = 8;
pub const RLIMIT_NOFILE: ::__rlimit_resource_t = 7;
pub const RLIMIT_NPROC: ::__rlimit_resource_t = 6;
@@ -151,7 +215,16 @@ pub const O_NOATIME: ::c_int = 0o1000000;
pub const O_PATH: ::c_int = 0o10000000;
pub const O_TMPFILE: ::c_int = 0o20000000 | O_DIRECTORY;
+pub const MADV_SOFT_OFFLINE: ::c_int = 101;
pub const MAP_GROWSDOWN: ::c_int = 0x0100;
+pub const MAP_ANON: ::c_int = 0x0020;
+pub const MAP_ANONYMOUS: ::c_int = 0x0020;
+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;
+pub const MAP_HUGETLB: ::c_int = 0x040000;
pub const EDEADLK: ::c_int = 35;
pub const ENAMETOOLONG: ::c_int = 36;
@@ -287,10 +360,20 @@ pub const SO_INCOMING_CPU: ::c_int = 49;
pub const SO_ATTACH_BPF: ::c_int = 50;
pub const SO_DETACH_BPF: ::c_int = SO_DETACH_FILTER;
+pub const SOCK_STREAM: ::c_int = 1;
+pub const SOCK_DGRAM: ::c_int = 2;
+
pub const SA_ONSTACK: ::c_int = 0x08000000;
pub const SA_SIGINFO: ::c_int = 0x00000004;
pub const SA_NOCLDWAIT: ::c_int = 0x00000002;
+pub const SIGTTIN: ::c_int = 21;
+pub const SIGTTOU: ::c_int = 22;
+pub const SIGXCPU: ::c_int = 24;
+pub const SIGXFSZ: ::c_int = 25;
+pub const SIGVTALRM: ::c_int = 26;
+pub const SIGPROF: ::c_int = 27;
+pub const SIGWINCH: ::c_int = 28;
pub const SIGCHLD: ::c_int = 17;
pub const SIGBUS: ::c_int = 7;
pub const SIGUSR1: ::c_int = 10;
@@ -335,6 +418,12 @@ pub const F_UNLCK: ::c_int = 2;
pub const SFD_NONBLOCK: ::c_int = 0x0800;
+pub const TCSANOW: ::c_int = 0;
+pub const TCSADRAIN: ::c_int = 1;
+pub const TCSAFLUSH: ::c_int = 2;
+
+pub const TIOCLINUX: ::c_ulong = 0x541C;
+pub const TIOCGSERIAL: ::c_ulong = 0x541E;
pub const TIOCEXCL: ::c_ulong = 0x540C;
pub const TIOCNXCL: ::c_ulong = 0x540D;
pub const TIOCSCTTY: ::c_ulong = 0x540E;
@@ -347,6 +436,13 @@ pub const TIOCCONS: ::c_ulong = 0x541D;
pub const TIOCGRS485: ::c_int = 0x542E;
pub const TIOCSRS485: ::c_int = 0x542F;
+pub const TIOCM_ST: ::c_int = 0x008;
+pub const TIOCM_SR: ::c_int = 0x010;
+pub const TIOCM_CTS: ::c_int = 0x020;
+pub const TIOCM_CAR: ::c_int = 0x040;
+pub const TIOCM_RNG: ::c_int = 0x080;
+pub const TIOCM_DSR: ::c_int = 0x100;
+
pub const SFD_CLOEXEC: ::c_int = 0x080000;
pub const NCCS: usize = 32;
@@ -442,6 +538,11 @@ pub const MAP_LOCKED: ::c_int = 0x00080;
pub const MAP_NORESERVE: ::c_int = 0x00040;
pub const EDEADLOCK: ::c_int = 58;
+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;
pub const FIOCLEX: ::c_ulong = 0x20006601;
pub const FIONBIO: ::c_ulong = 0x8004667e;
diff --git a/src/unix/linux_like/linux/s390x/mod.rs b/src/unix/linux_like/linux/gnu/b64/s390x.rs
index 7a7b426a..8fb0345e 100644
--- a/src/unix/linux_like/linux/s390x/mod.rs
+++ b/src/unix/linux_like/linux/gnu/b64/s390x.rs
@@ -1,47 +1,61 @@
-use ::pthread_mutex_t;
+//! s390x
+
+use pthread_mutex_t;
-pub type __rlimit_resource_t = ::c_uint;
-pub type pthread_t = c_ulong;
-pub type blkcnt_t = i64;
pub type blksize_t = i64;
pub type c_char = u8;
pub type c_long = i64;
pub type c_ulong = u64;
-pub type fsblkcnt_t = u64;
-pub type fsfilcnt_t = u64;
-pub type ino_t = u64;
pub type nlink_t = u64;
-pub type off_t = i64;
-pub type rlim_t = u64;
pub type suseconds_t = i64;
-pub type time_t = i64;
pub type wchar_t = i32;
pub type greg_t = u64;
-pub type clock_t = i64;
-pub type shmatt_t = ::c_ulong;
-pub type msgqnum_t = ::c_ulong;
-pub type msglen_t = ::c_ulong;
-pub type __fsword_t = ::c_long;
-pub type __priority_which_t = ::c_uint;
pub type __u64 = u64;
s! {
- pub struct aiocb {
- pub aio_fildes: ::c_int,
- pub aio_lio_opcode: ::c_int,
- pub aio_reqprio: ::c_int,
- pub aio_buf: *mut ::c_void,
- pub aio_nbytes: ::size_t,
- pub aio_sigevent: ::sigevent,
- __next_prio: *mut aiocb,
- __abs_prio: ::c_int,
- __policy: ::c_int,
- __error_code: ::c_int,
- __return_value: ::ssize_t,
- pub aio_offset: off_t,
- #[cfg(target_pointer_width = "32")]
- __unused1: [::c_char; 4],
- __glibc_reserved: [::c_char; 32]
+ pub struct sigaction {
+ pub sa_sigaction: ::sighandler_t,
+ __glibc_reserved0: ::c_int,
+ pub sa_flags: ::c_int,
+ pub sa_restorer: ::Option<extern fn()>,
+ pub sa_mask: ::sigset_t,
+ }
+
+ pub struct statfs {
+ pub f_type: ::c_uint,
+ pub f_bsize: ::c_uint,
+ pub f_blocks: ::fsblkcnt_t,
+ pub f_bfree: ::fsblkcnt_t,
+ pub f_bavail: ::fsblkcnt_t,
+ pub f_files: ::fsfilcnt_t,
+ pub f_ffree: ::fsfilcnt_t,
+ pub f_fsid: ::fsid_t,
+ pub f_namelen: ::c_uint,
+ pub f_frsize: ::c_uint,
+ pub f_flags: ::c_uint,
+ f_spare: [::c_uint; 4],
+ }
+
+ pub struct flock {
+ pub l_type: ::c_short,
+ pub l_whence: ::c_short,
+ pub l_start: ::off_t,
+ pub l_len: ::off_t,
+ pub l_pid: ::pid_t,
+ }
+
+ pub struct siginfo_t {
+ pub si_signo: ::c_int,
+ pub si_errno: ::c_int,
+ pub si_code: ::c_int,
+ _pad: ::c_int,
+ _pad2: [::c_long; 14],
+ }
+
+ pub struct stack_t {
+ pub ss_sp: *mut ::c_void,
+ pub ss_flags: ::c_int,
+ pub ss_size: ::size_t
}
pub struct stat {
@@ -90,32 +104,6 @@ s! {
__size: [::c_ulong; 7]
}
- pub struct sigaction {
- pub sa_sigaction: ::sighandler_t,
- __glibc_reserved0: ::c_int,
- pub sa_flags: ::c_int,
- pub sa_restorer: ::Option<extern fn()>,
- pub sa_mask: sigset_t,
- }
-
- pub struct stack_t {
- pub ss_sp: *mut ::c_void,
- pub ss_flags: ::c_int,
- pub ss_size: ::size_t,
- }
-
- pub struct sigset_t {
- __size: [::c_ulong; 16],
- }
-
- pub struct siginfo_t {
- pub si_signo: ::c_int,
- pub si_errno: ::c_int,
- pub si_code: ::c_int,
- _pad: ::c_int,
- _pad2: [::c_long; 14],
- }
-
pub struct ipc_perm {
pub __key: ::key_t,
pub uid: ::uid_t,
@@ -142,21 +130,6 @@ s! {
__unused5: ::c_ulong
}
- pub struct statfs {
- pub f_type: ::c_uint,
- pub f_bsize: ::c_uint,
- pub f_blocks: ::fsblkcnt_t,
- pub f_bfree: ::fsblkcnt_t,
- pub f_bavail: ::fsblkcnt_t,
- pub f_files: ::fsfilcnt_t,
- pub f_ffree: ::fsfilcnt_t,
- pub f_fsid: ::fsid_t,
- pub f_namelen: ::c_uint,
- pub f_frsize: ::c_uint,
- pub f_flags: ::c_uint,
- f_spare: [::c_uint; 4],
- }
-
pub struct statvfs {
pub f_bsize: ::c_ulong,
pub f_frsize: ::c_ulong,
@@ -172,33 +145,6 @@ s! {
__f_spare: [::c_int; 6],
}
- pub struct msghdr {
- pub msg_name: *mut ::c_void,
- pub msg_namelen: ::socklen_t,
- pub msg_iov: *mut ::iovec,
- pub msg_iovlen: ::size_t,
- pub msg_control: *mut ::c_void,
- pub msg_controllen: ::size_t,
- pub msg_flags: ::c_int,
- }
-
- pub struct cmsghdr {
- pub cmsg_len: ::size_t,
- pub cmsg_level: ::c_int,
- pub cmsg_type: ::c_int,
- }
-
- pub struct termios {
- pub c_iflag: ::tcflag_t,
- pub c_oflag: ::tcflag_t,
- pub c_cflag: ::tcflag_t,
- pub c_lflag: ::tcflag_t,
- pub c_line: ::cc_t,
- pub c_cc: [::cc_t; ::NCCS],
- pub c_ispeed: ::speed_t,
- pub c_ospeed: ::speed_t,
- }
-
pub struct termios2 {
pub c_iflag: ::tcflag_t,
pub c_oflag: ::tcflag_t,
@@ -210,44 +156,6 @@ s! {
pub c_ospeed: ::speed_t,
}
- pub struct sysinfo {
- pub uptime: ::c_long,
- pub loads: [::c_ulong; 3],
- pub totalram: ::c_ulong,
- pub freeram: ::c_ulong,
- pub sharedram: ::c_ulong,
- pub bufferram: ::c_ulong,
- pub totalswap: ::c_ulong,
- pub freeswap: ::c_ulong,
- pub procs: ::c_ushort,
- pub pad: ::c_ushort,
- pub totalhigh: ::c_ulong,
- pub freehigh: ::c_ulong,
- pub mem_unit: ::c_uint,
- pub _f: [::c_char; 0],
- }
-
- pub struct glob64_t {
- pub gl_pathc: ::size_t,
- pub gl_pathv: *mut *mut ::c_char,
- pub gl_offs: ::size_t,
- pub gl_flags: ::c_int,
-
- __unused1: *mut ::c_void,
- __unused2: *mut ::c_void,
- __unused3: *mut ::c_void,
- __unused4: *mut ::c_void,
- __unused5: *mut ::c_void,
- }
-
- pub struct flock {
- pub l_type: ::c_short,
- pub l_whence: ::c_short,
- pub l_start: ::off_t,
- pub l_len: ::off_t,
- pub l_pid: ::pid_t,
- }
-
pub struct __psw_t {
pub mask: u64,
pub addr: u64,
@@ -274,20 +182,6 @@ s! {
pub uc_sigmask: ::sigset_t,
}
- pub struct msqid_ds {
- pub msg_perm: ::ipc_perm,
- pub msg_stime: ::time_t,
- pub msg_rtime: ::time_t,
- pub msg_ctime: ::time_t,
- __msg_cbytes: ::c_ulong,
- pub msg_qnum: ::msgqnum_t,
- pub msg_qbytes: ::msglen_t,
- pub msg_lspid: ::pid_t,
- pub msg_lrpid: ::pid_t,
- __glibc_reserved4: ::c_ulong,
- __glibc_reserved5: ::c_ulong,
- }
-
pub struct statfs64 {
pub f_type: ::c_uint,
pub f_bsize: ::c_uint,
@@ -354,15 +248,18 @@ cfg_if! {
}
}
-pub const MADV_SOFT_OFFLINE: ::c_int = 101;
-pub const MS_RMT_MASK: ::c_ulong = 0x02800051;
+pub const POSIX_FADV_DONTNEED: ::c_int = 6;
+pub const POSIX_FADV_NOREUSE: ::c_int = 7;
+pub const VEOF: usize = 4;
+pub const RTLD_DEEPBIND: ::c_int = 0x8;
+pub const RTLD_GLOBAL: ::c_int = 0x100;
+pub const RTLD_NOLOAD: ::c_int = 0x4;
pub const SFD_CLOEXEC: ::c_int = 0x080000;
pub const NCCS: usize = 32;
pub const O_TRUNC: ::c_int = 512;
-pub const O_LARGEFILE: ::c_int = 0;
pub const O_NOATIME: ::c_int = 0o1000000;
pub const O_CLOEXEC: ::c_int = 0x80000;
pub const O_PATH: ::c_int = 0o10000000;
@@ -392,14 +289,10 @@ 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;
-
pub const __SIZEOF_PTHREAD_CONDATTR_T: usize = 4;
pub const __SIZEOF_PTHREAD_MUTEXATTR_T: usize = 4;
pub const __SIZEOF_PTHREAD_MUTEX_T: usize = 40;
pub const __SIZEOF_PTHREAD_RWLOCK_T: usize = 56;
-pub const __SIZEOF_PTHREAD_RWLOCKATTR_T: usize = 8;
align_const! {
pub const PTHREAD_RECURSIVE_MUTEX_INITIALIZER_NP: ::pthread_mutex_t =
@@ -425,6 +318,11 @@ align_const! {
};
}
+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;
pub const EADDRINUSE: ::c_int = 98;
pub const EADDRNOTAVAIL: ::c_int = 99;
pub const ECONNABORTED: ::c_int = 103;
@@ -436,15 +334,10 @@ pub const ENOTCONN: ::c_int = 107;
pub const ETIMEDOUT: ::c_int = 110;
pub const FIOCLEX: ::c_ulong = 0x5451;
pub const FIONBIO: ::c_ulong = 0x5421;
-pub const MAP_ANON: ::c_int = 0x20;
-pub const O_ACCMODE: ::c_int = 3;
pub const O_APPEND: ::c_int = 1024;
pub const O_CREAT: ::c_int = 64;
pub const O_EXCL: ::c_int = 128;
pub const O_NONBLOCK: ::c_int = 2048;
-pub const PTHREAD_STACK_MIN: ::size_t = 16384;
-pub const PTHREAD_MUTEX_ADAPTIVE_NP: ::c_int = 3;
-pub const RLIM_INFINITY: ::rlim_t = 0xffffffffffffffff;
pub const SA_NOCLDWAIT: ::c_int = 2;
pub const SA_ONSTACK: ::c_int = 0x08000000;
pub const SA_SIGINFO: ::c_int = 4;
@@ -452,8 +345,6 @@ pub const SIGBUS: ::c_int = 7;
pub const SIGSTKSZ: ::size_t = 0x2000;
pub const MINSIGSTKSZ: ::size_t = 2048;
pub const SIG_SETMASK: ::c_int = 2;
-pub const SOCK_DGRAM: ::c_int = 2;
-pub const SOCK_STREAM: ::c_int = 1;
pub const SOL_SOCKET: ::c_int = 1;
pub const SO_BROADCAST: ::c_int = 6;
pub const SO_ERROR: ::c_int = 4;
@@ -469,13 +360,14 @@ pub const SO_RXQ_OVFL: ::c_int = 40;
pub const SO_PEEK_OFF: ::c_int = 42;
pub const SO_BUSY_POLL: ::c_int = 46;
+pub const SOCK_STREAM: ::c_int = 1;
+pub const SOCK_DGRAM: ::c_int = 2;
+
pub const RLIMIT_RSS: ::__rlimit_resource_t = 5;
-pub const RLIMIT_NOFILE: ::__rlimit_resource_t = 7;
pub const RLIMIT_AS: ::__rlimit_resource_t = 9;
-pub const RLIMIT_NPROC: ::__rlimit_resource_t = 6;
pub const RLIMIT_MEMLOCK: ::__rlimit_resource_t = 8;
-pub const RLIMIT_RTTIME: ::__rlimit_resource_t = 15;
-pub const RLIMIT_NLIMITS: ::__rlimit_resource_t = 16;
+pub const RLIMIT_NOFILE: ::__rlimit_resource_t = 7;
+pub const RLIMIT_NPROC: ::__rlimit_resource_t = 6;
pub const O_NOCTTY: ::c_int = 256;
pub const O_SYNC: ::c_int = 1052672;
@@ -486,44 +378,18 @@ pub const O_DIRECT: ::c_int = 0x4000;
pub const O_DIRECTORY: ::c_int = 0x10000;
pub const O_NOFOLLOW: ::c_int = 0x20000;
-pub const SOCK_NONBLOCK: ::c_int = O_NONBLOCK;
-
-pub const LC_PAPER: ::c_int = 7;
-pub const LC_NAME: ::c_int = 8;
-pub const LC_ADDRESS: ::c_int = 9;
-pub const LC_TELEPHONE: ::c_int = 10;
-pub const LC_MEASUREMENT: ::c_int = 11;
-pub const LC_IDENTIFICATION: ::c_int = 12;
-pub const LC_PAPER_MASK: ::c_int = (1 << LC_PAPER);
-pub const LC_NAME_MASK: ::c_int = (1 << LC_NAME);
-pub const LC_ADDRESS_MASK: ::c_int = (1 << LC_ADDRESS);
-pub const LC_TELEPHONE_MASK: ::c_int = (1 << LC_TELEPHONE);
-pub const LC_MEASUREMENT_MASK: ::c_int = (1 << LC_MEASUREMENT);
-pub const LC_IDENTIFICATION_MASK: ::c_int = (1 << LC_IDENTIFICATION);
-pub const LC_ALL_MASK: ::c_int = ::LC_CTYPE_MASK
- | ::LC_NUMERIC_MASK
- | ::LC_TIME_MASK
- | ::LC_COLLATE_MASK
- | ::LC_MONETARY_MASK
- | ::LC_MESSAGES_MASK
- | LC_PAPER_MASK
- | LC_NAME_MASK
- | LC_ADDRESS_MASK
- | LC_TELEPHONE_MASK
- | LC_MEASUREMENT_MASK
- | LC_IDENTIFICATION_MASK;
-
-pub const MAP_ANONYMOUS: ::c_int = 0x0020;
+pub const MADV_SOFT_OFFLINE: ::c_int = 101;
pub const MAP_GROWSDOWN: ::c_int = 0x0100;
-pub const MAP_DENYWRITE: ::c_int = 0x0800;
-pub const MAP_EXECUTABLE: ::c_int = 0x01000;
pub const MAP_LOCKED: ::c_int = 0x02000;
pub const MAP_NORESERVE: ::c_int = 0x04000;
+pub const MAP_ANON: ::c_int = 0x0020;
+pub const MAP_ANONYMOUS: ::c_int = 0x0020;
+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;
-pub const MAP_SHARED_VALIDATE: ::c_int = 0x3;
-pub const MAP_FIXED_NOREPLACE: ::c_int = 0x100000;
+pub const MAP_HUGETLB: ::c_int = 0x040000;
pub const EDEADLOCK: ::c_int = 35;
pub const ENAMETOOLONG: ::c_int = 36;
@@ -569,7 +435,6 @@ 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 ENOTSUP: ::c_int = EOPNOTSUPP;
pub const EPFNOSUPPORT: ::c_int = 96;
pub const EAFNOSUPPORT: ::c_int = 97;
pub const ENETDOWN: ::c_int = 100;
@@ -584,11 +449,6 @@ 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 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;
pub const EDQUOT: ::c_int = 122;
pub const ENOMEDIUM: ::c_int = 123;
pub const EMEDIUMTYPE: ::c_int = 124;
@@ -602,8 +462,6 @@ pub const ENOTRECOVERABLE: ::c_int = 131;
pub const EHWPOISON: ::c_int = 133;
pub const ERFKILL: ::c_int = 132;
-pub const SOCK_SEQPACKET: ::c_int = 5;
-
pub const SO_TYPE: ::c_int = 3;
pub const SO_DONTROUTE: ::c_int = 5;
pub const SO_SNDBUF: ::c_int = 7;
@@ -622,17 +480,13 @@ pub const SO_ACCEPTCONN: ::c_int = 30;
pub const SO_SNDBUFFORCE: ::c_int = 32;
pub const SO_RCVBUFFORCE: ::c_int = 33;
-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;
-pub const TCP_USER_TIMEOUT: ::c_int = 18;
-pub const TCP_REPAIR: ::c_int = 19;
-pub const TCP_REPAIR_QUEUE: ::c_int = 20;
-pub const TCP_QUEUE_SEQ: ::c_int = 21;
-pub const TCP_REPAIR_OPTIONS: ::c_int = 22;
-pub const TCP_FASTOPEN: ::c_int = 23;
-pub const TCP_TIMESTAMP: ::c_int = 24;
-
+pub const SIGTTIN: ::c_int = 21;
+pub const SIGTTOU: ::c_int = 22;
+pub const SIGXCPU: ::c_int = 24;
+pub const SIGXFSZ: ::c_int = 25;
+pub const SIGVTALRM: ::c_int = 26;
+pub const SIGPROF: ::c_int = 27;
+pub const SIGWINCH: ::c_int = 28;
pub const SIGCHLD: ::c_int = 17;
pub const SIGUSR1: ::c_int = 10;
pub const SIGUSR2: ::c_int = 12;
@@ -648,130 +502,14 @@ pub const SIGSTKFLT: ::c_int = 16;
note = "Use SIGSYS instead"
)]
pub const SIGUNUSED: ::c_int = 31;
-pub const SIGTTIN: ::c_int = 21;
-pub const SIGTTOU: ::c_int = 22;
-pub const SIGXCPU: ::c_int = 24;
-pub const SIGXFSZ: ::c_int = 25;
-pub const SIGVTALRM: ::c_int = 26;
-pub const SIGPROF: ::c_int = 27;
-pub const SIGWINCH: ::c_int = 28;
pub const SIGPOLL: ::c_int = 29;
pub const SIGPWR: ::c_int = 30;
pub const SIG_BLOCK: ::c_int = 0x000000;
pub const SIG_UNBLOCK: ::c_int = 0x01;
-pub const BUFSIZ: ::c_uint = 8192;
-pub const TMP_MAX: ::c_uint = 238328;
-pub const FOPEN_MAX: ::c_uint = 16;
-pub const POSIX_MADV_DONTNEED: ::c_int = 4;
-pub const _SC_EQUIV_CLASS_MAX: ::c_int = 41;
-pub const _SC_CHARCLASS_NAME_MAX: ::c_int = 45;
-pub const _SC_PII: ::c_int = 53;
-pub const _SC_PII_XTI: ::c_int = 54;
-pub const _SC_PII_SOCKET: ::c_int = 55;
-pub const _SC_PII_INTERNET: ::c_int = 56;
-pub const _SC_PII_OSI: ::c_int = 57;
-pub const _SC_POLL: ::c_int = 58;
-pub const _SC_SELECT: ::c_int = 59;
-pub const _SC_PII_INTERNET_STREAM: ::c_int = 61;
-pub const _SC_PII_INTERNET_DGRAM: ::c_int = 62;
-pub const _SC_PII_OSI_COTS: ::c_int = 63;
-pub const _SC_PII_OSI_CLTS: ::c_int = 64;
-pub const _SC_PII_OSI_M: ::c_int = 65;
-pub const _SC_T_IOV_MAX: ::c_int = 66;
-pub const _SC_2_C_VERSION: ::c_int = 96;
-pub const _SC_CHAR_BIT: ::c_int = 101;
-pub const _SC_CHAR_MAX: ::c_int = 102;
-pub const _SC_CHAR_MIN: ::c_int = 103;
-pub const _SC_INT_MAX: ::c_int = 104;
-pub const _SC_INT_MIN: ::c_int = 105;
-pub const _SC_LONG_BIT: ::c_int = 106;
-pub const _SC_WORD_BIT: ::c_int = 107;
-pub const _SC_MB_LEN_MAX: ::c_int = 108;
-pub const _SC_SSIZE_MAX: ::c_int = 110;
-pub const _SC_SCHAR_MAX: ::c_int = 111;
-pub const _SC_SCHAR_MIN: ::c_int = 112;
-pub const _SC_SHRT_MAX: ::c_int = 113;
-pub const _SC_SHRT_MIN: ::c_int = 114;
-pub const _SC_UCHAR_MAX: ::c_int = 115;
-pub const _SC_UINT_MAX: ::c_int = 116;
-pub const _SC_ULONG_MAX: ::c_int = 117;
-pub const _SC_USHRT_MAX: ::c_int = 118;
-pub const _SC_NL_ARGMAX: ::c_int = 119;
-pub const _SC_NL_LANGMAX: ::c_int = 120;
-pub const _SC_NL_MSGMAX: ::c_int = 121;
-pub const _SC_NL_NMAX: ::c_int = 122;
-pub const _SC_NL_SETMAX: ::c_int = 123;
-pub const _SC_NL_TEXTMAX: ::c_int = 124;
-pub const _SC_BASE: ::c_int = 134;
-pub const _SC_C_LANG_SUPPORT: ::c_int = 135;
-pub const _SC_C_LANG_SUPPORT_R: ::c_int = 136;
-pub const _SC_DEVICE_IO: ::c_int = 140;
-pub const _SC_DEVICE_SPECIFIC: ::c_int = 141;
-pub const _SC_DEVICE_SPECIFIC_R: ::c_int = 142;
-pub const _SC_FD_MGMT: ::c_int = 143;
-pub const _SC_FIFO: ::c_int = 144;
-pub const _SC_PIPE: ::c_int = 145;
-pub const _SC_FILE_ATTRIBUTES: ::c_int = 146;
-pub const _SC_FILE_LOCKING: ::c_int = 147;
-pub const _SC_FILE_SYSTEM: ::c_int = 148;
-pub const _SC_MULTI_PROCESS: ::c_int = 150;
-pub const _SC_SINGLE_PROCESS: ::c_int = 151;
-pub const _SC_NETWORKING: ::c_int = 152;
-pub const _SC_REGEX_VERSION: ::c_int = 156;
-pub const _SC_SIGNALS: ::c_int = 158;
-pub const _SC_SYSTEM_DATABASE: ::c_int = 162;
-pub const _SC_SYSTEM_DATABASE_R: ::c_int = 163;
-pub const _SC_USER_GROUPS: ::c_int = 166;
-pub const _SC_USER_GROUPS_R: ::c_int = 167;
-pub const _SC_LEVEL1_ICACHE_SIZE: ::c_int = 185;
-pub const _SC_LEVEL1_ICACHE_ASSOC: ::c_int = 186;
-pub const _SC_LEVEL1_ICACHE_LINESIZE: ::c_int = 187;
-pub const _SC_LEVEL1_DCACHE_SIZE: ::c_int = 188;
-pub const _SC_LEVEL1_DCACHE_ASSOC: ::c_int = 189;
-pub const _SC_LEVEL1_DCACHE_LINESIZE: ::c_int = 190;
-pub const _SC_LEVEL2_CACHE_SIZE: ::c_int = 191;
-pub const _SC_LEVEL2_CACHE_ASSOC: ::c_int = 192;
-pub const _SC_LEVEL2_CACHE_LINESIZE: ::c_int = 193;
-pub const _SC_LEVEL3_CACHE_SIZE: ::c_int = 194;
-pub const _SC_LEVEL3_CACHE_ASSOC: ::c_int = 195;
-pub const _SC_LEVEL3_CACHE_LINESIZE: ::c_int = 196;
-pub const _SC_LEVEL4_CACHE_SIZE: ::c_int = 197;
-pub const _SC_LEVEL4_CACHE_ASSOC: ::c_int = 198;
-pub const _SC_LEVEL4_CACHE_LINESIZE: ::c_int = 199;
pub const O_ASYNC: ::c_int = 0x2000;
pub const O_NDELAY: ::c_int = 0x800;
-pub const ST_RELATIME: ::c_ulong = 4096;
-pub const NI_MAXHOST: ::socklen_t = 1025;
-
-pub const ADFS_SUPER_MAGIC: ::c_int = 0x0000adf5;
-pub const AFFS_SUPER_MAGIC: ::c_int = 0x0000adff;
-pub const CODA_SUPER_MAGIC: ::c_int = 0x73757245;
-pub const CRAMFS_MAGIC: ::c_int = 0x28cd3d45;
-pub const EFS_SUPER_MAGIC: ::c_int = 0x00414a53;
-pub const EXT2_SUPER_MAGIC: ::c_int = 0x0000ef53;
-pub const EXT3_SUPER_MAGIC: ::c_int = 0x0000ef53;
-pub const EXT4_SUPER_MAGIC: ::c_int = 0x0000ef53;
-pub const HPFS_SUPER_MAGIC: ::c_int = 0xf995e849;
-pub const HUGETLBFS_MAGIC: ::c_int = 0x958458f6;
-pub const ISOFS_SUPER_MAGIC: ::c_int = 0x00009660;
-pub const JFFS2_SUPER_MAGIC: ::c_int = 0x000072b6;
-pub const MINIX_SUPER_MAGIC: ::c_int = 0x0000137f;
-pub const MINIX_SUPER_MAGIC2: ::c_int = 0x0000138f;
-pub const MINIX2_SUPER_MAGIC: ::c_int = 0x00002468;
-pub const MINIX2_SUPER_MAGIC2: ::c_int = 0x00002478;
-pub const MSDOS_SUPER_MAGIC: ::c_int = 0x00004d44;
-pub const NCP_SUPER_MAGIC: ::c_int = 0x0000564c;
-pub const NFS_SUPER_MAGIC: ::c_int = 0x00006969;
-pub const OPENPROM_SUPER_MAGIC: ::c_int = 0x00009fa1;
-pub const PROC_SUPER_MAGIC: ::c_int = 0x00009fa0;
-pub const QNX4_SUPER_MAGIC: ::c_int = 0x0000002f;
-pub const REISERFS_SUPER_MAGIC: ::c_int = 0x52654973;
-pub const SMB_SUPER_MAGIC: ::c_int = 0x0000517b;
-pub const TMPFS_MAGIC: ::c_int = 0x01021994;
-pub const USBDEVICE_SUPER_MAGIC: ::c_int = 0x00009fa2;
-pub const VEOF: usize = 4;
pub const VEOL: usize = 11;
pub const VEOL2: usize = 16;
pub const VMIN: usize = 6;
@@ -779,41 +517,13 @@ pub const IEXTEN: ::tcflag_t = 0x00008000;
pub const TOSTOP: ::tcflag_t = 0x00000100;
pub const FLUSHO: ::tcflag_t = 0x00001000;
-pub const CPU_SETSIZE: ::c_int = 0x400;
-
pub const EXTPROC: ::tcflag_t = 0x00010000;
-pub const PTRACE_TRACEME: ::c_uint = 0;
-pub const PTRACE_PEEKTEXT: ::c_uint = 1;
-pub const PTRACE_PEEKDATA: ::c_uint = 2;
-pub const PTRACE_PEEKUSER: ::c_uint = 3;
-pub const PTRACE_POKETEXT: ::c_uint = 4;
-pub const PTRACE_POKEDATA: ::c_uint = 5;
-pub const PTRACE_POKEUSER: ::c_uint = 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;
pub const PTRACE_DETACH: ::c_uint = 17;
-pub const PTRACE_SYSCALL: ::c_uint = 24;
-pub const PTRACE_SETOPTIONS: ::c_uint = 0x4200;
-pub const PTRACE_GETEVENTMSG: ::c_uint = 0x4201;
-pub const PTRACE_GETSIGINFO: ::c_uint = 0x4202;
-pub const PTRACE_SETSIGINFO: ::c_uint = 0x4203;
-pub const PTRACE_GETREGSET: ::c_uint = 0x4204;
-pub const PTRACE_SETREGSET: ::c_uint = 0x4205;
-pub const PTRACE_SEIZE: ::c_uint = 0x4206;
-pub const PTRACE_INTERRUPT: ::c_uint = 0x4207;
-pub const PTRACE_LISTEN: ::c_uint = 0x4208;
-pub const PTRACE_PEEKSIGINFO: ::c_uint = 0x4209;
pub const MCL_CURRENT: ::c_int = 0x0001;
pub const MCL_FUTURE: ::c_int = 0x0002;
-pub const EPOLLWAKEUP: ::c_int = 0x20000000;
-
-pub const MAP_HUGETLB: ::c_int = 0x040000;
-
pub const EFD_NONBLOCK: ::c_int = 0x800;
pub const F_RDLCK: ::c_int = 0;
@@ -825,15 +535,8 @@ pub const F_SETOWN: ::c_int = 8;
pub const F_SETLK: ::c_int = 6;
pub const F_SETLKW: ::c_int = 7;
-pub const SEEK_DATA: ::c_int = 3;
-pub const SEEK_HOLE: ::c_int = 4;
-
pub const SFD_NONBLOCK: ::c_int = 0x0800;
-pub const TCSANOW: ::c_int = 0;
-pub const TCSADRAIN: ::c_int = 1;
-pub const TCSAFLUSH: ::c_int = 2;
-
pub const TCGETS: ::c_ulong = 0x5401;
pub const TCSETS: ::c_ulong = 0x5402;
pub const TCSETSW: ::c_ulong = 0x5403;
@@ -848,8 +551,6 @@ pub const TCFLSH: ::c_ulong = 0x540B;
pub const TIOCGSOFTCAR: ::c_ulong = 0x5419;
pub const TIOCSSOFTCAR: ::c_ulong = 0x541A;
pub const TIOCINQ: ::c_ulong = 0x541B;
-pub const TIOCLINUX: ::c_ulong = 0x541C;
-pub const TIOCGSERIAL: ::c_ulong = 0x541E;
pub const TIOCEXCL: ::c_ulong = 0x540C;
pub const TIOCNXCL: ::c_ulong = 0x540D;
pub const TIOCSCTTY: ::c_ulong = 0x540E;
@@ -866,24 +567,18 @@ pub const TIOCMSET: ::c_ulong = 0x5418;
pub const FIONREAD: ::c_ulong = 0x541B;
pub const TIOCCONS: ::c_ulong = 0x541D;
-pub const RTLD_DEEPBIND: ::c_int = 0x8;
-pub const RTLD_GLOBAL: ::c_int = 0x100;
-pub const RTLD_NOLOAD: ::c_int = 0x4;
-
-pub const LINUX_REBOOT_MAGIC1: ::c_int = 0xfee1dead;
-pub const LINUX_REBOOT_MAGIC2: ::c_int = 672274793;
-pub const LINUX_REBOOT_MAGIC2A: ::c_int = 85072278;
-pub const LINUX_REBOOT_MAGIC2B: ::c_int = 369367448;
-pub const LINUX_REBOOT_MAGIC2C: ::c_int = 537993216;
+pub const TCSANOW: ::c_int = 0;
+pub const TCSADRAIN: ::c_int = 1;
+pub const TCSAFLUSH: ::c_int = 2;
-pub const LINUX_REBOOT_CMD_RESTART: ::c_int = 0x01234567;
-pub const LINUX_REBOOT_CMD_HALT: ::c_int = 0xCDEF0123;
-pub const LINUX_REBOOT_CMD_CAD_ON: ::c_int = 0x89ABCDEF;
-pub const LINUX_REBOOT_CMD_CAD_OFF: ::c_int = 0x00000000;
-pub const LINUX_REBOOT_CMD_POWER_OFF: ::c_int = 0x4321FEDC;
-pub const LINUX_REBOOT_CMD_RESTART2: ::c_int = 0xA1B2C3D4;
-pub const LINUX_REBOOT_CMD_SW_SUSPEND: ::c_int = 0xD000FCE2;
-pub const LINUX_REBOOT_CMD_KEXEC: ::c_int = 0x45584543;
+pub const TIOCLINUX: ::c_ulong = 0x541C;
+pub const TIOCGSERIAL: ::c_ulong = 0x541E;
+pub const TIOCM_ST: ::c_int = 0x008;
+pub const TIOCM_SR: ::c_int = 0x010;
+pub const TIOCM_CTS: ::c_int = 0x020;
+pub const TIOCM_CAR: ::c_int = 0x040;
+pub const TIOCM_RNG: ::c_int = 0x080;
+pub const TIOCM_DSR: ::c_int = 0x100;
pub const VTIME: usize = 5;
pub const VSWTC: usize = 7;
@@ -912,20 +607,6 @@ pub const VTDLY: ::tcflag_t = 0o040000;
pub const VT1: ::tcflag_t = 0x00004000;
pub const XTABS: ::tcflag_t = 0o014000;
-pub const TIOCM_LE: ::c_int = 0x001;
-pub const TIOCM_DTR: ::c_int = 0x002;
-pub const TIOCM_RTS: ::c_int = 0x004;
-pub const TIOCM_ST: ::c_int = 0x008;
-pub const TIOCM_SR: ::c_int = 0x010;
-pub const TIOCM_CTS: ::c_int = 0x020;
-pub const TIOCM_CAR: ::c_int = 0x040;
-pub const TIOCM_RNG: ::c_int = 0x080;
-pub const TIOCM_DSR: ::c_int = 0x100;
-pub const TIOCM_CD: ::c_int = TIOCM_CAR;
-pub const TIOCM_RI: ::c_int = TIOCM_RNG;
-
-pub const SIGEV_THREAD_ID: ::c_int = 4;
-
pub const CBAUD: ::speed_t = 0o010017;
pub const B0: ::speed_t = 0o000000;
pub const B50: ::speed_t = 0o000001;
@@ -992,17 +673,6 @@ pub const POLLWRBAND: ::c_short = 0x200;
pub const IXON: ::tcflag_t = 0o002000;
pub const IXOFF: ::tcflag_t = 0o010000;
-pub const RLIMIT_CPU: ::__rlimit_resource_t = 0;
-pub const RLIMIT_FSIZE: ::__rlimit_resource_t = 1;
-pub const RLIMIT_DATA: ::__rlimit_resource_t = 2;
-pub const RLIMIT_STACK: ::__rlimit_resource_t = 3;
-pub const RLIMIT_CORE: ::__rlimit_resource_t = 4;
-pub const RLIMIT_LOCKS: ::__rlimit_resource_t = 10;
-pub const RLIMIT_SIGPENDING: ::__rlimit_resource_t = 11;
-pub const RLIMIT_MSGQUEUE: ::__rlimit_resource_t = 12;
-pub const RLIMIT_NICE: ::__rlimit_resource_t = 13;
-pub const RLIMIT_RTPRIO: ::__rlimit_resource_t = 14;
-
pub const SYS_exit: ::c_long = 1;
pub const SYS_fork: ::c_long = 2;
pub const SYS_read: ::c_long = 3;
@@ -1328,26 +998,6 @@ pub const SYS_newfstatat: ::c_long = 293;
#[link(name = "util")]
extern {
- pub fn sendmmsg(sockfd: ::c_int, msgvec: *mut ::mmsghdr, vlen: ::c_uint,
- flags: ::c_int) -> ::c_int;
- pub fn recvmmsg(sockfd: ::c_int, msgvec: *mut ::mmsghdr, vlen: ::c_uint,
- flags: ::c_int, timeout: *mut ::timespec) -> ::c_int;
-
- pub fn getrlimit64(resource: ::__rlimit_resource_t,
- rlim: *mut ::rlimit64) -> ::c_int;
- pub fn setrlimit64(resource: ::__rlimit_resource_t,
- rlim: *const ::rlimit64) -> ::c_int;
- pub fn getrlimit(resource: ::__rlimit_resource_t,
- rlim: *mut ::rlimit) -> ::c_int;
- pub fn setrlimit(resource: ::__rlimit_resource_t,
- rlim: *const ::rlimit) -> ::c_int;
- pub fn prlimit(pid: ::pid_t,
- resource: ::__rlimit_resource_t, new_limit: *const ::rlimit,
- old_limit: *mut ::rlimit) -> ::c_int;
- pub fn prlimit64(pid: ::pid_t,
- resource: ::__rlimit_resource_t,
- new_limit: *const ::rlimit64,
- old_limit: *mut ::rlimit64) -> ::c_int;
pub fn sysctl(name: *mut ::c_int,
namelen: ::c_int,
@@ -1356,48 +1006,12 @@ extern {
newp: *mut ::c_void,
newlen: ::size_t)
-> ::c_int;
- pub fn ioctl(fd: ::c_int, request: ::c_ulong, ...) -> ::c_int;
- pub fn backtrace(buf: *mut *mut ::c_void,
- sz: ::c_int) -> ::c_int;
- pub fn glob64(pattern: *const ::c_char,
- flags: ::c_int,
- errfunc: ::Option<extern fn(epath: *const ::c_char,
- errno: ::c_int)
- -> ::c_int>,
- pglob: *mut glob64_t) -> ::c_int;
- pub fn globfree64(pglob: *mut glob64_t);
- pub fn ptrace(request: ::c_uint, ...) -> ::c_long;
- pub fn pthread_attr_getaffinity_np(attr: *const ::pthread_attr_t,
- cpusetsize: ::size_t,
- cpuset: *mut ::cpu_set_t) -> ::c_int;
- pub fn pthread_attr_setaffinity_np(attr: *mut ::pthread_attr_t,
- cpusetsize: ::size_t,
- cpuset: *const ::cpu_set_t) -> ::c_int;
- pub fn getpriority(which: ::__priority_which_t, who: ::id_t) -> ::c_int;
- pub fn setpriority(which: ::__priority_which_t, who: ::id_t,
- prio: ::c_int) -> ::c_int;
- pub fn pthread_getaffinity_np(thread: ::pthread_t,
- cpusetsize: ::size_t,
- cpuset: *mut ::cpu_set_t) -> ::c_int;
- pub fn pthread_setaffinity_np(thread: ::pthread_t,
- cpusetsize: ::size_t,
- cpuset: *const ::cpu_set_t) -> ::c_int;
- pub fn sched_getcpu() -> ::c_int;
- pub fn getcontext(ucp: *mut ucontext_t) -> ::c_int;
- pub fn setcontext(ucp: *const ucontext_t) -> ::c_int;
- pub fn makecontext(ucp: *mut ucontext_t,
+ pub fn getcontext(ucp: *mut ::ucontext_t) -> ::c_int;
+ pub fn setcontext(ucp: *const ::ucontext_t) -> ::c_int;
+ pub fn makecontext(ucp: *mut ::ucontext_t,
func: extern fn (),
argc: ::c_int, ...);
- pub fn swapcontext(uocp: *mut ucontext_t,
- ucp: *const ucontext_t) -> ::c_int;
+ pub fn swapcontext(uocp: *mut ::ucontext_t,
+ ucp: *const ::ucontext_t) -> ::c_int;
}
-cfg_if! {
- if #[cfg(libc_align)] {
- mod align;
- pub use self::align::*;
- } else {
- mod no_align;
- pub use self::no_align::*;
- }
-}
diff --git a/src/unix/linux_like/linux/other/b64/sparc64.rs b/src/unix/linux_like/linux/gnu/b64/sparc64.rs
index 264a3f1d..7022cae3 100644
--- a/src/unix/linux_like/linux/other/b64/sparc64.rs
+++ b/src/unix/linux_like/linux/gnu/b64/sparc64.rs
@@ -12,6 +12,60 @@ pub type suseconds_t = i32;
pub type __u64 = ::c_ulonglong;
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,
+ pub sa_restorer: ::Option<extern fn()>,
+ }
+
+ pub struct statfs {
+ pub f_type: ::__fsword_t,
+ pub f_bsize: ::__fsword_t,
+ pub f_blocks: ::fsblkcnt_t,
+ pub f_bfree: ::fsblkcnt_t,
+ pub f_bavail: ::fsblkcnt_t,
+
+ pub f_files: ::fsfilcnt_t,
+ pub f_ffree: ::fsfilcnt_t,
+ pub f_fsid: ::fsid_t,
+
+ pub f_namelen: ::__fsword_t,
+ pub f_frsize: ::__fsword_t,
+ f_spare: [::__fsword_t; 5],
+ }
+
+ pub struct siginfo_t {
+ pub si_signo: ::c_int,
+ pub si_errno: ::c_int,
+ pub si_code: ::c_int,
+ #[doc(hidden)]
+ #[deprecated(
+ since="0.2.54",
+ note="Please leave a comment on \
+ https://github.com/rust-lang/libc/pull/1316 if you're using \
+ this field"
+ )]
+ pub _pad: [::c_int; 29],
+ _align: [usize; 0],
+ }
+
+ pub struct flock {
+ pub l_type: ::c_short,
+ pub l_whence: ::c_short,
+ pub l_start: ::off_t,
+ pub l_len: ::off_t,
+ pub l_pid: ::pid_t,
+ }
+
+ pub struct stack_t {
+ pub ss_sp: *mut ::c_void,
+ pub ss_flags: ::c_int,
+ pub ss_size: ::size_t
+ }
+
pub struct stat {
pub st_dev: ::dev_t,
__pad0: u64,
@@ -143,11 +197,21 @@ s! {
}
}
+pub const POSIX_FADV_DONTNEED: ::c_int = 4;
+pub const POSIX_FADV_NOREUSE: ::c_int = 5;
+
+pub const VEOF: usize = 4;
+pub const RTLD_DEEPBIND: ::c_int = 0x8;
+pub const RTLD_GLOBAL: ::c_int = 0x100;
+pub const RTLD_NOLOAD: ::c_int = 0x4;
pub const __SIZEOF_PTHREAD_RWLOCK_T: usize = 56;
pub const TIOCGSOFTCAR: ::c_ulong = 0x40047464;
pub const TIOCSSOFTCAR: ::c_ulong = 0x80047465;
+pub const RLIMIT_RSS: ::__rlimit_resource_t = 5;
+pub const RLIMIT_AS: ::__rlimit_resource_t = 9;
+pub const RLIMIT_MEMLOCK: ::__rlimit_resource_t = 8;
pub const RLIMIT_NOFILE: ::__rlimit_resource_t = 6;
pub const RLIMIT_NPROC: ::__rlimit_resource_t = 7;
@@ -164,7 +228,16 @@ pub const O_NOATIME: ::c_int = 0x200000;
pub const O_PATH: ::c_int = 0x1000000;
pub const O_TMPFILE: ::c_int = 0x2000000 | O_DIRECTORY;
+pub const MADV_SOFT_OFFLINE: ::c_int = 101;
pub const MAP_GROWSDOWN: ::c_int = 0x0200;
+pub const MAP_ANON: ::c_int = 0x0020;
+pub const MAP_ANONYMOUS: ::c_int = 0x0020;
+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;
+pub const MAP_HUGETLB: ::c_int = 0x040000;
pub const EDEADLK: ::c_int = 78;
pub const ENAMETOOLONG: ::c_int = 63;
@@ -270,10 +343,20 @@ pub const SO_LINGER: ::c_int = 128;
pub const SO_REUSEPORT: ::c_int = 0x200;
pub const SO_ACCEPTCONN: ::c_int = 0x8000;
+pub const SOCK_STREAM: ::c_int = 1;
+pub const SOCK_DGRAM: ::c_int = 2;
+
pub const SA_ONSTACK: ::c_int = 1;
pub const SA_SIGINFO: ::c_int = 0x200;
pub const SA_NOCLDWAIT: ::c_int = 0x100;
+pub const SIGTTIN: ::c_int = 21;
+pub const SIGTTOU: ::c_int = 22;
+pub const SIGXCPU: ::c_int = 24;
+pub const SIGXFSZ: ::c_int = 25;
+pub const SIGVTALRM: ::c_int = 26;
+pub const SIGPROF: ::c_int = 27;
+pub const SIGWINCH: ::c_int = 28;
pub const SIGCHLD: ::c_int = 20;
pub const SIGBUS: ::c_int = 10;
pub const SIGUSR1: ::c_int = 30;
@@ -312,6 +395,12 @@ pub const F_UNLCK: ::c_int = 3;
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 TIOCLINUX: ::c_ulong = 0x541C;
+pub const TIOCGSERIAL: ::c_ulong = 0x541E;
pub const TIOCEXCL: ::c_ulong = 0x2000740d;
pub const TIOCNXCL: ::c_ulong = 0x2000740e;
pub const TIOCSCTTY: ::c_ulong = 0x20007484;
@@ -322,6 +411,13 @@ pub const TIOCMBIC: ::c_ulong = 0x8004746b;
pub const TIOCMSET: ::c_ulong = 0x8004746d;
pub const TIOCCONS: ::c_ulong = 0x20007424;
+pub const TIOCM_ST: ::c_int = 0x008;
+pub const TIOCM_SR: ::c_int = 0x010;
+pub const TIOCM_CTS: ::c_int = 0x020;
+pub const TIOCM_CAR: ::c_int = 0x040;
+pub const TIOCM_RNG: ::c_int = 0x080;
+pub const TIOCM_DSR: ::c_int = 0x100;
+
pub const SFD_CLOEXEC: ::c_int = 0x400000;
pub const NCCS: usize = 17;
@@ -388,6 +484,11 @@ pub const MAP_LOCKED: ::c_int = 0x0100;
pub const MAP_NORESERVE: ::c_int = 0x00040;
pub const EDEADLOCK: ::c_int = 108;
+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;
pub const SO_PEERCRED: ::c_int = 0x40;
pub const SO_RCVLOWAT: ::c_int = 0x800;
diff --git a/src/unix/linux_like/linux/other/b64/x86_64.rs b/src/unix/linux_like/linux/gnu/b64/x86_64/mod.rs
index 32f7265a..6d61cd5d 100644
--- a/src/unix/linux_like/linux/other/b64/x86_64.rs
+++ b/src/unix/linux_like/linux/gnu/b64/x86_64/mod.rs
@@ -9,6 +9,60 @@ pub type suseconds_t = i64;
pub type __u64 = ::c_ulonglong;
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,
+ pub sa_restorer: ::Option<extern fn()>,
+ }
+
+ pub struct statfs {
+ pub f_type: ::__fsword_t,
+ pub f_bsize: ::__fsword_t,
+ pub f_blocks: ::fsblkcnt_t,
+ pub f_bfree: ::fsblkcnt_t,
+ pub f_bavail: ::fsblkcnt_t,
+
+ pub f_files: ::fsfilcnt_t,
+ pub f_ffree: ::fsfilcnt_t,
+ pub f_fsid: ::fsid_t,
+
+ pub f_namelen: ::__fsword_t,
+ pub f_frsize: ::__fsword_t,
+ f_spare: [::__fsword_t; 5],
+ }
+
+ pub struct flock {
+ pub l_type: ::c_short,
+ pub l_whence: ::c_short,
+ pub l_start: ::off_t,
+ pub l_len: ::off_t,
+ pub l_pid: ::pid_t,
+ }
+
+ pub struct siginfo_t {
+ pub si_signo: ::c_int,
+ pub si_errno: ::c_int,
+ pub si_code: ::c_int,
+ #[doc(hidden)]
+ #[deprecated(
+ since="0.2.54",
+ note="Please leave a comment on \
+ https://github.com/rust-lang/libc/pull/1316 if you're using \
+ this field"
+ )]
+ pub _pad: [::c_int; 29],
+ _align: [u64; 0],
+ }
+
+ pub struct stack_t {
+ pub ss_sp: *mut ::c_void,
+ pub ss_flags: ::c_int,
+ pub ss_size: ::size_t
+ }
+
pub struct stat {
pub st_dev: ::dev_t,
pub st_ino: ::ino_t,
@@ -330,11 +384,21 @@ cfg_if! {
}
}
+pub const POSIX_FADV_DONTNEED: ::c_int = 4;
+pub const POSIX_FADV_NOREUSE: ::c_int = 5;
+
+pub const VEOF: usize = 4;
+pub const RTLD_DEEPBIND: ::c_int = 0x8;
+pub const RTLD_GLOBAL: ::c_int = 0x100;
+pub const RTLD_NOLOAD: ::c_int = 0x4;
pub const TIOCGSOFTCAR: ::c_ulong = 0x5419;
pub const TIOCSSOFTCAR: ::c_ulong = 0x541A;
pub const TIOCGRS485: ::c_int = 0x542E;
pub const TIOCSRS485: ::c_int = 0x542F;
+pub const RLIMIT_RSS: ::__rlimit_resource_t = 5;
+pub const RLIMIT_AS: ::__rlimit_resource_t = 9;
+pub const RLIMIT_MEMLOCK: ::__rlimit_resource_t = 8;
pub const RLIMIT_NOFILE: ::__rlimit_resource_t = 7;
pub const RLIMIT_NPROC: ::__rlimit_resource_t = 6;
@@ -351,6 +415,7 @@ pub const O_NOATIME: ::c_int = 0o1000000;
pub const O_PATH: ::c_int = 0o10000000;
pub const O_TMPFILE: ::c_int = 0o20000000 | O_DIRECTORY;
+pub const MADV_SOFT_OFFLINE: ::c_int = 101;
pub const MAP_GROWSDOWN: ::c_int = 0x0100;
pub const EDEADLK: ::c_int = 35;
@@ -487,10 +552,20 @@ pub const SO_INCOMING_CPU: ::c_int = 49;
pub const SO_ATTACH_BPF: ::c_int = 50;
pub const SO_DETACH_BPF: ::c_int = SO_DETACH_FILTER;
+pub const SOCK_STREAM: ::c_int = 1;
+pub const SOCK_DGRAM: ::c_int = 2;
+
pub const SA_ONSTACK: ::c_int = 0x08000000;
pub const SA_SIGINFO: ::c_int = 0x00000004;
pub const SA_NOCLDWAIT: ::c_int = 0x00000002;
+pub const SIGTTIN: ::c_int = 21;
+pub const SIGTTOU: ::c_int = 22;
+pub const SIGXCPU: ::c_int = 24;
+pub const SIGXFSZ: ::c_int = 25;
+pub const SIGVTALRM: ::c_int = 26;
+pub const SIGPROF: ::c_int = 27;
+pub const SIGWINCH: ::c_int = 28;
pub const SIGCHLD: ::c_int = 17;
pub const SIGBUS: ::c_int = 7;
pub const SIGUSR1: ::c_int = 10;
@@ -535,6 +610,12 @@ pub const F_UNLCK: ::c_int = 2;
pub const SFD_NONBLOCK: ::c_int = 0x0800;
+pub const TCSANOW: ::c_int = 0;
+pub const TCSADRAIN: ::c_int = 1;
+pub const TCSAFLUSH: ::c_int = 2;
+
+pub const TIOCLINUX: ::c_ulong = 0x541C;
+pub const TIOCGSERIAL: ::c_ulong = 0x541E;
pub const TIOCEXCL: ::c_ulong = 0x540C;
pub const TIOCNXCL: ::c_ulong = 0x540D;
pub const TIOCSCTTY: ::c_ulong = 0x540E;
@@ -545,6 +626,13 @@ pub const TIOCMBIC: ::c_ulong = 0x5417;
pub const TIOCMSET: ::c_ulong = 0x5418;
pub const TIOCCONS: ::c_ulong = 0x541D;
+pub const TIOCM_ST: ::c_int = 0x008;
+pub const TIOCM_SR: ::c_int = 0x010;
+pub const TIOCM_CTS: ::c_int = 0x020;
+pub const TIOCM_CAR: ::c_int = 0x040;
+pub const TIOCM_RNG: ::c_int = 0x080;
+pub const TIOCM_DSR: ::c_int = 0x100;
+
pub const SFD_CLOEXEC: ::c_int = 0x080000;
pub const NCCS: usize = 32;
@@ -584,11 +672,24 @@ pub const O_DIRECT: ::c_int = 0x4000;
pub const O_DIRECTORY: ::c_int = 0x10000;
pub const O_NOFOLLOW: ::c_int = 0x20000;
+pub const MAP_HUGETLB: ::c_int = 0x040000;
pub const MAP_LOCKED: ::c_int = 0x02000;
pub const MAP_NORESERVE: ::c_int = 0x04000;
pub const MAP_32BIT: ::c_int = 0x0040;
+pub const MAP_ANON: ::c_int = 0x0020;
+pub const MAP_ANONYMOUS: ::c_int = 0x0020;
+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;
pub const EDEADLOCK: ::c_int = 35;
+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;
pub const FIOCLEX: ::c_ulong = 0x5451;
pub const FIONBIO: ::c_ulong = 0x5421;
@@ -785,3 +886,13 @@ extern {
pub fn ioperm(from: ::c_ulong, num: ::c_ulong,
turn_on: ::c_int) -> ::c_int;
}
+
+cfg_if! {
+ if #[cfg(target_pointer_width = "32")] {
+ mod x32;
+ pub use self::x32::*;
+ } else {
+ mod not_x32;
+ pub use self::not_x32::*;
+ }
+}
diff --git a/src/unix/linux_like/linux/other/b64/not_x32.rs b/src/unix/linux_like/linux/gnu/b64/x86_64/not_x32.rs
index 97e21f27..97e21f27 100644
--- a/src/unix/linux_like/linux/other/b64/not_x32.rs
+++ b/src/unix/linux_like/linux/gnu/b64/x86_64/not_x32.rs
diff --git a/src/unix/linux_like/linux/other/b64/x32.rs b/src/unix/linux_like/linux/gnu/b64/x86_64/x32.rs
index 37468818..37468818 100644
--- a/src/unix/linux_like/linux/other/b64/x32.rs
+++ b/src/unix/linux_like/linux/gnu/b64/x86_64/x32.rs
diff --git a/src/unix/linux_like/linux/other/mod.rs b/src/unix/linux_like/linux/gnu/mod.rs
index 4acf30e1..cbca5a32 100644
--- a/src/unix/linux_like/linux/other/mod.rs
+++ b/src/unix/linux_like/linux/gnu/mod.rs
@@ -61,39 +61,6 @@ s! {
pub tv_usec: i32,
}
- 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,
- pub sa_restorer: ::Option<extern fn()>,
- }
-
- pub struct stack_t {
- pub ss_sp: *mut ::c_void,
- pub ss_flags: ::c_int,
- pub ss_size: ::size_t
- }
-
- pub struct siginfo_t {
- pub si_signo: ::c_int,
- pub si_errno: ::c_int,
- pub si_code: ::c_int,
- #[doc(hidden)]
- #[deprecated(
- since="0.2.54",
- note="Please leave a comment on \
- https://github.com/rust-lang/libc/pull/1316 if you're using \
- this field"
- )]
- pub _pad: [::c_int; 29],
- #[cfg(target_arch = "x86_64")]
- _align: [u64; 0],
- #[cfg(not(target_arch = "x86_64"))]
- _align: [usize; 0],
- }
-
pub struct glob64_t {
pub gl_pathc: ::size_t,
pub gl_pathv: *mut *mut ::c_char,
@@ -107,22 +74,6 @@ s! {
__unused5: *mut ::c_void,
}
- pub struct statfs {
- pub f_type: __fsword_t,
- pub f_bsize: __fsword_t,
- pub f_blocks: ::fsblkcnt_t,
- pub f_bfree: ::fsblkcnt_t,
- pub f_bavail: ::fsblkcnt_t,
-
- pub f_files: ::fsfilcnt_t,
- pub f_ffree: ::fsfilcnt_t,
- pub f_fsid: ::fsid_t,
-
- pub f_namelen: __fsword_t,
- pub f_frsize: __fsword_t,
- f_spare: [__fsword_t; 5],
- }
-
pub struct msghdr {
pub msg_name: *mut ::c_void,
pub msg_namelen: ::socklen_t,
@@ -146,20 +97,18 @@ s! {
pub c_lflag: ::tcflag_t,
pub c_line: ::cc_t,
pub c_cc: [::cc_t; ::NCCS],
- #[cfg(not(target_arch = "sparc64"))]
+ #[cfg(not(any(
+ target_arch = "sparc64",
+ target_arch = "mips",
+ target_arch = "mips64")))]
pub c_ispeed: ::speed_t,
- #[cfg(not(target_arch = "sparc64"))]
+ #[cfg(not(any(
+ target_arch = "sparc64",
+ target_arch = "mips",
+ target_arch = "mips64")))]
pub c_ospeed: ::speed_t,
}
- pub struct flock {
- pub l_type: ::c_short,
- pub l_whence: ::c_short,
- pub l_start: ::off_t,
- pub l_len: ::off_t,
- pub l_pid: ::pid_t,
- }
-
pub struct mallinfo {
pub arena: ::c_int,
pub ordblks: ::c_int,
@@ -258,19 +207,23 @@ s_no_extra_traits! {
pub ut_exit: __exit_status,
#[cfg(any(target_arch = "aarch64",
+ target_arch = "s390x",
all(target_pointer_width = "32",
not(target_arch = "x86_64"))))]
pub ut_session: ::c_long,
#[cfg(any(target_arch = "aarch64",
+ target_arch = "s390x",
all(target_pointer_width = "32",
not(target_arch = "x86_64"))))]
pub ut_tv: ::timeval,
#[cfg(not(any(target_arch = "aarch64",
+ target_arch = "s390x",
all(target_pointer_width = "32",
not(target_arch = "x86_64")))))]
pub ut_session: i32,
#[cfg(not(any(target_arch = "aarch64",
+ target_arch = "s390x",
all(target_pointer_width = "32",
not(target_arch = "x86_64")))))]
pub ut_tv: __timeval,
@@ -350,8 +303,9 @@ pub const RLIMIT_SIGPENDING: ::__rlimit_resource_t = 11;
pub const RLIMIT_MSGQUEUE: ::__rlimit_resource_t = 12;
pub const RLIMIT_NICE: ::__rlimit_resource_t = 13;
pub const RLIMIT_RTPRIO: ::__rlimit_resource_t = 14;
+pub const RLIMIT_RTTIME: ::__rlimit_resource_t = 15;
+pub const RLIMIT_NLIMITS: ::__rlimit_resource_t = 16;
-pub const MADV_SOFT_OFFLINE: ::c_int = 101;
pub const MS_RMT_MASK: ::c_ulong = 0x02800051;
pub const __UT_LINESIZE: usize = 32;
@@ -368,13 +322,6 @@ pub const USER_PROCESS: ::c_short = 7;
pub const DEAD_PROCESS: ::c_short = 8;
pub const ACCOUNTING: ::c_short = 9;
-pub const RLIMIT_RSS: ::__rlimit_resource_t = 5;
-pub const RLIMIT_AS: ::__rlimit_resource_t = 9;
-pub const RLIMIT_MEMLOCK: ::__rlimit_resource_t = 8;
-pub const RLIM_INFINITY: ::rlim_t = !0;
-pub const RLIMIT_RTTIME: ::__rlimit_resource_t = 15;
-pub const RLIMIT_NLIMITS: ::__rlimit_resource_t = 16;
-
pub const SOCK_NONBLOCK: ::c_int = O_NONBLOCK;
pub const SOL_RXRPC: ::c_int = 272;
@@ -413,25 +360,11 @@ pub const LC_ALL_MASK: ::c_int = ::LC_CTYPE_MASK
| LC_MEASUREMENT_MASK
| LC_IDENTIFICATION_MASK;
-pub const MAP_ANON: ::c_int = 0x0020;
-pub const MAP_ANONYMOUS: ::c_int = 0x0020;
-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;
pub const MAP_SHARED_VALIDATE: ::c_int = 0x3;
pub const MAP_FIXED_NOREPLACE: ::c_int = 0x100000;
pub const ENOTSUP: ::c_int = EOPNOTSUPP;
-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;
-
-pub const SOCK_STREAM: ::c_int = 1;
-pub const SOCK_DGRAM: ::c_int = 2;
+
pub const SOCK_SEQPACKET: ::c_int = 5;
pub const SOCK_DCCP: ::c_int = 6;
pub const SOCK_PACKET: ::c_int = 10;
@@ -468,21 +401,11 @@ pub const DCCP_SOCKOPT_CCID_TX_INFO: ::c_int = 192;
/// maximum number of services provided on the same listening port
pub const DCCP_SERVICE_LIST_MAX_LEN: ::c_int = 32;
-pub const SIGTTIN: ::c_int = 21;
-pub const SIGTTOU: ::c_int = 22;
-pub const SIGXCPU: ::c_int = 24;
-pub const SIGXFSZ: ::c_int = 25;
-pub const SIGVTALRM: ::c_int = 26;
-pub const SIGPROF: ::c_int = 27;
-pub const SIGWINCH: ::c_int = 28;
-
pub const SIGEV_THREAD_ID: ::c_int = 4;
pub const BUFSIZ: ::c_uint = 8192;
pub const TMP_MAX: ::c_uint = 238328;
pub const FOPEN_MAX: ::c_uint = 16;
-pub const POSIX_FADV_DONTNEED: ::c_int = 4;
-pub const POSIX_FADV_NOREUSE: ::c_int = 5;
pub const POSIX_MADV_DONTNEED: ::c_int = 4;
pub const _SC_EQUIV_CLASS_MAX: ::c_int = 41;
pub const _SC_CHARCLASS_NAME_MAX: ::c_int = 45;
@@ -590,8 +513,6 @@ pub const SMB_SUPER_MAGIC: ::c_long = 0x0000517b;
pub const TMPFS_MAGIC: ::c_long = 0x01021994;
pub const USBDEVICE_SUPER_MAGIC: ::c_long = 0x00009fa2;
-pub const VEOF: usize = 4;
-
pub const CPU_SETSIZE: ::c_int = 0x400;
pub const PTRACE_TRACEME: ::c_uint = 0;
@@ -619,22 +540,9 @@ pub const PTRACE_PEEKSIGINFO: ::c_uint = 0x4209;
pub const EPOLLWAKEUP: ::c_int = 0x20000000;
-pub const MAP_HUGETLB: ::c_int = 0x040000;
-
pub const SEEK_DATA: ::c_int = 3;
pub const SEEK_HOLE: ::c_int = 4;
-pub const TCSANOW: ::c_int = 0;
-pub const TCSADRAIN: ::c_int = 1;
-pub const TCSAFLUSH: ::c_int = 2;
-
-pub const TIOCLINUX: ::c_ulong = 0x541C;
-pub const TIOCGSERIAL: ::c_ulong = 0x541E;
-
-pub const RTLD_DEEPBIND: ::c_int = 0x8;
-pub const RTLD_GLOBAL: ::c_int = 0x100;
-pub const RTLD_NOLOAD: ::c_int = 0x4;
-
pub const LINUX_REBOOT_MAGIC1: ::c_int = 0xfee1dead;
pub const LINUX_REBOOT_MAGIC2: ::c_int = 672274793;
pub const LINUX_REBOOT_MAGIC2A: ::c_int = 85072278;
@@ -752,12 +660,6 @@ pub const GENL_ID_PMCRAID: ::c_int = ::NLMSG_MIN_TYPE + 2;
pub const TIOCM_LE: ::c_int = 0x001;
pub const TIOCM_DTR: ::c_int = 0x002;
pub const TIOCM_RTS: ::c_int = 0x004;
-pub const TIOCM_ST: ::c_int = 0x008;
-pub const TIOCM_SR: ::c_int = 0x010;
-pub const TIOCM_CTS: ::c_int = 0x020;
-pub const TIOCM_CAR: ::c_int = 0x040;
-pub const TIOCM_RNG: ::c_int = 0x080;
-pub const TIOCM_DSR: ::c_int = 0x100;
pub const TIOCM_CD: ::c_int = TIOCM_CAR;
pub const TIOCM_RI: ::c_int = TIOCM_RNG;
@@ -1010,8 +912,12 @@ pub const STATX_ATTR_ENCRYPTED: ::c_int = 0x0800;
pub const STATX_ATTR_AUTOMOUNT: ::c_int = 0x1000;
cfg_if! {
- if #[cfg(any(target_arch = "arm", target_arch = "x86",
- target_arch = "x86_64"))] {
+ if #[cfg(any(
+ target_arch = "arm",
+ target_arch = "x86",
+ target_arch = "x86_64",
+ target_arch = "s390x"
+ ))] {
pub const PTHREAD_STACK_MIN: ::size_t = 16384;
} else if #[cfg(target_arch = "sparc64")] {
pub const PTHREAD_STACK_MIN: ::size_t = 0x6000;
@@ -1116,12 +1022,15 @@ extern {
cfg_if! {
if #[cfg(any(target_arch = "x86",
target_arch = "arm",
+ target_arch = "mips",
target_arch = "powerpc"))] {
mod b32;
pub use self::b32::*;
} else if #[cfg(any(target_arch = "x86_64",
target_arch = "aarch64",
target_arch = "powerpc64",
+ target_arch = "mips64",
+ target_arch = "s390x",
target_arch = "sparc64"))] {
mod b64;
pub use self::b64::*;
diff --git a/src/unix/linux_like/linux/mips/no_align.rs b/src/unix/linux_like/linux/gnu/no_align.rs
index e32bf673..e32bf673 100644
--- a/src/unix/linux_like/linux/mips/no_align.rs
+++ b/src/unix/linux_like/linux/gnu/no_align.rs
diff --git a/src/unix/linux_like/linux/mips/mod.rs b/src/unix/linux_like/linux/mips/mod.rs
deleted file mode 100644
index 8416daf3..00000000
--- a/src/unix/linux_like/linux/mips/mod.rs
+++ /dev/null
@@ -1,1008 +0,0 @@
-pub type pthread_t = c_ulong;
-pub type shmatt_t = ::c_ulong;
-pub type msgqnum_t = ::c_ulong;
-pub type msglen_t = ::c_ulong;
-pub type fsblkcnt_t = ::c_ulong;
-pub type fsfilcnt_t = ::c_ulong;
-pub type rlim_t = c_ulong;
-pub type __priority_which_t = ::c_uint;
-pub type __rlimit_resource_t = ::c_uint;
-
-s! {
- pub struct glob64_t {
- pub gl_pathc: ::size_t,
- pub gl_pathv: *mut *mut ::c_char,
- pub gl_offs: ::size_t,
- pub gl_flags: ::c_int,
-
- __unused1: *mut ::c_void,
- __unused2: *mut ::c_void,
- __unused3: *mut ::c_void,
- __unused4: *mut ::c_void,
- __unused5: *mut ::c_void,
- }
-
- pub struct termios2 {
- pub c_iflag: ::tcflag_t,
- pub c_oflag: ::tcflag_t,
- pub c_cflag: ::tcflag_t,
- pub c_lflag: ::tcflag_t,
- pub c_line: ::cc_t,
- pub c_cc: [::cc_t; 23],
- pub c_ispeed: ::speed_t,
- pub c_ospeed: ::speed_t,
- }
-
- pub struct nlmsghdr {
- pub nlmsg_len: u32,
- pub nlmsg_type: u16,
- pub nlmsg_flags: u16,
- pub nlmsg_seq: u32,
- pub nlmsg_pid: u32,
- }
-
- pub struct nlmsgerr {
- pub error: ::c_int,
- pub msg: nlmsghdr,
- }
-
- pub struct nl_pktinfo {
- pub group: u32,
- }
-
- pub struct nl_mmap_req {
- pub nm_block_size: ::c_uint,
- pub nm_block_nr: ::c_uint,
- pub nm_frame_size: ::c_uint,
- pub nm_frame_nr: ::c_uint,
- }
-
- pub struct nl_mmap_hdr {
- pub nm_status: ::c_uint,
- pub nm_len: ::c_uint,
- pub nm_group: u32,
- pub nm_pid: u32,
- pub nm_uid: u32,
- pub nm_gid: u32,
- }
-
- pub struct nlattr {
- pub nla_len: u16,
- pub nla_type: u16,
- }
-}
-
-pub const MS_RMT_MASK: ::c_ulong = 0x02800051;
-
-pub const SFD_CLOEXEC: ::c_int = 0x080000;
-
-pub const NCCS: usize = 32;
-
-pub const O_TRUNC: ::c_int = 512;
-
-pub const O_NOATIME: ::c_int = 0o1000000;
-pub const O_CLOEXEC: ::c_int = 0x80000;
-pub const O_PATH: ::c_int = 0o10000000;
-pub const O_TMPFILE: ::c_int = 0o20000000 | O_DIRECTORY;
-
-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;
-pub const POSIX_FADV_DONTNEED: ::c_int = 4;
-pub const POSIX_FADV_NOREUSE: ::c_int = 5;
-pub const POSIX_MADV_DONTNEED: ::c_int = 4;
-pub const _SC_EQUIV_CLASS_MAX: ::c_int = 41;
-pub const _SC_CHARCLASS_NAME_MAX: ::c_int = 45;
-pub const _SC_PII: ::c_int = 53;
-pub const _SC_PII_XTI: ::c_int = 54;
-pub const _SC_PII_SOCKET: ::c_int = 55;
-pub const _SC_PII_INTERNET: ::c_int = 56;
-pub const _SC_PII_OSI: ::c_int = 57;
-pub const _SC_POLL: ::c_int = 58;
-pub const _SC_SELECT: ::c_int = 59;
-pub const _SC_PII_INTERNET_STREAM: ::c_int = 61;
-pub const _SC_PII_INTERNET_DGRAM: ::c_int = 62;
-pub const _SC_PII_OSI_COTS: ::c_int = 63;
-pub const _SC_PII_OSI_CLTS: ::c_int = 64;
-pub const _SC_PII_OSI_M: ::c_int = 65;
-pub const _SC_T_IOV_MAX: ::c_int = 66;
-pub const _SC_2_C_VERSION: ::c_int = 96;
-pub const _SC_CHAR_BIT: ::c_int = 101;
-pub const _SC_CHAR_MAX: ::c_int = 102;
-pub const _SC_CHAR_MIN: ::c_int = 103;
-pub const _SC_INT_MAX: ::c_int = 104;
-pub const _SC_INT_MIN: ::c_int = 105;
-pub const _SC_LONG_BIT: ::c_int = 106;
-pub const _SC_WORD_BIT: ::c_int = 107;
-pub const _SC_MB_LEN_MAX: ::c_int = 108;
-pub const _SC_SSIZE_MAX: ::c_int = 110;
-pub const _SC_SCHAR_MAX: ::c_int = 111;
-pub const _SC_SCHAR_MIN: ::c_int = 112;
-pub const _SC_SHRT_MAX: ::c_int = 113;
-pub const _SC_SHRT_MIN: ::c_int = 114;
-pub const _SC_UCHAR_MAX: ::c_int = 115;
-pub const _SC_UINT_MAX: ::c_int = 116;
-pub const _SC_ULONG_MAX: ::c_int = 117;
-pub const _SC_USHRT_MAX: ::c_int = 118;
-pub const _SC_NL_ARGMAX: ::c_int = 119;
-pub const _SC_NL_LANGMAX: ::c_int = 120;
-pub const _SC_NL_MSGMAX: ::c_int = 121;
-pub const _SC_NL_NMAX: ::c_int = 122;
-pub const _SC_NL_SETMAX: ::c_int = 123;
-pub const _SC_NL_TEXTMAX: ::c_int = 124;
-pub const _SC_BASE: ::c_int = 134;
-pub const _SC_C_LANG_SUPPORT: ::c_int = 135;
-pub const _SC_C_LANG_SUPPORT_R: ::c_int = 136;
-pub const _SC_DEVICE_IO: ::c_int = 140;
-pub const _SC_DEVICE_SPECIFIC: ::c_int = 141;
-pub const _SC_DEVICE_SPECIFIC_R: ::c_int = 142;
-pub const _SC_FD_MGMT: ::c_int = 143;
-pub const _SC_FIFO: ::c_int = 144;
-pub const _SC_PIPE: ::c_int = 145;
-pub const _SC_FILE_ATTRIBUTES: ::c_int = 146;
-pub const _SC_FILE_LOCKING: ::c_int = 147;
-pub const _SC_FILE_SYSTEM: ::c_int = 148;
-pub const _SC_MULTI_PROCESS: ::c_int = 150;
-pub const _SC_SINGLE_PROCESS: ::c_int = 151;
-pub const _SC_NETWORKING: ::c_int = 152;
-pub const _SC_REGEX_VERSION: ::c_int = 156;
-pub const _SC_SIGNALS: ::c_int = 158;
-pub const _SC_SYSTEM_DATABASE: ::c_int = 162;
-pub const _SC_SYSTEM_DATABASE_R: ::c_int = 163;
-pub const _SC_USER_GROUPS: ::c_int = 166;
-pub const _SC_USER_GROUPS_R: ::c_int = 167;
-pub const _SC_LEVEL1_ICACHE_SIZE: ::c_int = 185;
-pub const _SC_LEVEL1_ICACHE_ASSOC: ::c_int = 186;
-pub const _SC_LEVEL1_ICACHE_LINESIZE: ::c_int = 187;
-pub const _SC_LEVEL1_DCACHE_SIZE: ::c_int = 188;
-pub const _SC_LEVEL1_DCACHE_ASSOC: ::c_int = 189;
-pub const _SC_LEVEL1_DCACHE_LINESIZE: ::c_int = 190;
-pub const _SC_LEVEL2_CACHE_SIZE: ::c_int = 191;
-pub const _SC_LEVEL2_CACHE_ASSOC: ::c_int = 192;
-pub const _SC_LEVEL2_CACHE_LINESIZE: ::c_int = 193;
-pub const _SC_LEVEL3_CACHE_SIZE: ::c_int = 194;
-pub const _SC_LEVEL3_CACHE_ASSOC: ::c_int = 195;
-pub const _SC_LEVEL3_CACHE_LINESIZE: ::c_int = 196;
-pub const _SC_LEVEL4_CACHE_SIZE: ::c_int = 197;
-pub const _SC_LEVEL4_CACHE_ASSOC: ::c_int = 198;
-pub const _SC_LEVEL4_CACHE_LINESIZE: ::c_int = 199;
-pub const O_ACCMODE: ::c_int = 3;
-pub const O_DIRECT: ::c_int = 0x8000;
-pub const O_DIRECTORY: ::c_int = 0x10000;
-pub const O_NOFOLLOW: ::c_int = 0x20000;
-pub const ST_RELATIME: ::c_ulong = 4096;
-pub const NI_MAXHOST: ::socklen_t = 1025;
-
-pub const RLIMIT_NOFILE: ::__rlimit_resource_t = 5;
-pub const RLIMIT_AS: ::__rlimit_resource_t = 6;
-pub const RLIMIT_RSS: ::__rlimit_resource_t = 7;
-pub const RLIMIT_NPROC: ::__rlimit_resource_t = 8;
-pub const RLIMIT_MEMLOCK: ::__rlimit_resource_t = 9;
-pub const RLIMIT_NLIMITS: ::__rlimit_resource_t = 16;
-
-pub const O_APPEND: ::c_int = 8;
-pub const O_CREAT: ::c_int = 256;
-pub const O_EXCL: ::c_int = 1024;
-pub const O_NOCTTY: ::c_int = 2048;
-pub const O_NONBLOCK: ::c_int = 128;
-pub const O_SYNC: ::c_int = 0x4010;
-pub const O_RSYNC: ::c_int = 0x4010;
-pub const O_DSYNC: ::c_int = 0x10;
-pub const O_FSYNC: ::c_int = 0x4010;
-pub const O_ASYNC: ::c_int = 0x1000;
-pub const O_NDELAY: ::c_int = 0x80;
-
-pub const SOCK_NONBLOCK: ::c_int = 128;
-
-pub const EDEADLK: ::c_int = 45;
-pub const ENAMETOOLONG: ::c_int = 78;
-pub const ENOLCK: ::c_int = 46;
-pub const ENOSYS: ::c_int = 89;
-pub const ENOTEMPTY: ::c_int = 93;
-pub const ELOOP: ::c_int = 90;
-pub const ENOMSG: ::c_int = 35;
-pub const EIDRM: ::c_int = 36;
-pub const ECHRNG: ::c_int = 37;
-pub const EL2NSYNC: ::c_int = 38;
-pub const EL3HLT: ::c_int = 39;
-pub const EL3RST: ::c_int = 40;
-pub const ELNRNG: ::c_int = 41;
-pub const EUNATCH: ::c_int = 42;
-pub const ENOCSI: ::c_int = 43;
-pub const EL2HLT: ::c_int = 44;
-pub const EBADE: ::c_int = 50;
-pub const EBADR: ::c_int = 51;
-pub const EXFULL: ::c_int = 52;
-pub const ENOANO: ::c_int = 53;
-pub const EBADRQC: ::c_int = 54;
-pub const EBADSLT: ::c_int = 55;
-pub const EDEADLOCK: ::c_int = 56;
-pub const EMULTIHOP: ::c_int = 74;
-pub const EOVERFLOW: ::c_int = 79;
-pub const ENOTUNIQ: ::c_int = 80;
-pub const EBADFD: ::c_int = 81;
-pub const EBADMSG: ::c_int = 77;
-pub const EREMCHG: ::c_int = 82;
-pub const ELIBACC: ::c_int = 83;
-pub const ELIBBAD: ::c_int = 84;
-pub const ELIBSCN: ::c_int = 85;
-pub const ELIBMAX: ::c_int = 86;
-pub const ELIBEXEC: ::c_int = 87;
-pub const EILSEQ: ::c_int = 88;
-pub const ERESTART: ::c_int = 91;
-pub const ESTRPIPE: ::c_int = 92;
-pub const EUSERS: ::c_int = 94;
-pub const ENOTSOCK: ::c_int = 95;
-pub const EDESTADDRREQ: ::c_int = 96;
-pub const EMSGSIZE: ::c_int = 97;
-pub const EPROTOTYPE: ::c_int = 98;
-pub const ENOPROTOOPT: ::c_int = 99;
-pub const EPROTONOSUPPORT: ::c_int = 120;
-pub const ESOCKTNOSUPPORT: ::c_int = 121;
-pub const EOPNOTSUPP: ::c_int = 122;
-pub const ENOTSUP: ::c_int = EOPNOTSUPP;
-pub const EPFNOSUPPORT: ::c_int = 123;
-pub const EAFNOSUPPORT: ::c_int = 124;
-pub const EADDRINUSE: ::c_int = 125;
-pub const EADDRNOTAVAIL: ::c_int = 126;
-pub const ENETDOWN: ::c_int = 127;
-pub const ENETUNREACH: ::c_int = 128;
-pub const ENETRESET: ::c_int = 129;
-pub const ECONNABORTED: ::c_int = 130;
-pub const ECONNRESET: ::c_int = 131;
-pub const ENOBUFS: ::c_int = 132;
-pub const EISCONN: ::c_int = 133;
-pub const ENOTCONN: ::c_int = 134;
-pub const ESHUTDOWN: ::c_int = 143;
-pub const ETOOMANYREFS: ::c_int = 144;
-pub const ETIMEDOUT: ::c_int = 145;
-pub const ECONNREFUSED: ::c_int = 146;
-pub const EHOSTDOWN: ::c_int = 147;
-pub const EHOSTUNREACH: ::c_int = 148;
-pub const EALREADY: ::c_int = 149;
-pub const EINPROGRESS: ::c_int = 150;
-pub const ESTALE: ::c_int = 151;
-pub const EUCLEAN: ::c_int = 135;
-pub const ENOTNAM: ::c_int = 137;
-pub const ENAVAIL: ::c_int = 138;
-pub const EISNAM: ::c_int = 139;
-pub const EREMOTEIO: ::c_int = 140;
-pub const EDQUOT: ::c_int = 1133;
-pub const ENOMEDIUM: ::c_int = 159;
-pub const EMEDIUMTYPE: ::c_int = 160;
-pub const ECANCELED: ::c_int = 158;
-pub const ENOKEY: ::c_int = 161;
-pub const EKEYEXPIRED: ::c_int = 162;
-pub const EKEYREVOKED: ::c_int = 163;
-pub const EKEYREJECTED: ::c_int = 164;
-pub const EOWNERDEAD: ::c_int = 165;
-pub const ENOTRECOVERABLE: ::c_int = 166;
-pub const ERFKILL: ::c_int = 167;
-
-pub const LC_PAPER: ::c_int = 7;
-pub const LC_NAME: ::c_int = 8;
-pub const LC_ADDRESS: ::c_int = 9;
-pub const LC_TELEPHONE: ::c_int = 10;
-pub const LC_MEASUREMENT: ::c_int = 11;
-pub const LC_IDENTIFICATION: ::c_int = 12;
-pub const LC_PAPER_MASK: ::c_int = (1 << LC_PAPER);
-pub const LC_NAME_MASK: ::c_int = (1 << LC_NAME);
-pub const LC_ADDRESS_MASK: ::c_int = (1 << LC_ADDRESS);
-pub const LC_TELEPHONE_MASK: ::c_int = (1 << LC_TELEPHONE);
-pub const LC_MEASUREMENT_MASK: ::c_int = (1 << LC_MEASUREMENT);
-pub const LC_IDENTIFICATION_MASK: ::c_int = (1 << LC_IDENTIFICATION);
-pub const LC_ALL_MASK: ::c_int = ::LC_CTYPE_MASK
- | ::LC_NUMERIC_MASK
- | ::LC_TIME_MASK
- | ::LC_COLLATE_MASK
- | ::LC_MONETARY_MASK
- | ::LC_MESSAGES_MASK
- | LC_PAPER_MASK
- | LC_NAME_MASK
- | LC_ADDRESS_MASK
- | LC_TELEPHONE_MASK
- | LC_MEASUREMENT_MASK
- | LC_IDENTIFICATION_MASK;
-
-pub const MAP_NORESERVE: ::c_int = 0x400;
-pub const MAP_ANON: ::c_int = 0x800;
-pub const MAP_ANONYMOUS: ::c_int = 0x800;
-pub const MAP_GROWSDOWN: ::c_int = 0x1000;
-pub const MAP_DENYWRITE: ::c_int = 0x2000;
-pub const MAP_EXECUTABLE: ::c_int = 0x4000;
-pub const MAP_LOCKED: ::c_int = 0x8000;
-pub const MAP_POPULATE: ::c_int = 0x10000;
-pub const MAP_NONBLOCK: ::c_int = 0x20000;
-pub const MAP_STACK: ::c_int = 0x40000;
-pub const MAP_SHARED_VALIDATE: ::c_int = 0x3;
-pub const MAP_FIXED_NOREPLACE: ::c_int = 0x100000;
-
-pub const SOCK_STREAM: ::c_int = 2;
-pub const SOCK_DGRAM: ::c_int = 1;
-pub const SOCK_SEQPACKET: ::c_int = 5;
-pub const SOCK_DCCP: ::c_int = 6;
-pub const SOCK_PACKET: ::c_int = 10;
-
-pub const SOL_SOCKET: ::c_int = 0xffff;
-
-pub const SO_REUSEADDR: ::c_int = 0x0004;
-pub const SO_KEEPALIVE: ::c_int = 0x0008;
-pub const SO_DONTROUTE: ::c_int = 0x0010;
-pub const SO_BROADCAST: ::c_int = 0x0020;
-pub const SO_LINGER: ::c_int = 0x0080;
-pub const SO_OOBINLINE: ::c_int = 0x0100;
-pub const SO_REUSEPORT: ::c_int = 0x0200;
-pub const SO_TYPE: ::c_int = 0x1008;
-pub const SO_STYLE: ::c_int = SO_TYPE;
-pub const SO_ERROR: ::c_int = 0x1007;
-pub const SO_SNDBUF: ::c_int = 0x1001;
-pub const SO_RCVBUF: ::c_int = 0x1002;
-pub const SO_SNDLOWAT: ::c_int = 0x1003;
-pub const SO_RCVLOWAT: ::c_int = 0x1004;
-pub const SO_SNDTIMEO: ::c_int = 0x1005;
-pub const SO_RCVTIMEO: ::c_int = 0x1006;
-pub const SO_ACCEPTCONN: ::c_int = 0x1009;
-pub const SO_PROTOCOL: ::c_int = 0x1028;
-pub const SO_DOMAIN: ::c_int = 0x1029;
-pub const SO_NO_CHECK: ::c_int = 11;
-pub const SO_PRIORITY: ::c_int = 12;
-pub const SO_BSDCOMPAT: ::c_int = 14;
-pub const SO_PASSCRED: ::c_int = 17;
-pub const SO_PEERCRED: ::c_int = 18;
-pub const SO_SECURITY_AUTHENTICATION: ::c_int = 22;
-pub const SO_SECURITY_ENCRYPTION_TRANSPORT: ::c_int = 23;
-pub const SO_SECURITY_ENCRYPTION_NETWORK: ::c_int = 24;
-pub const SO_BINDTODEVICE: ::c_int = 25;
-pub const SO_ATTACH_FILTER: ::c_int = 26;
-pub const SO_DETACH_FILTER: ::c_int = 27;
-pub const SO_GET_FILTER: ::c_int = SO_ATTACH_FILTER;
-pub const SO_PEERNAME: ::c_int = 28;
-pub const SO_TIMESTAMP: ::c_int = 29;
-pub const SO_PEERSEC: ::c_int = 30;
-pub const SO_SNDBUFFORCE: ::c_int = 31;
-pub const SO_RCVBUFFORCE: ::c_int = 33;
-pub const SO_PASSSEC: ::c_int = 34;
-pub const SO_TIMESTAMPNS: ::c_int = 35;
-pub const SCM_TIMESTAMPNS: ::c_int = SO_TIMESTAMPNS;
-pub const SO_MARK: ::c_int = 36;
-pub const SO_RXQ_OVFL: ::c_int = 40;
-pub const SO_WIFI_STATUS: ::c_int = 41;
-pub const SCM_WIFI_STATUS: ::c_int = SO_WIFI_STATUS;
-pub const SO_PEEK_OFF: ::c_int = 42;
-pub const SO_NOFCS: ::c_int = 43;
-pub const SO_LOCK_FILTER: ::c_int = 44;
-pub const SO_SELECT_ERR_QUEUE: ::c_int = 45;
-pub const SO_BUSY_POLL: ::c_int = 46;
-pub const SO_MAX_PACING_RATE: ::c_int = 47;
-pub const SO_BPF_EXTENSIONS: ::c_int = 48;
-pub const SO_INCOMING_CPU: ::c_int = 49;
-pub const SO_ATTACH_BPF: ::c_int = 50;
-pub const SO_DETACH_BPF: ::c_int = SO_DETACH_FILTER;
-
-/* DCCP socket options */
-pub const DCCP_SOCKOPT_PACKET_SIZE: ::c_int = 1;
-pub const DCCP_SOCKOPT_SERVICE: ::c_int = 2;
-pub const DCCP_SOCKOPT_CHANGE_L: ::c_int = 3;
-pub const DCCP_SOCKOPT_CHANGE_R: ::c_int = 4;
-pub const DCCP_SOCKOPT_GET_CUR_MPS: ::c_int = 5;
-pub const DCCP_SOCKOPT_SERVER_TIMEWAIT: ::c_int = 6;
-pub const DCCP_SOCKOPT_SEND_CSCOV: ::c_int = 10;
-pub const DCCP_SOCKOPT_RECV_CSCOV: ::c_int = 11;
-pub const DCCP_SOCKOPT_AVAILABLE_CCIDS: ::c_int = 12;
-pub const DCCP_SOCKOPT_CCID: ::c_int = 13;
-pub const DCCP_SOCKOPT_TX_CCID: ::c_int = 14;
-pub const DCCP_SOCKOPT_RX_CCID: ::c_int = 15;
-pub const DCCP_SOCKOPT_QPOLICY_ID: ::c_int = 16;
-pub const DCCP_SOCKOPT_QPOLICY_TXQLEN: ::c_int = 17;
-pub const DCCP_SOCKOPT_CCID_RX_INFO: ::c_int = 128;
-pub const DCCP_SOCKOPT_CCID_TX_INFO: ::c_int = 192;
-
-/// maximum number of services provided on the same listening port
-pub const DCCP_SERVICE_LIST_MAX_LEN: ::c_int = 32;
-
-pub const FIOCLEX: ::c_ulong = 0x6601;
-pub const FIONBIO: ::c_ulong = 0x667e;
-
-pub const SA_ONSTACK: ::c_int = 0x08000000;
-pub const SA_SIGINFO: ::c_int = 0x00000008;
-pub const SA_NOCLDWAIT: ::c_int = 0x00010000;
-
-pub const SIGCHLD: ::c_int = 18;
-pub const SIGBUS: ::c_int = 10;
-pub const SIGTTIN: ::c_int = 26;
-pub const SIGTTOU: ::c_int = 27;
-pub const SIGXCPU: ::c_int = 30;
-pub const SIGXFSZ: ::c_int = 31;
-pub const SIGVTALRM: ::c_int = 28;
-pub const SIGPROF: ::c_int = 29;
-pub const SIGWINCH: ::c_int = 20;
-pub const SIGUSR1: ::c_int = 16;
-pub const SIGUSR2: ::c_int = 17;
-pub const SIGCONT: ::c_int = 25;
-pub const SIGSTOP: ::c_int = 23;
-pub const SIGTSTP: ::c_int = 24;
-pub const SIGURG: ::c_int = 21;
-pub const SIGIO: ::c_int = 22;
-pub const SIGSYS: ::c_int = 12;
-pub const SIGPOLL: ::c_int = 22;
-pub const SIGPWR: ::c_int = 19;
-pub const SIG_SETMASK: ::c_int = 3;
-pub const SIG_BLOCK: ::c_int = 0x1;
-pub const SIG_UNBLOCK: ::c_int = 0x2;
-
-pub const POLLWRNORM: ::c_short = 0x004;
-pub const POLLWRBAND: ::c_short = 0x100;
-
-pub const PTHREAD_STACK_MIN: ::size_t = 131072;
-pub const PTHREAD_MUTEX_ADAPTIVE_NP: ::c_int = 3;
-
-pub const ADFS_SUPER_MAGIC: ::c_long = 0x0000adf5;
-pub const AFFS_SUPER_MAGIC: ::c_long = 0x0000adff;
-pub const CODA_SUPER_MAGIC: ::c_long = 0x73757245;
-pub const CRAMFS_MAGIC: ::c_long = 0x28cd3d45;
-pub const EFS_SUPER_MAGIC: ::c_long = 0x00414a53;
-pub const EXT2_SUPER_MAGIC: ::c_long = 0x0000ef53;
-pub const EXT3_SUPER_MAGIC: ::c_long = 0x0000ef53;
-pub const EXT4_SUPER_MAGIC: ::c_long = 0x0000ef53;
-pub const HPFS_SUPER_MAGIC: ::c_long = 0xf995e849;
-pub const HUGETLBFS_MAGIC: ::c_long = 0x958458f6;
-pub const ISOFS_SUPER_MAGIC: ::c_long = 0x00009660;
-pub const JFFS2_SUPER_MAGIC: ::c_long = 0x000072b6;
-pub const MINIX_SUPER_MAGIC: ::c_long = 0x0000137f;
-pub const MINIX_SUPER_MAGIC2: ::c_long = 0x0000138f;
-pub const MINIX2_SUPER_MAGIC: ::c_long = 0x00002468;
-pub const MINIX2_SUPER_MAGIC2: ::c_long = 0x00002478;
-pub const MSDOS_SUPER_MAGIC: ::c_long = 0x00004d44;
-pub const NCP_SUPER_MAGIC: ::c_long = 0x0000564c;
-pub const NFS_SUPER_MAGIC: ::c_long = 0x00006969;
-pub const OPENPROM_SUPER_MAGIC: ::c_long = 0x00009fa1;
-pub const PROC_SUPER_MAGIC: ::c_long = 0x00009fa0;
-pub const QNX4_SUPER_MAGIC: ::c_long = 0x0000002f;
-pub const REISERFS_SUPER_MAGIC: ::c_long = 0x52654973;
-pub const SMB_SUPER_MAGIC: ::c_long = 0x0000517b;
-pub const TMPFS_MAGIC: ::c_long = 0x01021994;
-pub const USBDEVICE_SUPER_MAGIC: ::c_long = 0x00009fa2;
-
-pub const VEOF: usize = 16;
-pub const VEOL: usize = 17;
-pub const VEOL2: usize = 6;
-pub const VMIN: usize = 4;
-pub const IEXTEN: ::tcflag_t = 0x00000100;
-pub const TOSTOP: ::tcflag_t = 0x00008000;
-pub const FLUSHO: ::tcflag_t = 0x00002000;
-pub const EXTPROC: ::tcflag_t = 0o200000;
-pub const TCSANOW: ::c_int = 0x540e;
-pub const TCSADRAIN: ::c_int = 0x540f;
-pub const TCSAFLUSH: ::c_int = 0x5410;
-
-pub const CPU_SETSIZE: ::c_int = 0x400;
-
-pub const PTRACE_TRACEME: ::c_uint = 0;
-pub const PTRACE_PEEKTEXT: ::c_uint = 1;
-pub const PTRACE_PEEKDATA: ::c_uint = 2;
-pub const PTRACE_PEEKUSER: ::c_uint = 3;
-pub const PTRACE_POKETEXT: ::c_uint = 4;
-pub const PTRACE_POKEDATA: ::c_uint = 5;
-pub const PTRACE_POKEUSER: ::c_uint = 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;
-pub const PTRACE_DETACH: ::c_uint = 17;
-pub const PTRACE_SYSCALL: ::c_uint = 24;
-pub const PTRACE_SETOPTIONS: ::c_uint = 0x4200;
-pub const PTRACE_GETEVENTMSG: ::c_uint = 0x4201;
-pub const PTRACE_GETSIGINFO: ::c_uint = 0x4202;
-pub const PTRACE_SETSIGINFO: ::c_uint = 0x4203;
-pub const PTRACE_GETFPREGS: ::c_uint = 14;
-pub const PTRACE_SETFPREGS: ::c_uint = 15;
-pub const PTRACE_GETFPXREGS: ::c_uint = 18;
-pub const PTRACE_SETFPXREGS: ::c_uint = 19;
-pub const PTRACE_GETREGS: ::c_uint = 12;
-pub const PTRACE_SETREGS: ::c_uint = 13;
-
-pub const MAP_HUGETLB: ::c_int = 0x080000;
-
-pub const EFD_NONBLOCK: ::c_int = 0x80;
-
-pub const F_RDLCK: ::c_int = 0;
-pub const F_WRLCK: ::c_int = 1;
-pub const F_UNLCK: ::c_int = 2;
-pub const F_GETLK: ::c_int = 14;
-pub const F_GETOWN: ::c_int = 23;
-pub const F_SETOWN: ::c_int = 24;
-pub const F_SETLK: ::c_int = 6;
-pub const F_SETLKW: ::c_int = 7;
-
-pub const SFD_NONBLOCK: ::c_int = 0x80;
-
-pub const TCGETS: ::c_ulong = 0x540d;
-pub const TCSETS: ::c_ulong = 0x540e;
-pub const TCSETSW: ::c_ulong = 0x540f;
-pub const TCSETSF: ::c_ulong = 0x5410;
-pub const TCGETA: ::c_ulong = 0x5401;
-pub const TCSETA: ::c_ulong = 0x5402;
-pub const TCSETAW: ::c_ulong = 0x5403;
-pub const TCSETAF: ::c_ulong = 0x5404;
-pub const TCSBRK: ::c_ulong = 0x5405;
-pub const TCXONC: ::c_ulong = 0x5406;
-pub const TCFLSH: ::c_ulong = 0x5407;
-pub const TIOCGSOFTCAR: ::c_ulong = 0x5481;
-pub const TIOCSSOFTCAR: ::c_ulong = 0x5482;
-pub const TIOCINQ: ::c_ulong = 0x467f;
-pub const TIOCLINUX: ::c_ulong = 0x5483;
-pub const TIOCGSERIAL: ::c_ulong = 0x5484;
-pub const TIOCEXCL: ::c_ulong = 0x740d;
-pub const TIOCNXCL: ::c_ulong = 0x740e;
-pub const TIOCSCTTY: ::c_ulong = 0x5480;
-pub const TIOCGPGRP: ::c_ulong = 0x40047477;
-pub const TIOCSPGRP: ::c_ulong = 0x80047476;
-pub const TIOCOUTQ: ::c_ulong = 0x7472;
-pub const TIOCSTI: ::c_ulong = 0x5472;
-pub const TIOCGWINSZ: ::c_ulong = 0x40087468;
-pub const TIOCSWINSZ: ::c_ulong = 0x80087467;
-pub const TIOCMGET: ::c_ulong = 0x741d;
-pub const TIOCMBIS: ::c_ulong = 0x741b;
-pub const TIOCMBIC: ::c_ulong = 0x741c;
-pub const TIOCMSET: ::c_ulong = 0x741a;
-pub const FIONREAD: ::c_ulong = 0x467f;
-pub const TIOCCONS: ::c_ulong = 0x80047478;
-
-pub const RTLD_DEEPBIND: ::c_int = 0x10;
-pub const RTLD_GLOBAL: ::c_int = 0x4;
-pub const RTLD_NOLOAD: ::c_int = 0x8;
-
-pub const LINUX_REBOOT_MAGIC1: ::c_int = 0xfee1dead;
-pub const LINUX_REBOOT_MAGIC2: ::c_int = 672274793;
-pub const LINUX_REBOOT_MAGIC2A: ::c_int = 85072278;
-pub const LINUX_REBOOT_MAGIC2B: ::c_int = 369367448;
-pub const LINUX_REBOOT_MAGIC2C: ::c_int = 537993216;
-
-pub const LINUX_REBOOT_CMD_RESTART: ::c_int = 0x01234567;
-pub const LINUX_REBOOT_CMD_HALT: ::c_int = 0xCDEF0123;
-pub const LINUX_REBOOT_CMD_CAD_ON: ::c_int = 0x89ABCDEF;
-pub const LINUX_REBOOT_CMD_CAD_OFF: ::c_int = 0x00000000;
-pub const LINUX_REBOOT_CMD_POWER_OFF: ::c_int = 0x4321FEDC;
-pub const LINUX_REBOOT_CMD_RESTART2: ::c_int = 0xA1B2C3D4;
-pub const LINUX_REBOOT_CMD_SW_SUSPEND: ::c_int = 0xD000FCE2;
-pub const LINUX_REBOOT_CMD_KEXEC: ::c_int = 0x45584543;
-
-pub const MCL_CURRENT: ::c_int = 0x0001;
-pub const MCL_FUTURE: ::c_int = 0x0002;
-
-pub const SIGSTKSZ: ::size_t = 8192;
-pub const MINSIGSTKSZ: ::size_t = 2048;
-pub const CBAUD: ::tcflag_t = 0o0010017;
-pub const TAB1: ::tcflag_t = 0x00000800;
-pub const TAB2: ::tcflag_t = 0x00001000;
-pub const TAB3: ::tcflag_t = 0x00001800;
-pub const CR1: ::tcflag_t = 0x00000200;
-pub const CR2: ::tcflag_t = 0x00000400;
-pub const CR3: ::tcflag_t = 0x00000600;
-pub const FF1: ::tcflag_t = 0x00008000;
-pub const BS1: ::tcflag_t = 0x00002000;
-pub const VT1: ::tcflag_t = 0x00004000;
-pub const VWERASE: usize = 14;
-pub const VREPRINT: usize = 12;
-pub const VSUSP: usize = 10;
-pub const VSTART: usize = 8;
-pub const VSTOP: usize = 9;
-pub const VDISCARD: usize = 13;
-pub const VTIME: usize = 5;
-pub const IXON: ::tcflag_t = 0x00000400;
-pub const IXOFF: ::tcflag_t = 0x00001000;
-pub const ONLCR: ::tcflag_t = 0x4;
-pub const CSIZE: ::tcflag_t = 0x00000030;
-pub const CS6: ::tcflag_t = 0x00000010;
-pub const CS7: ::tcflag_t = 0x00000020;
-pub const CS8: ::tcflag_t = 0x00000030;
-pub const CSTOPB: ::tcflag_t = 0x00000040;
-pub const CREAD: ::tcflag_t = 0x00000080;
-pub const PARENB: ::tcflag_t = 0x00000100;
-pub const PARODD: ::tcflag_t = 0x00000200;
-pub const HUPCL: ::tcflag_t = 0x00000400;
-pub const CLOCAL: ::tcflag_t = 0x00000800;
-pub const ECHOKE: ::tcflag_t = 0x00000800;
-pub const ECHOE: ::tcflag_t = 0x00000010;
-pub const ECHOK: ::tcflag_t = 0x00000020;
-pub const ECHONL: ::tcflag_t = 0x00000040;
-pub const ECHOPRT: ::tcflag_t = 0x00000400;
-pub const ECHOCTL: ::tcflag_t = 0x00000200;
-pub const ISIG: ::tcflag_t = 0x00000001;
-pub const ICANON: ::tcflag_t = 0x00000002;
-pub const PENDIN: ::tcflag_t = 0x00004000;
-pub const NOFLSH: ::tcflag_t = 0x00000080;
-pub const CIBAUD: ::tcflag_t = 0o02003600000;
-pub const CBAUDEX: ::tcflag_t = 0o010000;
-pub const VSWTC: usize = 7;
-pub const OLCUC: ::tcflag_t = 0o000002;
-pub const NLDLY: ::tcflag_t = 0o000400;
-pub const CRDLY: ::tcflag_t = 0o003000;
-pub const TABDLY: ::tcflag_t = 0o014000;
-pub const BSDLY: ::tcflag_t = 0o020000;
-pub const FFDLY: ::tcflag_t = 0o100000;
-pub const VTDLY: ::tcflag_t = 0o040000;
-pub const XTABS: ::tcflag_t = 0o014000;
-
-pub const B0: ::speed_t = 0o000000;
-pub const B50: ::speed_t = 0o000001;
-pub const B75: ::speed_t = 0o000002;
-pub const B110: ::speed_t = 0o000003;
-pub const B134: ::speed_t = 0o000004;
-pub const B150: ::speed_t = 0o000005;
-pub const B200: ::speed_t = 0o000006;
-pub const B300: ::speed_t = 0o000007;
-pub const B600: ::speed_t = 0o000010;
-pub const B1200: ::speed_t = 0o000011;
-pub const B1800: ::speed_t = 0o000012;
-pub const B2400: ::speed_t = 0o000013;
-pub const B4800: ::speed_t = 0o000014;
-pub const B9600: ::speed_t = 0o000015;
-pub const B19200: ::speed_t = 0o000016;
-pub const B38400: ::speed_t = 0o000017;
-pub const EXTA: ::speed_t = B19200;
-pub const EXTB: ::speed_t = B38400;
-pub const BOTHER: ::speed_t = 0o010000;
-pub const B57600: ::speed_t = 0o010001;
-pub const B115200: ::speed_t = 0o010002;
-pub const B230400: ::speed_t = 0o010003;
-pub const B460800: ::speed_t = 0o010004;
-pub const B500000: ::speed_t = 0o010005;
-pub const B576000: ::speed_t = 0o010006;
-pub const B921600: ::speed_t = 0o010007;
-pub const B1000000: ::speed_t = 0o010010;
-pub const B1152000: ::speed_t = 0o010011;
-pub const B1500000: ::speed_t = 0o010012;
-pub const B2000000: ::speed_t = 0o010013;
-pub const B2500000: ::speed_t = 0o010014;
-pub const B3000000: ::speed_t = 0o010015;
-pub const B3500000: ::speed_t = 0o010016;
-pub const B4000000: ::speed_t = 0o010017;
-
-pub const TIOCM_LE: ::c_int = 0x001;
-pub const TIOCM_DTR: ::c_int = 0x002;
-pub const TIOCM_RTS: ::c_int = 0x004;
-pub const TIOCM_ST: ::c_int = 0x010;
-pub const TIOCM_SR: ::c_int = 0x020;
-pub const TIOCM_CTS: ::c_int = 0x040;
-pub const TIOCM_CAR: ::c_int = 0x100;
-pub const TIOCM_CD: ::c_int = TIOCM_CAR;
-pub const TIOCM_RNG: ::c_int = 0x200;
-pub const TIOCM_RI: ::c_int = TIOCM_RNG;
-pub const TIOCM_DSR: ::c_int = 0x400;
-
-pub const EHWPOISON: ::c_int = 168;
-pub const SIGEV_THREAD_ID: ::c_int = 4;
-pub const EPOLLWAKEUP: ::c_int = 0x20000000;
-
-pub const NF_NETDEV_INGRESS: ::c_int = 0;
-pub const NF_NETDEV_NUMHOOKS: ::c_int = 1;
-
-pub const NFPROTO_INET: ::c_int = 1;
-pub const NFPROTO_NETDEV: ::c_int = 5;
-
-pub const NLA_ALIGNTO: ::c_int = 4;
-
-pub const GENL_UNS_ADMIN_PERM: ::c_int = 0x10;
-
-pub const GENL_ID_VFS_DQUOT: ::c_int = ::NLMSG_MIN_TYPE + 1;
-pub const GENL_ID_PMCRAID: ::c_int = ::NLMSG_MIN_TYPE + 2;
-
-pub const NFT_TABLE_MAXNAMELEN: ::c_int = 256;
-pub const NFT_CHAIN_MAXNAMELEN: ::c_int = 256;
-pub const NFT_SET_MAXNAMELEN: ::c_int = 256;
-pub const NFT_OBJ_MAXNAMELEN: ::c_int = 256;
-pub const NFT_USERDATA_MAXLEN: ::c_int = 256;
-
-pub const NFT_REG_VERDICT: ::c_int = 0;
-pub const NFT_REG_1: ::c_int = 1;
-pub const NFT_REG_2: ::c_int = 2;
-pub const NFT_REG_3: ::c_int = 3;
-pub const NFT_REG_4: ::c_int = 4;
-pub const __NFT_REG_MAX: ::c_int = 5;
-pub const NFT_REG32_00: ::c_int = 8;
-pub const NFT_REG32_01: ::c_int = 9;
-pub const NFT_REG32_02: ::c_int = 10;
-pub const NFT_REG32_03: ::c_int = 11;
-pub const NFT_REG32_04: ::c_int = 12;
-pub const NFT_REG32_05: ::c_int = 13;
-pub const NFT_REG32_06: ::c_int = 14;
-pub const NFT_REG32_07: ::c_int = 15;
-pub const NFT_REG32_08: ::c_int = 16;
-pub const NFT_REG32_09: ::c_int = 17;
-pub const NFT_REG32_10: ::c_int = 18;
-pub const NFT_REG32_11: ::c_int = 19;
-pub const NFT_REG32_12: ::c_int = 20;
-pub const NFT_REG32_13: ::c_int = 21;
-pub const NFT_REG32_14: ::c_int = 22;
-pub const NFT_REG32_15: ::c_int = 23;
-
-pub const NFT_REG_SIZE: ::c_int = 16;
-pub const NFT_REG32_SIZE: ::c_int = 4;
-
-pub const NFT_CONTINUE: ::c_int = -1;
-pub const NFT_BREAK: ::c_int = -2;
-pub const NFT_JUMP: ::c_int = -3;
-pub const NFT_GOTO: ::c_int = -4;
-pub const NFT_RETURN: ::c_int = -5;
-
-pub const NFT_MSG_NEWTABLE: ::c_int = 0;
-pub const NFT_MSG_GETTABLE: ::c_int = 1;
-pub const NFT_MSG_DELTABLE: ::c_int = 2;
-pub const NFT_MSG_NEWCHAIN: ::c_int = 3;
-pub const NFT_MSG_GETCHAIN: ::c_int = 4;
-pub const NFT_MSG_DELCHAIN: ::c_int = 5;
-pub const NFT_MSG_NEWRULE: ::c_int = 6;
-pub const NFT_MSG_GETRULE: ::c_int = 7;
-pub const NFT_MSG_DELRULE: ::c_int = 8;
-pub const NFT_MSG_NEWSET: ::c_int = 9;
-pub const NFT_MSG_GETSET: ::c_int = 10;
-pub const NFT_MSG_DELSET: ::c_int = 11;
-pub const NFT_MSG_NEWSETELEM: ::c_int = 12;
-pub const NFT_MSG_GETSETELEM: ::c_int = 13;
-pub const NFT_MSG_DELSETELEM: ::c_int = 14;
-pub const NFT_MSG_NEWGEN: ::c_int = 15;
-pub const NFT_MSG_GETGEN: ::c_int = 16;
-pub const NFT_MSG_TRACE: ::c_int = 17;
-pub const NFT_MSG_NEWOBJ: ::c_int = 18;
-pub const NFT_MSG_GETOBJ: ::c_int = 19;
-pub const NFT_MSG_DELOBJ: ::c_int = 20;
-pub const NFT_MSG_GETOBJ_RESET: ::c_int = 21;
-pub const NFT_MSG_MAX: ::c_int = 25;
-
-pub const NFT_SET_ANONYMOUS: ::c_int = 0x1;
-pub const NFT_SET_CONSTANT: ::c_int = 0x2;
-pub const NFT_SET_INTERVAL: ::c_int = 0x4;
-pub const NFT_SET_MAP: ::c_int = 0x8;
-pub const NFT_SET_TIMEOUT: ::c_int = 0x10;
-pub const NFT_SET_EVAL: ::c_int = 0x20;
-
-pub const NFT_SET_POL_PERFORMANCE: ::c_int = 0;
-pub const NFT_SET_POL_MEMORY: ::c_int = 1;
-
-pub const NFT_SET_ELEM_INTERVAL_END: ::c_int = 0x1;
-
-pub const NFT_DATA_VALUE: ::c_uint = 0;
-pub const NFT_DATA_VERDICT: ::c_uint = 0xffffff00;
-
-pub const NFT_DATA_RESERVED_MASK: ::c_uint = 0xffffff00;
-
-pub const NFT_DATA_VALUE_MAXLEN: ::c_int = 64;
-
-pub const NFT_BYTEORDER_NTOH: ::c_int = 0;
-pub const NFT_BYTEORDER_HTON: ::c_int = 1;
-
-pub const NFT_CMP_EQ: ::c_int = 0;
-pub const NFT_CMP_NEQ: ::c_int = 1;
-pub const NFT_CMP_LT: ::c_int = 2;
-pub const NFT_CMP_LTE: ::c_int = 3;
-pub const NFT_CMP_GT: ::c_int = 4;
-pub const NFT_CMP_GTE: ::c_int = 5;
-
-pub const NFT_RANGE_EQ: ::c_int = 0;
-pub const NFT_RANGE_NEQ: ::c_int = 1;
-
-pub const NFT_LOOKUP_F_INV: ::c_int = (1 << 0);
-
-pub const NFT_DYNSET_OP_ADD: ::c_int = 0;
-pub const NFT_DYNSET_OP_UPDATE: ::c_int = 1;
-
-pub const NFT_DYNSET_F_INV: ::c_int = (1 << 0);
-
-pub const NFT_PAYLOAD_LL_HEADER: ::c_int = 0;
-pub const NFT_PAYLOAD_NETWORK_HEADER: ::c_int = 1;
-pub const NFT_PAYLOAD_TRANSPORT_HEADER: ::c_int = 2;
-
-pub const NFT_PAYLOAD_CSUM_NONE: ::c_int = 0;
-pub const NFT_PAYLOAD_CSUM_INET: ::c_int = 1;
-
-pub const NFT_META_LEN: ::c_int = 0;
-pub const NFT_META_PROTOCOL: ::c_int = 1;
-pub const NFT_META_PRIORITY: ::c_int = 2;
-pub const NFT_META_MARK: ::c_int = 3;
-pub const NFT_META_IIF: ::c_int = 4;
-pub const NFT_META_OIF: ::c_int = 5;
-pub const NFT_META_IIFNAME: ::c_int = 6;
-pub const NFT_META_OIFNAME: ::c_int = 7;
-pub const NFT_META_IIFTYPE: ::c_int = 8;
-pub const NFT_META_OIFTYPE: ::c_int = 9;
-pub const NFT_META_SKUID: ::c_int = 10;
-pub const NFT_META_SKGID: ::c_int = 11;
-pub const NFT_META_NFTRACE: ::c_int = 12;
-pub const NFT_META_RTCLASSID: ::c_int = 13;
-pub const NFT_META_SECMARK: ::c_int = 14;
-pub const NFT_META_NFPROTO: ::c_int = 15;
-pub const NFT_META_L4PROTO: ::c_int = 16;
-pub const NFT_META_BRI_IIFNAME: ::c_int = 17;
-pub const NFT_META_BRI_OIFNAME: ::c_int = 18;
-pub const NFT_META_PKTTYPE: ::c_int = 19;
-pub const NFT_META_CPU: ::c_int = 20;
-pub const NFT_META_IIFGROUP: ::c_int = 21;
-pub const NFT_META_OIFGROUP: ::c_int = 22;
-pub const NFT_META_CGROUP: ::c_int = 23;
-pub const NFT_META_PRANDOM: ::c_int = 24;
-
-pub const NFT_CT_STATE: ::c_int = 0;
-pub const NFT_CT_DIRECTION: ::c_int = 1;
-pub const NFT_CT_STATUS: ::c_int = 2;
-pub const NFT_CT_MARK: ::c_int = 3;
-pub const NFT_CT_SECMARK: ::c_int = 4;
-pub const NFT_CT_EXPIRATION: ::c_int = 5;
-pub const NFT_CT_HELPER: ::c_int = 6;
-pub const NFT_CT_L3PROTOCOL: ::c_int = 7;
-pub const NFT_CT_SRC: ::c_int = 8;
-pub const NFT_CT_DST: ::c_int = 9;
-pub const NFT_CT_PROTOCOL: ::c_int = 10;
-pub const NFT_CT_PROTO_SRC: ::c_int = 11;
-pub const NFT_CT_PROTO_DST: ::c_int = 12;
-pub const NFT_CT_LABELS: ::c_int = 13;
-pub const NFT_CT_PKTS: ::c_int = 14;
-pub const NFT_CT_BYTES: ::c_int = 15;
-
-pub const NFT_LIMIT_PKTS: ::c_int = 0;
-pub const NFT_LIMIT_PKT_BYTES: ::c_int = 1;
-
-pub const NFT_LIMIT_F_INV: ::c_int = (1 << 0);
-
-pub const NFT_QUEUE_FLAG_BYPASS: ::c_int = 0x01;
-pub const NFT_QUEUE_FLAG_CPU_FANOUT: ::c_int = 0x02;
-pub const NFT_QUEUE_FLAG_MASK: ::c_int = 0x03;
-
-pub const NFT_QUOTA_F_INV: ::c_int = (1 << 0);
-
-pub const NFT_REJECT_ICMP_UNREACH: ::c_int = 0;
-pub const NFT_REJECT_TCP_RST: ::c_int = 1;
-pub const NFT_REJECT_ICMPX_UNREACH: ::c_int = 2;
-
-pub const NFT_REJECT_ICMPX_NO_ROUTE: ::c_int = 0;
-pub const NFT_REJECT_ICMPX_PORT_UNREACH: ::c_int = 1;
-pub const NFT_REJECT_ICMPX_HOST_UNREACH: ::c_int = 2;
-pub const NFT_REJECT_ICMPX_ADMIN_PROHIBITED: ::c_int = 3;
-
-pub const NFT_NAT_SNAT: ::c_int = 0;
-pub const NFT_NAT_DNAT: ::c_int = 1;
-
-pub const NFT_TRACETYPE_UNSPEC: ::c_int = 0;
-pub const NFT_TRACETYPE_POLICY: ::c_int = 1;
-pub const NFT_TRACETYPE_RETURN: ::c_int = 2;
-pub const NFT_TRACETYPE_RULE: ::c_int = 3;
-
-pub const NFT_NG_INCREMENTAL: ::c_int = 0;
-pub const NFT_NG_RANDOM: ::c_int = 1;
-
-pub const RLIMIT_CPU: ::__rlimit_resource_t = 0;
-pub const RLIMIT_FSIZE: ::__rlimit_resource_t = 1;
-pub const RLIMIT_DATA: ::__rlimit_resource_t = 2;
-pub const RLIMIT_STACK: ::__rlimit_resource_t = 3;
-pub const RLIMIT_CORE: ::__rlimit_resource_t = 4;
-pub const RLIMIT_LOCKS: ::__rlimit_resource_t = 10;
-pub const RLIMIT_SIGPENDING: ::__rlimit_resource_t = 11;
-pub const RLIMIT_MSGQUEUE: ::__rlimit_resource_t = 12;
-pub const RLIMIT_NICE: ::__rlimit_resource_t = 13;
-pub const RLIMIT_RTPRIO: ::__rlimit_resource_t = 14;
-
-#[doc(hidden)]
-#[deprecated(
- since = "0.2.55",
- note = "If you are using this report to: \
- https://github.com/rust-lang/libc/issues/665"
-)]
-pub const AF_MAX: ::c_int = 45;
-#[doc(hidden)]
-#[deprecated(
- since = "0.2.55",
- note = "If you are using this report to: \
- https://github.com/rust-lang/libc/issues/665"
-)]
-#[allow(deprecated)]
-pub const PF_MAX: ::c_int = AF_MAX;
-
-f! {
- pub fn NLA_ALIGN(len: ::c_int) -> ::c_int {
- return ((len) + NLA_ALIGNTO - 1) & !(NLA_ALIGNTO - 1)
- }
-}
-
-#[link(name = "util")]
-extern {
- pub fn sendmmsg(sockfd: ::c_int, msgvec: *mut ::mmsghdr, vlen: ::c_uint,
- flags: ::c_int) -> ::c_int;
- pub fn recvmmsg(sockfd: ::c_int, msgvec: *mut ::mmsghdr, vlen: ::c_uint,
- flags: ::c_int, timeout: *mut ::timespec) -> ::c_int;
-
- pub fn getrlimit64(resource: ::__rlimit_resource_t,
- rlim: *mut ::rlimit64) -> ::c_int;
- pub fn setrlimit64(resource: ::__rlimit_resource_t,
- rlim: *const ::rlimit64) -> ::c_int;
- pub fn getrlimit(resource: ::__rlimit_resource_t,
- rlim: *mut ::rlimit) -> ::c_int;
- pub fn setrlimit(resource: ::__rlimit_resource_t,
- rlim: *const ::rlimit) -> ::c_int;
- pub fn prlimit(pid: ::pid_t,
- resource: ::__rlimit_resource_t, new_limit: *const ::rlimit,
- old_limit: *mut ::rlimit) -> ::c_int;
- pub fn prlimit64(pid: ::pid_t,
- resource: ::__rlimit_resource_t,
- new_limit: *const ::rlimit64,
- old_limit: *mut ::rlimit64) -> ::c_int;
- pub fn sysctl(name: *mut ::c_int,
- namelen: ::c_int,
- oldp: *mut ::c_void,
- oldlenp: *mut ::size_t,
- newp: *mut ::c_void,
- newlen: ::size_t)
- -> ::c_int;
- pub fn ioctl(fd: ::c_int, request: ::c_ulong, ...) -> ::c_int;
- pub fn backtrace(buf: *mut *mut ::c_void,
- sz: ::c_int) -> ::c_int;
- pub fn glob64(pattern: *const ::c_char,
- flags: ::c_int,
- errfunc: ::Option<extern fn(epath: *const ::c_char,
- errno: ::c_int)
- -> ::c_int>,
- pglob: *mut glob64_t) -> ::c_int;
- pub fn globfree64(pglob: *mut glob64_t);
- pub fn ptrace(request: ::c_uint, ...) -> ::c_long;
- pub fn pthread_attr_getaffinity_np(attr: *const ::pthread_attr_t,
- cpusetsize: ::size_t,
- cpuset: *mut ::cpu_set_t) -> ::c_int;
- pub fn pthread_attr_setaffinity_np(attr: *mut ::pthread_attr_t,
- cpusetsize: ::size_t,
- cpuset: *const ::cpu_set_t) -> ::c_int;
- pub fn getpriority(which: ::__priority_which_t, who: ::id_t) -> ::c_int;
- pub fn setpriority(which: ::__priority_which_t, who: ::id_t,
- prio: ::c_int) -> ::c_int;
- pub fn pthread_getaffinity_np(thread: ::pthread_t,
- cpusetsize: ::size_t,
- cpuset: *mut ::cpu_set_t) -> ::c_int;
- pub fn pthread_setaffinity_np(thread: ::pthread_t,
- cpusetsize: ::size_t,
- cpuset: *const ::cpu_set_t) -> ::c_int;
- pub fn sched_getcpu() -> ::c_int;
-}
-
-cfg_if! {
- if #[cfg(target_arch = "mips")] {
- mod mips32;
- pub use self::mips32::*;
- } else if #[cfg(target_arch = "mips64")] {
- mod mips64;
- pub use self::mips64::*;
- } else {
- // Unknown target_arch
- }
-}
-
-cfg_if! {
- if #[cfg(libc_align)] {
- mod align;
- pub use self::align::*;
- } else {
- mod no_align;
- pub use self::no_align::*;
- }
-}
diff --git a/src/unix/linux_like/linux/mod.rs b/src/unix/linux_like/linux/mod.rs
index 3b7bc292..f6f2e637 100644
--- a/src/unix/linux_like/linux/mod.rs
+++ b/src/unix/linux_like/linux/mod.rs
@@ -2647,16 +2647,9 @@ cfg_if! {
if #[cfg(target_env = "musl")] {
mod musl;
pub use self::musl::*;
- } else if #[cfg(any(target_arch = "mips",
- target_arch = "mips64"))] {
- mod mips;
- pub use self::mips::*;
- } else if #[cfg(any(target_arch = "s390x"))] {
- mod s390x;
- pub use self::s390x::*;
- } else {
- mod other;
- pub use self::other::*;
+ } else if #[cfg(target_env = "gnu")] {
+ mod gnu;
+ pub use self::gnu::*;
}
}
diff --git a/src/unix/linux_like/linux/other/align.rs b/src/unix/linux_like/linux/other/align.rs
deleted file mode 100644
index 4a0e0746..00000000
--- a/src/unix/linux_like/linux/other/align.rs
+++ /dev/null
@@ -1,13 +0,0 @@
-s! {
- // FIXME this is actually a union
- #[cfg_attr(target_pointer_width = "32",
- repr(align(4)))]
- #[cfg_attr(target_pointer_width = "64",
- repr(align(8)))]
- pub struct sem_t {
- #[cfg(target_pointer_width = "32")]
- __size: [::c_char; 16],
- #[cfg(target_pointer_width = "64")]
- __size: [::c_char; 32],
- }
-}
diff --git a/src/unix/linux_like/linux/other/no_align.rs b/src/unix/linux_like/linux/other/no_align.rs
deleted file mode 100644
index e32bf673..00000000
--- a/src/unix/linux_like/linux/other/no_align.rs
+++ /dev/null
@@ -1,10 +0,0 @@
-s! {
- // FIXME this is actually a union
- pub struct sem_t {
- #[cfg(target_pointer_width = "32")]
- __size: [::c_char; 16],
- #[cfg(target_pointer_width = "64")]
- __size: [::c_char; 32],
- __align: [::c_long; 0],
- }
-}
diff --git a/src/unix/linux_like/linux/s390x/align.rs b/src/unix/linux_like/linux/s390x/align.rs
deleted file mode 100644
index 21e21907..00000000
--- a/src/unix/linux_like/linux/s390x/align.rs
+++ /dev/null
@@ -1,10 +0,0 @@
-s! {
- // FIXME this is actually a union
- #[cfg_attr(target_pointer_width = "32",
- repr(align(4)))]
- #[cfg_attr(target_pointer_width = "64",
- repr(align(8)))]
- pub struct sem_t {
- __size: [::c_char; 32],
- }
-}
diff --git a/src/unix/linux_like/linux/s390x/no_align.rs b/src/unix/linux_like/linux/s390x/no_align.rs
deleted file mode 100644
index 8909114c..00000000
--- a/src/unix/linux_like/linux/s390x/no_align.rs
+++ /dev/null
@@ -1,7 +0,0 @@
-s! {
- // FIXME this is actually a union
- pub struct sem_t {
- __size: [::c_char; 32],
- __align: [::c_long; 0],
- }
-}