| 1 |
use crate::prelude::*; |
| 2 |
|
| 3 |
pub type pthread_t = c_ulong; |
| 4 |
|
| 5 |
pub const SFD_CLOEXEC: c_int = 0x080000; |
| 6 |
|
| 7 |
pub const NCCS: usize = 32; |
| 8 |
|
| 9 |
pub const O_TRUNC: c_int = 512; |
| 10 |
|
| 11 |
pub const O_CLOEXEC: c_int = 0x80000; |
| 12 |
|
| 13 |
pub const EBFONT: c_int = 59; |
| 14 |
pub const ENOSTR: c_int = 60; |
| 15 |
pub const ENODATA: c_int = 61; |
| 16 |
pub const ETIME: c_int = 62; |
| 17 |
pub const ENOSR: c_int = 63; |
| 18 |
pub const ENONET: c_int = 64; |
| 19 |
pub const ENOPKG: c_int = 65; |
| 20 |
pub const EREMOTE: c_int = 66; |
| 21 |
pub const ENOLINK: c_int = 67; |
| 22 |
pub const EADV: c_int = 68; |
| 23 |
pub const ESRMNT: c_int = 69; |
| 24 |
pub const ECOMM: c_int = 70; |
| 25 |
pub const EPROTO: c_int = 71; |
| 26 |
pub const EDOTDOT: c_int = 73; |
| 27 |
|
| 28 |
pub const SA_NODEFER: c_uint = 0x40000000; |
| 29 |
pub const SA_RESETHAND: c_uint = 0x80000000; |
| 30 |
pub const SA_RESTART: c_uint = 0x10000000; |
| 31 |
pub const SA_NOCLDSTOP: c_uint = 0x00000001; |
| 32 |
|
| 33 |
pub const EPOLL_CLOEXEC: c_int = 0x80000; |
| 34 |
|
| 35 |
pub const EFD_CLOEXEC: c_int = 0x80000; |
| 36 |
|
| 37 |
pub const TMP_MAX: c_uint = 238328; |
| 38 |
pub const _SC_2_C_VERSION: c_int = 96; |
| 39 |
pub const O_ACCMODE: c_int = 3; |
| 40 |
pub const O_DIRECT: c_int = 0x8000; |
| 41 |
pub const O_DIRECTORY: c_int = 0x10000; |
| 42 |
pub const O_NOFOLLOW: c_int = 0x20000; |
| 43 |
pub const O_NOATIME: c_int = 0x40000; |
| 44 |
pub const O_PATH: c_int = 0o010000000; |
| 45 |
|
| 46 |
pub const O_APPEND: c_int = 8; |
| 47 |
pub const O_CREAT: c_int = 256; |
| 48 |
pub const O_EXCL: c_int = 1024; |
| 49 |
pub const O_NOCTTY: c_int = 2048; |
| 50 |
pub const O_NONBLOCK: c_int = 128; |
| 51 |
pub const O_SYNC: c_int = 0x10; |
| 52 |
pub const O_RSYNC: c_int = 0x10; |
| 53 |
pub const O_DSYNC: c_int = 0x10; |
| 54 |
pub const O_FSYNC: c_int = 0x10; |
| 55 |
pub const O_ASYNC: c_int = 0x1000; |
| 56 |
pub const O_LARGEFILE: c_int = 0x2000; |
| 57 |
pub const O_NDELAY: c_int = 0x80; |
| 58 |
|
| 59 |
pub const SOCK_NONBLOCK: c_int = 128; |
| 60 |
pub const PIDFD_NONBLOCK: c_int = 128; |
| 61 |
|
| 62 |
pub const EDEADLK: c_int = 45; |
| 63 |
pub const ENAMETOOLONG: c_int = 78; |
| 64 |
pub const ENOLCK: c_int = 46; |
| 65 |
pub const ENOSYS: c_int = 89; |
| 66 |
pub const ENOTEMPTY: c_int = 93; |
| 67 |
pub const ELOOP: c_int = 90; |
| 68 |
pub const ENOMSG: c_int = 35; |
| 69 |
pub const EIDRM: c_int = 36; |
| 70 |
pub const ECHRNG: c_int = 37; |
| 71 |
pub const EL2NSYNC: c_int = 38; |
| 72 |
pub const EL3HLT: c_int = 39; |
| 73 |
pub const EL3RST: c_int = 40; |
| 74 |
pub const ELNRNG: c_int = 41; |
| 75 |
pub const EUNATCH: c_int = 42; |
| 76 |
pub const ENOCSI: c_int = 43; |
| 77 |
pub const EL2HLT: c_int = 44; |
| 78 |
pub const EBADE: c_int = 50; |
| 79 |
pub const EBADR: c_int = 51; |
| 80 |
pub const EXFULL: c_int = 52; |
| 81 |
pub const FFDLY: c_int = 0o0100000; |
| 82 |
pub const ENOANO: c_int = 53; |
| 83 |
pub const EBADRQC: c_int = 54; |
| 84 |
pub const EBADSLT: c_int = 55; |
| 85 |
pub const EMULTIHOP: c_int = 74; |
| 86 |
pub const EOVERFLOW: c_int = 79; |
| 87 |
pub const ENOTUNIQ: c_int = 80; |
| 88 |
pub const EBADFD: c_int = 81; |
| 89 |
pub const EBADMSG: c_int = 77; |
| 90 |
pub const EREMCHG: c_int = 82; |
| 91 |
pub const ELIBACC: c_int = 83; |
| 92 |
pub const ELIBBAD: c_int = 84; |
| 93 |
pub const ELIBSCN: c_int = 85; |
| 94 |
pub const ELIBMAX: c_int = 86; |
| 95 |
pub const ELIBEXEC: c_int = 87; |
| 96 |
pub const EILSEQ: c_int = 88; |
| 97 |
pub const ERESTART: c_int = 91; |
| 98 |
pub const ESTRPIPE: c_int = 92; |
| 99 |
pub const EUSERS: c_int = 94; |
| 100 |
pub const ENOTSOCK: c_int = 95; |
| 101 |
pub const EDESTADDRREQ: c_int = 96; |
| 102 |
pub const EMSGSIZE: c_int = 97; |
| 103 |
pub const EPROTOTYPE: c_int = 98; |
| 104 |
pub const ENOPROTOOPT: c_int = 99; |
| 105 |
pub const EPROTONOSUPPORT: c_int = 120; |
| 106 |
pub const ESOCKTNOSUPPORT: c_int = 121; |
| 107 |
pub const EOPNOTSUPP: c_int = 122; |
| 108 |
pub const EPFNOSUPPORT: c_int = 123; |
| 109 |
pub const EAFNOSUPPORT: c_int = 124; |
| 110 |
pub const EADDRINUSE: c_int = 125; |
| 111 |
pub const EADDRNOTAVAIL: c_int = 126; |
| 112 |
pub const ENETDOWN: c_int = 127; |
| 113 |
pub const ENETUNREACH: c_int = 128; |
| 114 |
pub const ENETRESET: c_int = 129; |
| 115 |
pub const ECONNABORTED: c_int = 130; |
| 116 |
pub const ECONNRESET: c_int = 131; |
| 117 |
pub const ENOBUFS: c_int = 132; |
| 118 |
pub const EISCONN: c_int = 133; |
| 119 |
pub const ENOTCONN: c_int = 134; |
| 120 |
pub const ESHUTDOWN: c_int = 143; |
| 121 |
pub const ETOOMANYREFS: c_int = 144; |
| 122 |
pub const ETIMEDOUT: c_int = 145; |
| 123 |
pub const ECONNREFUSED: c_int = 146; |
| 124 |
pub const EHOSTDOWN: c_int = 147; |
| 125 |
pub const EHOSTUNREACH: c_int = 148; |
| 126 |
pub const EALREADY: c_int = 149; |
| 127 |
pub const EINPROGRESS: c_int = 150; |
| 128 |
pub const ESTALE: c_int = 151; |
| 129 |
pub const EUCLEAN: c_int = 135; |
| 130 |
pub const ENOTNAM: c_int = 137; |
| 131 |
pub const ENAVAIL: c_int = 138; |
| 132 |
pub const EISNAM: c_int = 139; |
| 133 |
pub const EREMOTEIO: c_int = 140; |
| 134 |
pub const EDQUOT: c_int = 1133; |
| 135 |
pub const ENOMEDIUM: c_int = 159; |
| 136 |
pub const EMEDIUMTYPE: c_int = 160; |
| 137 |
pub const ECANCELED: c_int = 158; |
| 138 |
pub const ENOKEY: c_int = 161; |
| 139 |
pub const EKEYEXPIRED: c_int = 162; |
| 140 |
pub const EKEYREVOKED: c_int = 163; |
| 141 |
pub const EKEYREJECTED: c_int = 164; |
| 142 |
pub const EOWNERDEAD: c_int = 165; |
| 143 |
pub const ENOTRECOVERABLE: c_int = 166; |
| 144 |
pub const ERFKILL: c_int = 167; |
| 145 |
|
| 146 |
pub const MAP_NORESERVE: c_int = 0x400; |
| 147 |
pub const MAP_ANON: c_int = 0x800; |
| 148 |
pub const MAP_ANONYMOUS: c_int = 0x800; |
| 149 |
pub const MAP_GROWSDOWN: c_int = 0x1000; |
| 150 |
pub const MAP_DENYWRITE: c_int = 0x2000; |
| 151 |
pub const MAP_EXECUTABLE: c_int = 0x4000; |
| 152 |
pub const MAP_LOCKED: c_int = 0x8000; |
| 153 |
pub const MAP_POPULATE: c_int = 0x10000; |
| 154 |
pub const MAP_NONBLOCK: c_int = 0x20000; |
| 155 |
pub const MAP_STACK: c_int = 0x40000; |
| 156 |
|
| 157 |
pub const NLDLY: crate::tcflag_t = 0o0000400; |
| 158 |
|
| 159 |
pub const SOCK_STREAM: c_int = 2; |
| 160 |
pub const SOCK_DGRAM: c_int = 1; |
| 161 |
pub const SOCK_SEQPACKET: c_int = 5; |
| 162 |
|
| 163 |
pub const SA_ONSTACK: c_uint = 0x08000000; |
| 164 |
pub const SA_SIGINFO: c_uint = 0x00000008; |
| 165 |
pub const SA_NOCLDWAIT: c_int = 0x00010000; |
| 166 |
|
| 167 |
pub const SIGCHLD: c_int = 18; |
| 168 |
pub const SIGBUS: c_int = 10; |
| 169 |
pub const SIGTTIN: c_int = 26; |
| 170 |
pub const SIGTTOU: c_int = 27; |
| 171 |
pub const SIGXCPU: c_int = 30; |
| 172 |
pub const SIGXFSZ: c_int = 31; |
| 173 |
pub const SIGVTALRM: c_int = 28; |
| 174 |
pub const SIGPROF: c_int = 29; |
| 175 |
pub const SIGWINCH: c_int = 20; |
| 176 |
pub const SIGUSR1: c_int = 16; |
| 177 |
pub const SIGUSR2: c_int = 17; |
| 178 |
pub const SIGCONT: c_int = 25; |
| 179 |
pub const SIGSTOP: c_int = 23; |
| 180 |
pub const SIGTSTP: c_int = 24; |
| 181 |
pub const SIGURG: c_int = 21; |
| 182 |
pub const SIGIO: c_int = 22; |
| 183 |
pub const SIGSYS: c_int = 12; |
| 184 |
pub const SIGPWR: c_int = 19; |
| 185 |
pub const SIG_SETMASK: c_int = 3; |
| 186 |
pub const SIG_BLOCK: c_int = 0x1; |
| 187 |
pub const SIG_UNBLOCK: c_int = 0x2; |
| 188 |
|
| 189 |
pub const POLLWRNORM: c_short = 0x004; |
| 190 |
pub const POLLWRBAND: c_short = 0x100; |
| 191 |
|
| 192 |
pub const PTHREAD_STACK_MIN: size_t = 16384; |
| 193 |
|
| 194 |
pub const VEOF: usize = 16; |
| 195 |
pub const VEOL: usize = 17; |
| 196 |
pub const VEOL2: usize = 6; |
| 197 |
pub const VMIN: usize = 4; |
| 198 |
pub const IEXTEN: crate::tcflag_t = 0x00000100; |
| 199 |
pub const TOSTOP: crate::tcflag_t = 0x00008000; |
| 200 |
pub const FLUSHO: crate::tcflag_t = 0x00002000; |
| 201 |
pub const TCSANOW: c_int = 0x540e; |
| 202 |
pub const TCSADRAIN: c_int = 0x540f; |
| 203 |
pub const TCSAFLUSH: c_int = 0x5410; |
| 204 |
|
| 205 |
pub const CPU_SETSIZE: c_int = 0x400; |
| 206 |
|
| 207 |
pub const EFD_NONBLOCK: c_int = 0x80; |
| 208 |
|
| 209 |
pub const F_GETLK: c_int = 14; |
| 210 |
pub const F_SETLK: c_int = 6; |
| 211 |
pub const F_SETLKW: c_int = 7; |
| 212 |
|
| 213 |
pub const SFD_NONBLOCK: c_int = 0x80; |
| 214 |
|
| 215 |
pub const RTLD_GLOBAL: c_int = 0x4; |
| 216 |
|
| 217 |
pub const SIGSTKSZ: size_t = 8192; |
| 218 |
pub const CBAUD: crate::tcflag_t = 0o0010017; |
| 219 |
pub const CBAUDEX: crate::tcflag_t = 0o0010000; |
| 220 |
pub const CIBAUD: crate::tcflag_t = 0o002003600000; |
| 221 |
pub const TAB1: crate::tcflag_t = 0x00000800; |
| 222 |
pub const TAB2: crate::tcflag_t = 0x00001000; |
| 223 |
pub const TAB3: crate::tcflag_t = 0x00001800; |
| 224 |
pub const TABDLY: crate::tcflag_t = 0o0014000; |
| 225 |
pub const CR1: crate::tcflag_t = 0x00000200; |
| 226 |
pub const CR2: crate::tcflag_t = 0x00000400; |
| 227 |
pub const CR3: crate::tcflag_t = 0x00000600; |
| 228 |
pub const FF1: crate::tcflag_t = 0x00008000; |
| 229 |
pub const BS1: crate::tcflag_t = 0x00002000; |
| 230 |
pub const BSDLY: crate::tcflag_t = 0o0020000; |
| 231 |
pub const VT1: crate::tcflag_t = 0x00004000; |
| 232 |
pub const VWERASE: usize = 14; |
| 233 |
pub const XTABS: crate::tcflag_t = 0o0014000; |
| 234 |
pub const VREPRINT: usize = 12; |
| 235 |
pub const VSUSP: usize = 10; |
| 236 |
pub const VSWTC: usize = 7; |
| 237 |
pub const VTDLY: c_int = 0o0040000; |
| 238 |
pub const VSTART: usize = 8; |
| 239 |
pub const VSTOP: usize = 9; |
| 240 |
pub const VDISCARD: usize = 13; |
| 241 |
pub const VTIME: usize = 5; |
| 242 |
pub const IXON: crate::tcflag_t = 0x00000400; |
| 243 |
pub const IXOFF: crate::tcflag_t = 0x00001000; |
| 244 |
pub const OLCUC: crate::tcflag_t = 0o0000002; |
| 245 |
pub const ONLCR: crate::tcflag_t = 0x4; |
| 246 |
pub const CSIZE: crate::tcflag_t = 0x00000030; |
| 247 |
pub const CS6: crate::tcflag_t = 0x00000010; |
| 248 |
pub const CS7: crate::tcflag_t = 0x00000020; |
| 249 |
pub const CS8: crate::tcflag_t = 0x00000030; |
| 250 |
pub const CSTOPB: crate::tcflag_t = 0x00000040; |
| 251 |
pub const CRDLY: c_int = 0o0003000; |
| 252 |
pub const CREAD: crate::tcflag_t = 0x00000080; |
| 253 |
pub const PARENB: crate::tcflag_t = 0x00000100; |
| 254 |
pub const PARODD: crate::tcflag_t = 0x00000200; |
| 255 |
pub const HUPCL: crate::tcflag_t = 0x00000400; |
| 256 |
pub const CLOCAL: crate::tcflag_t = 0x00000800; |
| 257 |
pub const ECHOKE: crate::tcflag_t = 0x00000800; |
| 258 |
pub const ECHOE: crate::tcflag_t = 0x00000010; |
| 259 |
pub const ECHOK: crate::tcflag_t = 0x00000020; |
| 260 |
pub const ECHONL: crate::tcflag_t = 0x00000040; |
| 261 |
pub const ECHOPRT: crate::tcflag_t = 0x00000400; |
| 262 |
pub const ECHOCTL: crate::tcflag_t = 0x00000200; |
| 263 |
pub const ISIG: crate::tcflag_t = 0x00000001; |
| 264 |
pub const ICANON: crate::tcflag_t = 0x00000002; |
| 265 |
pub const PENDIN: crate::tcflag_t = 0x00004000; |
| 266 |
pub const NOFLSH: crate::tcflag_t = 0x00000080; |
| 267 |
|
| 268 |
pub const MAP_HUGETLB: c_int = 0x80000; |
| 269 |
|
| 270 |
pub const B0: crate::speed_t = 0o000000; |
| 271 |
pub const B50: crate::speed_t = 0o000001; |
| 272 |
pub const B75: crate::speed_t = 0o000002; |
| 273 |
pub const B110: crate::speed_t = 0o000003; |
| 274 |
pub const B134: crate::speed_t = 0o000004; |
| 275 |
pub const B150: crate::speed_t = 0o000005; |
| 276 |
pub const B200: crate::speed_t = 0o000006; |
| 277 |
pub const B300: crate::speed_t = 0o000007; |
| 278 |
pub const B600: crate::speed_t = 0o000010; |
| 279 |
pub const B1200: crate::speed_t = 0o000011; |
| 280 |
pub const B1800: crate::speed_t = 0o000012; |
| 281 |
pub const B2400: crate::speed_t = 0o000013; |
| 282 |
pub const B4800: crate::speed_t = 0o000014; |
| 283 |
pub const B9600: crate::speed_t = 0o000015; |
| 284 |
pub const B19200: crate::speed_t = 0o000016; |
| 285 |
pub const B38400: crate::speed_t = 0o000017; |
| 286 |
pub const B57600: crate::speed_t = 0o010001; |
| 287 |
pub const B115200: crate::speed_t = 0o010002; |
| 288 |
pub const B230400: crate::speed_t = 0o010003; |
| 289 |
pub const B460800: crate::speed_t = 0o010004; |
| 290 |
pub const B500000: crate::speed_t = 0o010005; |
| 291 |
pub const B576000: crate::speed_t = 0o010006; |
| 292 |
pub const B921600: crate::speed_t = 0o010007; |
| 293 |
pub const B1000000: crate::speed_t = 0o010010; |
| 294 |
pub const B1152000: crate::speed_t = 0o010011; |
| 295 |
pub const B1500000: crate::speed_t = 0o010012; |
| 296 |
pub const B2000000: crate::speed_t = 0o010013; |
| 297 |
pub const B2500000: crate::speed_t = 0o010014; |
| 298 |
pub const B3000000: crate::speed_t = 0o010015; |
| 299 |
pub const B3500000: crate::speed_t = 0o010016; |
| 300 |
pub const B4000000: crate::speed_t = 0o010017; |
| 301 |
|
| 302 |
cfg_if! { |
| 303 |
if #[cfg(target_arch = "mips")] { |
| 304 |
mod mips32; |
| 305 |
pub use self::mips32::*; |
| 306 |
} else if #[cfg(target_arch = "mips64")] { |
| 307 |
mod mips64; |
| 308 |
pub use self::mips64::*; |
| 309 |
} else { |
| 310 |
// Unknown target_arch |
| 311 |
} |
| 312 |
} |