]> git.proxmox.com Git - rustc.git/blob - src/vendor/libc/src/unix/notbsd/linux/s390x.rs
New upstream version 1.15.0+dfsg1
[rustc.git] / src / vendor / libc / src / unix / notbsd / linux / s390x.rs
1 pub type blkcnt_t = i64;
2 pub type blksize_t = i64;
3 pub type c_char = u8;
4 pub type c_long = i64;
5 pub type c_ulong = u64;
6 pub type fsblkcnt_t = u64;
7 pub type fsfilcnt_t = u64;
8 pub type ino_t = u64;
9 pub type nlink_t = u64;
10 pub type off_t = i64;
11 pub type rlim_t = u64;
12 pub type suseconds_t = i64;
13 pub type time_t = i64;
14 pub type wchar_t = i32;
15 pub type greg_t = u64;
16 pub type clock_t = i64;
17 pub type __fsword_t = ::c_long;
18 pub type __priority_which_t = ::c_uint;
19
20 s! {
21 pub struct stat {
22 pub st_dev: ::dev_t,
23 pub st_ino: ::ino_t,
24 pub st_nlink: ::nlink_t,
25 pub st_mode: ::mode_t,
26 pub st_uid: ::uid_t,
27 pub st_gid: ::gid_t,
28 st_pad0: ::c_int,
29 pub st_rdev: ::dev_t,
30 pub st_size: ::off_t,
31 pub st_atime: ::time_t,
32 pub st_atime_nsec: ::c_long,
33 pub st_mtime: ::time_t,
34 pub st_mtime_nsec: ::c_long,
35 pub st_ctime: ::time_t,
36 pub st_ctime_nsec: ::c_long,
37 pub st_blksize: ::blksize_t,
38 pub st_blocks: ::blkcnt_t,
39 __glibc_reserved: [::c_long; 3],
40 }
41
42 pub struct stat64 {
43 pub st_dev: ::dev_t,
44 pub st_ino: ::ino64_t,
45 pub st_nlink: ::nlink_t,
46 pub st_mode: ::mode_t,
47 pub st_uid: ::uid_t,
48 pub st_gid: ::gid_t,
49 st_pad0: ::c_int,
50 pub st_rdev: ::dev_t,
51 pub st_size: ::off_t,
52 pub st_atime: ::time_t,
53 pub st_atime_nsec: ::c_long,
54 pub st_mtime: ::time_t,
55 pub st_mtime_nsec: ::c_long,
56 pub st_ctime: ::time_t,
57 pub st_ctime_nsec: ::c_long,
58 pub st_blksize: ::blksize_t,
59 pub st_blocks: ::blkcnt64_t,
60 __glibc_reserved: [::c_long; 3],
61 }
62
63 pub struct pthread_attr_t {
64 __size: [::c_ulong; 7]
65 }
66
67 pub struct sigaction {
68 pub sa_sigaction: ::sighandler_t,
69 __glibc_reserved0: ::c_int,
70 pub sa_flags: ::c_int,
71 _restorer: *mut ::c_void,
72 pub sa_mask: sigset_t,
73 }
74
75 pub struct stack_t {
76 pub ss_sp: *mut ::c_void,
77 pub ss_flags: ::c_int,
78 pub ss_size: ::size_t,
79 }
80
81 pub struct sigset_t {
82 __size: [::c_ulong; 16],
83 }
84
85 pub struct siginfo_t {
86 pub si_signo: ::c_int,
87 pub si_errno: ::c_int,
88 pub si_code: ::c_int,
89 _pad: ::c_int,
90 _pad2: [::c_long; 14],
91 }
92
93 pub struct ipc_perm {
94 pub __key: ::key_t,
95 pub uid: ::uid_t,
96 pub gid: ::gid_t,
97 pub cuid: ::uid_t,
98 pub cgid: ::gid_t,
99 pub mode: ::mode_t,
100 pub __seq: ::c_ushort,
101 __pad1: ::c_ushort,
102 __unused1: ::c_ulong,
103 __unused2: ::c_ulong
104 }
105
106 pub struct shmid_ds {
107 pub shm_perm: ::ipc_perm,
108 pub shm_segsz: ::size_t,
109 pub shm_atime: ::time_t,
110 pub shm_dtime: ::time_t,
111 pub shm_ctime: ::time_t,
112 pub shm_cpid: ::pid_t,
113 pub shm_lpid: ::pid_t,
114 pub shm_nattch: ::shmatt_t,
115 __unused4: ::c_ulong,
116 __unused5: ::c_ulong
117 }
118
119 pub struct statfs {
120 pub f_type: ::c_uint,
121 pub f_bsize: ::c_uint,
122 pub f_blocks: ::fsblkcnt_t,
123 pub f_bfree: ::fsblkcnt_t,
124 pub f_bavail: ::fsblkcnt_t,
125 pub f_files: ::fsfilcnt_t,
126 pub f_ffree: ::fsfilcnt_t,
127 pub f_fsid: ::fsid_t,
128 pub f_namelen: ::c_uint,
129 pub f_frsize: ::c_uint,
130 pub f_flags: ::c_uint,
131 f_spare: [::c_uint; 4],
132 }
133
134 pub struct msghdr {
135 pub msg_name: *mut ::c_void,
136 pub msg_namelen: ::socklen_t,
137 pub msg_iov: *mut ::iovec,
138 pub msg_iovlen: ::size_t,
139 pub msg_control: *mut ::c_void,
140 pub msg_controllen: ::size_t,
141 pub msg_flags: ::c_int,
142 }
143
144 pub struct termios {
145 pub c_iflag: ::tcflag_t,
146 pub c_oflag: ::tcflag_t,
147 pub c_cflag: ::tcflag_t,
148 pub c_lflag: ::tcflag_t,
149 pub c_line: ::cc_t,
150 pub c_cc: [::cc_t; ::NCCS],
151 pub c_ispeed: ::speed_t,
152 pub c_ospeed: ::speed_t,
153 }
154
155 pub struct sysinfo {
156 pub uptime: ::c_long,
157 pub loads: [::c_ulong; 3],
158 pub totalram: ::c_ulong,
159 pub freeram: ::c_ulong,
160 pub sharedram: ::c_ulong,
161 pub bufferram: ::c_ulong,
162 pub totalswap: ::c_ulong,
163 pub freeswap: ::c_ulong,
164 pub procs: ::c_ushort,
165 pub pad: ::c_ushort,
166 pub totalhigh: ::c_ulong,
167 pub freehigh: ::c_ulong,
168 pub mem_unit: ::c_uint,
169 pub _f: [::c_char; 0],
170 }
171
172 pub struct glob64_t {
173 pub gl_pathc: ::size_t,
174 pub gl_pathv: *mut *mut ::c_char,
175 pub gl_offs: ::size_t,
176 pub gl_flags: ::c_int,
177
178 __unused1: *mut ::c_void,
179 __unused2: *mut ::c_void,
180 __unused3: *mut ::c_void,
181 __unused4: *mut ::c_void,
182 __unused5: *mut ::c_void,
183 }
184
185 pub struct ucred {
186 pub pid: ::pid_t,
187 pub uid: ::uid_t,
188 pub gid: ::gid_t,
189 }
190
191 pub struct flock {
192 pub l_type: ::c_short,
193 pub l_whence: ::c_short,
194 pub l_start: ::off_t,
195 pub l_len: ::off_t,
196 pub l_pid: ::pid_t,
197 }
198
199 // FIXME this is actually a union
200 pub struct sem_t {
201 __size: [::c_char; 32],
202 __align: [::c_long; 0],
203 }
204
205 pub struct __psw_t {
206 pub mask: u64,
207 pub addr: u64,
208 }
209
210 // FIXME: This is actually a union.
211 pub struct fpreg_t {
212 pub d: ::c_double,
213 // f: ::c_float,
214 }
215
216 pub struct fpregset_t {
217 pub fpc: u32,
218 __pad: u32,
219 pub fprs: [fpreg_t; 16],
220 }
221
222 pub struct mcontext_t {
223 pub psw: __psw_t,
224 pub gregs: [u64; 16],
225 pub aregs: [u32; 16],
226 pub fpregs: fpregset_t,
227 }
228
229 pub struct ucontext_t {
230 pub uc_flags: ::c_ulong,
231 pub uc_link: *mut ucontext_t,
232 pub uc_stack: ::stack_t,
233 pub uc_mcontext: mcontext_t,
234 pub uc_sigmask: ::sigset_t,
235 }
236
237 pub struct msqid_ds {
238 pub msg_perm: ::ipc_perm,
239 pub msg_stime: ::time_t,
240 pub msg_rtime: ::time_t,
241 pub msg_ctime: ::time_t,
242 __msg_cbytes: ::c_ulong,
243 pub msg_qnum: ::msgqnum_t,
244 pub msg_qbytes: ::msglen_t,
245 pub msg_lspid: ::pid_t,
246 pub msg_lrpid: ::pid_t,
247 __glibc_reserved4: ::c_ulong,
248 __glibc_reserved5: ::c_ulong,
249 }
250 }
251
252 pub const POSIX_FADV_DONTNEED: ::c_int = 6;
253 pub const POSIX_FADV_NOREUSE: ::c_int = 7;
254
255 pub const __SIZEOF_PTHREAD_CONDATTR_T: usize = 4;
256 pub const __SIZEOF_PTHREAD_MUTEXATTR_T: usize = 4;
257 pub const __SIZEOF_PTHREAD_MUTEX_T: usize = 40;
258 pub const __SIZEOF_PTHREAD_RWLOCK_T: usize = 56;
259
260 pub const EADDRINUSE: ::c_int = 98;
261 pub const EADDRNOTAVAIL: ::c_int = 99;
262 pub const ECONNABORTED: ::c_int = 103;
263 pub const ECONNREFUSED: ::c_int = 111;
264 pub const ECONNRESET: ::c_int = 104;
265 pub const EDEADLK: ::c_int = 35;
266 pub const ENOSYS: ::c_int = 38;
267 pub const ENOTCONN: ::c_int = 107;
268 pub const ETIMEDOUT: ::c_int = 110;
269 pub const FIOCLEX: ::c_ulong = 0x5451;
270 pub const FIONBIO: ::c_ulong = 0x5421;
271 pub const MAP_ANON: ::c_int = 0x20;
272 pub const O_ACCMODE: ::c_int = 3;
273 pub const O_APPEND: ::c_int = 1024;
274 pub const O_CREAT: ::c_int = 64;
275 pub const O_EXCL: ::c_int = 128;
276 pub const O_NONBLOCK: ::c_int = 2048;
277 pub const PTHREAD_STACK_MIN: ::size_t = 16384;
278 pub const RLIM_INFINITY: ::rlim_t = 0xffffffffffffffff;
279 pub const SA_NOCLDWAIT: ::c_int = 2;
280 pub const SA_ONSTACK: ::c_int = 0x08000000;
281 pub const SA_SIGINFO: ::c_int = 4;
282 pub const SIGBUS: ::c_int = 7;
283 pub const SIGSTKSZ: ::size_t = 0x2000;
284 pub const SIG_SETMASK: ::c_int = 2;
285 pub const SOCK_DGRAM: ::c_int = 2;
286 pub const SOCK_STREAM: ::c_int = 1;
287 pub const SOL_SOCKET: ::c_int = 1;
288 pub const SO_BROADCAST: ::c_int = 6;
289 pub const SO_ERROR: ::c_int = 4;
290 pub const SO_RCVTIMEO: ::c_int = 20;
291 pub const SO_REUSEADDR: ::c_int = 2;
292 pub const SO_SNDTIMEO: ::c_int = 21;
293
294 pub const RLIMIT_RSS: ::c_int = 5;
295 pub const RLIMIT_NOFILE: ::c_int = 7;
296 pub const RLIMIT_AS: ::c_int = 9;
297 pub const RLIMIT_NPROC: ::c_int = 6;
298 pub const RLIMIT_MEMLOCK: ::c_int = 8;
299 pub const RLIMIT_RTTIME: ::c_int = 15;
300 pub const RLIMIT_NLIMITS: ::c_int = 16;
301
302 pub const O_NOCTTY: ::c_int = 256;
303 pub const O_SYNC: ::c_int = 1052672;
304 pub const O_RSYNC: ::c_int = 1052672;
305 pub const O_DSYNC: ::c_int = 4096;
306 pub const O_FSYNC: ::c_int = 0x101000;
307 pub const O_DIRECT: ::c_int = 0x4000;
308 pub const O_DIRECTORY: ::c_int = 0x10000;
309 pub const O_NOFOLLOW: ::c_int = 0x20000;
310
311 pub const SOCK_NONBLOCK: ::c_int = O_NONBLOCK;
312
313 pub const LC_PAPER: ::c_int = 7;
314 pub const LC_NAME: ::c_int = 8;
315 pub const LC_ADDRESS: ::c_int = 9;
316 pub const LC_TELEPHONE: ::c_int = 10;
317 pub const LC_MEASUREMENT: ::c_int = 11;
318 pub const LC_IDENTIFICATION: ::c_int = 12;
319 pub const LC_PAPER_MASK: ::c_int = (1 << LC_PAPER);
320 pub const LC_NAME_MASK: ::c_int = (1 << LC_NAME);
321 pub const LC_ADDRESS_MASK: ::c_int = (1 << LC_ADDRESS);
322 pub const LC_TELEPHONE_MASK: ::c_int = (1 << LC_TELEPHONE);
323 pub const LC_MEASUREMENT_MASK: ::c_int = (1 << LC_MEASUREMENT);
324 pub const LC_IDENTIFICATION_MASK: ::c_int = (1 << LC_IDENTIFICATION);
325 pub const LC_ALL_MASK: ::c_int = ::LC_CTYPE_MASK
326 | ::LC_NUMERIC_MASK
327 | ::LC_TIME_MASK
328 | ::LC_COLLATE_MASK
329 | ::LC_MONETARY_MASK
330 | ::LC_MESSAGES_MASK
331 | LC_PAPER_MASK
332 | LC_NAME_MASK
333 | LC_ADDRESS_MASK
334 | LC_TELEPHONE_MASK
335 | LC_MEASUREMENT_MASK
336 | LC_IDENTIFICATION_MASK;
337
338 pub const MAP_ANONYMOUS: ::c_int = 0x0020;
339 pub const MAP_GROWSDOWN: ::c_int = 0x0100;
340 pub const MAP_DENYWRITE: ::c_int = 0x0800;
341 pub const MAP_EXECUTABLE: ::c_int = 0x01000;
342 pub const MAP_LOCKED: ::c_int = 0x02000;
343 pub const MAP_NORESERVE: ::c_int = 0x04000;
344 pub const MAP_POPULATE: ::c_int = 0x08000;
345 pub const MAP_NONBLOCK: ::c_int = 0x010000;
346 pub const MAP_STACK: ::c_int = 0x020000;
347
348 pub const EDEADLOCK: ::c_int = 35;
349 pub const ENAMETOOLONG: ::c_int = 36;
350 pub const ENOLCK: ::c_int = 37;
351 pub const ENOTEMPTY: ::c_int = 39;
352 pub const ELOOP: ::c_int = 40;
353 pub const ENOMSG: ::c_int = 42;
354 pub const EIDRM: ::c_int = 43;
355 pub const ECHRNG: ::c_int = 44;
356 pub const EL2NSYNC: ::c_int = 45;
357 pub const EL3HLT: ::c_int = 46;
358 pub const EL3RST: ::c_int = 47;
359 pub const ELNRNG: ::c_int = 48;
360 pub const EUNATCH: ::c_int = 49;
361 pub const ENOCSI: ::c_int = 50;
362 pub const EL2HLT: ::c_int = 51;
363 pub const EBADE: ::c_int = 52;
364 pub const EBADR: ::c_int = 53;
365 pub const EXFULL: ::c_int = 54;
366 pub const ENOANO: ::c_int = 55;
367 pub const EBADRQC: ::c_int = 56;
368 pub const EBADSLT: ::c_int = 57;
369 pub const EMULTIHOP: ::c_int = 72;
370 pub const EOVERFLOW: ::c_int = 75;
371 pub const ENOTUNIQ: ::c_int = 76;
372 pub const EBADFD: ::c_int = 77;
373 pub const EBADMSG: ::c_int = 74;
374 pub const EREMCHG: ::c_int = 78;
375 pub const ELIBACC: ::c_int = 79;
376 pub const ELIBBAD: ::c_int = 80;
377 pub const ELIBSCN: ::c_int = 81;
378 pub const ELIBMAX: ::c_int = 82;
379 pub const ELIBEXEC: ::c_int = 83;
380 pub const EILSEQ: ::c_int = 84;
381 pub const ERESTART: ::c_int = 85;
382 pub const ESTRPIPE: ::c_int = 86;
383 pub const EUSERS: ::c_int = 87;
384 pub const ENOTSOCK: ::c_int = 88;
385 pub const EDESTADDRREQ: ::c_int = 89;
386 pub const EMSGSIZE: ::c_int = 90;
387 pub const EPROTOTYPE: ::c_int = 91;
388 pub const ENOPROTOOPT: ::c_int = 92;
389 pub const EPROTONOSUPPORT: ::c_int = 93;
390 pub const ESOCKTNOSUPPORT: ::c_int = 94;
391 pub const EOPNOTSUPP: ::c_int = 95;
392 pub const EPFNOSUPPORT: ::c_int = 96;
393 pub const EAFNOSUPPORT: ::c_int = 97;
394 pub const ENETDOWN: ::c_int = 100;
395 pub const ENETUNREACH: ::c_int = 101;
396 pub const ENETRESET: ::c_int = 102;
397 pub const ENOBUFS: ::c_int = 105;
398 pub const EISCONN: ::c_int = 106;
399 pub const ESHUTDOWN: ::c_int = 108;
400 pub const ETOOMANYREFS: ::c_int = 109;
401 pub const EHOSTDOWN: ::c_int = 112;
402 pub const EHOSTUNREACH: ::c_int = 113;
403 pub const EALREADY: ::c_int = 114;
404 pub const EINPROGRESS: ::c_int = 115;
405 pub const ESTALE: ::c_int = 116;
406 pub const EUCLEAN: ::c_int = 117;
407 pub const ENOTNAM: ::c_int = 118;
408 pub const ENAVAIL: ::c_int = 119;
409 pub const EISNAM: ::c_int = 120;
410 pub const EREMOTEIO: ::c_int = 121;
411 pub const EDQUOT: ::c_int = 122;
412 pub const ENOMEDIUM: ::c_int = 123;
413 pub const EMEDIUMTYPE: ::c_int = 124;
414 pub const ECANCELED: ::c_int = 125;
415 pub const ENOKEY: ::c_int = 126;
416 pub const EKEYEXPIRED: ::c_int = 127;
417 pub const EKEYREVOKED: ::c_int = 128;
418 pub const EKEYREJECTED: ::c_int = 129;
419 pub const EOWNERDEAD: ::c_int = 130;
420 pub const ENOTRECOVERABLE: ::c_int = 131;
421 pub const EHWPOISON: ::c_int = 133;
422 pub const ERFKILL: ::c_int = 132;
423
424 pub const SOCK_SEQPACKET: ::c_int = 5;
425
426 pub const SO_TYPE: ::c_int = 3;
427 pub const SO_DONTROUTE: ::c_int = 5;
428 pub const SO_SNDBUF: ::c_int = 7;
429 pub const SO_RCVBUF: ::c_int = 8;
430 pub const SO_KEEPALIVE: ::c_int = 9;
431 pub const SO_OOBINLINE: ::c_int = 10;
432 pub const SO_LINGER: ::c_int = 13;
433 pub const SO_REUSEPORT: ::c_int = 15;
434 pub const SO_PEERCRED: ::c_int = 17;
435 pub const SO_RCVLOWAT: ::c_int = 18;
436 pub const SO_SNDLOWAT: ::c_int = 19;
437 pub const SO_ACCEPTCONN: ::c_int = 30;
438
439 pub const TCP_COOKIE_TRANSACTIONS: ::c_int = 15;
440 pub const TCP_THIN_LINEAR_TIMEOUTS: ::c_int = 16;
441 pub const TCP_THIN_DUPACK: ::c_int = 17;
442 pub const TCP_USER_TIMEOUT: ::c_int = 18;
443 pub const TCP_REPAIR: ::c_int = 19;
444 pub const TCP_REPAIR_QUEUE: ::c_int = 20;
445 pub const TCP_QUEUE_SEQ: ::c_int = 21;
446 pub const TCP_REPAIR_OPTIONS: ::c_int = 22;
447 pub const TCP_FASTOPEN: ::c_int = 23;
448 pub const TCP_TIMESTAMP: ::c_int = 24;
449
450 pub const SIGCHLD: ::c_int = 17;
451 pub const SIGUSR1: ::c_int = 10;
452 pub const SIGUSR2: ::c_int = 12;
453 pub const SIGCONT: ::c_int = 18;
454 pub const SIGSTOP: ::c_int = 19;
455 pub const SIGTSTP: ::c_int = 20;
456 pub const SIGURG: ::c_int = 23;
457 pub const SIGIO: ::c_int = 29;
458 pub const SIGSYS: ::c_int = 31;
459 pub const SIGSTKFLT: ::c_int = 16;
460 pub const SIGUNUSED: ::c_int = 31;
461 pub const SIGTTIN: ::c_int = 21;
462 pub const SIGTTOU: ::c_int = 22;
463 pub const SIGXCPU: ::c_int = 24;
464 pub const SIGXFSZ: ::c_int = 25;
465 pub const SIGVTALRM: ::c_int = 26;
466 pub const SIGPROF: ::c_int = 27;
467 pub const SIGWINCH: ::c_int = 28;
468 pub const SIGPOLL: ::c_int = 29;
469 pub const SIGPWR: ::c_int = 30;
470 pub const SIG_BLOCK: ::c_int = 0x000000;
471 pub const SIG_UNBLOCK: ::c_int = 0x01;
472
473 pub const FALLOC_FL_KEEP_SIZE: ::c_int = 0x01;
474 pub const FALLOC_FL_PUNCH_HOLE: ::c_int = 0x02;
475
476 pub const BUFSIZ: ::c_uint = 8192;
477 pub const TMP_MAX: ::c_uint = 238328;
478 pub const FOPEN_MAX: ::c_uint = 16;
479 pub const POSIX_MADV_DONTNEED: ::c_int = 4;
480 pub const _SC_2_C_VERSION: ::c_int = 96;
481 pub const O_ASYNC: ::c_int = 0x2000;
482 pub const O_NDELAY: ::c_int = 0x800;
483 pub const ST_RELATIME: ::c_ulong = 4096;
484 pub const NI_MAXHOST: ::socklen_t = 1025;
485
486 pub const ADFS_SUPER_MAGIC: ::c_int = 0x0000adf5;
487 pub const AFFS_SUPER_MAGIC: ::c_int = 0x0000adff;
488 pub const CODA_SUPER_MAGIC: ::c_int = 0x73757245;
489 pub const CRAMFS_MAGIC: ::c_int = 0x28cd3d45;
490 pub const EFS_SUPER_MAGIC: ::c_int = 0x00414a53;
491 pub const EXT2_SUPER_MAGIC: ::c_int = 0x0000ef53;
492 pub const EXT3_SUPER_MAGIC: ::c_int = 0x0000ef53;
493 pub const EXT4_SUPER_MAGIC: ::c_int = 0x0000ef53;
494 pub const HPFS_SUPER_MAGIC: ::c_int = 0xf995e849;
495 pub const HUGETLBFS_MAGIC: ::c_int = 0x958458f6;
496 pub const ISOFS_SUPER_MAGIC: ::c_int = 0x00009660;
497 pub const JFFS2_SUPER_MAGIC: ::c_int = 0x000072b6;
498 pub const MINIX_SUPER_MAGIC: ::c_int = 0x0000137f;
499 pub const MINIX_SUPER_MAGIC2: ::c_int = 0x0000138f;
500 pub const MINIX2_SUPER_MAGIC: ::c_int = 0x00002468;
501 pub const MINIX2_SUPER_MAGIC2: ::c_int = 0x00002478;
502 pub const MSDOS_SUPER_MAGIC: ::c_int = 0x00004d44;
503 pub const NCP_SUPER_MAGIC: ::c_int = 0x0000564c;
504 pub const NFS_SUPER_MAGIC: ::c_int = 0x00006969;
505 pub const OPENPROM_SUPER_MAGIC: ::c_int = 0x00009fa1;
506 pub const PROC_SUPER_MAGIC: ::c_int = 0x00009fa0;
507 pub const QNX4_SUPER_MAGIC: ::c_int = 0x0000002f;
508 pub const REISERFS_SUPER_MAGIC: ::c_int = 0x52654973;
509 pub const SMB_SUPER_MAGIC: ::c_int = 0x0000517b;
510 pub const TMPFS_MAGIC: ::c_int = 0x01021994;
511 pub const USBDEVICE_SUPER_MAGIC: ::c_int = 0x00009fa2;
512
513 pub const VEOF: usize = 4;
514 pub const VEOL: usize = 11;
515 pub const VEOL2: usize = 16;
516 pub const VMIN: usize = 6;
517 pub const IEXTEN: ::tcflag_t = 0x00008000;
518 pub const TOSTOP: ::tcflag_t = 0x00000100;
519 pub const FLUSHO: ::tcflag_t = 0x00001000;
520 pub const IUTF8: ::tcflag_t = 0x00004000;
521
522 pub const CPU_SETSIZE: ::c_int = 0x400;
523
524 pub const EXTPROC: ::tcflag_t = 0x00010000;
525
526 pub const QFMT_VFS_V1: ::c_int = 4;
527
528 pub const PTRACE_TRACEME: ::c_uint = 0;
529 pub const PTRACE_PEEKTEXT: ::c_uint = 1;
530 pub const PTRACE_PEEKDATA: ::c_uint = 2;
531 pub const PTRACE_PEEKUSER: ::c_uint = 3;
532 pub const PTRACE_POKETEXT: ::c_uint = 4;
533 pub const PTRACE_POKEDATA: ::c_uint = 5;
534 pub const PTRACE_POKEUSER: ::c_uint = 6;
535 pub const PTRACE_CONT: ::c_uint = 7;
536 pub const PTRACE_KILL: ::c_uint = 8;
537 pub const PTRACE_SINGLESTEP: ::c_uint = 9;
538 pub const PTRACE_GETREGS: ::c_uint = 12;
539 pub const PTRACE_SETREGS: ::c_uint = 13;
540 pub const PTRACE_GETFPREGS: ::c_uint = 14;
541 pub const PTRACE_SETFPREGS: ::c_uint = 15;
542 pub const PTRACE_ATTACH: ::c_uint = 16;
543 pub const PTRACE_DETACH: ::c_uint = 17;
544 pub const PTRACE_SYSCALL: ::c_uint = 24;
545 pub const PTRACE_SETOPTIONS: ::c_uint = 0x4200;
546 pub const PTRACE_GETEVENTMSG: ::c_uint = 0x4201;
547 pub const PTRACE_GETSIGINFO: ::c_uint = 0x4202;
548 pub const PTRACE_SETSIGINFO: ::c_uint = 0x4203;
549 pub const PTRACE_GETREGSET: ::c_uint = 0x4204;
550 pub const PTRACE_SETREGSET: ::c_uint = 0x4205;
551 pub const PTRACE_SEIZE: ::c_uint = 0x4206;
552 pub const PTRACE_INTERRUPT: ::c_uint = 0x4207;
553 pub const PTRACE_LISTEN: ::c_uint = 0x4208;
554 pub const PTRACE_PEEKSIGINFO: ::c_uint = 0x4209;
555
556 pub const MADV_DODUMP: ::c_int = 17;
557 pub const MADV_DONTDUMP: ::c_int = 16;
558
559 pub const EPOLLWAKEUP: ::c_int = 0x20000000;
560
561 pub const MADV_HUGEPAGE: ::c_int = 14;
562 pub const MADV_NOHUGEPAGE: ::c_int = 15;
563 pub const MAP_HUGETLB: ::c_int = 0x040000;
564
565 pub const EFD_NONBLOCK: ::c_int = 0x800;
566
567 pub const F_GETLK: ::c_int = 5;
568 pub const F_GETOWN: ::c_int = 9;
569 pub const F_SETOWN: ::c_int = 8;
570 pub const F_SETLK: ::c_int = 6;
571 pub const F_SETLKW: ::c_int = 7;
572
573 pub const SEEK_DATA: ::c_int = 3;
574 pub const SEEK_HOLE: ::c_int = 4;
575
576 pub const SFD_NONBLOCK: ::c_int = 0x0800;
577
578 pub const TCSANOW: ::c_int = 0;
579 pub const TCSADRAIN: ::c_int = 1;
580 pub const TCSAFLUSH: ::c_int = 2;
581
582 pub const TCGETS: ::c_ulong = 0x5401;
583 pub const TCSETS: ::c_ulong = 0x5402;
584 pub const TCSETSW: ::c_ulong = 0x5403;
585 pub const TCSETSF: ::c_ulong = 0x5404;
586 pub const TCGETA: ::c_ulong = 0x5405;
587 pub const TCSETA: ::c_ulong = 0x5406;
588 pub const TCSETAW: ::c_ulong = 0x5407;
589 pub const TCSETAF: ::c_ulong = 0x5408;
590 pub const TCSBRK: ::c_ulong = 0x5409;
591 pub const TCXONC: ::c_ulong = 0x540A;
592 pub const TCFLSH: ::c_ulong = 0x540B;
593 pub const TIOCGSOFTCAR: ::c_ulong = 0x5419;
594 pub const TIOCSSOFTCAR: ::c_ulong = 0x541A;
595 pub const TIOCINQ: ::c_ulong = 0x541B;
596 pub const TIOCLINUX: ::c_ulong = 0x541C;
597 pub const TIOCGSERIAL: ::c_ulong = 0x541E;
598 pub const TIOCEXCL: ::c_ulong = 0x540C;
599 pub const TIOCNXCL: ::c_ulong = 0x540D;
600 pub const TIOCSCTTY: ::c_ulong = 0x540E;
601 pub const TIOCGPGRP: ::c_ulong = 0x540F;
602 pub const TIOCSPGRP: ::c_ulong = 0x5410;
603 pub const TIOCOUTQ: ::c_ulong = 0x5411;
604 pub const TIOCSTI: ::c_ulong = 0x5412;
605 pub const TIOCGWINSZ: ::c_ulong = 0x5413;
606 pub const TIOCSWINSZ: ::c_ulong = 0x5414;
607 pub const TIOCMGET: ::c_ulong = 0x5415;
608 pub const TIOCMBIS: ::c_ulong = 0x5416;
609 pub const TIOCMBIC: ::c_ulong = 0x5417;
610 pub const TIOCMSET: ::c_ulong = 0x5418;
611 pub const FIONREAD: ::c_ulong = 0x541B;
612 pub const TIOCCONS: ::c_ulong = 0x541D;
613
614 pub const RTLD_DEEPBIND: ::c_int = 0x8;
615 pub const RTLD_GLOBAL: ::c_int = 0x100;
616 pub const RTLD_NOLOAD: ::c_int = 0x4;
617
618 pub const LINUX_REBOOT_MAGIC1: ::c_int = 0xfee1dead;
619 pub const LINUX_REBOOT_MAGIC2: ::c_int = 672274793;
620 pub const LINUX_REBOOT_MAGIC2A: ::c_int = 85072278;
621 pub const LINUX_REBOOT_MAGIC2B: ::c_int = 369367448;
622 pub const LINUX_REBOOT_MAGIC2C: ::c_int = 537993216;
623
624 pub const LINUX_REBOOT_CMD_RESTART: ::c_int = 0x01234567;
625 pub const LINUX_REBOOT_CMD_HALT: ::c_int = 0xCDEF0123;
626 pub const LINUX_REBOOT_CMD_CAD_ON: ::c_int = 0x89ABCDEF;
627 pub const LINUX_REBOOT_CMD_CAD_OFF: ::c_int = 0x00000000;
628 pub const LINUX_REBOOT_CMD_POWER_OFF: ::c_int = 0x4321FEDC;
629 pub const LINUX_REBOOT_CMD_RESTART2: ::c_int = 0xA1B2C3D4;
630 pub const LINUX_REBOOT_CMD_SW_SUSPEND: ::c_int = 0xD000FCE2;
631 pub const LINUX_REBOOT_CMD_KEXEC: ::c_int = 0x45584543;
632
633 pub const SYS_gettid: ::c_long = 236;
634 pub const SYS_perf_event_open: ::c_long = 331;
635
636 #[link(name = "util")]
637 extern {
638 pub fn sysctl(name: *mut ::c_int,
639 namelen: ::c_int,
640 oldp: *mut ::c_void,
641 oldlenp: *mut ::size_t,
642 newp: *mut ::c_void,
643 newlen: ::size_t)
644 -> ::c_int;
645 pub fn ioctl(fd: ::c_int, request: ::c_ulong, ...) -> ::c_int;
646 pub fn backtrace(buf: *mut *mut ::c_void,
647 sz: ::c_int) -> ::c_int;
648 pub fn glob64(pattern: *const ::c_char,
649 flags: ::c_int,
650 errfunc: ::dox::Option<extern fn(epath: *const ::c_char,
651 errno: ::c_int)
652 -> ::c_int>,
653 pglob: *mut glob64_t) -> ::c_int;
654 pub fn globfree64(pglob: *mut glob64_t);
655 pub fn ptrace(request: ::c_uint, ...) -> ::c_long;
656 pub fn pthread_attr_getaffinity_np(attr: *const ::pthread_attr_t,
657 cpusetsize: ::size_t,
658 cpuset: *mut ::cpu_set_t) -> ::c_int;
659 pub fn pthread_attr_setaffinity_np(attr: *mut ::pthread_attr_t,
660 cpusetsize: ::size_t,
661 cpuset: *const ::cpu_set_t) -> ::c_int;
662 pub fn getpriority(which: ::__priority_which_t, who: ::id_t) -> ::c_int;
663 pub fn setpriority(which: ::__priority_which_t, who: ::id_t,
664 prio: ::c_int) -> ::c_int;
665 pub fn pthread_getaffinity_np(thread: ::pthread_t,
666 cpusetsize: ::size_t,
667 cpuset: *mut ::cpu_set_t) -> ::c_int;
668 pub fn pthread_setaffinity_np(thread: ::pthread_t,
669 cpusetsize: ::size_t,
670 cpuset: *const ::cpu_set_t) -> ::c_int;
671 pub fn sched_getcpu() -> ::c_int;
672 pub fn getcontext(ucp: *mut ucontext_t) -> ::c_int;
673 pub fn setcontext(ucp: *const ucontext_t) -> ::c_int;
674 pub fn makecontext(ucp: *mut ucontext_t,
675 func: extern fn (),
676 argc: ::c_int, ...);
677 pub fn swapcontext(uocp: *mut ucontext_t,
678 ucp: *const ucontext_t) -> ::c_int;
679 }