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; s! { pub struct stat { pub st_dev: ::c_ulong, pub 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, pub 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, pub st_pad5: [::c_long; 14], } pub struct pthread_attr_t { __size: [u32; 9] } pub struct sigaction { pub sa_flags: ::c_uint, pub sa_sigaction: ::sighandler_t, pub sa_mask: sigset_t, _restorer: *mut ::c_void, _resv: [::c_int; 1], } pub struct stack_t { pub ss_sp: *mut ::c_void, pub ss_size: ::size_t, 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, pub si_errno: ::c_int, pub _pad: [::c_int; 29], } } pub const RLIMIT_NOFILE: ::c_int = 5; pub const RLIMIT_AS: ::c_int = 6; pub const RLIMIT_RSS: ::c_int = 7; pub const RLIMIT_NPROC: ::c_int = 8; pub const RLIMIT_MEMLOCK: ::c_int = 9; pub const RLIMIT_NLIMITS: ::c_int = 15; pub const RLIM_INFINITY: ::rlim_t = 0x7fffffff; 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 = 0x10; pub const O_RSYNC: ::c_int = 0x10; pub const O_DSYNC: ::c_int = 0x10; 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 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 = 4; pub const SO_TYPE: ::c_int = 4104; pub const SO_ERROR: ::c_int = 4103; pub const SO_DONTROUTE: ::c_int = 16; pub const SO_BROADCAST: ::c_int = 32; pub const SO_SNDBUF: ::c_int = 4097; pub const SO_RCVBUF: ::c_int = 4098; pub const SO_KEEPALIVE: ::c_int = 8; pub const SO_OOBINLINE: ::c_int = 256; pub const SO_LINGER: ::c_int = 128; pub const SO_RCVLOWAT: ::c_int = 4100; pub const SO_SNDLOWAT: ::c_int = 4099; pub const SO_RCVTIMEO: ::c_int = 4102; pub const SO_SNDTIMEO: ::c_int = 4101; pub const SO_ACCEPTCONN: ::c_int = 4105; 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 FIOCLEX: ::c_ulong = 0x6601; pub const FIONBIO: ::c_ulong = 0x667e; pub const SA_ONSTACK: ::c_ulong = 0x08000000; pub const SA_SIGINFO: ::c_ulong = 0x00000008; pub const SA_NOCLDWAIT: ::c_int = 0x00010000; pub const SIGCHLD: ::c_int = 18; pub const SIGBUS: ::c_int = 10; pub const SIG_SETMASK: ::c_int = 3;