]> git.proxmox.com Git - rustc.git/blob - src/liblibc/src/unix/notbsd/linux/other/mod.rs
Imported Upstream version 1.9.0+dfsg1
[rustc.git] / src / liblibc / src / unix / notbsd / linux / other / mod.rs
1 pub type fsblkcnt_t = ::c_ulong;
2 pub type fsfilcnt_t = ::c_ulong;
3 pub type rlim_t = c_ulong;
4
5 s! {
6 pub struct sigaction {
7 pub sa_sigaction: ::sighandler_t,
8 pub sa_mask: ::sigset_t,
9 pub sa_flags: ::c_int,
10 _restorer: *mut ::c_void,
11 }
12
13 pub struct stack_t {
14 pub ss_sp: *mut ::c_void,
15 pub ss_flags: ::c_int,
16 pub ss_size: ::size_t
17 }
18
19 pub struct siginfo_t {
20 pub si_signo: ::c_int,
21 pub si_errno: ::c_int,
22 pub si_code: ::c_int,
23 pub _pad: [::c_int; 29],
24 _align: [usize; 0],
25 }
26
27 pub struct glob64_t {
28 pub gl_pathc: ::size_t,
29 pub gl_pathv: *mut *mut ::c_char,
30 pub gl_offs: ::size_t,
31 pub gl_flags: ::c_int,
32
33 __unused1: *mut ::c_void,
34 __unused2: *mut ::c_void,
35 __unused3: *mut ::c_void,
36 __unused4: *mut ::c_void,
37 __unused5: *mut ::c_void,
38 }
39
40 pub struct ucred {
41 pub pid: ::pid_t,
42 pub uid: ::uid_t,
43 pub gid: ::gid_t,
44 }
45
46 pub struct statfs {
47 pub f_type: __fsword_t,
48 pub f_bsize: __fsword_t,
49 pub f_blocks: ::fsblkcnt_t,
50 pub f_bfree: ::fsblkcnt_t,
51 pub f_bavail: ::fsblkcnt_t,
52
53 pub f_files: ::fsfilcnt_t,
54 pub f_ffree: ::fsfilcnt_t,
55 pub f_fsid: ::fsid_t,
56
57 pub f_namelen: __fsword_t,
58 pub f_frsize: __fsword_t,
59 f_spare: [__fsword_t; 5],
60 }
61
62 pub struct msghdr {
63 pub msg_name: *mut ::c_void,
64 pub msg_namelen: ::socklen_t,
65 pub msg_iov: *mut ::iovec,
66 pub msg_iovlen: ::size_t,
67 pub msg_control: *mut ::c_void,
68 pub msg_controllen: ::size_t,
69 pub msg_flags: ::c_int,
70 }
71
72 pub struct termios {
73 pub c_iflag: ::tcflag_t,
74 pub c_oflag: ::tcflag_t,
75 pub c_cflag: ::tcflag_t,
76 pub c_lflag: ::tcflag_t,
77 pub c_line: ::cc_t,
78 pub c_cc: [::cc_t; ::NCCS],
79 pub c_ispeed: ::speed_t,
80 pub c_ospeed: ::speed_t,
81 }
82
83 pub struct flock {
84 pub l_type: ::c_short,
85 pub l_whence: ::c_short,
86 pub l_start: ::off_t,
87 pub l_len: ::off_t,
88 pub l_pid: ::pid_t,
89 }
90
91 pub struct ipc_perm {
92 pub __key: ::key_t,
93 pub uid: ::uid_t,
94 pub gid: ::gid_t,
95 pub cuid: ::uid_t,
96 pub cgid: ::gid_t,
97 pub mode: ::c_ushort,
98 __pad1: ::c_ushort,
99 pub __seq: ::c_ushort,
100 __pad2: ::c_ushort,
101 __unused1: ::c_ulong,
102 __unused2: ::c_ulong
103 }
104
105 pub struct shmid_ds {
106 pub shm_perm: ::ipc_perm,
107 pub shm_segsz: ::size_t,
108 pub shm_atime: ::time_t,
109 #[cfg(target_pointer_width = "32")]
110 __unused1: ::c_ulong,
111 pub shm_dtime: ::time_t,
112 #[cfg(target_pointer_width = "32")]
113 __unused2: ::c_ulong,
114 pub shm_ctime: ::time_t,
115 #[cfg(target_pointer_width = "32")]
116 __unused3: ::c_ulong,
117 pub shm_cpid: ::pid_t,
118 pub shm_lpid: ::pid_t,
119 pub shm_nattch: ::shmatt_t,
120 __unused4: ::c_ulong,
121 __unused5: ::c_ulong
122 }
123 }
124
125 pub const RLIMIT_RSS: ::c_int = 5;
126 pub const RLIMIT_NOFILE: ::c_int = 7;
127 pub const RLIMIT_AS: ::c_int = 9;
128 pub const RLIMIT_NPROC: ::c_int = 6;
129 pub const RLIMIT_MEMLOCK: ::c_int = 8;
130 pub const RLIM_INFINITY: ::rlim_t = !0;
131 pub const RLIMIT_RTTIME: ::c_int = 15;
132 pub const RLIMIT_NLIMITS: ::c_int = 16;
133
134 pub const O_APPEND: ::c_int = 1024;
135 pub const O_CREAT: ::c_int = 64;
136 pub const O_EXCL: ::c_int = 128;
137 pub const O_NOCTTY: ::c_int = 256;
138 pub const O_NONBLOCK: ::c_int = 2048;
139 pub const O_SYNC: ::c_int = 1052672;
140 pub const O_RSYNC: ::c_int = 1052672;
141 pub const O_DSYNC: ::c_int = 4096;
142 pub const O_FSYNC: ::c_int = 0x101000;
143
144 pub const SOCK_NONBLOCK: ::c_int = O_NONBLOCK;
145
146 pub const LC_PAPER: ::c_int = 7;
147 pub const LC_NAME: ::c_int = 8;
148 pub const LC_ADDRESS: ::c_int = 9;
149 pub const LC_TELEPHONE: ::c_int = 10;
150 pub const LC_MEASUREMENT: ::c_int = 11;
151 pub const LC_IDENTIFICATION: ::c_int = 12;
152
153 pub const MAP_ANON: ::c_int = 0x0020;
154 pub const MAP_ANONYMOUS: ::c_int = 0x0020;
155 pub const MAP_GROWSDOWN: ::c_int = 0x0100;
156 pub const MAP_DENYWRITE: ::c_int = 0x0800;
157 pub const MAP_EXECUTABLE: ::c_int = 0x01000;
158 pub const MAP_POPULATE: ::c_int = 0x08000;
159 pub const MAP_NONBLOCK: ::c_int = 0x010000;
160 pub const MAP_STACK: ::c_int = 0x020000;
161
162 pub const EDEADLK: ::c_int = 35;
163 pub const ENAMETOOLONG: ::c_int = 36;
164 pub const ENOLCK: ::c_int = 37;
165 pub const ENOSYS: ::c_int = 38;
166 pub const ENOTEMPTY: ::c_int = 39;
167 pub const ELOOP: ::c_int = 40;
168 pub const ENOMSG: ::c_int = 42;
169 pub const EIDRM: ::c_int = 43;
170 pub const ECHRNG: ::c_int = 44;
171 pub const EL2NSYNC: ::c_int = 45;
172 pub const EL3HLT: ::c_int = 46;
173 pub const EL3RST: ::c_int = 47;
174 pub const ELNRNG: ::c_int = 48;
175 pub const EUNATCH: ::c_int = 49;
176 pub const ENOCSI: ::c_int = 50;
177 pub const EL2HLT: ::c_int = 51;
178 pub const EBADE: ::c_int = 52;
179 pub const EBADR: ::c_int = 53;
180 pub const EXFULL: ::c_int = 54;
181 pub const ENOANO: ::c_int = 55;
182 pub const EBADRQC: ::c_int = 56;
183 pub const EBADSLT: ::c_int = 57;
184 pub const EMULTIHOP: ::c_int = 72;
185 pub const EOVERFLOW: ::c_int = 75;
186 pub const ENOTUNIQ: ::c_int = 76;
187 pub const EBADFD: ::c_int = 77;
188 pub const EBADMSG: ::c_int = 74;
189 pub const EREMCHG: ::c_int = 78;
190 pub const ELIBACC: ::c_int = 79;
191 pub const ELIBBAD: ::c_int = 80;
192 pub const ELIBSCN: ::c_int = 81;
193 pub const ELIBMAX: ::c_int = 82;
194 pub const ELIBEXEC: ::c_int = 83;
195 pub const EILSEQ: ::c_int = 84;
196 pub const ERESTART: ::c_int = 85;
197 pub const ESTRPIPE: ::c_int = 86;
198 pub const EUSERS: ::c_int = 87;
199 pub const ENOTSOCK: ::c_int = 88;
200 pub const EDESTADDRREQ: ::c_int = 89;
201 pub const EMSGSIZE: ::c_int = 90;
202 pub const EPROTOTYPE: ::c_int = 91;
203 pub const ENOPROTOOPT: ::c_int = 92;
204 pub const EPROTONOSUPPORT: ::c_int = 93;
205 pub const ESOCKTNOSUPPORT: ::c_int = 94;
206 pub const EOPNOTSUPP: ::c_int = 95;
207 pub const EPFNOSUPPORT: ::c_int = 96;
208 pub const EAFNOSUPPORT: ::c_int = 97;
209 pub const EADDRINUSE: ::c_int = 98;
210 pub const EADDRNOTAVAIL: ::c_int = 99;
211 pub const ENETDOWN: ::c_int = 100;
212 pub const ENETUNREACH: ::c_int = 101;
213 pub const ENETRESET: ::c_int = 102;
214 pub const ECONNABORTED: ::c_int = 103;
215 pub const ECONNRESET: ::c_int = 104;
216 pub const ENOBUFS: ::c_int = 105;
217 pub const EISCONN: ::c_int = 106;
218 pub const ENOTCONN: ::c_int = 107;
219 pub const ESHUTDOWN: ::c_int = 108;
220 pub const ETOOMANYREFS: ::c_int = 109;
221 pub const ETIMEDOUT: ::c_int = 110;
222 pub const ECONNREFUSED: ::c_int = 111;
223 pub const EHOSTDOWN: ::c_int = 112;
224 pub const EHOSTUNREACH: ::c_int = 113;
225 pub const EALREADY: ::c_int = 114;
226 pub const EINPROGRESS: ::c_int = 115;
227 pub const ESTALE: ::c_int = 116;
228 pub const EUCLEAN: ::c_int = 117;
229 pub const ENOTNAM: ::c_int = 118;
230 pub const ENAVAIL: ::c_int = 119;
231 pub const EISNAM: ::c_int = 120;
232 pub const EREMOTEIO: ::c_int = 121;
233 pub const EDQUOT: ::c_int = 122;
234 pub const ENOMEDIUM: ::c_int = 123;
235 pub const EMEDIUMTYPE: ::c_int = 124;
236 pub const ECANCELED: ::c_int = 125;
237 pub const ENOKEY: ::c_int = 126;
238 pub const EKEYEXPIRED: ::c_int = 127;
239 pub const EKEYREVOKED: ::c_int = 128;
240 pub const EKEYREJECTED: ::c_int = 129;
241 pub const EOWNERDEAD: ::c_int = 130;
242 pub const ENOTRECOVERABLE: ::c_int = 131;
243 pub const EHWPOISON: ::c_int = 133;
244 pub const ERFKILL: ::c_int = 132;
245
246 pub const SOCK_STREAM: ::c_int = 1;
247 pub const SOCK_DGRAM: ::c_int = 2;
248
249 pub const SOL_SOCKET: ::c_int = 1;
250
251 pub const SO_REUSEADDR: ::c_int = 2;
252 pub const SO_TYPE: ::c_int = 3;
253 pub const SO_ERROR: ::c_int = 4;
254 pub const SO_DONTROUTE: ::c_int = 5;
255 pub const SO_BROADCAST: ::c_int = 6;
256 pub const SO_SNDBUF: ::c_int = 7;
257 pub const SO_RCVBUF: ::c_int = 8;
258 pub const SO_KEEPALIVE: ::c_int = 9;
259 pub const SO_OOBINLINE: ::c_int = 10;
260 pub const SO_LINGER: ::c_int = 13;
261 pub const SO_REUSEPORT: ::c_int = 15;
262 pub const SO_ACCEPTCONN: ::c_int = 30;
263
264 pub const TCP_COOKIE_TRANSACTIONS: ::c_int = 15;
265 pub const TCP_THIN_LINEAR_TIMEOUTS: ::c_int = 16;
266 pub const TCP_THIN_DUPACK: ::c_int = 17;
267 pub const TCP_USER_TIMEOUT: ::c_int = 18;
268 pub const TCP_REPAIR: ::c_int = 19;
269 pub const TCP_REPAIR_QUEUE: ::c_int = 20;
270 pub const TCP_QUEUE_SEQ: ::c_int = 21;
271 pub const TCP_REPAIR_OPTIONS: ::c_int = 22;
272 pub const TCP_FASTOPEN: ::c_int = 23;
273 pub const TCP_TIMESTAMP: ::c_int = 24;
274
275 pub const SA_ONSTACK: ::c_int = 0x08000000;
276 pub const SA_SIGINFO: ::c_int = 0x00000004;
277 pub const SA_NOCLDWAIT: ::c_int = 0x00000002;
278
279 pub const SIGCHLD: ::c_int = 17;
280 pub const SIGBUS: ::c_int = 7;
281 pub const SIGUSR1: ::c_int = 10;
282 pub const SIGUSR2: ::c_int = 12;
283 pub const SIGCONT: ::c_int = 18;
284 pub const SIGSTOP: ::c_int = 19;
285 pub const SIGTSTP: ::c_int = 20;
286 pub const SIGURG: ::c_int = 23;
287 pub const SIGIO: ::c_int = 29;
288 pub const SIGSYS: ::c_int = 31;
289 pub const SIGSTKFLT: ::c_int = 16;
290 pub const SIGUNUSED: ::c_int = 31;
291 pub const SIGTTIN: ::c_int = 21;
292 pub const SIGTTOU: ::c_int = 22;
293 pub const SIGXCPU: ::c_int = 24;
294 pub const SIGXFSZ: ::c_int = 25;
295 pub const SIGVTALRM: ::c_int = 26;
296 pub const SIGPROF: ::c_int = 27;
297 pub const SIGWINCH: ::c_int = 28;
298 pub const SIGPOLL: ::c_int = 29;
299 pub const SIGPWR: ::c_int = 30;
300 pub const SIG_SETMASK: ::c_int = 2;
301 pub const SIG_BLOCK: ::c_int = 0x000000;
302 pub const SIG_UNBLOCK: ::c_int = 0x01;
303
304 pub const FALLOC_FL_KEEP_SIZE: ::c_int = 0x01;
305 pub const FALLOC_FL_PUNCH_HOLE: ::c_int = 0x02;
306
307 pub const BUFSIZ: ::c_uint = 8192;
308 pub const TMP_MAX: ::c_uint = 238328;
309 pub const FOPEN_MAX: ::c_uint = 16;
310 pub const POSIX_MADV_DONTNEED: ::c_int = 4;
311 pub const _SC_2_C_VERSION: ::c_int = 96;
312 pub const RUSAGE_THREAD: ::c_int = 1;
313 pub const O_ACCMODE: ::c_int = 3;
314 pub const O_ASYNC: ::c_int = 0x2000;
315 pub const O_NDELAY: ::c_int = 0x800;
316 pub const RUSAGE_CHILDREN: ::c_int = -1;
317 pub const ST_RELATIME: ::c_ulong = 4096;
318 pub const NI_MAXHOST: ::socklen_t = 1025;
319
320 pub const ADFS_SUPER_MAGIC: ::c_long = 0x0000adf5;
321 pub const AFFS_SUPER_MAGIC: ::c_long = 0x0000adff;
322 pub const CODA_SUPER_MAGIC: ::c_long = 0x73757245;
323 pub const CRAMFS_MAGIC: ::c_long = 0x28cd3d45;
324 pub const EFS_SUPER_MAGIC: ::c_long = 0x00414a53;
325 pub const EXT2_SUPER_MAGIC: ::c_long = 0x0000ef53;
326 pub const EXT3_SUPER_MAGIC: ::c_long = 0x0000ef53;
327 pub const EXT4_SUPER_MAGIC: ::c_long = 0x0000ef53;
328 pub const HPFS_SUPER_MAGIC: ::c_long = 0xf995e849;
329 pub const HUGETLBFS_MAGIC: ::c_long = 0x958458f6;
330 pub const ISOFS_SUPER_MAGIC: ::c_long = 0x00009660;
331 pub const JFFS2_SUPER_MAGIC: ::c_long = 0x000072b6;
332 pub const MINIX_SUPER_MAGIC: ::c_long = 0x0000137f;
333 pub const MINIX_SUPER_MAGIC2: ::c_long = 0x0000138f;
334 pub const MINIX2_SUPER_MAGIC: ::c_long = 0x00002468;
335 pub const MINIX2_SUPER_MAGIC2: ::c_long = 0x00002478;
336 pub const MSDOS_SUPER_MAGIC: ::c_long = 0x00004d44;
337 pub const NCP_SUPER_MAGIC: ::c_long = 0x0000564c;
338 pub const NFS_SUPER_MAGIC: ::c_long = 0x00006969;
339 pub const OPENPROM_SUPER_MAGIC: ::c_long = 0x00009fa1;
340 pub const PROC_SUPER_MAGIC: ::c_long = 0x00009fa0;
341 pub const QNX4_SUPER_MAGIC: ::c_long = 0x0000002f;
342 pub const REISERFS_SUPER_MAGIC: ::c_long = 0x52654973;
343 pub const SMB_SUPER_MAGIC: ::c_long = 0x0000517b;
344 pub const TMPFS_MAGIC: ::c_long = 0x01021994;
345 pub const USBDEVICE_SUPER_MAGIC: ::c_long = 0x00009fa2;
346
347 pub const VEOF: usize = 4;
348 pub const VEOL: usize = 11;
349 pub const VEOL2: usize = 16;
350 pub const VMIN: usize = 6;
351 pub const IEXTEN: ::tcflag_t = 0x00008000;
352 pub const TOSTOP: ::tcflag_t = 0x00000100;
353 pub const FLUSHO: ::tcflag_t = 0x00001000;
354 pub const IUTF8: ::tcflag_t = 0x00004000;
355
356 pub const CPU_SETSIZE: ::c_int = 0x400;
357
358 pub const EXTPROC: ::tcflag_t = 0x00010000;
359
360 pub const QFMT_VFS_V1: ::c_int = 4;
361
362 pub const PTRACE_TRACEME: ::c_uint = 0;
363 pub const PTRACE_PEEKTEXT: ::c_uint = 1;
364 pub const PTRACE_PEEKDATA: ::c_uint = 2;
365 pub const PTRACE_PEEKUSER: ::c_uint = 3;
366 pub const PTRACE_POKETEXT: ::c_uint = 4;
367 pub const PTRACE_POKEDATA: ::c_uint = 5;
368 pub const PTRACE_POKEUSER: ::c_uint = 6;
369 pub const PTRACE_CONT: ::c_uint = 7;
370 pub const PTRACE_KILL: ::c_uint = 8;
371 pub const PTRACE_SINGLESTEP: ::c_uint = 9;
372 pub const PTRACE_ATTACH: ::c_uint = 16;
373 pub const PTRACE_DETACH: ::c_uint = 17;
374 pub const PTRACE_SYSCALL: ::c_uint = 24;
375 pub const PTRACE_SETOPTIONS: ::c_uint = 0x4200;
376 pub const PTRACE_GETEVENTMSG: ::c_uint = 0x4201;
377 pub const PTRACE_GETSIGINFO: ::c_uint = 0x4202;
378 pub const PTRACE_SETSIGINFO: ::c_uint = 0x4203;
379 pub const PTRACE_GETREGSET: ::c_uint = 0x4204;
380 pub const PTRACE_SETREGSET: ::c_uint = 0x4205;
381 pub const PTRACE_SEIZE: ::c_uint = 0x4206;
382 pub const PTRACE_INTERRUPT: ::c_uint = 0x4207;
383 pub const PTRACE_LISTEN: ::c_uint = 0x4208;
384 pub const PTRACE_PEEKSIGINFO: ::c_uint = 0x4209;
385
386 pub const MADV_DODUMP: ::c_int = 17;
387 pub const MADV_DONTDUMP: ::c_int = 16;
388
389 pub const EPOLLWAKEUP: ::c_int = 0x20000000;
390
391 pub const MADV_HUGEPAGE: ::c_int = 14;
392 pub const MADV_NOHUGEPAGE: ::c_int = 15;
393 pub const MAP_HUGETLB: ::c_int = 0x040000;
394
395 pub const EFD_NONBLOCK: ::c_int = 0x800;
396
397 pub const F_GETLK: ::c_int = 5;
398 pub const F_GETOWN: ::c_int = 9;
399 pub const F_SETOWN: ::c_int = 8;
400 pub const F_SETLK: ::c_int = 6;
401 pub const F_SETLKW: ::c_int = 7;
402
403 pub const SFD_NONBLOCK: ::c_int = 0x0800;
404
405 pub const TCSANOW: ::c_int = 0;
406 pub const TCSADRAIN: ::c_int = 1;
407 pub const TCSAFLUSH: ::c_int = 2;
408
409 pub const TCGETS: ::c_ulong = 0x5401;
410 pub const TCSETS: ::c_ulong = 0x5402;
411 pub const TCSETSW: ::c_ulong = 0x5403;
412 pub const TCSETSF: ::c_ulong = 0x5404;
413 pub const TCGETA: ::c_ulong = 0x5405;
414 pub const TCSETA: ::c_ulong = 0x5406;
415 pub const TCSETAW: ::c_ulong = 0x5407;
416 pub const TCSETAF: ::c_ulong = 0x5408;
417 pub const TCSBRK: ::c_ulong = 0x5409;
418 pub const TCXONC: ::c_ulong = 0x540A;
419 pub const TCFLSH: ::c_ulong = 0x540B;
420 pub const TIOCGSOFTCAR: ::c_ulong = 0x5419;
421 pub const TIOCSSOFTCAR: ::c_ulong = 0x541A;
422 pub const TIOCINQ: ::c_ulong = 0x541B;
423 pub const TIOCLINUX: ::c_ulong = 0x541C;
424 pub const TIOCGSERIAL: ::c_ulong = 0x541E;
425 pub const TIOCEXCL: ::c_ulong = 0x540C;
426 pub const TIOCNXCL: ::c_ulong = 0x540D;
427 pub const TIOCSCTTY: ::c_ulong = 0x540E;
428 pub const TIOCGPGRP: ::c_ulong = 0x540F;
429 pub const TIOCSPGRP: ::c_ulong = 0x5410;
430 pub const TIOCOUTQ: ::c_ulong = 0x5411;
431 pub const TIOCSTI: ::c_ulong = 0x5412;
432 pub const TIOCGWINSZ: ::c_ulong = 0x5413;
433 pub const TIOCSWINSZ: ::c_ulong = 0x5414;
434 pub const TIOCMGET: ::c_ulong = 0x5415;
435 pub const TIOCMBIS: ::c_ulong = 0x5416;
436 pub const TIOCMBIC: ::c_ulong = 0x5417;
437 pub const TIOCMSET: ::c_ulong = 0x5418;
438 pub const FIONREAD: ::c_ulong = 0x541B;
439 pub const TIOCCONS: ::c_ulong = 0x541D;
440
441 pub const RTLD_DEEPBIND: ::c_int = 0x8;
442 pub const RTLD_GLOBAL: ::c_int = 0x100;
443 pub const RTLD_NOLOAD: ::c_int = 0x4;
444
445 cfg_if! {
446 if #[cfg(any(target_arch = "arm", target_arch = "x86",
447 target_arch = "x86_64"))] {
448 pub const PTHREAD_STACK_MIN: ::size_t = 16384;
449 } else {
450 pub const PTHREAD_STACK_MIN: ::size_t = 131072;
451 }
452 }
453
454 extern {
455 pub fn sysctl(name: *mut ::c_int,
456 namelen: ::c_int,
457 oldp: *mut ::c_void,
458 oldlenp: *mut ::size_t,
459 newp: *mut ::c_void,
460 newlen: ::size_t)
461 -> ::c_int;
462 pub fn ioctl(fd: ::c_int, request: ::c_ulong, ...) -> ::c_int;
463 pub fn backtrace(buf: *mut *mut ::c_void,
464 sz: ::c_int) -> ::c_int;
465 pub fn glob64(pattern: *const ::c_char,
466 flags: ::c_int,
467 errfunc: ::dox::Option<extern fn(epath: *const ::c_char,
468 errno: ::c_int)
469 -> ::c_int>,
470 pglob: *mut glob64_t) -> ::c_int;
471 pub fn globfree64(pglob: *mut glob64_t);
472 pub fn getnameinfo(sa: *const ::sockaddr,
473 salen: ::socklen_t,
474 host: *mut ::c_char,
475 hostlen: ::socklen_t,
476 serv: *mut ::c_char,
477 sevlen: ::socklen_t,
478 flags: ::c_int) -> ::c_int;
479 pub fn eventfd(init: ::c_uint, flags: ::c_int) -> ::c_int;
480 pub fn ptrace(request: ::c_uint, ...) -> ::c_long;
481 pub fn pthread_attr_getaffinity_np(attr: *const ::pthread_attr_t,
482 cpusetsize: ::size_t,
483 cpuset: *mut ::cpu_set_t) -> ::c_int;
484 pub fn pthread_attr_setaffinity_np(attr: *mut ::pthread_attr_t,
485 cpusetsize: ::size_t,
486 cpuset: *const ::cpu_set_t) -> ::c_int;
487 }
488
489 cfg_if! {
490 if #[cfg(any(target_arch = "x86",
491 target_arch = "arm",
492 target_arch = "powerpc"))] {
493 mod b32;
494 pub use self::b32::*;
495 } else if #[cfg(any(target_arch = "x86_64",
496 target_arch = "aarch64",
497 target_arch = "powerpc64"))] {
498 mod b64;
499 pub use self::b64::*;
500 } else {
501 // Unknown target_arch
502 }
503 }