]>
Commit | Line | Data |
---|---|---|
7453a54e SL |
1 | pub type c_char = u8; |
2 | pub type wchar_t = u32; | |
92a42be0 | 3 | |
54a0048b SL |
4 | s! { |
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 | ||
9cc50fc6 SL |
87 | pub const O_DIRECT: ::c_int = 0x4000; |
88 | pub const O_DIRECTORY: ::c_int = 0x10000; | |
89 | pub const O_NOFOLLOW: ::c_int = 0x20000; | |
90 | pub const O_ASYNC: ::c_int = 0x2000; | |
92a42be0 SL |
91 | |
92 | pub const FIOCLEX: ::c_int = 0x5451; | |
93 | pub const FIONBIO: ::c_int = 0x5421; | |
94 | ||
95 | pub const RLIMIT_RSS: ::c_int = 5; | |
96 | pub const RLIMIT_NOFILE: ::c_int = 7; | |
97 | pub const RLIMIT_AS: ::c_int = 9; | |
98 | pub const RLIMIT_NPROC: ::c_int = 6; | |
99 | pub const RLIMIT_MEMLOCK: ::c_int = 8; | |
92a42be0 SL |
100 | |
101 | pub const O_APPEND: ::c_int = 1024; | |
102 | pub const O_CREAT: ::c_int = 64; | |
103 | pub const O_EXCL: ::c_int = 128; | |
104 | pub const O_NOCTTY: ::c_int = 256; | |
105 | pub const O_NONBLOCK: ::c_int = 2048; | |
106 | pub const O_SYNC: ::c_int = 1052672; | |
107 | pub const O_RSYNC: ::c_int = 1052672; | |
108 | pub const O_DSYNC: ::c_int = 4096; | |
109 | ||
7453a54e SL |
110 | pub const SOCK_NONBLOCK: ::c_int = 2048; |
111 | ||
92a42be0 | 112 | pub const MAP_ANON: ::c_int = 0x0020; |
92a42be0 SL |
113 | pub const MAP_GROWSDOWN: ::c_int = 0x0100; |
114 | pub const MAP_DENYWRITE: ::c_int = 0x0800; | |
115 | pub const MAP_EXECUTABLE: ::c_int = 0x01000; | |
116 | pub const MAP_LOCKED: ::c_int = 0x02000; | |
117 | pub const MAP_NORESERVE: ::c_int = 0x04000; | |
118 | pub const MAP_POPULATE: ::c_int = 0x08000; | |
119 | pub const MAP_NONBLOCK: ::c_int = 0x010000; | |
120 | pub const MAP_STACK: ::c_int = 0x020000; | |
121 | ||
7453a54e SL |
122 | pub const SOCK_STREAM: ::c_int = 1; |
123 | pub const SOCK_DGRAM: ::c_int = 2; | |
124 | ||
125 | pub const SOL_SOCKET: ::c_int = 1; | |
126 | ||
92a42be0 SL |
127 | pub const EDEADLK: ::c_int = 35; |
128 | pub const ENAMETOOLONG: ::c_int = 36; | |
129 | pub const ENOLCK: ::c_int = 37; | |
130 | pub const ENOSYS: ::c_int = 38; | |
131 | pub const ENOTEMPTY: ::c_int = 39; | |
132 | pub const ELOOP: ::c_int = 40; | |
133 | pub const ENOMSG: ::c_int = 42; | |
134 | pub const EIDRM: ::c_int = 43; | |
135 | pub const ECHRNG: ::c_int = 44; | |
136 | pub const EL2NSYNC: ::c_int = 45; | |
137 | pub const EL3HLT: ::c_int = 46; | |
138 | pub const EL3RST: ::c_int = 47; | |
139 | pub const ELNRNG: ::c_int = 48; | |
140 | pub const EUNATCH: ::c_int = 49; | |
141 | pub const ENOCSI: ::c_int = 50; | |
142 | pub const EL2HLT: ::c_int = 51; | |
143 | pub const EBADE: ::c_int = 52; | |
144 | pub const EBADR: ::c_int = 53; | |
145 | pub const EXFULL: ::c_int = 54; | |
146 | pub const ENOANO: ::c_int = 55; | |
147 | pub const EBADRQC: ::c_int = 56; | |
148 | pub const EBADSLT: ::c_int = 57; | |
149 | pub const EDEADLOCK: ::c_int = EDEADLK; | |
150 | pub const EMULTIHOP: ::c_int = 72; | |
7453a54e | 151 | pub const EBADMSG: ::c_int = 74; |
92a42be0 SL |
152 | pub const EOVERFLOW: ::c_int = 75; |
153 | pub const ENOTUNIQ: ::c_int = 76; | |
154 | pub const EBADFD: ::c_int = 77; | |
92a42be0 SL |
155 | pub const EREMCHG: ::c_int = 78; |
156 | pub const ELIBACC: ::c_int = 79; | |
157 | pub const ELIBBAD: ::c_int = 80; | |
158 | pub const ELIBSCN: ::c_int = 81; | |
159 | pub const ELIBMAX: ::c_int = 82; | |
160 | pub const ELIBEXEC: ::c_int = 83; | |
161 | pub const EILSEQ: ::c_int = 84; | |
162 | pub const ERESTART: ::c_int = 85; | |
163 | pub const ESTRPIPE: ::c_int = 86; | |
164 | pub const EUSERS: ::c_int = 87; | |
165 | pub const ENOTSOCK: ::c_int = 88; | |
166 | pub const EDESTADDRREQ: ::c_int = 89; | |
167 | pub const EMSGSIZE: ::c_int = 90; | |
168 | pub const EPROTOTYPE: ::c_int = 91; | |
169 | pub const ENOPROTOOPT: ::c_int = 92; | |
170 | pub const EPROTONOSUPPORT: ::c_int = 93; | |
171 | pub const ESOCKTNOSUPPORT: ::c_int = 94; | |
172 | pub const EOPNOTSUPP: ::c_int = 95; | |
173 | pub const EPFNOSUPPORT: ::c_int = 96; | |
174 | pub const EAFNOSUPPORT: ::c_int = 97; | |
175 | pub const EADDRINUSE: ::c_int = 98; | |
176 | pub const EADDRNOTAVAIL: ::c_int = 99; | |
177 | pub const ENETDOWN: ::c_int = 100; | |
178 | pub const ENETUNREACH: ::c_int = 101; | |
179 | pub const ENETRESET: ::c_int = 102; | |
180 | pub const ECONNABORTED: ::c_int = 103; | |
181 | pub const ECONNRESET: ::c_int = 104; | |
182 | pub const ENOBUFS: ::c_int = 105; | |
183 | pub const EISCONN: ::c_int = 106; | |
184 | pub const ENOTCONN: ::c_int = 107; | |
185 | pub const ESHUTDOWN: ::c_int = 108; | |
186 | pub const ETOOMANYREFS: ::c_int = 109; | |
187 | pub const ETIMEDOUT: ::c_int = 110; | |
188 | pub const ECONNREFUSED: ::c_int = 111; | |
189 | pub const EHOSTDOWN: ::c_int = 112; | |
190 | pub const EHOSTUNREACH: ::c_int = 113; | |
191 | pub const EALREADY: ::c_int = 114; | |
192 | pub const EINPROGRESS: ::c_int = 115; | |
193 | pub const ESTALE: ::c_int = 116; | |
194 | pub const EUCLEAN: ::c_int = 117; | |
195 | pub const ENOTNAM: ::c_int = 118; | |
196 | pub const ENAVAIL: ::c_int = 119; | |
197 | pub const EISNAM: ::c_int = 120; | |
198 | pub const EREMOTEIO: ::c_int = 121; | |
199 | pub const EDQUOT: ::c_int = 122; | |
200 | pub const ENOMEDIUM: ::c_int = 123; | |
201 | pub const EMEDIUMTYPE: ::c_int = 124; | |
202 | pub const ECANCELED: ::c_int = 125; | |
203 | pub const ENOKEY: ::c_int = 126; | |
204 | pub const EKEYEXPIRED: ::c_int = 127; | |
205 | pub const EKEYREVOKED: ::c_int = 128; | |
206 | pub const EKEYREJECTED: ::c_int = 129; | |
207 | pub const EOWNERDEAD: ::c_int = 130; | |
208 | pub const ENOTRECOVERABLE: ::c_int = 131; | |
92a42be0 | 209 | pub const ERFKILL: ::c_int = 132; |
7453a54e | 210 | pub const EHWPOISON: ::c_int = 133; |
92a42be0 SL |
211 | |
212 | pub const SO_REUSEADDR: ::c_int = 2; | |
213 | pub const SO_TYPE: ::c_int = 3; | |
214 | pub const SO_ERROR: ::c_int = 4; | |
215 | pub const SO_DONTROUTE: ::c_int = 5; | |
216 | pub const SO_BROADCAST: ::c_int = 6; | |
217 | pub const SO_SNDBUF: ::c_int = 7; | |
218 | pub const SO_RCVBUF: ::c_int = 8; | |
219 | pub const SO_KEEPALIVE: ::c_int = 9; | |
220 | pub const SO_OOBINLINE: ::c_int = 10; | |
221 | pub const SO_LINGER: ::c_int = 13; | |
222 | pub const SO_REUSEPORT: ::c_int = 15; | |
223 | pub const SO_RCVLOWAT: ::c_int = 18; | |
224 | pub const SO_SNDLOWAT: ::c_int = 19; | |
225 | pub const SO_RCVTIMEO: ::c_int = 20; | |
226 | pub const SO_SNDTIMEO: ::c_int = 21; | |
227 | pub const SO_ACCEPTCONN: ::c_int = 30; | |
228 | ||
92a42be0 SL |
229 | pub const SA_ONSTACK: ::c_int = 0x08000000; |
230 | pub const SA_SIGINFO: ::c_int = 0x00000004; | |
231 | pub const SA_NOCLDWAIT: ::c_int = 0x00000002; | |
232 | ||
233 | pub const SIGCHLD: ::c_int = 17; | |
234 | pub const SIGBUS: ::c_int = 7; | |
9cc50fc6 SL |
235 | pub const SIGTTIN: ::c_int = 21; |
236 | pub const SIGTTOU: ::c_int = 22; | |
237 | pub const SIGXCPU: ::c_int = 24; | |
238 | pub const SIGXFSZ: ::c_int = 25; | |
239 | pub const SIGVTALRM: ::c_int = 26; | |
240 | pub const SIGPROF: ::c_int = 27; | |
241 | pub const SIGWINCH: ::c_int = 28; | |
242 | pub const SIGUSR1: ::c_int = 10; | |
243 | pub const SIGUSR2: ::c_int = 12; | |
244 | pub const SIGCONT: ::c_int = 18; | |
245 | pub const SIGSTOP: ::c_int = 19; | |
246 | pub const SIGTSTP: ::c_int = 20; | |
247 | pub const SIGURG: ::c_int = 23; | |
248 | pub const SIGIO: ::c_int = 29; | |
249 | pub const SIGSYS: ::c_int = 31; | |
250 | pub const SIGSTKFLT: ::c_int = 16; | |
9cc50fc6 SL |
251 | pub const SIGPOLL: ::c_int = 29; |
252 | pub const SIGPWR: ::c_int = 30; | |
92a42be0 | 253 | pub const SIG_SETMASK: ::c_int = 2; |
9cc50fc6 SL |
254 | pub const SIG_BLOCK: ::c_int = 0x000000; |
255 | pub const SIG_UNBLOCK: ::c_int = 0x01; | |
92a42be0 | 256 | |
9cc50fc6 SL |
257 | pub const EXTPROC: ::tcflag_t = 0x00010000; |
258 | ||
9cc50fc6 SL |
259 | pub const MAP_HUGETLB: ::c_int = 0x040000; |
260 | ||
7453a54e | 261 | pub const F_GETLK: ::c_int = 12; |
9cc50fc6 | 262 | pub const F_GETOWN: ::c_int = 9; |
7453a54e SL |
263 | pub const F_SETLK: ::c_int = 13; |
264 | pub const F_SETLKW: ::c_int = 14; | |
9cc50fc6 SL |
265 | pub const F_SETOWN: ::c_int = 8; |
266 | ||
267 | pub const VEOF: usize = 4; | |
268 | pub const VEOL: usize = 11; | |
269 | pub const VEOL2: usize = 16; | |
270 | pub const VMIN: usize = 6; | |
271 | pub const IEXTEN: ::tcflag_t = 0x00008000; | |
272 | pub const TOSTOP: ::tcflag_t = 0x00000100; | |
273 | pub const FLUSHO: ::tcflag_t = 0x00001000; | |
274 | ||
9cc50fc6 SL |
275 | pub const TCGETS: ::c_ulong = 0x5401; |
276 | pub const TCSETS: ::c_ulong = 0x5402; | |
277 | pub const TCSETSW: ::c_ulong = 0x5403; | |
278 | pub const TCSETSF: ::c_ulong = 0x5404; | |
279 | pub const TCGETA: ::c_ulong = 0x5405; | |
280 | pub const TCSETA: ::c_ulong = 0x5406; | |
281 | pub const TCSETAW: ::c_ulong = 0x5407; | |
282 | pub const TCSETAF: ::c_ulong = 0x5408; | |
283 | pub const TCSBRK: ::c_ulong = 0x5409; | |
284 | pub const TCXONC: ::c_ulong = 0x540A; | |
285 | pub const TCFLSH: ::c_ulong = 0x540B; | |
286 | pub const TIOCGSOFTCAR: ::c_ulong = 0x5419; | |
287 | pub const TIOCSSOFTCAR: ::c_ulong = 0x541A; | |
9cc50fc6 SL |
288 | pub const TIOCLINUX: ::c_ulong = 0x541C; |
289 | pub const TIOCGSERIAL: ::c_ulong = 0x541E; | |
290 | pub const TIOCEXCL: ::c_ulong = 0x540C; | |
291 | pub const TIOCNXCL: ::c_ulong = 0x540D; | |
292 | pub const TIOCSCTTY: ::c_ulong = 0x540E; | |
293 | pub const TIOCGPGRP: ::c_ulong = 0x540F; | |
294 | pub const TIOCSPGRP: ::c_ulong = 0x5410; | |
295 | pub const TIOCOUTQ: ::c_ulong = 0x5411; | |
296 | pub const TIOCSTI: ::c_ulong = 0x5412; | |
297 | pub const TIOCGWINSZ: ::c_ulong = 0x5413; | |
298 | pub const TIOCSWINSZ: ::c_ulong = 0x5414; | |
299 | pub const TIOCMGET: ::c_ulong = 0x5415; | |
300 | pub const TIOCMBIS: ::c_ulong = 0x5416; | |
301 | pub const TIOCMBIC: ::c_ulong = 0x5417; | |
302 | pub const TIOCMSET: ::c_ulong = 0x5418; | |
303 | pub const FIONREAD: ::c_ulong = 0x541B; | |
304 | pub const TIOCCONS: ::c_ulong = 0x541D; | |
305 | ||
54a0048b SL |
306 | pub const SYS_gettid: ::c_long = 224; |
307 | pub const SYS_perf_event_open: ::c_long = 364; |