]> git.proxmox.com Git - rustc.git/blame - src/liblibc/src/unix/notbsd/linux/mips.rs
New upstream version 1.13.0+dfsg1
[rustc.git] / src / liblibc / src / unix / notbsd / linux / mips.rs
CommitLineData
92a42be0
SL
1pub type c_char = i8;
2pub type c_long = i32;
3pub type c_ulong = u32;
4pub type clock_t = i32;
5pub type time_t = i32;
6pub type suseconds_t = i32;
7pub type wchar_t = i32;
8pub type off_t = i32;
9pub type ino_t = u32;
10pub type blkcnt_t = i32;
11pub type blksize_t = i32;
12pub type nlink_t = u32;
7453a54e
SL
13pub type fsblkcnt_t = ::c_ulong;
14pub type fsfilcnt_t = ::c_ulong;
15pub type rlim_t = c_ulong;
92a42be0
SL
16
17s! {
18 pub struct stat {
19 pub st_dev: ::c_ulong,
20 st_pad1: [::c_long; 3],
21 pub st_ino: ::ino_t,
22 pub st_mode: ::mode_t,
23 pub st_nlink: ::nlink_t,
24 pub st_uid: ::uid_t,
25 pub st_gid: ::gid_t,
26 pub st_rdev: ::c_ulong,
27 pub st_pad2: [::c_long; 2],
28 pub st_size: ::off_t,
29 st_pad3: ::c_long,
30 pub st_atime: ::time_t,
31 pub st_atime_nsec: ::c_long,
32 pub st_mtime: ::time_t,
33 pub st_mtime_nsec: ::c_long,
34 pub st_ctime: ::time_t,
35 pub st_ctime_nsec: ::c_long,
36 pub st_blksize: ::blksize_t,
37 pub st_blocks: ::blkcnt_t,
38 st_pad5: [::c_long; 14],
39 }
40
41 pub struct stat64 {
42 pub st_dev: ::c_ulong,
43 st_pad1: [::c_long; 3],
44 pub st_ino: ::ino64_t,
45 pub st_mode: ::mode_t,
46 pub st_nlink: ::nlink_t,
47 pub st_uid: ::uid_t,
48 pub st_gid: ::gid_t,
49 pub st_rdev: ::c_ulong,
50 st_pad2: [::c_long; 2],
51 pub st_size: ::off64_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 st_pad3: ::c_long,
60 pub st_blocks: ::blkcnt64_t,
61 st_pad5: [::c_long; 14],
62 }
63
64 pub struct pthread_attr_t {
65 __size: [u32; 9]
66 }
67
68 pub struct sigaction {
9cc50fc6 69 pub sa_flags: ::c_int,
92a42be0
SL
70 pub sa_sigaction: ::sighandler_t,
71 pub sa_mask: sigset_t,
72 _restorer: *mut ::c_void,
73 _resv: [::c_int; 1],
74 }
75
76 pub struct stack_t {
77 pub ss_sp: *mut ::c_void,
78 pub ss_size: ::size_t,
79 pub ss_flags: ::c_int,
80 }
81
82 pub struct sigset_t {
83 __val: [::c_ulong; 32],
84 }
85
86 pub struct siginfo_t {
87 pub si_signo: ::c_int,
88 pub si_code: ::c_int,
89 pub si_errno: ::c_int,
90 pub _pad: [::c_int; 29],
91 }
92
93 pub struct glob64_t {
94 pub gl_pathc: ::size_t,
95 pub gl_pathv: *mut *mut ::c_char,
96 pub gl_offs: ::size_t,
97 pub gl_flags: ::c_int,
98
99 __unused1: *mut ::c_void,
100 __unused2: *mut ::c_void,
101 __unused3: *mut ::c_void,
102 __unused4: *mut ::c_void,
103 __unused5: *mut ::c_void,
104 }
9cc50fc6
SL
105
106 pub struct ipc_perm {
107 pub __key: ::key_t,
108 pub uid: ::uid_t,
109 pub gid: ::gid_t,
110 pub cuid: ::uid_t,
111 pub cgid: ::gid_t,
112 pub mode: ::c_uint,
113 pub __seq: ::c_ushort,
114 __pad1: ::c_ushort,
115 __unused1: ::c_ulong,
116 __unused2: ::c_ulong
117 }
118
119 pub struct shmid_ds {
120 pub shm_perm: ::ipc_perm,
121 pub shm_segsz: ::size_t,
122 pub shm_atime: ::time_t,
123 pub shm_dtime: ::time_t,
124 pub shm_ctime: ::time_t,
125 pub shm_cpid: ::pid_t,
126 pub shm_lpid: ::pid_t,
127 pub shm_nattch: ::shmatt_t,
128 __unused4: ::c_ulong,
129 __unused5: ::c_ulong
130 }
131
9e0c209e
SL
132 pub struct msqid_ds {
133 pub msg_perm: ::ipc_perm,
134 #[cfg(target_endian = "big")]
135 __glibc_reserved1: ::c_ulong,
136 pub msg_stime: ::time_t,
137 #[cfg(target_endian = "little")]
138 __glibc_reserved1: ::c_ulong,
139 #[cfg(target_endian = "big")]
140 __glibc_reserved2: ::c_ulong,
141 pub msg_rtime: ::time_t,
142 #[cfg(target_endian = "little")]
143 __glibc_reserved2: ::c_ulong,
144 #[cfg(target_endian = "big")]
145 __glibc_reserved3: ::c_ulong,
146 pub msg_ctime: ::time_t,
147 #[cfg(target_endian = "little")]
148 __glibc_reserved3: ::c_ulong,
149 __msg_cbytes: ::c_ulong,
150 pub msg_qnum: ::msgqnum_t,
151 pub msg_qbytes: ::msglen_t,
152 pub msg_lspid: ::pid_t,
153 pub msg_lrpid: ::pid_t,
154 __glibc_reserved4: ::c_ulong,
155 __glibc_reserved5: ::c_ulong,
156 }
157
9cc50fc6
SL
158 pub struct statfs {
159 pub f_type: ::c_long,
160 pub f_bsize: ::c_long,
161 pub f_frsize: ::c_long,
162 pub f_blocks: ::fsblkcnt_t,
163 pub f_bfree: ::fsblkcnt_t,
164 pub f_files: ::fsblkcnt_t,
165 pub f_ffree: ::fsblkcnt_t,
166 pub f_bavail: ::fsblkcnt_t,
167 pub f_fsid: ::fsid_t,
168
169 pub f_namelen: ::c_long,
170 f_spare: [::c_long; 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 termios {
184 pub c_iflag: ::tcflag_t,
185 pub c_oflag: ::tcflag_t,
186 pub c_cflag: ::tcflag_t,
187 pub c_lflag: ::tcflag_t,
188 pub c_line: ::cc_t,
189 pub c_cc: [::cc_t; ::NCCS],
190 }
191
192 pub struct flock {
193 pub l_type: ::c_short,
194 pub l_whence: ::c_short,
195 pub l_start: ::off_t,
196 pub l_len: ::off_t,
197 pub l_sysid: ::c_long,
198 pub l_pid: ::pid_t,
199 pad: [::c_long; 4],
200 }
3157f602
XL
201
202 pub struct sysinfo {
203 pub uptime: ::c_long,
204 pub loads: [::c_ulong; 3],
205 pub totalram: ::c_ulong,
206 pub freeram: ::c_ulong,
207 pub sharedram: ::c_ulong,
208 pub bufferram: ::c_ulong,
209 pub totalswap: ::c_ulong,
210 pub freeswap: ::c_ulong,
211 pub procs: ::c_ushort,
212 pub pad: ::c_ushort,
213 pub totalhigh: ::c_ulong,
214 pub freehigh: ::c_ulong,
215 pub mem_unit: ::c_uint,
216 pub _f: [::c_char; 8],
217 }
5bcae85e
SL
218
219 // FIXME this is actually a union
220 pub struct sem_t {
221 #[cfg(target_pointer_width = "32")]
222 __size: [::c_char; 16],
223 #[cfg(target_pointer_width = "64")]
224 __size: [::c_char; 32],
225 __align: [::c_long; 0],
226 }
92a42be0
SL
227}
228
229pub const BUFSIZ: ::c_uint = 8192;
230pub const TMP_MAX: ::c_uint = 238328;
231pub const FOPEN_MAX: ::c_uint = 16;
9e0c209e
SL
232pub const POSIX_FADV_DONTNEED: ::c_int = 4;
233pub const POSIX_FADV_NOREUSE: ::c_int = 5;
92a42be0
SL
234pub const POSIX_MADV_DONTNEED: ::c_int = 4;
235pub const _SC_2_C_VERSION: ::c_int = 96;
92a42be0 236pub const O_ACCMODE: ::c_int = 3;
9cc50fc6
SL
237pub const O_DIRECT: ::c_int = 0x8000;
238pub const O_DIRECTORY: ::c_int = 0x10000;
239pub const O_NOFOLLOW: ::c_int = 0x20000;
92a42be0
SL
240pub const ST_RELATIME: ::c_ulong = 4096;
241pub const NI_MAXHOST: ::socklen_t = 1025;
242
243pub const RLIMIT_NOFILE: ::c_int = 5;
244pub const RLIMIT_AS: ::c_int = 6;
245pub const RLIMIT_RSS: ::c_int = 7;
246pub const RLIMIT_NPROC: ::c_int = 8;
247pub const RLIMIT_MEMLOCK: ::c_int = 9;
9cc50fc6 248pub const RLIMIT_NLIMITS: ::c_int = 16;
92a42be0
SL
249pub const RLIM_INFINITY: ::rlim_t = 0x7fffffff;
250
251pub const O_APPEND: ::c_int = 8;
252pub const O_CREAT: ::c_int = 256;
253pub const O_EXCL: ::c_int = 1024;
254pub const O_NOCTTY: ::c_int = 2048;
255pub const O_NONBLOCK: ::c_int = 128;
9cc50fc6
SL
256pub const O_SYNC: ::c_int = 0x4010;
257pub const O_RSYNC: ::c_int = 0x4010;
92a42be0 258pub const O_DSYNC: ::c_int = 0x10;
9cc50fc6
SL
259pub const O_FSYNC: ::c_int = 0x4010;
260pub const O_ASYNC: ::c_int = 0x1000;
261pub const O_NDELAY: ::c_int = 0x80;
92a42be0 262
7453a54e
SL
263pub const SOCK_NONBLOCK: ::c_int = 128;
264
92a42be0
SL
265pub const EDEADLK: ::c_int = 45;
266pub const ENAMETOOLONG: ::c_int = 78;
267pub const ENOLCK: ::c_int = 46;
268pub const ENOSYS: ::c_int = 89;
269pub const ENOTEMPTY: ::c_int = 93;
270pub const ELOOP: ::c_int = 90;
271pub const ENOMSG: ::c_int = 35;
272pub const EIDRM: ::c_int = 36;
273pub const ECHRNG: ::c_int = 37;
274pub const EL2NSYNC: ::c_int = 38;
275pub const EL3HLT: ::c_int = 39;
276pub const EL3RST: ::c_int = 40;
277pub const ELNRNG: ::c_int = 41;
278pub const EUNATCH: ::c_int = 42;
279pub const ENOCSI: ::c_int = 43;
280pub const EL2HLT: ::c_int = 44;
281pub const EBADE: ::c_int = 50;
282pub const EBADR: ::c_int = 51;
283pub const EXFULL: ::c_int = 52;
284pub const ENOANO: ::c_int = 53;
285pub const EBADRQC: ::c_int = 54;
286pub const EBADSLT: ::c_int = 55;
287pub const EDEADLOCK: ::c_int = 56;
288pub const EMULTIHOP: ::c_int = 74;
289pub const EOVERFLOW: ::c_int = 79;
290pub const ENOTUNIQ: ::c_int = 80;
291pub const EBADFD: ::c_int = 81;
292pub const EBADMSG: ::c_int = 77;
293pub const EREMCHG: ::c_int = 82;
294pub const ELIBACC: ::c_int = 83;
295pub const ELIBBAD: ::c_int = 84;
296pub const ELIBSCN: ::c_int = 85;
297pub const ELIBMAX: ::c_int = 86;
298pub const ELIBEXEC: ::c_int = 87;
299pub const EILSEQ: ::c_int = 88;
300pub const ERESTART: ::c_int = 91;
301pub const ESTRPIPE: ::c_int = 92;
302pub const EUSERS: ::c_int = 94;
303pub const ENOTSOCK: ::c_int = 95;
304pub const EDESTADDRREQ: ::c_int = 96;
305pub const EMSGSIZE: ::c_int = 97;
306pub const EPROTOTYPE: ::c_int = 98;
307pub const ENOPROTOOPT: ::c_int = 99;
308pub const EPROTONOSUPPORT: ::c_int = 120;
309pub const ESOCKTNOSUPPORT: ::c_int = 121;
310pub const EOPNOTSUPP: ::c_int = 122;
311pub const EPFNOSUPPORT: ::c_int = 123;
312pub const EAFNOSUPPORT: ::c_int = 124;
313pub const EADDRINUSE: ::c_int = 125;
314pub const EADDRNOTAVAIL: ::c_int = 126;
315pub const ENETDOWN: ::c_int = 127;
316pub const ENETUNREACH: ::c_int = 128;
317pub const ENETRESET: ::c_int = 129;
318pub const ECONNABORTED: ::c_int = 130;
319pub const ECONNRESET: ::c_int = 131;
320pub const ENOBUFS: ::c_int = 132;
321pub const EISCONN: ::c_int = 133;
322pub const ENOTCONN: ::c_int = 134;
323pub const ESHUTDOWN: ::c_int = 143;
324pub const ETOOMANYREFS: ::c_int = 144;
325pub const ETIMEDOUT: ::c_int = 145;
326pub const ECONNREFUSED: ::c_int = 146;
327pub const EHOSTDOWN: ::c_int = 147;
328pub const EHOSTUNREACH: ::c_int = 148;
329pub const EALREADY: ::c_int = 149;
330pub const EINPROGRESS: ::c_int = 150;
331pub const ESTALE: ::c_int = 151;
332pub const EUCLEAN: ::c_int = 135;
333pub const ENOTNAM: ::c_int = 137;
334pub const ENAVAIL: ::c_int = 138;
335pub const EISNAM: ::c_int = 139;
336pub const EREMOTEIO: ::c_int = 140;
337pub const EDQUOT: ::c_int = 1133;
338pub const ENOMEDIUM: ::c_int = 159;
339pub const EMEDIUMTYPE: ::c_int = 160;
340pub const ECANCELED: ::c_int = 158;
341pub const ENOKEY: ::c_int = 161;
342pub const EKEYEXPIRED: ::c_int = 162;
343pub const EKEYREVOKED: ::c_int = 163;
344pub const EKEYREJECTED: ::c_int = 164;
345pub const EOWNERDEAD: ::c_int = 165;
346pub const ENOTRECOVERABLE: ::c_int = 166;
347pub const ERFKILL: ::c_int = 167;
348
54a0048b
SL
349pub const LC_PAPER: ::c_int = 7;
350pub const LC_NAME: ::c_int = 8;
351pub const LC_ADDRESS: ::c_int = 9;
352pub const LC_TELEPHONE: ::c_int = 10;
353pub const LC_MEASUREMENT: ::c_int = 11;
354pub const LC_IDENTIFICATION: ::c_int = 12;
a7813a04
XL
355pub const LC_PAPER_MASK: ::c_int = (1 << LC_PAPER);
356pub const LC_NAME_MASK: ::c_int = (1 << LC_NAME);
357pub const LC_ADDRESS_MASK: ::c_int = (1 << LC_ADDRESS);
358pub const LC_TELEPHONE_MASK: ::c_int = (1 << LC_TELEPHONE);
359pub const LC_MEASUREMENT_MASK: ::c_int = (1 << LC_MEASUREMENT);
360pub const LC_IDENTIFICATION_MASK: ::c_int = (1 << LC_IDENTIFICATION);
361pub const LC_ALL_MASK: ::c_int = ::LC_CTYPE_MASK
362 | ::LC_NUMERIC_MASK
363 | ::LC_TIME_MASK
364 | ::LC_COLLATE_MASK
365 | ::LC_MONETARY_MASK
366 | ::LC_MESSAGES_MASK
367 | LC_PAPER_MASK
368 | LC_NAME_MASK
369 | LC_ADDRESS_MASK
370 | LC_TELEPHONE_MASK
371 | LC_MEASUREMENT_MASK
372 | LC_IDENTIFICATION_MASK;
54a0048b 373
92a42be0
SL
374pub const MAP_NORESERVE: ::c_int = 0x400;
375pub const MAP_ANON: ::c_int = 0x800;
376pub const MAP_ANONYMOUS: ::c_int = 0x800;
377pub const MAP_GROWSDOWN: ::c_int = 0x1000;
378pub const MAP_DENYWRITE: ::c_int = 0x2000;
379pub const MAP_EXECUTABLE: ::c_int = 0x4000;
380pub const MAP_LOCKED: ::c_int = 0x8000;
381pub const MAP_POPULATE: ::c_int = 0x10000;
382pub const MAP_NONBLOCK: ::c_int = 0x20000;
54a0048b 383pub const MAP_STACK: ::c_int = 0x40000;
92a42be0
SL
384
385pub const SOCK_STREAM: ::c_int = 2;
386pub const SOCK_DGRAM: ::c_int = 1;
3157f602 387pub const SOCK_SEQPACKET: ::c_int = 5;
92a42be0
SL
388
389pub const SOL_SOCKET: ::c_int = 0xffff;
390
391pub const SO_REUSEADDR: ::c_int = 4;
9e0c209e 392pub const SO_REUSEPORT: ::c_int = 0x200;
92a42be0
SL
393pub const SO_TYPE: ::c_int = 4104;
394pub const SO_ERROR: ::c_int = 4103;
395pub const SO_DONTROUTE: ::c_int = 16;
396pub const SO_BROADCAST: ::c_int = 32;
397pub const SO_SNDBUF: ::c_int = 4097;
398pub const SO_RCVBUF: ::c_int = 4098;
399pub const SO_KEEPALIVE: ::c_int = 8;
400pub const SO_OOBINLINE: ::c_int = 256;
401pub const SO_LINGER: ::c_int = 128;
402pub const SO_RCVLOWAT: ::c_int = 4100;
403pub const SO_SNDLOWAT: ::c_int = 4099;
404pub const SO_RCVTIMEO: ::c_int = 4102;
405pub const SO_SNDTIMEO: ::c_int = 4101;
406pub const SO_ACCEPTCONN: ::c_int = 4105;
407
5bcae85e 408pub const __SIZEOF_PTHREAD_CONDATTR_T: usize = 4;
92a42be0
SL
409pub const __SIZEOF_PTHREAD_MUTEX_T: usize = 24;
410pub const __SIZEOF_PTHREAD_RWLOCK_T: usize = 32;
411pub const __SIZEOF_PTHREAD_MUTEXATTR_T: usize = 4;
412
413pub const FIOCLEX: ::c_ulong = 0x6601;
414pub const FIONBIO: ::c_ulong = 0x667e;
415
9cc50fc6
SL
416pub const SA_ONSTACK: ::c_int = 0x08000000;
417pub const SA_SIGINFO: ::c_int = 0x00000008;
418pub const SA_NOCLDWAIT: ::c_int = 0x00010000;
92a42be0
SL
419
420pub const SIGCHLD: ::c_int = 18;
421pub const SIGBUS: ::c_int = 10;
9cc50fc6
SL
422pub const SIGTTIN: ::c_int = 26;
423pub const SIGTTOU: ::c_int = 27;
424pub const SIGXCPU: ::c_int = 30;
425pub const SIGXFSZ: ::c_int = 31;
426pub const SIGVTALRM: ::c_int = 28;
427pub const SIGPROF: ::c_int = 29;
428pub const SIGWINCH: ::c_int = 20;
429pub const SIGUSR1: ::c_int = 16;
430pub const SIGUSR2: ::c_int = 17;
431pub const SIGCONT: ::c_int = 25;
432pub const SIGSTOP: ::c_int = 23;
433pub const SIGTSTP: ::c_int = 24;
434pub const SIGURG: ::c_int = 21;
435pub const SIGIO: ::c_int = 22;
436pub const SIGSYS: ::c_int = 12;
437pub const SIGPOLL: ::c_int = 22;
438pub const SIGPWR: ::c_int = 19;
92a42be0 439pub const SIG_SETMASK: ::c_int = 3;
9cc50fc6
SL
440pub const SIG_BLOCK: ::c_int = 0x1;
441pub const SIG_UNBLOCK: ::c_int = 0x2;
442
9e0c209e
SL
443pub const POLLRDNORM: ::c_short = 0x040;
444pub const POLLWRNORM: ::c_short = 0x004;
445pub const POLLRDBAND: ::c_short = 0x080;
446pub const POLLWRBAND: ::c_short = 0x100;
447
92a42be0
SL
448pub const PTHREAD_STACK_MIN: ::size_t = 131072;
449
9cc50fc6
SL
450pub const ADFS_SUPER_MAGIC: ::c_long = 0x0000adf5;
451pub const AFFS_SUPER_MAGIC: ::c_long = 0x0000adff;
452pub const CODA_SUPER_MAGIC: ::c_long = 0x73757245;
453pub const CRAMFS_MAGIC: ::c_long = 0x28cd3d45;
454pub const EFS_SUPER_MAGIC: ::c_long = 0x00414a53;
455pub const EXT2_SUPER_MAGIC: ::c_long = 0x0000ef53;
456pub const EXT3_SUPER_MAGIC: ::c_long = 0x0000ef53;
457pub const EXT4_SUPER_MAGIC: ::c_long = 0x0000ef53;
458pub const HPFS_SUPER_MAGIC: ::c_long = 0xf995e849;
459pub const HUGETLBFS_MAGIC: ::c_long = 0x958458f6;
460pub const ISOFS_SUPER_MAGIC: ::c_long = 0x00009660;
461pub const JFFS2_SUPER_MAGIC: ::c_long = 0x000072b6;
462pub const MINIX_SUPER_MAGIC: ::c_long = 0x0000137f;
463pub const MINIX_SUPER_MAGIC2: ::c_long = 0x0000138f;
464pub const MINIX2_SUPER_MAGIC: ::c_long = 0x00002468;
465pub const MINIX2_SUPER_MAGIC2: ::c_long = 0x00002478;
466pub const MSDOS_SUPER_MAGIC: ::c_long = 0x00004d44;
467pub const NCP_SUPER_MAGIC: ::c_long = 0x0000564c;
468pub const NFS_SUPER_MAGIC: ::c_long = 0x00006969;
469pub const OPENPROM_SUPER_MAGIC: ::c_long = 0x00009fa1;
470pub const PROC_SUPER_MAGIC: ::c_long = 0x00009fa0;
471pub const QNX4_SUPER_MAGIC: ::c_long = 0x0000002f;
472pub const REISERFS_SUPER_MAGIC: ::c_long = 0x52654973;
473pub const SMB_SUPER_MAGIC: ::c_long = 0x0000517b;
474pub const TMPFS_MAGIC: ::c_long = 0x01021994;
475pub const USBDEVICE_SUPER_MAGIC: ::c_long = 0x00009fa2;
476
477pub const VEOF: usize = 16;
478pub const VEOL: usize = 17;
479pub const VEOL2: usize = 6;
480pub const VMIN: usize = 4;
481pub const IEXTEN: ::tcflag_t = 0x00000100;
482pub const TOSTOP: ::tcflag_t = 0x00008000;
483pub const FLUSHO: ::tcflag_t = 0x00002000;
484pub const IUTF8: ::tcflag_t = 0x00004000;
485pub const TCSANOW: ::c_int = 0x540e;
486pub const TCSADRAIN: ::c_int = 0x540f;
487pub const TCSAFLUSH: ::c_int = 0x5410;
488
489pub const CPU_SETSIZE: ::c_int = 0x400;
490
491pub const PTRACE_TRACEME: ::c_uint = 0;
492pub const PTRACE_PEEKTEXT: ::c_uint = 1;
493pub const PTRACE_PEEKDATA: ::c_uint = 2;
494pub const PTRACE_PEEKUSER: ::c_uint = 3;
495pub const PTRACE_POKETEXT: ::c_uint = 4;
496pub const PTRACE_POKEDATA: ::c_uint = 5;
497pub const PTRACE_POKEUSER: ::c_uint = 6;
498pub const PTRACE_CONT: ::c_uint = 7;
499pub const PTRACE_KILL: ::c_uint = 8;
500pub const PTRACE_SINGLESTEP: ::c_uint = 9;
501pub const PTRACE_ATTACH: ::c_uint = 16;
502pub const PTRACE_DETACH: ::c_uint = 17;
503pub const PTRACE_SYSCALL: ::c_uint = 24;
504pub const PTRACE_SETOPTIONS: ::c_uint = 0x4200;
505pub const PTRACE_GETEVENTMSG: ::c_uint = 0x4201;
506pub const PTRACE_GETSIGINFO: ::c_uint = 0x4202;
507pub const PTRACE_SETSIGINFO: ::c_uint = 0x4203;
508pub const PTRACE_GETFPREGS: ::c_uint = 14;
509pub const PTRACE_SETFPREGS: ::c_uint = 15;
510pub const PTRACE_GETFPXREGS: ::c_uint = 18;
511pub const PTRACE_SETFPXREGS: ::c_uint = 19;
512pub const PTRACE_GETREGS: ::c_uint = 12;
513pub const PTRACE_SETREGS: ::c_uint = 13;
514
54a0048b
SL
515pub const MAP_HUGETLB: ::c_int = 0x080000;
516
9cc50fc6
SL
517pub const EFD_NONBLOCK: ::c_int = 0x80;
518
519pub const F_GETLK: ::c_int = 14;
520pub const F_GETOWN: ::c_int = 23;
521pub const F_SETOWN: ::c_int = 24;
7453a54e
SL
522pub const F_SETLK: ::c_int = 6;
523pub const F_SETLKW: ::c_int = 7;
9cc50fc6
SL
524
525pub const SFD_NONBLOCK: ::c_int = 0x80;
526
527pub const TCGETS: ::c_ulong = 0x540d;
528pub const TCSETS: ::c_ulong = 0x540e;
529pub const TCSETSW: ::c_ulong = 0x540f;
530pub const TCSETSF: ::c_ulong = 0x5410;
531pub const TCGETA: ::c_ulong = 0x5401;
532pub const TCSETA: ::c_ulong = 0x5402;
533pub const TCSETAW: ::c_ulong = 0x5403;
534pub const TCSETAF: ::c_ulong = 0x5404;
535pub const TCSBRK: ::c_ulong = 0x5405;
536pub const TCXONC: ::c_ulong = 0x5406;
537pub const TCFLSH: ::c_ulong = 0x5407;
538pub const TIOCGSOFTCAR: ::c_ulong = 0x5481;
539pub const TIOCSSOFTCAR: ::c_ulong = 0x5482;
540pub const TIOCINQ: ::c_ulong = 0x467f;
541pub const TIOCLINUX: ::c_ulong = 0x5483;
542pub const TIOCGSERIAL: ::c_ulong = 0x5484;
543pub const TIOCEXCL: ::c_ulong = 0x740d;
544pub const TIOCNXCL: ::c_ulong = 0x740e;
545pub const TIOCSCTTY: ::c_ulong = 0x5480;
546pub const TIOCGPGRP: ::c_ulong = 0x40047477;
547pub const TIOCSPGRP: ::c_ulong = 0x80047476;
548pub const TIOCOUTQ: ::c_ulong = 0x7472;
549pub const TIOCSTI: ::c_ulong = 0x5472;
550pub const TIOCGWINSZ: ::c_ulong = 0x40087468;
551pub const TIOCSWINSZ: ::c_ulong = 0x80087467;
552pub const TIOCMGET: ::c_ulong = 0x741d;
553pub const TIOCMBIS: ::c_ulong = 0x741b;
554pub const TIOCMBIC: ::c_ulong = 0x741c;
555pub const TIOCMSET: ::c_ulong = 0x741a;
556pub const FIONREAD: ::c_ulong = 0x467f;
557pub const TIOCCONS: ::c_ulong = 0x80047478;
558
7453a54e
SL
559pub const RTLD_DEEPBIND: ::c_int = 0x10;
560pub const RTLD_GLOBAL: ::c_int = 0x4;
561pub const RTLD_NOLOAD: ::c_int = 0x8;
562
5bcae85e
SL
563pub const LINUX_REBOOT_MAGIC1: ::c_int = 0xfee1dead;
564pub const LINUX_REBOOT_MAGIC2: ::c_int = 672274793;
565pub const LINUX_REBOOT_MAGIC2A: ::c_int = 85072278;
566pub const LINUX_REBOOT_MAGIC2B: ::c_int = 369367448;
567pub const LINUX_REBOOT_MAGIC2C: ::c_int = 537993216;
568
569pub const LINUX_REBOOT_CMD_RESTART: ::c_int = 0x01234567;
570pub const LINUX_REBOOT_CMD_HALT: ::c_int = 0xCDEF0123;
571pub const LINUX_REBOOT_CMD_CAD_ON: ::c_int = 0x89ABCDEF;
572pub const LINUX_REBOOT_CMD_CAD_OFF: ::c_int = 0x00000000;
573pub const LINUX_REBOOT_CMD_POWER_OFF: ::c_int = 0x4321FEDC;
574pub const LINUX_REBOOT_CMD_RESTART2: ::c_int = 0xA1B2C3D4;
575pub const LINUX_REBOOT_CMD_SW_SUSPEND: ::c_int = 0xD000FCE2;
576pub const LINUX_REBOOT_CMD_KEXEC: ::c_int = 0x45584543;
577
54a0048b
SL
578pub const SYS_gettid: ::c_long = 4222; // Valid for O32
579
9e0c209e
SL
580pub const MCL_CURRENT: ::c_int = 0x0001;
581pub const MCL_FUTURE: ::c_int = 0x0002;
582
583pub const SIGSTKSZ: ::size_t = 8192;
584pub const CBAUD: ::tcflag_t = 0o0010017;
585pub const TAB1: ::c_int = 0x00000800;
586pub const TAB2: ::c_int = 0x00001000;
587pub const TAB3: ::c_int = 0x00001800;
588pub const CR1: ::c_int = 0x00000200;
589pub const CR2: ::c_int = 0x00000400;
590pub const CR3: ::c_int = 0x00000600;
591pub const FF1: ::c_int = 0x00008000;
592pub const BS1: ::c_int = 0x00002000;
593pub const VT1: ::c_int = 0x00004000;
594pub const VWERASE: usize = 14;
595pub const VREPRINT: usize = 12;
596pub const VSUSP: usize = 10;
597pub const VSTART: usize = 8;
598pub const VSTOP: usize = 9;
599pub const VDISCARD: usize = 13;
600pub const VTIME: usize = 5;
601pub const IXON: ::tcflag_t = 0x00000400;
602pub const IXOFF: ::tcflag_t = 0x00001000;
603pub const ONLCR: ::tcflag_t = 0x4;
604pub const CSIZE: ::tcflag_t = 0x00000030;
605pub const CS6: ::tcflag_t = 0x00000010;
606pub const CS7: ::tcflag_t = 0x00000020;
607pub const CS8: ::tcflag_t = 0x00000030;
608pub const CSTOPB: ::tcflag_t = 0x00000040;
609pub const CREAD: ::tcflag_t = 0x00000080;
610pub const PARENB: ::tcflag_t = 0x00000100;
611pub const PARODD: ::tcflag_t = 0x00000200;
612pub const HUPCL: ::tcflag_t = 0x00000400;
613pub const CLOCAL: ::tcflag_t = 0x00000800;
614pub const ECHOKE: ::tcflag_t = 0x00000800;
615pub const ECHOE: ::tcflag_t = 0x00000010;
616pub const ECHOK: ::tcflag_t = 0x00000020;
617pub const ECHONL: ::tcflag_t = 0x00000040;
618pub const ECHOPRT: ::tcflag_t = 0x00000400;
619pub const ECHOCTL: ::tcflag_t = 0x00000200;
620pub const ISIG: ::tcflag_t = 0x00000001;
621pub const ICANON: ::tcflag_t = 0x00000002;
622pub const PENDIN: ::tcflag_t = 0x00004000;
623pub const NOFLSH: ::tcflag_t = 0x00000080;
624
a7813a04 625#[link(name = "util")]
92a42be0
SL
626extern {
627 pub fn sysctl(name: *mut ::c_int,
628 namelen: ::c_int,
629 oldp: *mut ::c_void,
630 oldlenp: *mut ::size_t,
631 newp: *mut ::c_void,
632 newlen: ::size_t)
633 -> ::c_int;
634 pub fn ioctl(fd: ::c_int, request: ::c_ulong, ...) -> ::c_int;
635 pub fn backtrace(buf: *mut *mut ::c_void,
636 sz: ::c_int) -> ::c_int;
637 pub fn glob64(pattern: *const ::c_char,
638 flags: ::c_int,
54a0048b
SL
639 errfunc: ::dox::Option<extern fn(epath: *const ::c_char,
640 errno: ::c_int)
641 -> ::c_int>,
92a42be0
SL
642 pglob: *mut glob64_t) -> ::c_int;
643 pub fn globfree64(pglob: *mut glob64_t);
9cc50fc6 644 pub fn ptrace(request: ::c_uint, ...) -> ::c_long;
7453a54e
SL
645 pub fn pthread_attr_getaffinity_np(attr: *const ::pthread_attr_t,
646 cpusetsize: ::size_t,
647 cpuset: *mut ::cpu_set_t) -> ::c_int;
648 pub fn pthread_attr_setaffinity_np(attr: *mut ::pthread_attr_t,
649 cpusetsize: ::size_t,
650 cpuset: *const ::cpu_set_t) -> ::c_int;
92a42be0 651}