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