]> git.proxmox.com Git - rustc.git/blob - vendor/libc/src/unix/notbsd/linux/s390x.rs
New upstream version 1.32.0~beta.2+dfsg1
[rustc.git] / vendor / libc / src / unix / notbsd / linux / s390x.rs
1 use pthread_mutex_t;
2
3 pub type blkcnt_t = i64;
4 pub type blksize_t = i64;
5 pub type c_char = u8;
6 pub type c_long = i64;
7 pub type c_ulong = u64;
8 pub type fsblkcnt_t = u64;
9 pub type fsfilcnt_t = u64;
10 pub type ino_t = u64;
11 pub type nlink_t = u64;
12 pub type off_t = i64;
13 pub type rlim_t = u64;
14 pub type suseconds_t = i64;
15 pub type time_t = i64;
16 pub type wchar_t = i32;
17 pub type greg_t = u64;
18 pub type clock_t = i64;
19 pub type shmatt_t = ::c_ulong;
20 pub type msgqnum_t = ::c_ulong;
21 pub type msglen_t = ::c_ulong;
22 pub type __fsword_t = ::c_long;
23 pub type __priority_which_t = ::c_uint;
24 pub type __u64 = u64;
25
26 s! {
27 pub struct aiocb {
28 pub aio_fildes: ::c_int,
29 pub aio_lio_opcode: ::c_int,
30 pub aio_reqprio: ::c_int,
31 pub aio_buf: *mut ::c_void,
32 pub aio_nbytes: ::size_t,
33 pub aio_sigevent: ::sigevent,
34 __next_prio: *mut aiocb,
35 __abs_prio: ::c_int,
36 __policy: ::c_int,
37 __error_code: ::c_int,
38 __return_value: ::ssize_t,
39 pub aio_offset: off_t,
40 #[cfg(target_pointer_width = "32")]
41 __unused1: [::c_char; 4],
42 __glibc_reserved: [::c_char; 32]
43 }
44
45 pub struct stat {
46 pub st_dev: ::dev_t,
47 pub st_ino: ::ino_t,
48 pub st_nlink: ::nlink_t,
49 pub st_mode: ::mode_t,
50 pub st_uid: ::uid_t,
51 pub st_gid: ::gid_t,
52 st_pad0: ::c_int,
53 pub st_rdev: ::dev_t,
54 pub st_size: ::off_t,
55 pub st_atime: ::time_t,
56 pub st_atime_nsec: ::c_long,
57 pub st_mtime: ::time_t,
58 pub st_mtime_nsec: ::c_long,
59 pub st_ctime: ::time_t,
60 pub st_ctime_nsec: ::c_long,
61 pub st_blksize: ::blksize_t,
62 pub st_blocks: ::blkcnt_t,
63 __glibc_reserved: [::c_long; 3],
64 }
65
66 pub struct stat64 {
67 pub st_dev: ::dev_t,
68 pub st_ino: ::ino64_t,
69 pub st_nlink: ::nlink_t,
70 pub st_mode: ::mode_t,
71 pub st_uid: ::uid_t,
72 pub st_gid: ::gid_t,
73 st_pad0: ::c_int,
74 pub st_rdev: ::dev_t,
75 pub st_size: ::off_t,
76 pub st_atime: ::time_t,
77 pub st_atime_nsec: ::c_long,
78 pub st_mtime: ::time_t,
79 pub st_mtime_nsec: ::c_long,
80 pub st_ctime: ::time_t,
81 pub st_ctime_nsec: ::c_long,
82 pub st_blksize: ::blksize_t,
83 pub st_blocks: ::blkcnt64_t,
84 __glibc_reserved: [::c_long; 3],
85 }
86
87 pub struct pthread_attr_t {
88 __size: [::c_ulong; 7]
89 }
90
91 pub struct sigaction {
92 pub sa_sigaction: ::sighandler_t,
93 __glibc_reserved0: ::c_int,
94 pub sa_flags: ::c_int,
95 pub sa_restorer: ::dox::Option<extern fn()>,
96 pub sa_mask: sigset_t,
97 }
98
99 pub struct stack_t {
100 pub ss_sp: *mut ::c_void,
101 pub ss_flags: ::c_int,
102 pub ss_size: ::size_t,
103 }
104
105 pub struct sigset_t {
106 __size: [::c_ulong; 16],
107 }
108
109 pub struct siginfo_t {
110 pub si_signo: ::c_int,
111 pub si_errno: ::c_int,
112 pub si_code: ::c_int,
113 _pad: ::c_int,
114 _pad2: [::c_long; 14],
115 }
116
117 pub struct ipc_perm {
118 pub __key: ::key_t,
119 pub uid: ::uid_t,
120 pub gid: ::gid_t,
121 pub cuid: ::uid_t,
122 pub cgid: ::gid_t,
123 pub mode: ::mode_t,
124 pub __seq: ::c_ushort,
125 __pad1: ::c_ushort,
126 __unused1: ::c_ulong,
127 __unused2: ::c_ulong
128 }
129
130 pub struct shmid_ds {
131 pub shm_perm: ::ipc_perm,
132 pub shm_segsz: ::size_t,
133 pub shm_atime: ::time_t,
134 pub shm_dtime: ::time_t,
135 pub shm_ctime: ::time_t,
136 pub shm_cpid: ::pid_t,
137 pub shm_lpid: ::pid_t,
138 pub shm_nattch: ::shmatt_t,
139 __unused4: ::c_ulong,
140 __unused5: ::c_ulong
141 }
142
143 pub struct statfs {
144 pub f_type: ::c_uint,
145 pub f_bsize: ::c_uint,
146 pub f_blocks: ::fsblkcnt_t,
147 pub f_bfree: ::fsblkcnt_t,
148 pub f_bavail: ::fsblkcnt_t,
149 pub f_files: ::fsfilcnt_t,
150 pub f_ffree: ::fsfilcnt_t,
151 pub f_fsid: ::fsid_t,
152 pub f_namelen: ::c_uint,
153 pub f_frsize: ::c_uint,
154 pub f_flags: ::c_uint,
155 f_spare: [::c_uint; 4],
156 }
157
158 pub struct statvfs {
159 pub f_bsize: ::c_ulong,
160 pub f_frsize: ::c_ulong,
161 pub f_blocks: ::fsblkcnt_t,
162 pub f_bfree: ::fsblkcnt_t,
163 pub f_bavail: ::fsblkcnt_t,
164 pub f_files: ::fsfilcnt_t,
165 pub f_ffree: ::fsfilcnt_t,
166 pub f_favail: ::fsfilcnt_t,
167 pub f_fsid: ::c_ulong,
168 pub f_flag: ::c_ulong,
169 pub f_namemax: ::c_ulong,
170 __f_spare: [::c_int; 6],
171 }
172
173 pub struct msghdr {
174 pub msg_name: *mut ::c_void,
175 pub msg_namelen: ::socklen_t,
176 pub msg_iov: *mut ::iovec,
177 pub msg_iovlen: ::size_t,
178 pub msg_control: *mut ::c_void,
179 pub msg_controllen: ::size_t,
180 pub msg_flags: ::c_int,
181 }
182
183 pub struct cmsghdr {
184 pub cmsg_len: ::size_t,
185 pub cmsg_level: ::c_int,
186 pub cmsg_type: ::c_int,
187 }
188
189 pub struct termios {
190 pub c_iflag: ::tcflag_t,
191 pub c_oflag: ::tcflag_t,
192 pub c_cflag: ::tcflag_t,
193 pub c_lflag: ::tcflag_t,
194 pub c_line: ::cc_t,
195 pub c_cc: [::cc_t; ::NCCS],
196 pub c_ispeed: ::speed_t,
197 pub c_ospeed: ::speed_t,
198 }
199
200 pub struct termios2 {
201 pub c_iflag: ::tcflag_t,
202 pub c_oflag: ::tcflag_t,
203 pub c_cflag: ::tcflag_t,
204 pub c_lflag: ::tcflag_t,
205 pub c_line: ::cc_t,
206 pub c_cc: [::cc_t; 19],
207 pub c_ispeed: ::speed_t,
208 pub c_ospeed: ::speed_t,
209 }
210
211 pub struct sysinfo {
212 pub uptime: ::c_long,
213 pub loads: [::c_ulong; 3],
214 pub totalram: ::c_ulong,
215 pub freeram: ::c_ulong,
216 pub sharedram: ::c_ulong,
217 pub bufferram: ::c_ulong,
218 pub totalswap: ::c_ulong,
219 pub freeswap: ::c_ulong,
220 pub procs: ::c_ushort,
221 pub pad: ::c_ushort,
222 pub totalhigh: ::c_ulong,
223 pub freehigh: ::c_ulong,
224 pub mem_unit: ::c_uint,
225 pub _f: [::c_char; 0],
226 }
227
228 pub struct glob64_t {
229 pub gl_pathc: ::size_t,
230 pub gl_pathv: *mut *mut ::c_char,
231 pub gl_offs: ::size_t,
232 pub gl_flags: ::c_int,
233
234 __unused1: *mut ::c_void,
235 __unused2: *mut ::c_void,
236 __unused3: *mut ::c_void,
237 __unused4: *mut ::c_void,
238 __unused5: *mut ::c_void,
239 }
240
241 pub struct flock {
242 pub l_type: ::c_short,
243 pub l_whence: ::c_short,
244 pub l_start: ::off_t,
245 pub l_len: ::off_t,
246 pub l_pid: ::pid_t,
247 }
248
249 // FIXME this is actually a union
250 #[cfg_attr(all(feature = "align", target_pointer_width = "32"),
251 repr(align(4)))]
252 #[cfg_attr(all(feature = "align", target_pointer_width = "64"),
253 repr(align(8)))]
254 pub struct sem_t {
255 __size: [::c_char; 32],
256 #[cfg(not(feature = "align"))]
257 __align: [::c_long; 0],
258 }
259
260 pub struct __psw_t {
261 pub mask: u64,
262 pub addr: u64,
263 }
264
265 // FIXME: This is actually a union.
266 pub struct fpreg_t {
267 pub d: ::c_double,
268 // f: ::c_float,
269 }
270
271 pub struct fpregset_t {
272 pub fpc: u32,
273 __pad: u32,
274 pub fprs: [fpreg_t; 16],
275 }
276
277 pub struct mcontext_t {
278 pub psw: __psw_t,
279 pub gregs: [u64; 16],
280 pub aregs: [u32; 16],
281 pub fpregs: fpregset_t,
282 }
283
284 pub struct ucontext_t {
285 pub uc_flags: ::c_ulong,
286 pub uc_link: *mut ucontext_t,
287 pub uc_stack: ::stack_t,
288 pub uc_mcontext: mcontext_t,
289 pub uc_sigmask: ::sigset_t,
290 }
291
292 pub struct msqid_ds {
293 pub msg_perm: ::ipc_perm,
294 pub msg_stime: ::time_t,
295 pub msg_rtime: ::time_t,
296 pub msg_ctime: ::time_t,
297 __msg_cbytes: ::c_ulong,
298 pub msg_qnum: ::msgqnum_t,
299 pub msg_qbytes: ::msglen_t,
300 pub msg_lspid: ::pid_t,
301 pub msg_lrpid: ::pid_t,
302 __glibc_reserved4: ::c_ulong,
303 __glibc_reserved5: ::c_ulong,
304 }
305
306 pub struct statfs64 {
307 pub f_type: ::c_uint,
308 pub f_bsize: ::c_uint,
309 pub f_blocks: u64,
310 pub f_bfree: u64,
311 pub f_bavail: u64,
312 pub f_files: u64,
313 pub f_ffree: u64,
314 pub f_fsid: ::fsid_t,
315 pub f_namelen: ::c_uint,
316 pub f_frsize: ::c_uint,
317 pub f_flags: ::c_uint,
318 pub f_spare: [::c_uint; 4],
319 }
320
321 pub struct statvfs64 {
322 pub f_bsize: ::c_ulong,
323 pub f_frsize: ::c_ulong,
324 pub f_blocks: u64,
325 pub f_bfree: u64,
326 pub f_bavail: u64,
327 pub f_files: u64,
328 pub f_ffree: u64,
329 pub f_favail: u64,
330 pub f_fsid: ::c_ulong,
331 pub f_flag: ::c_ulong,
332 pub f_namemax: ::c_ulong,
333 __f_spare: [::c_int; 6],
334 }
335 }
336
337 pub const SFD_CLOEXEC: ::c_int = 0x080000;
338
339 pub const NCCS: usize = 32;
340
341 pub const O_TRUNC: ::c_int = 512;
342 pub const O_LARGEFILE: ::c_int = 0;
343 pub const O_NOATIME: ::c_int = 0o1000000;
344 pub const O_CLOEXEC: ::c_int = 0x80000;
345 pub const O_PATH: ::c_int = 0o10000000;
346 pub const O_TMPFILE: ::c_int = 0o20000000 | O_DIRECTORY;
347
348 pub const EBFONT: ::c_int = 59;
349 pub const ENOSTR: ::c_int = 60;
350 pub const ENODATA: ::c_int = 61;
351 pub const ETIME: ::c_int = 62;
352 pub const ENOSR: ::c_int = 63;
353 pub const ENONET: ::c_int = 64;
354 pub const ENOPKG: ::c_int = 65;
355 pub const EREMOTE: ::c_int = 66;
356 pub const ENOLINK: ::c_int = 67;
357 pub const EADV: ::c_int = 68;
358 pub const ESRMNT: ::c_int = 69;
359 pub const ECOMM: ::c_int = 70;
360 pub const EPROTO: ::c_int = 71;
361 pub const EDOTDOT: ::c_int = 73;
362
363 pub const SA_NODEFER: ::c_int = 0x40000000;
364 pub const SA_RESETHAND: ::c_int = 0x80000000;
365 pub const SA_RESTART: ::c_int = 0x10000000;
366 pub const SA_NOCLDSTOP: ::c_int = 0x00000001;
367
368 pub const EPOLL_CLOEXEC: ::c_int = 0x80000;
369
370 pub const EFD_CLOEXEC: ::c_int = 0x80000;
371
372 pub const POSIX_FADV_DONTNEED: ::c_int = 6;
373 pub const POSIX_FADV_NOREUSE: ::c_int = 7;
374
375 pub const __SIZEOF_PTHREAD_CONDATTR_T: usize = 4;
376 pub const __SIZEOF_PTHREAD_MUTEXATTR_T: usize = 4;
377 pub const __SIZEOF_PTHREAD_MUTEX_T: usize = 40;
378 pub const __SIZEOF_PTHREAD_RWLOCK_T: usize = 56;
379 pub const __SIZEOF_PTHREAD_RWLOCKATTR_T: usize = 8;
380
381 align_const! {
382 pub const PTHREAD_RECURSIVE_MUTEX_INITIALIZER_NP: ::pthread_mutex_t =
383 pthread_mutex_t {
384 size: [
385 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 1, 0,
386 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
387 ],
388 };
389 pub const PTHREAD_ERRORCHECK_MUTEX_INITIALIZER_NP: ::pthread_mutex_t =
390 pthread_mutex_t {
391 size: [
392 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 2, 0,
393 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
394 ],
395 };
396 pub const PTHREAD_ADAPTIVE_MUTEX_INITIALIZER_NP: ::pthread_mutex_t =
397 pthread_mutex_t {
398 size: [
399 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 3, 0,
400 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
401 ],
402 };
403 }
404
405 pub const EADDRINUSE: ::c_int = 98;
406 pub const EADDRNOTAVAIL: ::c_int = 99;
407 pub const ECONNABORTED: ::c_int = 103;
408 pub const ECONNREFUSED: ::c_int = 111;
409 pub const ECONNRESET: ::c_int = 104;
410 pub const EDEADLK: ::c_int = 35;
411 pub const ENOSYS: ::c_int = 38;
412 pub const ENOTCONN: ::c_int = 107;
413 pub const ETIMEDOUT: ::c_int = 110;
414 pub const FIOCLEX: ::c_ulong = 0x5451;
415 pub const FIONBIO: ::c_ulong = 0x5421;
416 pub const MAP_ANON: ::c_int = 0x20;
417 pub const O_ACCMODE: ::c_int = 3;
418 pub const O_APPEND: ::c_int = 1024;
419 pub const O_CREAT: ::c_int = 64;
420 pub const O_EXCL: ::c_int = 128;
421 pub const O_NONBLOCK: ::c_int = 2048;
422 pub const PTHREAD_STACK_MIN: ::size_t = 16384;
423 pub const PTHREAD_MUTEX_ADAPTIVE_NP: ::c_int = 3;
424 pub const RLIM_INFINITY: ::rlim_t = 0xffffffffffffffff;
425 pub const SA_NOCLDWAIT: ::c_int = 2;
426 pub const SA_ONSTACK: ::c_int = 0x08000000;
427 pub const SA_SIGINFO: ::c_int = 4;
428 pub const SIGBUS: ::c_int = 7;
429 pub const SIGSTKSZ: ::size_t = 0x2000;
430 pub const MINSIGSTKSZ: ::size_t = 2048;
431 pub const SIG_SETMASK: ::c_int = 2;
432 pub const SOCK_DGRAM: ::c_int = 2;
433 pub const SOCK_STREAM: ::c_int = 1;
434 pub const SOL_SOCKET: ::c_int = 1;
435 pub const SO_BROADCAST: ::c_int = 6;
436 pub const SO_ERROR: ::c_int = 4;
437 pub const SO_RCVTIMEO: ::c_int = 20;
438 pub const SO_REUSEADDR: ::c_int = 2;
439 pub const SO_SNDTIMEO: ::c_int = 21;
440 pub const SO_BINDTODEVICE: ::c_int = 25;
441 pub const SO_TIMESTAMP: ::c_int = 29;
442 pub const SO_MARK: ::c_int = 36;
443 pub const SO_PROTOCOL: ::c_int = 38;
444 pub const SO_DOMAIN: ::c_int = 39;
445 pub const SO_RXQ_OVFL: ::c_int = 40;
446 pub const SO_PEEK_OFF: ::c_int = 42;
447 pub const SO_BUSY_POLL: ::c_int = 46;
448
449 pub const RLIMIT_RSS: ::c_int = 5;
450 pub const RLIMIT_NOFILE: ::c_int = 7;
451 pub const RLIMIT_AS: ::c_int = 9;
452 pub const RLIMIT_NPROC: ::c_int = 6;
453 pub const RLIMIT_MEMLOCK: ::c_int = 8;
454 pub const RLIMIT_RTTIME: ::c_int = 15;
455 pub const RLIMIT_NLIMITS: ::c_int = 16;
456
457 pub const O_NOCTTY: ::c_int = 256;
458 pub const O_SYNC: ::c_int = 1052672;
459 pub const O_RSYNC: ::c_int = 1052672;
460 pub const O_DSYNC: ::c_int = 4096;
461 pub const O_FSYNC: ::c_int = 0x101000;
462 pub const O_DIRECT: ::c_int = 0x4000;
463 pub const O_DIRECTORY: ::c_int = 0x10000;
464 pub const O_NOFOLLOW: ::c_int = 0x20000;
465
466 pub const SOCK_NONBLOCK: ::c_int = O_NONBLOCK;
467
468 pub const LC_PAPER: ::c_int = 7;
469 pub const LC_NAME: ::c_int = 8;
470 pub const LC_ADDRESS: ::c_int = 9;
471 pub const LC_TELEPHONE: ::c_int = 10;
472 pub const LC_MEASUREMENT: ::c_int = 11;
473 pub const LC_IDENTIFICATION: ::c_int = 12;
474 pub const LC_PAPER_MASK: ::c_int = (1 << LC_PAPER);
475 pub const LC_NAME_MASK: ::c_int = (1 << LC_NAME);
476 pub const LC_ADDRESS_MASK: ::c_int = (1 << LC_ADDRESS);
477 pub const LC_TELEPHONE_MASK: ::c_int = (1 << LC_TELEPHONE);
478 pub const LC_MEASUREMENT_MASK: ::c_int = (1 << LC_MEASUREMENT);
479 pub const LC_IDENTIFICATION_MASK: ::c_int = (1 << LC_IDENTIFICATION);
480 pub const LC_ALL_MASK: ::c_int = ::LC_CTYPE_MASK
481 | ::LC_NUMERIC_MASK
482 | ::LC_TIME_MASK
483 | ::LC_COLLATE_MASK
484 | ::LC_MONETARY_MASK
485 | ::LC_MESSAGES_MASK
486 | LC_PAPER_MASK
487 | LC_NAME_MASK
488 | LC_ADDRESS_MASK
489 | LC_TELEPHONE_MASK
490 | LC_MEASUREMENT_MASK
491 | LC_IDENTIFICATION_MASK;
492
493 pub const MAP_ANONYMOUS: ::c_int = 0x0020;
494 pub const MAP_GROWSDOWN: ::c_int = 0x0100;
495 pub const MAP_DENYWRITE: ::c_int = 0x0800;
496 pub const MAP_EXECUTABLE: ::c_int = 0x01000;
497 pub const MAP_LOCKED: ::c_int = 0x02000;
498 pub const MAP_NORESERVE: ::c_int = 0x04000;
499 pub const MAP_POPULATE: ::c_int = 0x08000;
500 pub const MAP_NONBLOCK: ::c_int = 0x010000;
501 pub const MAP_STACK: ::c_int = 0x020000;
502
503 pub const EDEADLOCK: ::c_int = 35;
504 pub const ENAMETOOLONG: ::c_int = 36;
505 pub const ENOLCK: ::c_int = 37;
506 pub const ENOTEMPTY: ::c_int = 39;
507 pub const ELOOP: ::c_int = 40;
508 pub const ENOMSG: ::c_int = 42;
509 pub const EIDRM: ::c_int = 43;
510 pub const ECHRNG: ::c_int = 44;
511 pub const EL2NSYNC: ::c_int = 45;
512 pub const EL3HLT: ::c_int = 46;
513 pub const EL3RST: ::c_int = 47;
514 pub const ELNRNG: ::c_int = 48;
515 pub const EUNATCH: ::c_int = 49;
516 pub const ENOCSI: ::c_int = 50;
517 pub const EL2HLT: ::c_int = 51;
518 pub const EBADE: ::c_int = 52;
519 pub const EBADR: ::c_int = 53;
520 pub const EXFULL: ::c_int = 54;
521 pub const ENOANO: ::c_int = 55;
522 pub const EBADRQC: ::c_int = 56;
523 pub const EBADSLT: ::c_int = 57;
524 pub const EMULTIHOP: ::c_int = 72;
525 pub const EOVERFLOW: ::c_int = 75;
526 pub const ENOTUNIQ: ::c_int = 76;
527 pub const EBADFD: ::c_int = 77;
528 pub const EBADMSG: ::c_int = 74;
529 pub const EREMCHG: ::c_int = 78;
530 pub const ELIBACC: ::c_int = 79;
531 pub const ELIBBAD: ::c_int = 80;
532 pub const ELIBSCN: ::c_int = 81;
533 pub const ELIBMAX: ::c_int = 82;
534 pub const ELIBEXEC: ::c_int = 83;
535 pub const EILSEQ: ::c_int = 84;
536 pub const ERESTART: ::c_int = 85;
537 pub const ESTRPIPE: ::c_int = 86;
538 pub const EUSERS: ::c_int = 87;
539 pub const ENOTSOCK: ::c_int = 88;
540 pub const EDESTADDRREQ: ::c_int = 89;
541 pub const EMSGSIZE: ::c_int = 90;
542 pub const EPROTOTYPE: ::c_int = 91;
543 pub const ENOPROTOOPT: ::c_int = 92;
544 pub const EPROTONOSUPPORT: ::c_int = 93;
545 pub const ESOCKTNOSUPPORT: ::c_int = 94;
546 pub const EOPNOTSUPP: ::c_int = 95;
547 pub const ENOTSUP: ::c_int = EOPNOTSUPP;
548 pub const EPFNOSUPPORT: ::c_int = 96;
549 pub const EAFNOSUPPORT: ::c_int = 97;
550 pub const ENETDOWN: ::c_int = 100;
551 pub const ENETUNREACH: ::c_int = 101;
552 pub const ENETRESET: ::c_int = 102;
553 pub const ENOBUFS: ::c_int = 105;
554 pub const EISCONN: ::c_int = 106;
555 pub const ESHUTDOWN: ::c_int = 108;
556 pub const ETOOMANYREFS: ::c_int = 109;
557 pub const EHOSTDOWN: ::c_int = 112;
558 pub const EHOSTUNREACH: ::c_int = 113;
559 pub const EALREADY: ::c_int = 114;
560 pub const EINPROGRESS: ::c_int = 115;
561 pub const ESTALE: ::c_int = 116;
562 pub const EUCLEAN: ::c_int = 117;
563 pub const ENOTNAM: ::c_int = 118;
564 pub const ENAVAIL: ::c_int = 119;
565 pub const EISNAM: ::c_int = 120;
566 pub const EREMOTEIO: ::c_int = 121;
567 pub const EDQUOT: ::c_int = 122;
568 pub const ENOMEDIUM: ::c_int = 123;
569 pub const EMEDIUMTYPE: ::c_int = 124;
570 pub const ECANCELED: ::c_int = 125;
571 pub const ENOKEY: ::c_int = 126;
572 pub const EKEYEXPIRED: ::c_int = 127;
573 pub const EKEYREVOKED: ::c_int = 128;
574 pub const EKEYREJECTED: ::c_int = 129;
575 pub const EOWNERDEAD: ::c_int = 130;
576 pub const ENOTRECOVERABLE: ::c_int = 131;
577 pub const EHWPOISON: ::c_int = 133;
578 pub const ERFKILL: ::c_int = 132;
579
580 pub const SOCK_SEQPACKET: ::c_int = 5;
581
582 pub const SO_TYPE: ::c_int = 3;
583 pub const SO_DONTROUTE: ::c_int = 5;
584 pub const SO_SNDBUF: ::c_int = 7;
585 pub const SO_RCVBUF: ::c_int = 8;
586 pub const SO_KEEPALIVE: ::c_int = 9;
587 pub const SO_OOBINLINE: ::c_int = 10;
588 pub const SO_PRIORITY: ::c_int = 12;
589 pub const SO_LINGER: ::c_int = 13;
590 pub const SO_BSDCOMPAT: ::c_int = 14;
591 pub const SO_REUSEPORT: ::c_int = 15;
592 pub const SO_PASSCRED: ::c_int = 16;
593 pub const SO_PEERCRED: ::c_int = 17;
594 pub const SO_RCVLOWAT: ::c_int = 18;
595 pub const SO_SNDLOWAT: ::c_int = 19;
596 pub const SO_ACCEPTCONN: ::c_int = 30;
597 pub const SO_SNDBUFFORCE: ::c_int = 32;
598 pub const SO_RCVBUFFORCE: ::c_int = 33;
599
600 pub const TCP_COOKIE_TRANSACTIONS: ::c_int = 15;
601 pub const TCP_THIN_LINEAR_TIMEOUTS: ::c_int = 16;
602 pub const TCP_THIN_DUPACK: ::c_int = 17;
603 pub const TCP_USER_TIMEOUT: ::c_int = 18;
604 pub const TCP_REPAIR: ::c_int = 19;
605 pub const TCP_REPAIR_QUEUE: ::c_int = 20;
606 pub const TCP_QUEUE_SEQ: ::c_int = 21;
607 pub const TCP_REPAIR_OPTIONS: ::c_int = 22;
608 pub const TCP_FASTOPEN: ::c_int = 23;
609 pub const TCP_TIMESTAMP: ::c_int = 24;
610
611 pub const SIGCHLD: ::c_int = 17;
612 pub const SIGUSR1: ::c_int = 10;
613 pub const SIGUSR2: ::c_int = 12;
614 pub const SIGCONT: ::c_int = 18;
615 pub const SIGSTOP: ::c_int = 19;
616 pub const SIGTSTP: ::c_int = 20;
617 pub const SIGURG: ::c_int = 23;
618 pub const SIGIO: ::c_int = 29;
619 pub const SIGSYS: ::c_int = 31;
620 pub const SIGSTKFLT: ::c_int = 16;
621 pub const SIGUNUSED: ::c_int = 31;
622 pub const SIGTTIN: ::c_int = 21;
623 pub const SIGTTOU: ::c_int = 22;
624 pub const SIGXCPU: ::c_int = 24;
625 pub const SIGXFSZ: ::c_int = 25;
626 pub const SIGVTALRM: ::c_int = 26;
627 pub const SIGPROF: ::c_int = 27;
628 pub const SIGWINCH: ::c_int = 28;
629 pub const SIGPOLL: ::c_int = 29;
630 pub const SIGPWR: ::c_int = 30;
631 pub const SIG_BLOCK: ::c_int = 0x000000;
632 pub const SIG_UNBLOCK: ::c_int = 0x01;
633
634 pub const BUFSIZ: ::c_uint = 8192;
635 pub const TMP_MAX: ::c_uint = 238328;
636 pub const FOPEN_MAX: ::c_uint = 16;
637 pub const POSIX_MADV_DONTNEED: ::c_int = 4;
638 pub const _SC_EQUIV_CLASS_MAX: ::c_int = 41;
639 pub const _SC_CHARCLASS_NAME_MAX: ::c_int = 45;
640 pub const _SC_PII: ::c_int = 53;
641 pub const _SC_PII_XTI: ::c_int = 54;
642 pub const _SC_PII_SOCKET: ::c_int = 55;
643 pub const _SC_PII_INTERNET: ::c_int = 56;
644 pub const _SC_PII_OSI: ::c_int = 57;
645 pub const _SC_POLL: ::c_int = 58;
646 pub const _SC_SELECT: ::c_int = 59;
647 pub const _SC_PII_INTERNET_STREAM: ::c_int = 61;
648 pub const _SC_PII_INTERNET_DGRAM: ::c_int = 62;
649 pub const _SC_PII_OSI_COTS: ::c_int = 63;
650 pub const _SC_PII_OSI_CLTS: ::c_int = 64;
651 pub const _SC_PII_OSI_M: ::c_int = 65;
652 pub const _SC_T_IOV_MAX: ::c_int = 66;
653 pub const _SC_2_C_VERSION: ::c_int = 96;
654 pub const _SC_CHAR_BIT: ::c_int = 101;
655 pub const _SC_CHAR_MAX: ::c_int = 102;
656 pub const _SC_CHAR_MIN: ::c_int = 103;
657 pub const _SC_INT_MAX: ::c_int = 104;
658 pub const _SC_INT_MIN: ::c_int = 105;
659 pub const _SC_LONG_BIT: ::c_int = 106;
660 pub const _SC_WORD_BIT: ::c_int = 107;
661 pub const _SC_MB_LEN_MAX: ::c_int = 108;
662 pub const _SC_SSIZE_MAX: ::c_int = 110;
663 pub const _SC_SCHAR_MAX: ::c_int = 111;
664 pub const _SC_SCHAR_MIN: ::c_int = 112;
665 pub const _SC_SHRT_MAX: ::c_int = 113;
666 pub const _SC_SHRT_MIN: ::c_int = 114;
667 pub const _SC_UCHAR_MAX: ::c_int = 115;
668 pub const _SC_UINT_MAX: ::c_int = 116;
669 pub const _SC_ULONG_MAX: ::c_int = 117;
670 pub const _SC_USHRT_MAX: ::c_int = 118;
671 pub const _SC_NL_ARGMAX: ::c_int = 119;
672 pub const _SC_NL_LANGMAX: ::c_int = 120;
673 pub const _SC_NL_MSGMAX: ::c_int = 121;
674 pub const _SC_NL_NMAX: ::c_int = 122;
675 pub const _SC_NL_SETMAX: ::c_int = 123;
676 pub const _SC_NL_TEXTMAX: ::c_int = 124;
677 pub const _SC_BASE: ::c_int = 134;
678 pub const _SC_C_LANG_SUPPORT: ::c_int = 135;
679 pub const _SC_C_LANG_SUPPORT_R: ::c_int = 136;
680 pub const _SC_DEVICE_IO: ::c_int = 140;
681 pub const _SC_DEVICE_SPECIFIC: ::c_int = 141;
682 pub const _SC_DEVICE_SPECIFIC_R: ::c_int = 142;
683 pub const _SC_FD_MGMT: ::c_int = 143;
684 pub const _SC_FIFO: ::c_int = 144;
685 pub const _SC_PIPE: ::c_int = 145;
686 pub const _SC_FILE_ATTRIBUTES: ::c_int = 146;
687 pub const _SC_FILE_LOCKING: ::c_int = 147;
688 pub const _SC_FILE_SYSTEM: ::c_int = 148;
689 pub const _SC_MULTI_PROCESS: ::c_int = 150;
690 pub const _SC_SINGLE_PROCESS: ::c_int = 151;
691 pub const _SC_NETWORKING: ::c_int = 152;
692 pub const _SC_REGEX_VERSION: ::c_int = 156;
693 pub const _SC_SIGNALS: ::c_int = 158;
694 pub const _SC_SYSTEM_DATABASE: ::c_int = 162;
695 pub const _SC_SYSTEM_DATABASE_R: ::c_int = 163;
696 pub const _SC_USER_GROUPS: ::c_int = 166;
697 pub const _SC_USER_GROUPS_R: ::c_int = 167;
698 pub const _SC_LEVEL1_ICACHE_SIZE: ::c_int = 185;
699 pub const _SC_LEVEL1_ICACHE_ASSOC: ::c_int = 186;
700 pub const _SC_LEVEL1_ICACHE_LINESIZE: ::c_int = 187;
701 pub const _SC_LEVEL1_DCACHE_SIZE: ::c_int = 188;
702 pub const _SC_LEVEL1_DCACHE_ASSOC: ::c_int = 189;
703 pub const _SC_LEVEL1_DCACHE_LINESIZE: ::c_int = 190;
704 pub const _SC_LEVEL2_CACHE_SIZE: ::c_int = 191;
705 pub const _SC_LEVEL2_CACHE_ASSOC: ::c_int = 192;
706 pub const _SC_LEVEL2_CACHE_LINESIZE: ::c_int = 193;
707 pub const _SC_LEVEL3_CACHE_SIZE: ::c_int = 194;
708 pub const _SC_LEVEL3_CACHE_ASSOC: ::c_int = 195;
709 pub const _SC_LEVEL3_CACHE_LINESIZE: ::c_int = 196;
710 pub const _SC_LEVEL4_CACHE_SIZE: ::c_int = 197;
711 pub const _SC_LEVEL4_CACHE_ASSOC: ::c_int = 198;
712 pub const _SC_LEVEL4_CACHE_LINESIZE: ::c_int = 199;
713 pub const O_ASYNC: ::c_int = 0x2000;
714 pub const O_NDELAY: ::c_int = 0x800;
715 pub const ST_RELATIME: ::c_ulong = 4096;
716 pub const NI_MAXHOST: ::socklen_t = 1025;
717
718 pub const ADFS_SUPER_MAGIC: ::c_int = 0x0000adf5;
719 pub const AFFS_SUPER_MAGIC: ::c_int = 0x0000adff;
720 pub const CODA_SUPER_MAGIC: ::c_int = 0x73757245;
721 pub const CRAMFS_MAGIC: ::c_int = 0x28cd3d45;
722 pub const EFS_SUPER_MAGIC: ::c_int = 0x00414a53;
723 pub const EXT2_SUPER_MAGIC: ::c_int = 0x0000ef53;
724 pub const EXT3_SUPER_MAGIC: ::c_int = 0x0000ef53;
725 pub const EXT4_SUPER_MAGIC: ::c_int = 0x0000ef53;
726 pub const HPFS_SUPER_MAGIC: ::c_int = 0xf995e849;
727 pub const HUGETLBFS_MAGIC: ::c_int = 0x958458f6;
728 pub const ISOFS_SUPER_MAGIC: ::c_int = 0x00009660;
729 pub const JFFS2_SUPER_MAGIC: ::c_int = 0x000072b6;
730 pub const MINIX_SUPER_MAGIC: ::c_int = 0x0000137f;
731 pub const MINIX_SUPER_MAGIC2: ::c_int = 0x0000138f;
732 pub const MINIX2_SUPER_MAGIC: ::c_int = 0x00002468;
733 pub const MINIX2_SUPER_MAGIC2: ::c_int = 0x00002478;
734 pub const MSDOS_SUPER_MAGIC: ::c_int = 0x00004d44;
735 pub const NCP_SUPER_MAGIC: ::c_int = 0x0000564c;
736 pub const NFS_SUPER_MAGIC: ::c_int = 0x00006969;
737 pub const OPENPROM_SUPER_MAGIC: ::c_int = 0x00009fa1;
738 pub const PROC_SUPER_MAGIC: ::c_int = 0x00009fa0;
739 pub const QNX4_SUPER_MAGIC: ::c_int = 0x0000002f;
740 pub const REISERFS_SUPER_MAGIC: ::c_int = 0x52654973;
741 pub const SMB_SUPER_MAGIC: ::c_int = 0x0000517b;
742 pub const TMPFS_MAGIC: ::c_int = 0x01021994;
743 pub const USBDEVICE_SUPER_MAGIC: ::c_int = 0x00009fa2;
744
745 pub const VEOF: usize = 4;
746 pub const VEOL: usize = 11;
747 pub const VEOL2: usize = 16;
748 pub const VMIN: usize = 6;
749 pub const IEXTEN: ::tcflag_t = 0x00008000;
750 pub const TOSTOP: ::tcflag_t = 0x00000100;
751 pub const FLUSHO: ::tcflag_t = 0x00001000;
752
753 pub const CPU_SETSIZE: ::c_int = 0x400;
754
755 pub const EXTPROC: ::tcflag_t = 0x00010000;
756
757 pub const PTRACE_TRACEME: ::c_uint = 0;
758 pub const PTRACE_PEEKTEXT: ::c_uint = 1;
759 pub const PTRACE_PEEKDATA: ::c_uint = 2;
760 pub const PTRACE_PEEKUSER: ::c_uint = 3;
761 pub const PTRACE_POKETEXT: ::c_uint = 4;
762 pub const PTRACE_POKEDATA: ::c_uint = 5;
763 pub const PTRACE_POKEUSER: ::c_uint = 6;
764 pub const PTRACE_CONT: ::c_uint = 7;
765 pub const PTRACE_KILL: ::c_uint = 8;
766 pub const PTRACE_SINGLESTEP: ::c_uint = 9;
767 pub const PTRACE_GETREGS: ::c_uint = 12;
768 pub const PTRACE_SETREGS: ::c_uint = 13;
769 pub const PTRACE_GETFPREGS: ::c_uint = 14;
770 pub const PTRACE_SETFPREGS: ::c_uint = 15;
771 pub const PTRACE_ATTACH: ::c_uint = 16;
772 pub const PTRACE_DETACH: ::c_uint = 17;
773 pub const PTRACE_SYSCALL: ::c_uint = 24;
774 pub const PTRACE_SETOPTIONS: ::c_uint = 0x4200;
775 pub const PTRACE_GETEVENTMSG: ::c_uint = 0x4201;
776 pub const PTRACE_GETSIGINFO: ::c_uint = 0x4202;
777 pub const PTRACE_SETSIGINFO: ::c_uint = 0x4203;
778 pub const PTRACE_GETREGSET: ::c_uint = 0x4204;
779 pub const PTRACE_SETREGSET: ::c_uint = 0x4205;
780 pub const PTRACE_SEIZE: ::c_uint = 0x4206;
781 pub const PTRACE_INTERRUPT: ::c_uint = 0x4207;
782 pub const PTRACE_LISTEN: ::c_uint = 0x4208;
783 pub const PTRACE_PEEKSIGINFO: ::c_uint = 0x4209;
784
785 pub const MCL_CURRENT: ::c_int = 0x0001;
786 pub const MCL_FUTURE: ::c_int = 0x0002;
787
788 pub const EPOLLWAKEUP: ::c_int = 0x20000000;
789
790 pub const MAP_HUGETLB: ::c_int = 0x040000;
791
792 pub const EFD_NONBLOCK: ::c_int = 0x800;
793
794 pub const F_GETLK: ::c_int = 5;
795 pub const F_GETOWN: ::c_int = 9;
796 pub const F_SETOWN: ::c_int = 8;
797 pub const F_SETLK: ::c_int = 6;
798 pub const F_SETLKW: ::c_int = 7;
799
800 pub const SEEK_DATA: ::c_int = 3;
801 pub const SEEK_HOLE: ::c_int = 4;
802
803 pub const SFD_NONBLOCK: ::c_int = 0x0800;
804
805 pub const TCSANOW: ::c_int = 0;
806 pub const TCSADRAIN: ::c_int = 1;
807 pub const TCSAFLUSH: ::c_int = 2;
808
809 pub const TCGETS: ::c_ulong = 0x5401;
810 pub const TCSETS: ::c_ulong = 0x5402;
811 pub const TCSETSW: ::c_ulong = 0x5403;
812 pub const TCSETSF: ::c_ulong = 0x5404;
813 pub const TCGETA: ::c_ulong = 0x5405;
814 pub const TCSETA: ::c_ulong = 0x5406;
815 pub const TCSETAW: ::c_ulong = 0x5407;
816 pub const TCSETAF: ::c_ulong = 0x5408;
817 pub const TCSBRK: ::c_ulong = 0x5409;
818 pub const TCXONC: ::c_ulong = 0x540A;
819 pub const TCFLSH: ::c_ulong = 0x540B;
820 pub const TIOCGSOFTCAR: ::c_ulong = 0x5419;
821 pub const TIOCSSOFTCAR: ::c_ulong = 0x541A;
822 pub const TIOCINQ: ::c_ulong = 0x541B;
823 pub const TIOCLINUX: ::c_ulong = 0x541C;
824 pub const TIOCGSERIAL: ::c_ulong = 0x541E;
825 pub const TIOCEXCL: ::c_ulong = 0x540C;
826 pub const TIOCNXCL: ::c_ulong = 0x540D;
827 pub const TIOCSCTTY: ::c_ulong = 0x540E;
828 pub const TIOCGPGRP: ::c_ulong = 0x540F;
829 pub const TIOCSPGRP: ::c_ulong = 0x5410;
830 pub const TIOCOUTQ: ::c_ulong = 0x5411;
831 pub const TIOCSTI: ::c_ulong = 0x5412;
832 pub const TIOCGWINSZ: ::c_ulong = 0x5413;
833 pub const TIOCSWINSZ: ::c_ulong = 0x5414;
834 pub const TIOCMGET: ::c_ulong = 0x5415;
835 pub const TIOCMBIS: ::c_ulong = 0x5416;
836 pub const TIOCMBIC: ::c_ulong = 0x5417;
837 pub const TIOCMSET: ::c_ulong = 0x5418;
838 pub const FIONREAD: ::c_ulong = 0x541B;
839 pub const TIOCCONS: ::c_ulong = 0x541D;
840
841 pub const RTLD_DEEPBIND: ::c_int = 0x8;
842 pub const RTLD_GLOBAL: ::c_int = 0x100;
843 pub const RTLD_NOLOAD: ::c_int = 0x4;
844
845 pub const LINUX_REBOOT_MAGIC1: ::c_int = 0xfee1dead;
846 pub const LINUX_REBOOT_MAGIC2: ::c_int = 672274793;
847 pub const LINUX_REBOOT_MAGIC2A: ::c_int = 85072278;
848 pub const LINUX_REBOOT_MAGIC2B: ::c_int = 369367448;
849 pub const LINUX_REBOOT_MAGIC2C: ::c_int = 537993216;
850
851 pub const LINUX_REBOOT_CMD_RESTART: ::c_int = 0x01234567;
852 pub const LINUX_REBOOT_CMD_HALT: ::c_int = 0xCDEF0123;
853 pub const LINUX_REBOOT_CMD_CAD_ON: ::c_int = 0x89ABCDEF;
854 pub const LINUX_REBOOT_CMD_CAD_OFF: ::c_int = 0x00000000;
855 pub const LINUX_REBOOT_CMD_POWER_OFF: ::c_int = 0x4321FEDC;
856 pub const LINUX_REBOOT_CMD_RESTART2: ::c_int = 0xA1B2C3D4;
857 pub const LINUX_REBOOT_CMD_SW_SUSPEND: ::c_int = 0xD000FCE2;
858 pub const LINUX_REBOOT_CMD_KEXEC: ::c_int = 0x45584543;
859
860 pub const VTIME: usize = 5;
861 pub const VSWTC: usize = 7;
862 pub const VSTART: usize = 8;
863 pub const VSTOP: usize = 9;
864 pub const VSUSP: usize = 10;
865 pub const VREPRINT: usize = 12;
866 pub const VDISCARD: usize = 13;
867 pub const VWERASE: usize = 14;
868 pub const OLCUC: ::tcflag_t = 0o000002;
869 pub const ONLCR: ::tcflag_t = 0o000004;
870 pub const NLDLY: ::tcflag_t = 0o000400;
871 pub const CRDLY: ::tcflag_t = 0o003000;
872 pub const CR1: ::tcflag_t = 0x00000200;
873 pub const CR2: ::tcflag_t = 0x00000400;
874 pub const CR3: ::tcflag_t = 0x00000600;
875 pub const TABDLY: ::tcflag_t = 0o014000;
876 pub const TAB1: ::tcflag_t = 0x00000800;
877 pub const TAB2: ::tcflag_t = 0x00001000;
878 pub const TAB3: ::tcflag_t = 0x00001800;
879 pub const BSDLY: ::tcflag_t = 0o020000;
880 pub const BS1: ::tcflag_t = 0x00002000;
881 pub const FFDLY: ::tcflag_t = 0o100000;
882 pub const FF1: ::tcflag_t = 0x00008000;
883 pub const VTDLY: ::tcflag_t = 0o040000;
884 pub const VT1: ::tcflag_t = 0x00004000;
885 pub const XTABS: ::tcflag_t = 0o014000;
886
887 pub const TIOCM_LE: ::c_int = 0x001;
888 pub const TIOCM_DTR: ::c_int = 0x002;
889 pub const TIOCM_RTS: ::c_int = 0x004;
890 pub const TIOCM_ST: ::c_int = 0x008;
891 pub const TIOCM_SR: ::c_int = 0x010;
892 pub const TIOCM_CTS: ::c_int = 0x020;
893 pub const TIOCM_CAR: ::c_int = 0x040;
894 pub const TIOCM_RNG: ::c_int = 0x080;
895 pub const TIOCM_DSR: ::c_int = 0x100;
896 pub const TIOCM_CD: ::c_int = TIOCM_CAR;
897 pub const TIOCM_RI: ::c_int = TIOCM_RNG;
898
899 pub const SIGEV_THREAD_ID: ::c_int = 4;
900
901 pub const CBAUD: ::speed_t = 0o010017;
902 pub const B0: ::speed_t = 0o000000;
903 pub const B50: ::speed_t = 0o000001;
904 pub const B75: ::speed_t = 0o000002;
905 pub const B110: ::speed_t = 0o000003;
906 pub const B134: ::speed_t = 0o000004;
907 pub const B150: ::speed_t = 0o000005;
908 pub const B200: ::speed_t = 0o000006;
909 pub const B300: ::speed_t = 0o000007;
910 pub const B600: ::speed_t = 0o000010;
911 pub const B1200: ::speed_t = 0o000011;
912 pub const B1800: ::speed_t = 0o000012;
913 pub const B2400: ::speed_t = 0o000013;
914 pub const B4800: ::speed_t = 0o000014;
915 pub const B9600: ::speed_t = 0o000015;
916 pub const B19200: ::speed_t = 0o000016;
917 pub const B38400: ::speed_t = 0o000017;
918 pub const EXTA: ::speed_t = B19200;
919 pub const EXTB: ::speed_t = B38400;
920 pub const CSIZE: ::tcflag_t = 0o000060;
921 pub const CS6: ::tcflag_t = 0o000020;
922 pub const CS7: ::tcflag_t = 0o000040;
923 pub const CS8: ::tcflag_t = 0o000060;
924 pub const CSTOPB: ::tcflag_t = 0o000100;
925 pub const CREAD: ::tcflag_t = 0o000200;
926 pub const PARENB: ::tcflag_t = 0o000400;
927 pub const PARODD: ::tcflag_t = 0o001000;
928 pub const HUPCL: ::tcflag_t = 0o002000;
929 pub const CLOCAL: ::tcflag_t = 0o004000;
930 pub const CBAUDEX: ::tcflag_t = 0o010000;
931 pub const BOTHER: ::speed_t = 0o010000;
932 pub const B57600: ::speed_t = 0o010001;
933 pub const B115200: ::speed_t = 0o010002;
934 pub const B230400: ::speed_t = 0o010003;
935 pub const B460800: ::speed_t = 0o010004;
936 pub const B500000: ::speed_t = 0o010005;
937 pub const B576000: ::speed_t = 0o010006;
938 pub const B921600: ::speed_t = 0o010007;
939 pub const B1000000: ::speed_t = 0o010010;
940 pub const B1152000: ::speed_t = 0o010011;
941 pub const B1500000: ::speed_t = 0o010012;
942 pub const B2000000: ::speed_t = 0o010013;
943 pub const B2500000: ::speed_t = 0o010014;
944 pub const B3000000: ::speed_t = 0o010015;
945 pub const B3500000: ::speed_t = 0o010016;
946 pub const B4000000: ::speed_t = 0o010017;
947 pub const CIBAUD: ::tcflag_t = 0o02003600000;
948
949 pub const ISIG: ::tcflag_t = 0o000001;
950 pub const ICANON: ::tcflag_t = 0o000002;
951 pub const XCASE: ::tcflag_t = 0o000004;
952 pub const ECHOE: ::tcflag_t = 0o000020;
953 pub const ECHOK: ::tcflag_t = 0o000040;
954 pub const ECHONL: ::tcflag_t = 0o000100;
955 pub const NOFLSH: ::tcflag_t = 0o000200;
956 pub const ECHOCTL: ::tcflag_t = 0o001000;
957 pub const ECHOPRT: ::tcflag_t = 0o002000;
958 pub const ECHOKE: ::tcflag_t = 0o004000;
959 pub const PENDIN: ::tcflag_t = 0o040000;
960
961 pub const POLLWRNORM: ::c_short = 0x100;
962 pub const POLLWRBAND: ::c_short = 0x200;
963
964 pub const IXON: ::tcflag_t = 0o002000;
965 pub const IXOFF: ::tcflag_t = 0o010000;
966
967 pub const SYS_exit: ::c_long = 1;
968 pub const SYS_fork: ::c_long = 2;
969 pub const SYS_read: ::c_long = 3;
970 pub const SYS_write: ::c_long = 4;
971 pub const SYS_open: ::c_long = 5;
972 pub const SYS_close: ::c_long = 6;
973 pub const SYS_restart_syscall: ::c_long = 7;
974 pub const SYS_creat: ::c_long = 8;
975 pub const SYS_link: ::c_long = 9;
976 pub const SYS_unlink: ::c_long = 10;
977 pub const SYS_execve: ::c_long = 11;
978 pub const SYS_chdir: ::c_long = 12;
979 pub const SYS_mknod: ::c_long = 14;
980 pub const SYS_chmod: ::c_long = 15;
981 pub const SYS_lseek: ::c_long = 19;
982 pub const SYS_getpid: ::c_long = 20;
983 pub const SYS_mount: ::c_long = 21;
984 pub const SYS_umount: ::c_long = 22;
985 pub const SYS_ptrace: ::c_long = 26;
986 pub const SYS_alarm: ::c_long = 27;
987 pub const SYS_pause: ::c_long = 29;
988 pub const SYS_utime: ::c_long = 30;
989 pub const SYS_access: ::c_long = 33;
990 pub const SYS_nice: ::c_long = 34;
991 pub const SYS_sync: ::c_long = 36;
992 pub const SYS_kill: ::c_long = 37;
993 pub const SYS_rename: ::c_long = 38;
994 pub const SYS_mkdir: ::c_long = 39;
995 pub const SYS_rmdir: ::c_long = 40;
996 pub const SYS_dup: ::c_long = 41;
997 pub const SYS_pipe: ::c_long = 42;
998 pub const SYS_times: ::c_long = 43;
999 pub const SYS_brk: ::c_long = 45;
1000 pub const SYS_signal: ::c_long = 48;
1001 pub const SYS_acct: ::c_long = 51;
1002 pub const SYS_umount2: ::c_long = 52;
1003 pub const SYS_ioctl: ::c_long = 54;
1004 pub const SYS_fcntl: ::c_long = 55;
1005 pub const SYS_setpgid: ::c_long = 57;
1006 pub const SYS_umask: ::c_long = 60;
1007 pub const SYS_chroot: ::c_long = 61;
1008 pub const SYS_ustat: ::c_long = 62;
1009 pub const SYS_dup2: ::c_long = 63;
1010 pub const SYS_getppid: ::c_long = 64;
1011 pub const SYS_getpgrp: ::c_long = 65;
1012 pub const SYS_setsid: ::c_long = 66;
1013 pub const SYS_sigaction: ::c_long = 67;
1014 pub const SYS_sigsuspend: ::c_long = 72;
1015 pub const SYS_sigpending: ::c_long = 73;
1016 pub const SYS_sethostname: ::c_long = 74;
1017 pub const SYS_setrlimit: ::c_long = 75;
1018 pub const SYS_getrusage: ::c_long = 77;
1019 pub const SYS_gettimeofday: ::c_long = 78;
1020 pub const SYS_settimeofday: ::c_long = 79;
1021 pub const SYS_symlink: ::c_long = 83;
1022 pub const SYS_readlink: ::c_long = 85;
1023 pub const SYS_uselib: ::c_long = 86;
1024 pub const SYS_swapon: ::c_long = 87;
1025 pub const SYS_reboot: ::c_long = 88;
1026 pub const SYS_readdir: ::c_long = 89;
1027 pub const SYS_mmap: ::c_long = 90;
1028 pub const SYS_munmap: ::c_long = 91;
1029 pub const SYS_truncate: ::c_long = 92;
1030 pub const SYS_ftruncate: ::c_long = 93;
1031 pub const SYS_fchmod: ::c_long = 94;
1032 pub const SYS_getpriority: ::c_long = 96;
1033 pub const SYS_setpriority: ::c_long = 97;
1034 pub const SYS_statfs: ::c_long = 99;
1035 pub const SYS_fstatfs: ::c_long = 100;
1036 pub const SYS_socketcall: ::c_long = 102;
1037 pub const SYS_syslog: ::c_long = 103;
1038 pub const SYS_setitimer: ::c_long = 104;
1039 pub const SYS_getitimer: ::c_long = 105;
1040 pub const SYS_stat: ::c_long = 106;
1041 pub const SYS_lstat: ::c_long = 107;
1042 pub const SYS_fstat: ::c_long = 108;
1043 pub const SYS_lookup_dcookie: ::c_long = 110;
1044 pub const SYS_vhangup: ::c_long = 111;
1045 pub const SYS_idle: ::c_long = 112;
1046 pub const SYS_wait4: ::c_long = 114;
1047 pub const SYS_swapoff: ::c_long = 115;
1048 pub const SYS_sysinfo: ::c_long = 116;
1049 pub const SYS_ipc: ::c_long = 117;
1050 pub const SYS_fsync: ::c_long = 118;
1051 pub const SYS_sigreturn: ::c_long = 119;
1052 pub const SYS_clone: ::c_long = 120;
1053 pub const SYS_setdomainname: ::c_long = 121;
1054 pub const SYS_uname: ::c_long = 122;
1055 pub const SYS_adjtimex: ::c_long = 124;
1056 pub const SYS_mprotect: ::c_long = 125;
1057 pub const SYS_sigprocmask: ::c_long = 126;
1058 pub const SYS_create_module: ::c_long = 127;
1059 pub const SYS_init_module: ::c_long = 128;
1060 pub const SYS_delete_module: ::c_long = 129;
1061 pub const SYS_get_kernel_syms: ::c_long = 130;
1062 pub const SYS_quotactl: ::c_long = 131;
1063 pub const SYS_getpgid: ::c_long = 132;
1064 pub const SYS_fchdir: ::c_long = 133;
1065 pub const SYS_bdflush: ::c_long = 134;
1066 pub const SYS_sysfs: ::c_long = 135;
1067 pub const SYS_personality: ::c_long = 136;
1068 pub const SYS_afs_syscall: ::c_long = 137; /* Syscall for Andrew File System */
1069 pub const SYS_getdents: ::c_long = 141;
1070 pub const SYS_flock: ::c_long = 143;
1071 pub const SYS_msync: ::c_long = 144;
1072 pub const SYS_readv: ::c_long = 145;
1073 pub const SYS_writev: ::c_long = 146;
1074 pub const SYS_getsid: ::c_long = 147;
1075 pub const SYS_fdatasync: ::c_long = 148;
1076 pub const SYS__sysctl: ::c_long = 149;
1077 pub const SYS_mlock: ::c_long = 150;
1078 pub const SYS_munlock: ::c_long = 151;
1079 pub const SYS_mlockall: ::c_long = 152;
1080 pub const SYS_munlockall: ::c_long = 153;
1081 pub const SYS_sched_setparam: ::c_long = 154;
1082 pub const SYS_sched_getparam: ::c_long = 155;
1083 pub const SYS_sched_setscheduler: ::c_long = 156;
1084 pub const SYS_sched_getscheduler: ::c_long = 157;
1085 pub const SYS_sched_yield: ::c_long = 158;
1086 pub const SYS_sched_get_priority_max: ::c_long = 159;
1087 pub const SYS_sched_get_priority_min: ::c_long = 160;
1088 pub const SYS_sched_rr_get_interval: ::c_long = 161;
1089 pub const SYS_nanosleep: ::c_long = 162;
1090 pub const SYS_mremap: ::c_long = 163;
1091 pub const SYS_query_module: ::c_long = 167;
1092 pub const SYS_poll: ::c_long = 168;
1093 pub const SYS_nfsservctl: ::c_long = 169;
1094 pub const SYS_prctl: ::c_long = 172;
1095 pub const SYS_rt_sigreturn: ::c_long = 173;
1096 pub const SYS_rt_sigaction: ::c_long = 174;
1097 pub const SYS_rt_sigprocmask: ::c_long = 175;
1098 pub const SYS_rt_sigpending: ::c_long = 176;
1099 pub const SYS_rt_sigtimedwait: ::c_long = 177;
1100 pub const SYS_rt_sigqueueinfo: ::c_long = 178;
1101 pub const SYS_rt_sigsuspend: ::c_long = 179;
1102 pub const SYS_pread64: ::c_long = 180;
1103 pub const SYS_pwrite64: ::c_long = 181;
1104 pub const SYS_getcwd: ::c_long = 183;
1105 pub const SYS_capget: ::c_long = 184;
1106 pub const SYS_capset: ::c_long = 185;
1107 pub const SYS_sigaltstack: ::c_long = 186;
1108 pub const SYS_sendfile: ::c_long = 187;
1109 pub const SYS_getpmsg: ::c_long = 188;
1110 pub const SYS_putpmsg: ::c_long = 189;
1111 pub const SYS_vfork: ::c_long = 190;
1112 pub const SYS_pivot_root: ::c_long = 217;
1113 pub const SYS_mincore: ::c_long = 218;
1114 pub const SYS_madvise: ::c_long = 219;
1115 pub const SYS_getdents64: ::c_long = 220;
1116 pub const SYS_readahead: ::c_long = 222;
1117 pub const SYS_setxattr: ::c_long = 224;
1118 pub const SYS_lsetxattr: ::c_long = 225;
1119 pub const SYS_fsetxattr: ::c_long = 226;
1120 pub const SYS_getxattr: ::c_long = 227;
1121 pub const SYS_lgetxattr: ::c_long = 228;
1122 pub const SYS_fgetxattr: ::c_long = 229;
1123 pub const SYS_listxattr: ::c_long = 230;
1124 pub const SYS_llistxattr: ::c_long = 231;
1125 pub const SYS_flistxattr: ::c_long = 232;
1126 pub const SYS_removexattr: ::c_long = 233;
1127 pub const SYS_lremovexattr: ::c_long = 234;
1128 pub const SYS_fremovexattr: ::c_long = 235;
1129 pub const SYS_gettid: ::c_long = 236;
1130 pub const SYS_tkill: ::c_long = 237;
1131 pub const SYS_futex: ::c_long = 238;
1132 pub const SYS_sched_setaffinity: ::c_long = 239;
1133 pub const SYS_sched_getaffinity: ::c_long = 240;
1134 pub const SYS_tgkill: ::c_long = 241;
1135 pub const SYS_io_setup: ::c_long = 243;
1136 pub const SYS_io_destroy: ::c_long = 244;
1137 pub const SYS_io_getevents: ::c_long = 245;
1138 pub const SYS_io_submit: ::c_long = 246;
1139 pub const SYS_io_cancel: ::c_long = 247;
1140 pub const SYS_exit_group: ::c_long = 248;
1141 pub const SYS_epoll_create: ::c_long = 249;
1142 pub const SYS_epoll_ctl: ::c_long = 250;
1143 pub const SYS_epoll_wait: ::c_long = 251;
1144 pub const SYS_set_tid_address: ::c_long = 252;
1145 pub const SYS_fadvise64: ::c_long = 253;
1146 pub const SYS_timer_create: ::c_long = 254;
1147 pub const SYS_timer_settime: ::c_long = 255;
1148 pub const SYS_timer_gettime: ::c_long = 256;
1149 pub const SYS_timer_getoverrun: ::c_long = 257;
1150 pub const SYS_timer_delete: ::c_long = 258;
1151 pub const SYS_clock_settime: ::c_long = 259;
1152 pub const SYS_clock_gettime: ::c_long = 260;
1153 pub const SYS_clock_getres: ::c_long = 261;
1154 pub const SYS_clock_nanosleep: ::c_long = 262;
1155 pub const SYS_statfs64: ::c_long = 265;
1156 pub const SYS_fstatfs64: ::c_long = 266;
1157 pub const SYS_remap_file_pages: ::c_long = 267;
1158 pub const SYS_mbind: ::c_long = 268;
1159 pub const SYS_get_mempolicy: ::c_long = 269;
1160 pub const SYS_set_mempolicy: ::c_long = 270;
1161 pub const SYS_mq_open: ::c_long = 271;
1162 pub const SYS_mq_unlink: ::c_long = 272;
1163 pub const SYS_mq_timedsend: ::c_long = 273;
1164 pub const SYS_mq_timedreceive: ::c_long = 274;
1165 pub const SYS_mq_notify: ::c_long = 275;
1166 pub const SYS_mq_getsetattr: ::c_long = 276;
1167 pub const SYS_kexec_load: ::c_long = 277;
1168 pub const SYS_add_key: ::c_long = 278;
1169 pub const SYS_request_key: ::c_long = 279;
1170 pub const SYS_keyctl: ::c_long = 280;
1171 pub const SYS_waitid: ::c_long = 281;
1172 pub const SYS_ioprio_set: ::c_long = 282;
1173 pub const SYS_ioprio_get: ::c_long = 283;
1174 pub const SYS_inotify_init: ::c_long = 284;
1175 pub const SYS_inotify_add_watch: ::c_long = 285;
1176 pub const SYS_inotify_rm_watch: ::c_long = 286;
1177 pub const SYS_migrate_pages: ::c_long = 287;
1178 pub const SYS_openat: ::c_long = 288;
1179 pub const SYS_mkdirat: ::c_long = 289;
1180 pub const SYS_mknodat: ::c_long = 290;
1181 pub const SYS_fchownat: ::c_long = 291;
1182 pub const SYS_futimesat: ::c_long = 292;
1183 pub const SYS_unlinkat: ::c_long = 294;
1184 pub const SYS_renameat: ::c_long = 295;
1185 pub const SYS_linkat: ::c_long = 296;
1186 pub const SYS_symlinkat: ::c_long = 297;
1187 pub const SYS_readlinkat: ::c_long = 298;
1188 pub const SYS_fchmodat: ::c_long = 299;
1189 pub const SYS_faccessat: ::c_long = 300;
1190 pub const SYS_pselect6: ::c_long = 301;
1191 pub const SYS_ppoll: ::c_long = 302;
1192 pub const SYS_unshare: ::c_long = 303;
1193 pub const SYS_set_robust_list: ::c_long = 304;
1194 pub const SYS_get_robust_list: ::c_long = 305;
1195 pub const SYS_splice: ::c_long = 306;
1196 pub const SYS_sync_file_range: ::c_long = 307;
1197 pub const SYS_tee: ::c_long = 308;
1198 pub const SYS_vmsplice: ::c_long = 309;
1199 pub const SYS_move_pages: ::c_long = 310;
1200 pub const SYS_getcpu: ::c_long = 311;
1201 pub const SYS_epoll_pwait: ::c_long = 312;
1202 pub const SYS_utimes: ::c_long = 313;
1203 pub const SYS_fallocate: ::c_long = 314;
1204 pub const SYS_utimensat: ::c_long = 315;
1205 pub const SYS_signalfd: ::c_long = 316;
1206 pub const SYS_timerfd: ::c_long = 317;
1207 pub const SYS_eventfd: ::c_long = 318;
1208 pub const SYS_timerfd_create: ::c_long = 319;
1209 pub const SYS_timerfd_settime: ::c_long = 320;
1210 pub const SYS_timerfd_gettime: ::c_long = 321;
1211 pub const SYS_signalfd4: ::c_long = 322;
1212 pub const SYS_eventfd2: ::c_long = 323;
1213 pub const SYS_inotify_init1: ::c_long = 324;
1214 pub const SYS_pipe2: ::c_long = 325;
1215 pub const SYS_dup3: ::c_long = 326;
1216 pub const SYS_epoll_create1: ::c_long = 327;
1217 pub const SYS_preadv: ::c_long = 328;
1218 pub const SYS_pwritev: ::c_long = 329;
1219 pub const SYS_rt_tgsigqueueinfo: ::c_long = 330;
1220 pub const SYS_perf_event_open: ::c_long = 331;
1221 pub const SYS_fanotify_init: ::c_long = 332;
1222 pub const SYS_fanotify_mark: ::c_long = 333;
1223 pub const SYS_prlimit64: ::c_long = 334;
1224 pub const SYS_name_to_handle_at: ::c_long = 335;
1225 pub const SYS_open_by_handle_at: ::c_long = 336;
1226 pub const SYS_clock_adjtime: ::c_long = 337;
1227 pub const SYS_syncfs: ::c_long = 338;
1228 pub const SYS_setns: ::c_long = 339;
1229 pub const SYS_process_vm_readv: ::c_long = 340;
1230 pub const SYS_process_vm_writev: ::c_long = 341;
1231 pub const SYS_s390_runtime_instr: ::c_long = 342;
1232 pub const SYS_kcmp: ::c_long = 343;
1233 pub const SYS_finit_module: ::c_long = 344;
1234 pub const SYS_sched_setattr: ::c_long = 345;
1235 pub const SYS_sched_getattr: ::c_long = 346;
1236 pub const SYS_renameat2: ::c_long = 347;
1237 pub const SYS_seccomp: ::c_long = 348;
1238 pub const SYS_getrandom: ::c_long = 349;
1239 pub const SYS_memfd_create: ::c_long = 350;
1240 pub const SYS_bpf: ::c_long = 351;
1241 pub const SYS_s390_pci_mmio_write: ::c_long = 352;
1242 pub const SYS_s390_pci_mmio_read: ::c_long = 353;
1243 pub const SYS_execveat: ::c_long = 354;
1244 pub const SYS_userfaultfd: ::c_long = 355;
1245 pub const SYS_membarrier: ::c_long = 356;
1246 pub const SYS_recvmmsg: ::c_long = 357;
1247 pub const SYS_sendmmsg: ::c_long = 358;
1248 pub const SYS_socket: ::c_long = 359;
1249 pub const SYS_socketpair: ::c_long = 360;
1250 pub const SYS_bind: ::c_long = 361;
1251 pub const SYS_connect: ::c_long = 362;
1252 pub const SYS_listen: ::c_long = 363;
1253 pub const SYS_accept4: ::c_long = 364;
1254 pub const SYS_getsockopt: ::c_long = 365;
1255 pub const SYS_setsockopt: ::c_long = 366;
1256 pub const SYS_getsockname: ::c_long = 367;
1257 pub const SYS_getpeername: ::c_long = 368;
1258 pub const SYS_sendto: ::c_long = 369;
1259 pub const SYS_sendmsg: ::c_long = 370;
1260 pub const SYS_recvfrom: ::c_long = 371;
1261 pub const SYS_recvmsg: ::c_long = 372;
1262 pub const SYS_shutdown: ::c_long = 373;
1263 pub const SYS_mlock2: ::c_long = 374;
1264 pub const SYS_copy_file_range: ::c_long = 375;
1265 pub const SYS_preadv2: ::c_long = 376;
1266 pub const SYS_pwritev2: ::c_long = 377;
1267 pub const SYS_lchown: ::c_long = 198;
1268 pub const SYS_setuid: ::c_long = 213;
1269 pub const SYS_getuid: ::c_long = 199;
1270 pub const SYS_setgid: ::c_long = 214;
1271 pub const SYS_getgid: ::c_long = 200;
1272 pub const SYS_geteuid: ::c_long = 201;
1273 pub const SYS_setreuid: ::c_long = 203;
1274 pub const SYS_setregid: ::c_long = 204;
1275 pub const SYS_getrlimit: ::c_long = 191;
1276 pub const SYS_getgroups: ::c_long = 205;
1277 pub const SYS_fchown: ::c_long = 207;
1278 pub const SYS_setresuid: ::c_long = 208;
1279 pub const SYS_setresgid: ::c_long = 210;
1280 pub const SYS_getresgid: ::c_long = 211;
1281 pub const SYS_select: ::c_long = 142;
1282 pub const SYS_getegid: ::c_long = 202;
1283 pub const SYS_setgroups: ::c_long = 206;
1284 pub const SYS_getresuid: ::c_long = 209;
1285 pub const SYS_chown: ::c_long = 212;
1286 pub const SYS_setfsuid: ::c_long = 215;
1287 pub const SYS_setfsgid: ::c_long = 216;
1288 pub const SYS_newfstatat: ::c_long = 293;
1289
1290 #[link(name = "util")]
1291 extern {
1292 pub fn sysctl(name: *mut ::c_int,
1293 namelen: ::c_int,
1294 oldp: *mut ::c_void,
1295 oldlenp: *mut ::size_t,
1296 newp: *mut ::c_void,
1297 newlen: ::size_t)
1298 -> ::c_int;
1299 pub fn ioctl(fd: ::c_int, request: ::c_ulong, ...) -> ::c_int;
1300 pub fn backtrace(buf: *mut *mut ::c_void,
1301 sz: ::c_int) -> ::c_int;
1302 pub fn glob64(pattern: *const ::c_char,
1303 flags: ::c_int,
1304 errfunc: ::dox::Option<extern fn(epath: *const ::c_char,
1305 errno: ::c_int)
1306 -> ::c_int>,
1307 pglob: *mut glob64_t) -> ::c_int;
1308 pub fn globfree64(pglob: *mut glob64_t);
1309 pub fn ptrace(request: ::c_uint, ...) -> ::c_long;
1310 pub fn pthread_attr_getaffinity_np(attr: *const ::pthread_attr_t,
1311 cpusetsize: ::size_t,
1312 cpuset: *mut ::cpu_set_t) -> ::c_int;
1313 pub fn pthread_attr_setaffinity_np(attr: *mut ::pthread_attr_t,
1314 cpusetsize: ::size_t,
1315 cpuset: *const ::cpu_set_t) -> ::c_int;
1316 pub fn getpriority(which: ::__priority_which_t, who: ::id_t) -> ::c_int;
1317 pub fn setpriority(which: ::__priority_which_t, who: ::id_t,
1318 prio: ::c_int) -> ::c_int;
1319 pub fn pthread_getaffinity_np(thread: ::pthread_t,
1320 cpusetsize: ::size_t,
1321 cpuset: *mut ::cpu_set_t) -> ::c_int;
1322 pub fn pthread_setaffinity_np(thread: ::pthread_t,
1323 cpusetsize: ::size_t,
1324 cpuset: *const ::cpu_set_t) -> ::c_int;
1325 pub fn sched_getcpu() -> ::c_int;
1326 pub fn getcontext(ucp: *mut ucontext_t) -> ::c_int;
1327 pub fn setcontext(ucp: *const ucontext_t) -> ::c_int;
1328 pub fn makecontext(ucp: *mut ucontext_t,
1329 func: extern fn (),
1330 argc: ::c_int, ...);
1331 pub fn swapcontext(uocp: *mut ucontext_t,
1332 ucp: *const ucontext_t) -> ::c_int;
1333 }