summaryrefslogtreecommitdiff
path: root/third_party/libc/src/unix/notbsd/linux/musl/b32/x86.rs
diff options
context:
space:
mode:
Diffstat (limited to 'third_party/libc/src/unix/notbsd/linux/musl/b32/x86.rs')
-rw-r--r--third_party/libc/src/unix/notbsd/linux/musl/b32/x86.rs322
1 files changed, 322 insertions, 0 deletions
diff --git a/third_party/libc/src/unix/notbsd/linux/musl/b32/x86.rs b/third_party/libc/src/unix/notbsd/linux/musl/b32/x86.rs
new file mode 100644
index 0000000..9d057de
--- /dev/null
+++ b/third_party/libc/src/unix/notbsd/linux/musl/b32/x86.rs
@@ -0,0 +1,322 @@
1pub type c_char = i8;
2pub type wchar_t = i32;
3
4s! {
5 pub struct stat {
6 pub st_dev: ::dev_t,
7 __st_dev_padding: ::c_int,
8 __st_ino_truncated: ::c_long,
9 pub st_mode: ::mode_t,
10 pub st_nlink: ::nlink_t,
11 pub st_uid: ::uid_t,
12 pub st_gid: ::gid_t,
13 pub st_rdev: ::dev_t,
14 __st_rdev_padding: ::c_int,
15 pub st_size: ::off_t,
16 pub st_blksize: ::blksize_t,
17 pub st_blocks: ::blkcnt_t,
18 pub st_atime: ::time_t,
19 pub st_atime_nsec: ::c_long,
20 pub st_mtime: ::time_t,
21 pub st_mtime_nsec: ::c_long,
22 pub st_ctime: ::time_t,
23 pub st_ctime_nsec: ::c_long,
24 pub st_ino: ::ino_t,
25 }
26
27 pub struct stat64 {
28 pub st_dev: ::dev_t,
29 __st_dev_padding: ::c_int,
30 __st_ino_truncated: ::c_long,
31 pub st_mode: ::mode_t,
32 pub st_nlink: ::nlink_t,
33 pub st_uid: ::uid_t,
34 pub st_gid: ::gid_t,
35 pub st_rdev: ::dev_t,
36 __st_rdev_padding: ::c_int,
37 pub st_size: ::off_t,
38 pub st_blksize: ::blksize_t,
39 pub st_blocks: ::blkcnt_t,
40 pub st_atime: ::time_t,
41 pub st_atime_nsec: ::c_long,
42 pub st_mtime: ::time_t,
43 pub st_mtime_nsec: ::c_long,
44 pub st_ctime: ::time_t,
45 pub st_ctime_nsec: ::c_long,
46 pub st_ino: ::ino_t,
47 }
48
49 pub struct stack_t {
50 pub ss_sp: *mut ::c_void,
51 pub ss_flags: ::c_int,
52 pub ss_size: ::size_t
53 }
54
55 pub struct shmid_ds {
56 pub shm_perm: ::ipc_perm,
57 pub shm_segsz: ::size_t,
58 pub shm_atime: ::time_t,
59 __unused1: ::c_int,
60 pub shm_dtime: ::time_t,
61 __unused2: ::c_int,
62 pub shm_ctime: ::time_t,
63 __unused3: ::c_int,
64 pub shm_cpid: ::pid_t,
65 pub shm_lpid: ::pid_t,
66 pub shm_nattch: ::c_ulong,
67 __pad1: ::c_ulong,
68 __pad2: ::c_ulong,
69 }
70
71 pub struct statfs {
72 pub f_type: ::c_ulong,
73 pub f_bsize: ::c_ulong,
74 pub f_blocks: ::fsblkcnt_t,
75 pub f_bfree: ::fsblkcnt_t,
76 pub f_bavail: ::fsblkcnt_t,
77 pub f_files: ::fsfilcnt_t,
78 pub f_ffree: ::fsfilcnt_t,
79 pub f_fsid: ::fsid_t,
80 pub f_namelen: ::c_ulong,
81 pub f_frsize: ::c_ulong,
82 pub f_flags: ::c_ulong,
83 pub f_spare: [::c_ulong; 4],
84 }
85
86 pub struct mcontext_t {
87 __private: [u32; 22]
88 }
89
90 pub struct ucontext_t {
91 pub uc_flags: ::c_ulong,
92 pub uc_link: *mut ucontext_t,
93 pub uc_stack: ::stack_t,
94 pub uc_mcontext: mcontext_t,
95 pub uc_sigmask: ::sigset_t,
96 __private: [u8; 112],
97 }
98}
99
100pub const O_DIRECT: ::c_int = 0x4000;
101pub const O_DIRECTORY: ::c_int = 0x10000;
102pub const O_NOFOLLOW: ::c_int = 0x20000;
103pub const O_ASYNC: ::c_int = 0x2000;
104
105pub const FIOCLEX: ::c_int = 0x5451;
106pub const FIONBIO: ::c_int = 0x5421;
107
108pub const RLIMIT_RSS: ::c_int = 5;
109pub const RLIMIT_NOFILE: ::c_int = 7;
110pub const RLIMIT_AS: ::c_int = 9;
111pub const RLIMIT_NPROC: ::c_int = 6;
112pub const RLIMIT_MEMLOCK: ::c_int = 8;
113
114pub const O_APPEND: ::c_int = 1024;
115pub const O_CREAT: ::c_int = 64;
116pub const O_EXCL: ::c_int = 128;
117pub const O_NOCTTY: ::c_int = 256;
118pub const O_NONBLOCK: ::c_int = 2048;
119pub const O_SYNC: ::c_int = 1052672;
120pub const O_RSYNC: ::c_int = 1052672;
121pub const O_DSYNC: ::c_int = 4096;
122
123pub const SOCK_NONBLOCK: ::c_int = 2048;
124
125pub const MAP_ANON: ::c_int = 0x0020;
126pub const MAP_GROWSDOWN: ::c_int = 0x0100;
127pub const MAP_DENYWRITE: ::c_int = 0x0800;
128pub const MAP_EXECUTABLE: ::c_int = 0x01000;
129pub const MAP_LOCKED: ::c_int = 0x02000;
130pub const MAP_NORESERVE: ::c_int = 0x04000;
131pub const MAP_POPULATE: ::c_int = 0x08000;
132pub const MAP_NONBLOCK: ::c_int = 0x010000;
133pub const MAP_STACK: ::c_int = 0x020000;
134
135pub const SOCK_STREAM: ::c_int = 1;
136pub const SOCK_DGRAM: ::c_int = 2;
137pub const SOCK_SEQPACKET: ::c_int = 5;
138
139pub const SOL_SOCKET: ::c_int = 1;
140
141pub const EDEADLK: ::c_int = 35;
142pub const ENAMETOOLONG: ::c_int = 36;
143pub const ENOLCK: ::c_int = 37;
144pub const ENOSYS: ::c_int = 38;
145pub const ENOTEMPTY: ::c_int = 39;
146pub const ELOOP: ::c_int = 40;
147pub const ENOMSG: ::c_int = 42;
148pub const EIDRM: ::c_int = 43;
149pub const ECHRNG: ::c_int = 44;
150pub const EL2NSYNC: ::c_int = 45;
151pub const EL3HLT: ::c_int = 46;
152pub const EL3RST: ::c_int = 47;
153pub const ELNRNG: ::c_int = 48;
154pub const EUNATCH: ::c_int = 49;
155pub const ENOCSI: ::c_int = 50;
156pub const EL2HLT: ::c_int = 51;
157pub const EBADE: ::c_int = 52;
158pub const EBADR: ::c_int = 53;
159pub const EXFULL: ::c_int = 54;
160pub const ENOANO: ::c_int = 55;
161pub const EBADRQC: ::c_int = 56;
162pub const EBADSLT: ::c_int = 57;
163pub const EDEADLOCK: ::c_int = EDEADLK;
164pub const EMULTIHOP: ::c_int = 72;
165pub const EBADMSG: ::c_int = 74;
166pub const EOVERFLOW: ::c_int = 75;
167pub const ENOTUNIQ: ::c_int = 76;
168pub const EBADFD: ::c_int = 77;
169pub const EREMCHG: ::c_int = 78;
170pub const ELIBACC: ::c_int = 79;
171pub const ELIBBAD: ::c_int = 80;
172pub const ELIBSCN: ::c_int = 81;
173pub const ELIBMAX: ::c_int = 82;
174pub const ELIBEXEC: ::c_int = 83;
175pub const EILSEQ: ::c_int = 84;
176pub const ERESTART: ::c_int = 85;
177pub const ESTRPIPE: ::c_int = 86;
178pub const EUSERS: ::c_int = 87;
179pub const ENOTSOCK: ::c_int = 88;
180pub const EDESTADDRREQ: ::c_int = 89;
181pub const EMSGSIZE: ::c_int = 90;
182pub const EPROTOTYPE: ::c_int = 91;
183pub const ENOPROTOOPT: ::c_int = 92;
184pub const EPROTONOSUPPORT: ::c_int = 93;
185pub const ESOCKTNOSUPPORT: ::c_int = 94;
186pub const EOPNOTSUPP: ::c_int = 95;
187pub const EPFNOSUPPORT: ::c_int = 96;
188pub const EAFNOSUPPORT: ::c_int = 97;
189pub const EADDRINUSE: ::c_int = 98;
190pub const EADDRNOTAVAIL: ::c_int = 99;
191pub const ENETDOWN: ::c_int = 100;
192pub const ENETUNREACH: ::c_int = 101;
193pub const ENETRESET: ::c_int = 102;
194pub const ECONNABORTED: ::c_int = 103;
195pub const ECONNRESET: ::c_int = 104;
196pub const ENOBUFS: ::c_int = 105;
197pub const EISCONN: ::c_int = 106;
198pub const ENOTCONN: ::c_int = 107;
199pub const ESHUTDOWN: ::c_int = 108;
200pub const ETOOMANYREFS: ::c_int = 109;
201pub const ETIMEDOUT: ::c_int = 110;
202pub const ECONNREFUSED: ::c_int = 111;
203pub const EHOSTDOWN: ::c_int = 112;
204pub const EHOSTUNREACH: ::c_int = 113;
205pub const EALREADY: ::c_int = 114;
206pub const EINPROGRESS: ::c_int = 115;
207pub const ESTALE: ::c_int = 116;
208pub const EUCLEAN: ::c_int = 117;
209pub const ENOTNAM: ::c_int = 118;
210pub const ENAVAIL: ::c_int = 119;
211pub const EISNAM: ::c_int = 120;
212pub const EREMOTEIO: ::c_int = 121;
213pub const EDQUOT: ::c_int = 122;
214pub const ENOMEDIUM: ::c_int = 123;
215pub const EMEDIUMTYPE: ::c_int = 124;
216pub const ECANCELED: ::c_int = 125;
217pub const ENOKEY: ::c_int = 126;
218pub const EKEYEXPIRED: ::c_int = 127;
219pub const EKEYREVOKED: ::c_int = 128;
220pub const EKEYREJECTED: ::c_int = 129;
221pub const EOWNERDEAD: ::c_int = 130;
222pub const ENOTRECOVERABLE: ::c_int = 131;
223pub const ERFKILL: ::c_int = 132;
224pub const EHWPOISON: ::c_int = 133;
225
226pub const SO_REUSEADDR: ::c_int = 2;
227pub const SO_TYPE: ::c_int = 3;
228pub const SO_ERROR: ::c_int = 4;
229pub const SO_DONTROUTE: ::c_int = 5;
230pub const SO_BROADCAST: ::c_int = 6;
231pub const SO_SNDBUF: ::c_int = 7;
232pub const SO_RCVBUF: ::c_int = 8;
233pub const SO_KEEPALIVE: ::c_int = 9;
234pub const SO_OOBINLINE: ::c_int = 10;
235pub const SO_LINGER: ::c_int = 13;
236pub const SO_REUSEPORT: ::c_int = 15;
237pub const SO_RCVLOWAT: ::c_int = 18;
238pub const SO_SNDLOWAT: ::c_int = 19;
239pub const SO_RCVTIMEO: ::c_int = 20;
240pub const SO_SNDTIMEO: ::c_int = 21;
241pub const SO_ACCEPTCONN: ::c_int = 30;
242
243pub const SA_ONSTACK: ::c_int = 0x08000000;
244pub const SA_SIGINFO: ::c_int = 0x00000004;
245pub const SA_NOCLDWAIT: ::c_int = 0x00000002;
246
247pub const SIGCHLD: ::c_int = 17;
248pub const SIGBUS: ::c_int = 7;
249pub const SIGTTIN: ::c_int = 21;
250pub const SIGTTOU: ::c_int = 22;
251pub const SIGXCPU: ::c_int = 24;
252pub const SIGXFSZ: ::c_int = 25;
253pub const SIGVTALRM: ::c_int = 26;
254pub const SIGPROF: ::c_int = 27;
255pub const SIGWINCH: ::c_int = 28;
256pub const SIGUSR1: ::c_int = 10;
257pub const SIGUSR2: ::c_int = 12;
258pub const SIGCONT: ::c_int = 18;
259pub const SIGSTOP: ::c_int = 19;
260pub const SIGTSTP: ::c_int = 20;
261pub const SIGURG: ::c_int = 23;
262pub const SIGIO: ::c_int = 29;
263pub const SIGSYS: ::c_int = 31;
264pub const SIGSTKFLT: ::c_int = 16;
265pub const SIGPOLL: ::c_int = 29;
266pub const SIGPWR: ::c_int = 30;
267pub const SIG_SETMASK: ::c_int = 2;
268pub const SIG_BLOCK: ::c_int = 0x000000;
269pub const SIG_UNBLOCK: ::c_int = 0x01;
270
271pub const EXTPROC: ::tcflag_t = 0x00010000;
272
273pub const MAP_HUGETLB: ::c_int = 0x040000;
274pub const MAP_32BIT: ::c_int = 0x0040;
275
276pub const F_GETLK: ::c_int = 12;
277pub const F_GETOWN: ::c_int = 9;
278pub const F_SETLK: ::c_int = 13;
279pub const F_SETLKW: ::c_int = 14;
280pub const F_SETOWN: ::c_int = 8;
281
282pub const VEOF: usize = 4;
283pub const VEOL: usize = 11;
284pub const VEOL2: usize = 16;
285pub const VMIN: usize = 6;
286pub const IEXTEN: ::tcflag_t = 0x00008000;
287pub const TOSTOP: ::tcflag_t = 0x00000100;
288pub const FLUSHO: ::tcflag_t = 0x00001000;
289
290pub const TCGETS: ::c_int = 0x5401;
291pub const TCSETS: ::c_int = 0x5402;
292pub const TCSETSW: ::c_int = 0x5403;
293pub const TCSETSF: ::c_int = 0x5404;
294pub const TCGETA: ::c_int = 0x5405;
295pub const TCSETA: ::c_int = 0x5406;
296pub const TCSETAW: ::c_int = 0x5407;
297pub const TCSETAF: ::c_int = 0x5408;
298pub const TCSBRK: ::c_int = 0x5409;
299pub const TCXONC: ::c_int = 0x540A;
300pub const TCFLSH: ::c_int = 0x540B;
301pub const TIOCGSOFTCAR: ::c_int = 0x5419;
302pub const TIOCSSOFTCAR: ::c_int = 0x541A;
303pub const TIOCLINUX: ::c_int = 0x541C;
304pub const TIOCGSERIAL: ::c_int = 0x541E;
305pub const TIOCEXCL: ::c_int = 0x540C;
306pub const TIOCNXCL: ::c_int = 0x540D;
307pub const TIOCSCTTY: ::c_int = 0x540E;
308pub const TIOCGPGRP: ::c_int = 0x540F;
309pub const TIOCSPGRP: ::c_int = 0x5410;
310pub const TIOCOUTQ: ::c_int = 0x5411;
311pub const TIOCSTI: ::c_int = 0x5412;
312pub const TIOCGWINSZ: ::c_int = 0x5413;
313pub const TIOCSWINSZ: ::c_int = 0x5414;
314pub const TIOCMGET: ::c_int = 0x5415;
315pub const TIOCMBIS: ::c_int = 0x5416;
316pub const TIOCMBIC: ::c_int = 0x5417;
317pub const TIOCMSET: ::c_int = 0x5418;
318pub const FIONREAD: ::c_int = 0x541B;
319pub const TIOCCONS: ::c_int = 0x541D;
320
321pub const SYS_gettid: ::c_long = 224;
322pub const SYS_perf_event_open: ::c_long = 336;