]> git.proxmox.com Git - rustc.git/blob - src/vendor/libc/src/unix/notbsd/linux/other/b32/x86.rs
New upstream version 1.20.0+dfsg1
[rustc.git] / src / vendor / libc / src / unix / notbsd / linux / other / b32 / x86.rs
1 pub type c_char = i8;
2 pub type wchar_t = i32;
3 pub type greg_t = i32;
4
5 s! {
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
23 pub struct user_fpregs_struct {
24 pub cwd: ::c_long,
25 pub swd: ::c_long,
26 pub twd: ::c_long,
27 pub fip: ::c_long,
28 pub fcs: ::c_long,
29 pub foo: ::c_long,
30 pub fos: ::c_long,
31 pub st_space: [::c_long; 20],
32 }
33
34 pub struct user_fpxregs_struct {
35 pub cwd: ::c_ushort,
36 pub swd: ::c_ushort,
37 pub twd: ::c_ushort,
38 pub fop: ::c_ushort,
39 pub fip: ::c_long,
40 pub fcs: ::c_long,
41 pub foo: ::c_long,
42 pub fos: ::c_long,
43 pub mxcsr: ::c_long,
44 __reserved: ::c_long,
45 pub st_space: [::c_long; 32],
46 pub xmm_space: [::c_long; 32],
47 padding: [::c_long; 56],
48 }
49
50 pub struct user_regs_struct {
51 pub ebx: ::c_long,
52 pub ecx: ::c_long,
53 pub edx: ::c_long,
54 pub esi: ::c_long,
55 pub edi: ::c_long,
56 pub ebp: ::c_long,
57 pub eax: ::c_long,
58 pub xds: ::c_long,
59 pub xes: ::c_long,
60 pub xfs: ::c_long,
61 pub xgs: ::c_long,
62 pub orig_eax: ::c_long,
63 pub eip: ::c_long,
64 pub xcs: ::c_long,
65 pub eflags: ::c_long,
66 pub esp: ::c_long,
67 pub xss: ::c_long,
68 }
69
70 pub struct user {
71 pub regs: user_regs_struct,
72 pub u_fpvalid: ::c_int,
73 pub i387: user_fpregs_struct,
74 pub u_tsize: ::c_ulong,
75 pub u_dsize: ::c_ulong,
76 pub u_ssize: ::c_ulong,
77 pub start_code: ::c_ulong,
78 pub start_stack: ::c_ulong,
79 pub signal: ::c_long,
80 __reserved: ::c_int,
81 pub u_ar0: *mut user_regs_struct,
82 pub u_fpstate: *mut user_fpregs_struct,
83 pub magic: ::c_ulong,
84 pub u_comm: [c_char; 32],
85 pub u_debugreg: [::c_int; 8],
86 }
87
88 pub struct mcontext_t {
89 pub gregs: [greg_t; 19],
90 pub fpregs: *mut _libc_fpstate,
91 pub oldmask: ::c_ulong,
92 pub cr2: ::c_ulong,
93 }
94
95 pub struct ucontext_t {
96 pub uc_flags: ::c_ulong,
97 pub uc_link: *mut ucontext_t,
98 pub uc_stack: ::stack_t,
99 pub uc_mcontext: mcontext_t,
100 pub uc_sigmask: ::sigset_t,
101 __private: [u8; 112],
102 }
103
104 pub struct ipc_perm {
105 pub __key: ::key_t,
106 pub uid: ::uid_t,
107 pub gid: ::gid_t,
108 pub cuid: ::uid_t,
109 pub cgid: ::gid_t,
110 pub mode: ::c_ushort,
111 __pad1: ::c_ushort,
112 pub __seq: ::c_ushort,
113 __pad2: ::c_ushort,
114 __unused1: ::c_ulong,
115 __unused2: ::c_ulong
116 }
117
118 pub struct stat64 {
119 pub st_dev: ::dev_t,
120 __pad1: ::c_uint,
121 __st_ino: ::ino_t,
122 pub st_mode: ::mode_t,
123 pub st_nlink: ::nlink_t,
124 pub st_uid: ::uid_t,
125 pub st_gid: ::gid_t,
126 pub st_rdev: ::dev_t,
127 __pad2: ::c_uint,
128 pub st_size: ::off64_t,
129 pub st_blksize: ::blksize_t,
130 pub st_blocks: ::blkcnt64_t,
131 pub st_atime: ::time_t,
132 pub st_atime_nsec: ::c_long,
133 pub st_mtime: ::time_t,
134 pub st_mtime_nsec: ::c_long,
135 pub st_ctime: ::time_t,
136 pub st_ctime_nsec: ::c_long,
137 pub st_ino: ::ino64_t,
138 }
139
140 pub struct shmid_ds {
141 pub shm_perm: ::ipc_perm,
142 pub shm_segsz: ::size_t,
143 pub shm_atime: ::time_t,
144 __unused1: ::c_ulong,
145 pub shm_dtime: ::time_t,
146 __unused2: ::c_ulong,
147 pub shm_ctime: ::time_t,
148 __unused3: ::c_ulong,
149 pub shm_cpid: ::pid_t,
150 pub shm_lpid: ::pid_t,
151 pub shm_nattch: ::shmatt_t,
152 __unused4: ::c_ulong,
153 __unused5: ::c_ulong
154 }
155
156 pub struct msqid_ds {
157 pub msg_perm: ::ipc_perm,
158 pub msg_stime: ::time_t,
159 __glibc_reserved1: ::c_ulong,
160 pub msg_rtime: ::time_t,
161 __glibc_reserved2: ::c_ulong,
162 pub msg_ctime: ::time_t,
163 __glibc_reserved3: ::c_ulong,
164 __msg_cbytes: ::c_ulong,
165 pub msg_qnum: ::msgqnum_t,
166 pub msg_qbytes: ::msglen_t,
167 pub msg_lspid: ::pid_t,
168 pub msg_lrpid: ::pid_t,
169 __glibc_reserved4: ::c_ulong,
170 __glibc_reserved5: ::c_ulong,
171 }
172 }
173
174 pub const O_DIRECT: ::c_int = 0x4000;
175 pub const O_DIRECTORY: ::c_int = 0x10000;
176 pub const O_NOFOLLOW: ::c_int = 0x20000;
177
178 pub const MAP_LOCKED: ::c_int = 0x02000;
179 pub const MAP_NORESERVE: ::c_int = 0x04000;
180 pub const MAP_32BIT: ::c_int = 0x0040;
181
182 pub const EDEADLOCK: ::c_int = 35;
183
184 pub const SO_SNDBUFFORCE: ::c_int = 32;
185 pub const SO_RCVBUFFORCE: ::c_int = 33;
186 pub const SO_NO_CHECK: ::c_int = 11;
187 pub const SO_PASSCRED: ::c_int = 16;
188 pub const SO_PEERCRED: ::c_int = 17;
189 pub const SO_RCVLOWAT: ::c_int = 18;
190 pub const SO_SNDLOWAT: ::c_int = 19;
191 pub const SO_RCVTIMEO: ::c_int = 20;
192 pub const SO_SNDTIMEO: ::c_int = 21;
193
194 pub const FIOCLEX: ::c_ulong = 0x5451;
195 pub const FIONBIO: ::c_ulong = 0x5421;
196
197 pub const SYS_gettid: ::c_long = 224;
198 pub const SYS_perf_event_open: ::c_long = 336;
199
200 pub const PTRACE_GETFPXREGS: ::c_uint = 18;
201 pub const PTRACE_SETFPXREGS: ::c_uint = 19;
202
203 pub const MCL_CURRENT: ::c_int = 0x0001;
204 pub const MCL_FUTURE: ::c_int = 0x0002;
205
206 pub const SIGSTKSZ: ::size_t = 8192;
207 pub const MINSIGSTKSZ: ::size_t = 2048;
208 pub const CBAUD: ::tcflag_t = 0o0010017;
209 pub const TAB1: ::c_int = 0x00000800;
210 pub const TAB2: ::c_int = 0x00001000;
211 pub const TAB3: ::c_int = 0x00001800;
212 pub const CR1: ::c_int = 0x00000200;
213 pub const CR2: ::c_int = 0x00000400;
214 pub const CR3: ::c_int = 0x00000600;
215 pub const FF1: ::c_int = 0x00008000;
216 pub const BS1: ::c_int = 0x00002000;
217 pub const VT1: ::c_int = 0x00004000;
218 pub const VWERASE: usize = 14;
219 pub const VREPRINT: usize = 12;
220 pub const VSUSP: usize = 10;
221 pub const VSTART: usize = 8;
222 pub const VSTOP: usize = 9;
223 pub const VDISCARD: usize = 13;
224 pub const VTIME: usize = 5;
225 pub const IXON: ::tcflag_t = 0x00000400;
226 pub const IXOFF: ::tcflag_t = 0x00001000;
227 pub const ONLCR: ::tcflag_t = 0x4;
228 pub const CSIZE: ::tcflag_t = 0x00000030;
229 pub const CS6: ::tcflag_t = 0x00000010;
230 pub const CS7: ::tcflag_t = 0x00000020;
231 pub const CS8: ::tcflag_t = 0x00000030;
232 pub const CSTOPB: ::tcflag_t = 0x00000040;
233 pub const CREAD: ::tcflag_t = 0x00000080;
234 pub const PARENB: ::tcflag_t = 0x00000100;
235 pub const PARODD: ::tcflag_t = 0x00000200;
236 pub const HUPCL: ::tcflag_t = 0x00000400;
237 pub const CLOCAL: ::tcflag_t = 0x00000800;
238 pub const ECHOKE: ::tcflag_t = 0x00000800;
239 pub const ECHOE: ::tcflag_t = 0x00000010;
240 pub const ECHOK: ::tcflag_t = 0x00000020;
241 pub const ECHONL: ::tcflag_t = 0x00000040;
242 pub const ECHOPRT: ::tcflag_t = 0x00000400;
243 pub const ECHOCTL: ::tcflag_t = 0x00000200;
244 pub const ISIG: ::tcflag_t = 0x00000001;
245 pub const ICANON: ::tcflag_t = 0x00000002;
246 pub const PENDIN: ::tcflag_t = 0x00004000;
247 pub const NOFLSH: ::tcflag_t = 0x00000080;
248 pub const CIBAUD: ::tcflag_t = 0o02003600000;
249 pub const CBAUDEX: ::tcflag_t = 0o010000;
250 pub const VSWTC: usize = 7;
251 pub const OLCUC: ::tcflag_t = 0o000002;
252 pub const NLDLY: ::tcflag_t = 0o000400;
253 pub const CRDLY: ::tcflag_t = 0o003000;
254 pub const TABDLY: ::tcflag_t = 0o014000;
255 pub const BSDLY: ::tcflag_t = 0o020000;
256 pub const FFDLY: ::tcflag_t = 0o100000;
257 pub const VTDLY: ::tcflag_t = 0o040000;
258 pub const XTABS: ::tcflag_t = 0o014000;
259
260 pub const B0: ::speed_t = 0o000000;
261 pub const B50: ::speed_t = 0o000001;
262 pub const B75: ::speed_t = 0o000002;
263 pub const B110: ::speed_t = 0o000003;
264 pub const B134: ::speed_t = 0o000004;
265 pub const B150: ::speed_t = 0o000005;
266 pub const B200: ::speed_t = 0o000006;
267 pub const B300: ::speed_t = 0o000007;
268 pub const B600: ::speed_t = 0o000010;
269 pub const B1200: ::speed_t = 0o000011;
270 pub const B1800: ::speed_t = 0o000012;
271 pub const B2400: ::speed_t = 0o000013;
272 pub const B4800: ::speed_t = 0o000014;
273 pub const B9600: ::speed_t = 0o000015;
274 pub const B19200: ::speed_t = 0o000016;
275 pub const B38400: ::speed_t = 0o000017;
276 pub const EXTA: ::speed_t = B19200;
277 pub const EXTB: ::speed_t = B38400;
278 pub const B57600: ::speed_t = 0o010001;
279 pub const B115200: ::speed_t = 0o010002;
280 pub const B230400: ::speed_t = 0o010003;
281 pub const B460800: ::speed_t = 0o010004;
282 pub const B500000: ::speed_t = 0o010005;
283 pub const B576000: ::speed_t = 0o010006;
284 pub const B921600: ::speed_t = 0o010007;
285 pub const B1000000: ::speed_t = 0o010010;
286 pub const B1152000: ::speed_t = 0o010011;
287 pub const B1500000: ::speed_t = 0o010012;
288 pub const B2000000: ::speed_t = 0o010013;
289 pub const B2500000: ::speed_t = 0o010014;
290 pub const B3000000: ::speed_t = 0o010015;
291 pub const B3500000: ::speed_t = 0o010016;
292 pub const B4000000: ::speed_t = 0o010017;
293
294 pub const VEOL: usize = 11;
295 pub const VEOL2: usize = 16;
296 pub const VMIN: usize = 6;
297 pub const IEXTEN: ::tcflag_t = 0x00008000;
298 pub const TOSTOP: ::tcflag_t = 0x00000100;
299 pub const FLUSHO: ::tcflag_t = 0x00001000;
300 pub const EXTPROC: ::tcflag_t = 0x00010000;
301 pub const TCGETS: ::c_ulong = 0x5401;
302 pub const TCSETS: ::c_ulong = 0x5402;
303 pub const TCSETSW: ::c_ulong = 0x5403;
304 pub const TCSETSF: ::c_ulong = 0x5404;
305 pub const TCGETA: ::c_ulong = 0x5405;
306 pub const TCSETA: ::c_ulong = 0x5406;
307 pub const TCSETAW: ::c_ulong = 0x5407;
308 pub const TCSETAF: ::c_ulong = 0x5408;
309 pub const TCSBRK: ::c_ulong = 0x5409;
310 pub const TCXONC: ::c_ulong = 0x540A;
311 pub const TCFLSH: ::c_ulong = 0x540B;
312 pub const TIOCINQ: ::c_ulong = 0x541B;
313 pub const TIOCGPGRP: ::c_ulong = 0x540F;
314 pub const TIOCSPGRP: ::c_ulong = 0x5410;
315 pub const TIOCOUTQ: ::c_ulong = 0x5411;
316 pub const TIOCGWINSZ: ::c_ulong = 0x5413;
317 pub const TIOCSWINSZ: ::c_ulong = 0x5414;
318 pub const FIONREAD: ::c_ulong = 0x541B;
319
320 extern {
321 pub fn getcontext(ucp: *mut ucontext_t) -> ::c_int;
322 pub fn setcontext(ucp: *const ucontext_t) -> ::c_int;
323 pub fn makecontext(ucp: *mut ucontext_t,
324 func: extern fn (),
325 argc: ::c_int, ...);
326 pub fn swapcontext(uocp: *mut ucontext_t,
327 ucp: *const ucontext_t) -> ::c_int;
328 }