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