]> git.proxmox.com Git - rustc.git/blame - src/liblibc/src/unix/notbsd/linux/other/b32/x86.rs
New upstream version 1.19.0+dfsg1
[rustc.git] / src / liblibc / src / unix / notbsd / linux / other / b32 / x86.rs
CommitLineData
92a42be0
SL
1pub type c_char = i8;
2pub type wchar_t = i32;
a7813a04 3pub type greg_t = i32;
9cc50fc6 4
54a0048b 5s! {
a7813a04
XL
6 pub struct _libc_fpreg {
7 pub significand: [u16; 4],
8 pub exponent: u16,
9 }
10
11 pub struct _libc_fpstate {
12 pub cw: ::c_ulong,
13 pub sw: ::c_ulong,
14 pub tag: ::c_ulong,
15 pub ipoff: ::c_ulong,
16 pub cssel: ::c_ulong,
17 pub dataoff: ::c_ulong,
18 pub datasel: ::c_ulong,
19 pub _st: [_libc_fpreg; 8],
20 pub status: ::c_ulong,
21 }
22
54a0048b 23 pub struct mcontext_t {
a7813a04
XL
24 pub gregs: [greg_t; 19],
25 pub fpregs: *mut _libc_fpstate,
26 pub oldmask: ::c_ulong,
27 pub cr2: ::c_ulong,
54a0048b
SL
28 }
29
30 pub struct ucontext_t {
31 pub uc_flags: ::c_ulong,
32 pub uc_link: *mut ucontext_t,
33 pub uc_stack: ::stack_t,
34 pub uc_mcontext: mcontext_t,
35 pub uc_sigmask: ::sigset_t,
36 __private: [u8; 112],
37 }
9e0c209e
SL
38
39 pub struct ipc_perm {
40 pub __key: ::key_t,
41 pub uid: ::uid_t,
42 pub gid: ::gid_t,
43 pub cuid: ::uid_t,
44 pub cgid: ::gid_t,
45 pub mode: ::c_ushort,
46 __pad1: ::c_ushort,
47 pub __seq: ::c_ushort,
48 __pad2: ::c_ushort,
49 __unused1: ::c_ulong,
50 __unused2: ::c_ulong
51 }
52
53 pub struct stat64 {
54 pub st_dev: ::dev_t,
55 __pad1: ::c_uint,
56 __st_ino: ::ino_t,
57 pub st_mode: ::mode_t,
58 pub st_nlink: ::nlink_t,
59 pub st_uid: ::uid_t,
60 pub st_gid: ::gid_t,
61 pub st_rdev: ::dev_t,
62 __pad2: ::c_uint,
63 pub st_size: ::off64_t,
64 pub st_blksize: ::blksize_t,
65 pub st_blocks: ::blkcnt64_t,
66 pub st_atime: ::time_t,
67 pub st_atime_nsec: ::c_long,
68 pub st_mtime: ::time_t,
69 pub st_mtime_nsec: ::c_long,
70 pub st_ctime: ::time_t,
71 pub st_ctime_nsec: ::c_long,
72 pub st_ino: ::ino64_t,
73 }
74
75 pub struct shmid_ds {
76 pub shm_perm: ::ipc_perm,
77 pub shm_segsz: ::size_t,
78 pub shm_atime: ::time_t,
79 __unused1: ::c_ulong,
80 pub shm_dtime: ::time_t,
81 __unused2: ::c_ulong,
82 pub shm_ctime: ::time_t,
83 __unused3: ::c_ulong,
84 pub shm_cpid: ::pid_t,
85 pub shm_lpid: ::pid_t,
86 pub shm_nattch: ::shmatt_t,
87 __unused4: ::c_ulong,
88 __unused5: ::c_ulong
89 }
90
91 pub struct msqid_ds {
92 pub msg_perm: ::ipc_perm,
93 pub msg_stime: ::time_t,
94 __glibc_reserved1: ::c_ulong,
95 pub msg_rtime: ::time_t,
96 __glibc_reserved2: ::c_ulong,
97 pub msg_ctime: ::time_t,
98 __glibc_reserved3: ::c_ulong,
99 __msg_cbytes: ::c_ulong,
100 pub msg_qnum: ::msgqnum_t,
101 pub msg_qbytes: ::msglen_t,
102 pub msg_lspid: ::pid_t,
103 pub msg_lrpid: ::pid_t,
104 __glibc_reserved4: ::c_ulong,
105 __glibc_reserved5: ::c_ulong,
106 }
54a0048b
SL
107}
108
9cc50fc6
SL
109pub const O_DIRECT: ::c_int = 0x4000;
110pub const O_DIRECTORY: ::c_int = 0x10000;
111pub const O_NOFOLLOW: ::c_int = 0x20000;
112
113pub const MAP_LOCKED: ::c_int = 0x02000;
114pub const MAP_NORESERVE: ::c_int = 0x04000;
54a0048b 115pub const MAP_32BIT: ::c_int = 0x0040;
9cc50fc6
SL
116
117pub const EDEADLOCK: ::c_int = 35;
118
cc61c64b
XL
119pub const SO_SNDBUFFORCE: ::c_int = 32;
120pub const SO_RCVBUFFORCE: ::c_int = 33;
121pub const SO_NO_CHECK: ::c_int = 11;
122pub const SO_PRIORITY: ::c_int = 12;
123pub const SO_BSDCOMPAT: ::c_int = 14;
124pub const SO_PASSCRED: ::c_int = 16;
9cc50fc6
SL
125pub const SO_PEERCRED: ::c_int = 17;
126pub const SO_RCVLOWAT: ::c_int = 18;
127pub const SO_SNDLOWAT: ::c_int = 19;
128pub const SO_RCVTIMEO: ::c_int = 20;
129pub const SO_SNDTIMEO: ::c_int = 21;
130
131pub const FIOCLEX: ::c_ulong = 0x5451;
132pub const FIONBIO: ::c_ulong = 0x5421;
54a0048b
SL
133
134pub const SYS_gettid: ::c_long = 224;
135pub const SYS_perf_event_open: ::c_long = 336;
136
9e0c209e
SL
137pub const PTRACE_GETFPXREGS: ::c_uint = 18;
138pub const PTRACE_SETFPXREGS: ::c_uint = 19;
139
140pub const MCL_CURRENT: ::c_int = 0x0001;
141pub const MCL_FUTURE: ::c_int = 0x0002;
142
143pub const SIGSTKSZ: ::size_t = 8192;
7cac9316 144pub const MINSIGSTKSZ: ::size_t = 2048;
9e0c209e
SL
145pub const CBAUD: ::tcflag_t = 0o0010017;
146pub const TAB1: ::c_int = 0x00000800;
147pub const TAB2: ::c_int = 0x00001000;
148pub const TAB3: ::c_int = 0x00001800;
149pub const CR1: ::c_int = 0x00000200;
150pub const CR2: ::c_int = 0x00000400;
151pub const CR3: ::c_int = 0x00000600;
152pub const FF1: ::c_int = 0x00008000;
153pub const BS1: ::c_int = 0x00002000;
154pub const VT1: ::c_int = 0x00004000;
155pub const VWERASE: usize = 14;
156pub const VREPRINT: usize = 12;
157pub const VSUSP: usize = 10;
158pub const VSTART: usize = 8;
159pub const VSTOP: usize = 9;
160pub const VDISCARD: usize = 13;
161pub const VTIME: usize = 5;
162pub const IXON: ::tcflag_t = 0x00000400;
163pub const IXOFF: ::tcflag_t = 0x00001000;
164pub const ONLCR: ::tcflag_t = 0x4;
165pub const CSIZE: ::tcflag_t = 0x00000030;
166pub const CS6: ::tcflag_t = 0x00000010;
167pub const CS7: ::tcflag_t = 0x00000020;
168pub const CS8: ::tcflag_t = 0x00000030;
169pub const CSTOPB: ::tcflag_t = 0x00000040;
170pub const CREAD: ::tcflag_t = 0x00000080;
171pub const PARENB: ::tcflag_t = 0x00000100;
172pub const PARODD: ::tcflag_t = 0x00000200;
173pub const HUPCL: ::tcflag_t = 0x00000400;
174pub const CLOCAL: ::tcflag_t = 0x00000800;
175pub const ECHOKE: ::tcflag_t = 0x00000800;
176pub const ECHOE: ::tcflag_t = 0x00000010;
177pub const ECHOK: ::tcflag_t = 0x00000020;
178pub const ECHONL: ::tcflag_t = 0x00000040;
179pub const ECHOPRT: ::tcflag_t = 0x00000400;
180pub const ECHOCTL: ::tcflag_t = 0x00000200;
181pub const ISIG: ::tcflag_t = 0x00000001;
182pub const ICANON: ::tcflag_t = 0x00000002;
183pub const PENDIN: ::tcflag_t = 0x00004000;
184pub const NOFLSH: ::tcflag_t = 0x00000080;
185
cc61c64b
XL
186pub const B0: ::speed_t = 0o000000;
187pub const B50: ::speed_t = 0o000001;
188pub const B75: ::speed_t = 0o000002;
189pub const B110: ::speed_t = 0o000003;
190pub const B134: ::speed_t = 0o000004;
191pub const B150: ::speed_t = 0o000005;
192pub const B200: ::speed_t = 0o000006;
193pub const B300: ::speed_t = 0o000007;
194pub const B600: ::speed_t = 0o000010;
195pub const B1200: ::speed_t = 0o000011;
196pub const B1800: ::speed_t = 0o000012;
197pub const B2400: ::speed_t = 0o000013;
198pub const B4800: ::speed_t = 0o000014;
199pub const B9600: ::speed_t = 0o000015;
200pub const B19200: ::speed_t = 0o000016;
201pub const B38400: ::speed_t = 0o000017;
202pub const EXTA: ::speed_t = B19200;
203pub const EXTB: ::speed_t = B38400;
204pub const B57600: ::speed_t = 0o010001;
205pub const B115200: ::speed_t = 0o010002;
206pub const B230400: ::speed_t = 0o010003;
207pub const B460800: ::speed_t = 0o010004;
208pub const B500000: ::speed_t = 0o010005;
209pub const B576000: ::speed_t = 0o010006;
210pub const B921600: ::speed_t = 0o010007;
211pub const B1000000: ::speed_t = 0o010010;
212pub const B1152000: ::speed_t = 0o010011;
213pub const B1500000: ::speed_t = 0o010012;
214pub const B2000000: ::speed_t = 0o010013;
215pub const B2500000: ::speed_t = 0o010014;
216pub const B3000000: ::speed_t = 0o010015;
217pub const B3500000: ::speed_t = 0o010016;
218pub const B4000000: ::speed_t = 0o010017;
219
9e0c209e
SL
220pub const VEOL: usize = 11;
221pub const VEOL2: usize = 16;
222pub const VMIN: usize = 6;
223pub const IEXTEN: ::tcflag_t = 0x00008000;
224pub const TOSTOP: ::tcflag_t = 0x00000100;
225pub const FLUSHO: ::tcflag_t = 0x00001000;
226pub const EXTPROC: ::tcflag_t = 0x00010000;
227pub const TCGETS: ::c_ulong = 0x5401;
228pub const TCSETS: ::c_ulong = 0x5402;
229pub const TCSETSW: ::c_ulong = 0x5403;
230pub const TCSETSF: ::c_ulong = 0x5404;
231pub const TCGETA: ::c_ulong = 0x5405;
232pub const TCSETA: ::c_ulong = 0x5406;
233pub const TCSETAW: ::c_ulong = 0x5407;
234pub const TCSETAF: ::c_ulong = 0x5408;
235pub const TCSBRK: ::c_ulong = 0x5409;
236pub const TCXONC: ::c_ulong = 0x540A;
237pub const TCFLSH: ::c_ulong = 0x540B;
238pub const TIOCINQ: ::c_ulong = 0x541B;
239pub const TIOCGPGRP: ::c_ulong = 0x540F;
240pub const TIOCSPGRP: ::c_ulong = 0x5410;
241pub const TIOCOUTQ: ::c_ulong = 0x5411;
242pub const TIOCGWINSZ: ::c_ulong = 0x5413;
243pub const TIOCSWINSZ: ::c_ulong = 0x5414;
244pub const FIONREAD: ::c_ulong = 0x541B;
245
54a0048b
SL
246extern {
247 pub fn getcontext(ucp: *mut ucontext_t) -> ::c_int;
248 pub fn setcontext(ucp: *const ucontext_t) -> ::c_int;
249 pub fn makecontext(ucp: *mut ucontext_t,
250 func: extern fn (),
251 argc: ::c_int, ...);
252 pub fn swapcontext(uocp: *mut ucontext_t,
253 ucp: *const ucontext_t) -> ::c_int;
254}