1 pub type __priority_which_t = ::c_uint;
2 
3 s! {
4     pub struct aiocb {
5         pub aio_fildes: ::c_int,
6         pub aio_lio_opcode: ::c_int,
7         pub aio_reqprio: ::c_int,
8         pub aio_buf: *mut ::c_void,
9         pub aio_nbytes: ::size_t,
10         pub aio_sigevent: ::sigevent,
11         __next_prio: *mut aiocb,
12         __abs_prio: ::c_int,
13         __policy: ::c_int,
14         __error_code: ::c_int,
15         __return_value: ::ssize_t,
16         pub aio_offset: off_t,
17         #[cfg(all(not(target_arch = "x86_64"), target_pointer_width = "32"))]
18         __unused1: [::c_char; 4],
19         __glibc_reserved: [::c_char; 32]
20     }
21 
22     pub struct __exit_status {
23         pub e_termination: ::c_short,
24         pub e_exit: ::c_short,
25     }
26 
27     pub struct __timeval {
28         pub tv_sec: ::int32_t,
29         pub tv_usec: ::int32_t,
30     }
31 
32     pub struct utmpx {
33         pub ut_type: ::c_short,
34         pub ut_pid: ::pid_t,
35         pub ut_line: [::c_char; __UT_LINESIZE],
36         pub ut_id: [::c_char; 4],
37 
38         pub ut_user: [::c_char; __UT_NAMESIZE],
39         pub ut_host: [::c_char; __UT_HOSTSIZE],
40         pub ut_exit: __exit_status,
41 
42         #[cfg(any(target_arch = "aarch64",
43                   target_arch = "sparc64",
44                   all(target_pointer_width = "32",
45                       not(target_arch = "x86_64"))))]
46         pub ut_session: ::c_long,
47         #[cfg(any(target_arch = "aarch64",
48                   target_arch = "sparc64",
49                   all(target_pointer_width = "32",
50                       not(target_arch = "x86_64"))))]
51         pub ut_tv: ::timeval,
52 
53         #[cfg(not(any(target_arch = "aarch64",
54                       target_arch = "sparc64",
55                       all(target_pointer_width = "32",
56                           not(target_arch = "x86_64")))))]
57         pub ut_session: ::int32_t,
58         #[cfg(not(any(target_arch = "aarch64",
59                       target_arch = "sparc64",
60                       all(target_pointer_width = "32",
61                           not(target_arch = "x86_64")))))]
62         pub ut_tv: __timeval,
63 
64         pub ut_addr_v6: [::int32_t; 4],
65         __glibc_reserved: [::c_char; 20],
66     }
67 
68     pub struct sigaction {
69         pub sa_sigaction: ::sighandler_t,
70         pub sa_mask: ::sigset_t,
71         #[cfg(target_arch = "sparc64")]
72         __reserved0: ::c_int,
73         pub sa_flags: ::c_int,
74         pub sa_restorer: ::dox::Option<extern fn()>,
75     }
76 
77     pub struct stack_t {
78         pub ss_sp: *mut ::c_void,
79         pub ss_flags: ::c_int,
80         pub ss_size: ::size_t
81     }
82 
83     pub struct siginfo_t {
84         pub si_signo: ::c_int,
85         pub si_errno: ::c_int,
86         pub si_code: ::c_int,
87         pub _pad: [::c_int; 29],
88         #[cfg(target_arch = "x86_64")]
89         _align: [u64; 0],
90         #[cfg(not(target_arch = "x86_64"))]
91         _align: [usize; 0],
92     }
93 
94     pub struct glob64_t {
95         pub gl_pathc: ::size_t,
96         pub gl_pathv: *mut *mut ::c_char,
97         pub gl_offs: ::size_t,
98         pub gl_flags: ::c_int,
99 
100         __unused1: *mut ::c_void,
101         __unused2: *mut ::c_void,
102         __unused3: *mut ::c_void,
103         __unused4: *mut ::c_void,
104         __unused5: *mut ::c_void,
105     }
106 
107     pub struct statfs {
108         pub f_type: __fsword_t,
109         pub f_bsize: __fsword_t,
110         pub f_blocks: ::fsblkcnt_t,
111         pub f_bfree: ::fsblkcnt_t,
112         pub f_bavail: ::fsblkcnt_t,
113 
114         pub f_files: ::fsfilcnt_t,
115         pub f_ffree: ::fsfilcnt_t,
116         pub f_fsid: ::fsid_t,
117 
118         pub f_namelen: __fsword_t,
119         pub f_frsize: __fsword_t,
120         f_spare: [__fsword_t; 5],
121     }
122 
123     pub struct msghdr {
124         pub msg_name: *mut ::c_void,
125         pub msg_namelen: ::socklen_t,
126         pub msg_iov: *mut ::iovec,
127         pub msg_iovlen: ::size_t,
128         pub msg_control: *mut ::c_void,
129         pub msg_controllen: ::size_t,
130         pub msg_flags: ::c_int,
131     }
132 
133     pub struct cmsghdr {
134         pub cmsg_len: ::size_t,
135         pub cmsg_level: ::c_int,
136         pub cmsg_type: ::c_int,
137     }
138 
139     pub struct termios {
140         pub c_iflag: ::tcflag_t,
141         pub c_oflag: ::tcflag_t,
142         pub c_cflag: ::tcflag_t,
143         pub c_lflag: ::tcflag_t,
144         pub c_line: ::cc_t,
145         pub c_cc: [::cc_t; ::NCCS],
146         #[cfg(not(target_arch = "sparc64"))]
147         pub c_ispeed: ::speed_t,
148         #[cfg(not(target_arch = "sparc64"))]
149         pub c_ospeed: ::speed_t,
150     }
151 
152     pub struct flock {
153         pub l_type: ::c_short,
154         pub l_whence: ::c_short,
155         pub l_start: ::off_t,
156         pub l_len: ::off_t,
157         pub l_pid: ::pid_t,
158     }
159 
160     // FIXME this is actually a union
161     #[cfg_attr(all(feature = "align", target_pointer_width = "32"),
162                repr(align(4)))]
163     #[cfg_attr(all(feature = "align", target_pointer_width = "64"),
164                repr(align(8)))]
165     pub struct sem_t {
166         #[cfg(target_pointer_width = "32")]
167         __size: [::c_char; 16],
168         #[cfg(target_pointer_width = "64")]
169         __size: [::c_char; 32],
170         #[cfg(not(feature = "align"))]
171         __align: [::c_long; 0],
172     }
173 
174     pub struct mallinfo {
175         pub arena: ::c_int,
176         pub ordblks: ::c_int,
177         pub smblks: ::c_int,
178         pub hblks: ::c_int,
179         pub hblkhd: ::c_int,
180         pub usmblks: ::c_int,
181         pub fsmblks: ::c_int,
182         pub uordblks: ::c_int,
183         pub fordblks: ::c_int,
184         pub keepcost: ::c_int,
185     }
186 
187     pub struct nlmsghdr {
188         pub nlmsg_len: u32,
189         pub nlmsg_type: u16,
190         pub nlmsg_flags: u16,
191         pub nlmsg_seq: u32,
192         pub nlmsg_pid: u32,
193     }
194 
195     pub struct nlmsgerr {
196         pub error: ::c_int,
197         pub msg: nlmsghdr,
198     }
199 
200     pub struct nl_pktinfo {
201         pub group: u32,
202     }
203 
204     pub struct nl_mmap_req {
205         pub nm_block_size: ::c_uint,
206         pub nm_block_nr: ::c_uint,
207         pub nm_frame_size: ::c_uint,
208         pub nm_frame_nr: ::c_uint,
209     }
210 
211     pub struct nl_mmap_hdr {
212         pub nm_status: ::c_uint,
213         pub nm_len: ::c_uint,
214         pub nm_group: u32,
215         pub nm_pid: u32,
216         pub nm_uid: u32,
217         pub nm_gid: u32,
218     }
219 
220     pub struct nlattr {
221         pub nla_len: u16,
222         pub nla_type: u16,
223     }
224 
225     pub struct rtentry {
226         pub rt_pad1: ::c_ulong,
227         pub rt_dst: ::sockaddr,
228         pub rt_gateway: ::sockaddr,
229         pub rt_genmask: ::sockaddr,
230         pub rt_flags: ::c_ushort,
231         pub rt_pad2: ::c_short,
232         pub rt_pad3: ::c_ulong,
233         pub rt_tos: ::c_uchar,
234         pub rt_class: ::c_uchar,
235         #[cfg(target_pointer_width = "64")]
236         pub rt_pad4: [::c_short; 3usize],
237         #[cfg(not(target_pointer_width = "64"))]
238         pub rt_pad4: ::c_short,
239         pub rt_metric: ::c_short,
240         pub rt_dev: *mut ::c_char,
241         pub rt_mtu: ::c_ulong,
242         pub rt_window: ::c_ulong,
243         pub rt_irtt: ::c_ushort,
244     }
245 }
246 
247 pub const __UT_LINESIZE: usize = 32;
248 pub const __UT_NAMESIZE: usize = 32;
249 pub const __UT_HOSTSIZE: usize = 256;
250 pub const EMPTY: ::c_short = 0;
251 pub const RUN_LVL: ::c_short = 1;
252 pub const BOOT_TIME: ::c_short = 2;
253 pub const NEW_TIME: ::c_short = 3;
254 pub const OLD_TIME: ::c_short = 4;
255 pub const INIT_PROCESS: ::c_short = 5;
256 pub const LOGIN_PROCESS: ::c_short = 6;
257 pub const USER_PROCESS: ::c_short = 7;
258 pub const DEAD_PROCESS: ::c_short = 8;
259 pub const ACCOUNTING: ::c_short = 9;
260 
261 pub const RLIMIT_RSS: ::c_int = 5;
262 pub const RLIMIT_AS: ::c_int = 9;
263 pub const RLIMIT_MEMLOCK: ::c_int = 8;
264 pub const RLIM_INFINITY: ::rlim_t = !0;
265 pub const RLIMIT_RTTIME: ::c_int = 15;
266 pub const RLIMIT_NLIMITS: ::c_int = 16;
267 
268 pub const SOCK_NONBLOCK: ::c_int = O_NONBLOCK;
269 
270 pub const SOL_RXRPC: ::c_int = 272;
271 pub const SOL_PPPOL2TP: ::c_int = 273;
272 pub const SOL_BLUETOOTH: ::c_int = 274;
273 pub const SOL_PNPIPE: ::c_int = 275;
274 pub const SOL_RDS: ::c_int = 276;
275 pub const SOL_IUCV: ::c_int = 277;
276 pub const SOL_CAIF: ::c_int = 278;
277 pub const SOL_ALG: ::c_int = 279;
278 pub const SOL_NFC: ::c_int = 280;
279 
280 pub const MSG_TRYHARD: ::c_int = 4;
281 
282 pub const LC_PAPER: ::c_int = 7;
283 pub const LC_NAME: ::c_int = 8;
284 pub const LC_ADDRESS: ::c_int = 9;
285 pub const LC_TELEPHONE: ::c_int = 10;
286 pub const LC_MEASUREMENT: ::c_int = 11;
287 pub const LC_IDENTIFICATION: ::c_int = 12;
288 pub const LC_PAPER_MASK: ::c_int = (1 << LC_PAPER);
289 pub const LC_NAME_MASK: ::c_int = (1 << LC_NAME);
290 pub const LC_ADDRESS_MASK: ::c_int = (1 << LC_ADDRESS);
291 pub const LC_TELEPHONE_MASK: ::c_int = (1 << LC_TELEPHONE);
292 pub const LC_MEASUREMENT_MASK: ::c_int = (1 << LC_MEASUREMENT);
293 pub const LC_IDENTIFICATION_MASK: ::c_int = (1 << LC_IDENTIFICATION);
294 pub const LC_ALL_MASK: ::c_int = ::LC_CTYPE_MASK
295                                | ::LC_NUMERIC_MASK
296                                | ::LC_TIME_MASK
297                                | ::LC_COLLATE_MASK
298                                | ::LC_MONETARY_MASK
299                                | ::LC_MESSAGES_MASK
300                                | LC_PAPER_MASK
301                                | LC_NAME_MASK
302                                | LC_ADDRESS_MASK
303                                | LC_TELEPHONE_MASK
304                                | LC_MEASUREMENT_MASK
305                                | LC_IDENTIFICATION_MASK;
306 
307 pub const MAP_ANON: ::c_int = 0x0020;
308 pub const MAP_ANONYMOUS: ::c_int = 0x0020;
309 pub const MAP_DENYWRITE: ::c_int = 0x0800;
310 pub const MAP_EXECUTABLE: ::c_int = 0x01000;
311 pub const MAP_POPULATE: ::c_int = 0x08000;
312 pub const MAP_NONBLOCK: ::c_int = 0x010000;
313 pub const MAP_STACK: ::c_int = 0x020000;
314 
315 pub const ENOTSUP: ::c_int = EOPNOTSUPP;
316 pub const EUCLEAN: ::c_int = 117;
317 pub const ENOTNAM: ::c_int = 118;
318 pub const ENAVAIL: ::c_int = 119;
319 pub const EISNAM: ::c_int = 120;
320 pub const EREMOTEIO: ::c_int = 121;
321 
322 pub const SOCK_STREAM: ::c_int = 1;
323 pub const SOCK_DGRAM: ::c_int = 2;
324 pub const SOCK_SEQPACKET: ::c_int = 5;
325 pub const SOCK_DCCP: ::c_int = 6;
326 pub const SOCK_PACKET: ::c_int = 10;
327 
328 pub const TCP_COOKIE_TRANSACTIONS: ::c_int = 15;
329 pub const TCP_THIN_LINEAR_TIMEOUTS: ::c_int = 16;
330 pub const TCP_THIN_DUPACK: ::c_int = 17;
331 pub const TCP_USER_TIMEOUT: ::c_int = 18;
332 pub const TCP_REPAIR: ::c_int = 19;
333 pub const TCP_REPAIR_QUEUE: ::c_int = 20;
334 pub const TCP_QUEUE_SEQ: ::c_int = 21;
335 pub const TCP_REPAIR_OPTIONS: ::c_int = 22;
336 pub const TCP_FASTOPEN: ::c_int = 23;
337 pub const TCP_TIMESTAMP: ::c_int = 24;
338 
339 /* DCCP socket options */
340 pub const DCCP_SOCKOPT_PACKET_SIZE: ::c_int = 1;
341 pub const DCCP_SOCKOPT_SERVICE: ::c_int = 2;
342 pub const DCCP_SOCKOPT_CHANGE_L: ::c_int = 3;
343 pub const DCCP_SOCKOPT_CHANGE_R: ::c_int = 4;
344 pub const DCCP_SOCKOPT_GET_CUR_MPS: ::c_int = 5;
345 pub const DCCP_SOCKOPT_SERVER_TIMEWAIT: ::c_int = 6;
346 pub const DCCP_SOCKOPT_SEND_CSCOV: ::c_int = 10;
347 pub const DCCP_SOCKOPT_RECV_CSCOV: ::c_int = 11;
348 pub const DCCP_SOCKOPT_AVAILABLE_CCIDS: ::c_int = 12;
349 pub const DCCP_SOCKOPT_CCID: ::c_int = 13;
350 pub const DCCP_SOCKOPT_TX_CCID: ::c_int = 14;
351 pub const DCCP_SOCKOPT_RX_CCID: ::c_int = 15;
352 pub const DCCP_SOCKOPT_QPOLICY_ID: ::c_int = 16;
353 pub const DCCP_SOCKOPT_QPOLICY_TXQLEN: ::c_int = 17;
354 pub const DCCP_SOCKOPT_CCID_RX_INFO: ::c_int = 128;
355 pub const DCCP_SOCKOPT_CCID_TX_INFO: ::c_int = 192;
356 
357 /// maximum number of services provided on the same listening port
358 pub const DCCP_SERVICE_LIST_MAX_LEN: ::c_int = 32;
359 
360 pub const SIGTTIN: ::c_int = 21;
361 pub const SIGTTOU: ::c_int = 22;
362 pub const SIGXCPU: ::c_int = 24;
363 pub const SIGXFSZ: ::c_int = 25;
364 pub const SIGVTALRM: ::c_int = 26;
365 pub const SIGPROF: ::c_int = 27;
366 pub const SIGWINCH: ::c_int = 28;
367 
368 pub const SIGEV_THREAD_ID: ::c_int = 4;
369 
370 pub const BUFSIZ: ::c_uint = 8192;
371 pub const TMP_MAX: ::c_uint = 238328;
372 pub const FOPEN_MAX: ::c_uint = 16;
373 pub const POSIX_FADV_DONTNEED: ::c_int = 4;
374 pub const POSIX_FADV_NOREUSE: ::c_int = 5;
375 pub const POSIX_MADV_DONTNEED: ::c_int = 4;
376 pub const _SC_EQUIV_CLASS_MAX: ::c_int = 41;
377 pub const _SC_CHARCLASS_NAME_MAX: ::c_int = 45;
378 pub const _SC_PII: ::c_int = 53;
379 pub const _SC_PII_XTI: ::c_int = 54;
380 pub const _SC_PII_SOCKET: ::c_int = 55;
381 pub const _SC_PII_INTERNET: ::c_int = 56;
382 pub const _SC_PII_OSI: ::c_int = 57;
383 pub const _SC_POLL: ::c_int = 58;
384 pub const _SC_SELECT: ::c_int = 59;
385 pub const _SC_PII_INTERNET_STREAM: ::c_int = 61;
386 pub const _SC_PII_INTERNET_DGRAM: ::c_int = 62;
387 pub const _SC_PII_OSI_COTS: ::c_int = 63;
388 pub const _SC_PII_OSI_CLTS: ::c_int = 64;
389 pub const _SC_PII_OSI_M: ::c_int = 65;
390 pub const _SC_T_IOV_MAX: ::c_int = 66;
391 pub const _SC_2_C_VERSION: ::c_int = 96;
392 pub const _SC_CHAR_BIT: ::c_int = 101;
393 pub const _SC_CHAR_MAX: ::c_int = 102;
394 pub const _SC_CHAR_MIN: ::c_int = 103;
395 pub const _SC_INT_MAX: ::c_int = 104;
396 pub const _SC_INT_MIN: ::c_int = 105;
397 pub const _SC_LONG_BIT: ::c_int = 106;
398 pub const _SC_WORD_BIT: ::c_int = 107;
399 pub const _SC_MB_LEN_MAX: ::c_int = 108;
400 pub const _SC_SSIZE_MAX: ::c_int = 110;
401 pub const _SC_SCHAR_MAX: ::c_int = 111;
402 pub const _SC_SCHAR_MIN: ::c_int = 112;
403 pub const _SC_SHRT_MAX: ::c_int = 113;
404 pub const _SC_SHRT_MIN: ::c_int = 114;
405 pub const _SC_UCHAR_MAX: ::c_int = 115;
406 pub const _SC_UINT_MAX: ::c_int = 116;
407 pub const _SC_ULONG_MAX: ::c_int = 117;
408 pub const _SC_USHRT_MAX: ::c_int = 118;
409 pub const _SC_NL_ARGMAX: ::c_int = 119;
410 pub const _SC_NL_LANGMAX: ::c_int = 120;
411 pub const _SC_NL_MSGMAX: ::c_int = 121;
412 pub const _SC_NL_NMAX: ::c_int = 122;
413 pub const _SC_NL_SETMAX: ::c_int = 123;
414 pub const _SC_NL_TEXTMAX: ::c_int = 124;
415 pub const _SC_BASE: ::c_int = 134;
416 pub const _SC_C_LANG_SUPPORT: ::c_int = 135;
417 pub const _SC_C_LANG_SUPPORT_R: ::c_int = 136;
418 pub const _SC_DEVICE_IO: ::c_int = 140;
419 pub const _SC_DEVICE_SPECIFIC: ::c_int = 141;
420 pub const _SC_DEVICE_SPECIFIC_R: ::c_int = 142;
421 pub const _SC_FD_MGMT: ::c_int = 143;
422 pub const _SC_FIFO: ::c_int = 144;
423 pub const _SC_PIPE: ::c_int = 145;
424 pub const _SC_FILE_ATTRIBUTES: ::c_int = 146;
425 pub const _SC_FILE_LOCKING: ::c_int = 147;
426 pub const _SC_FILE_SYSTEM: ::c_int = 148;
427 pub const _SC_MULTI_PROCESS: ::c_int = 150;
428 pub const _SC_SINGLE_PROCESS: ::c_int = 151;
429 pub const _SC_NETWORKING: ::c_int = 152;
430 pub const _SC_REGEX_VERSION: ::c_int = 156;
431 pub const _SC_SIGNALS: ::c_int = 158;
432 pub const _SC_SYSTEM_DATABASE: ::c_int = 162;
433 pub const _SC_SYSTEM_DATABASE_R: ::c_int = 163;
434 pub const _SC_USER_GROUPS: ::c_int = 166;
435 pub const _SC_USER_GROUPS_R: ::c_int = 167;
436 pub const _SC_LEVEL1_ICACHE_SIZE: ::c_int = 185;
437 pub const _SC_LEVEL1_ICACHE_ASSOC: ::c_int = 186;
438 pub const _SC_LEVEL1_ICACHE_LINESIZE: ::c_int = 187;
439 pub const _SC_LEVEL1_DCACHE_SIZE: ::c_int = 188;
440 pub const _SC_LEVEL1_DCACHE_ASSOC: ::c_int = 189;
441 pub const _SC_LEVEL1_DCACHE_LINESIZE: ::c_int = 190;
442 pub const _SC_LEVEL2_CACHE_SIZE: ::c_int = 191;
443 pub const _SC_LEVEL2_CACHE_ASSOC: ::c_int = 192;
444 pub const _SC_LEVEL2_CACHE_LINESIZE: ::c_int = 193;
445 pub const _SC_LEVEL3_CACHE_SIZE: ::c_int = 194;
446 pub const _SC_LEVEL3_CACHE_ASSOC: ::c_int = 195;
447 pub const _SC_LEVEL3_CACHE_LINESIZE: ::c_int = 196;
448 pub const _SC_LEVEL4_CACHE_SIZE: ::c_int = 197;
449 pub const _SC_LEVEL4_CACHE_ASSOC: ::c_int = 198;
450 pub const _SC_LEVEL4_CACHE_LINESIZE: ::c_int = 199;
451 pub const O_ACCMODE: ::c_int = 3;
452 pub const ST_RELATIME: ::c_ulong = 4096;
453 pub const NI_MAXHOST: ::socklen_t = 1025;
454 
455 pub const ADFS_SUPER_MAGIC: ::c_long = 0x0000adf5;
456 pub const AFFS_SUPER_MAGIC: ::c_long = 0x0000adff;
457 pub const CODA_SUPER_MAGIC: ::c_long = 0x73757245;
458 pub const CRAMFS_MAGIC: ::c_long = 0x28cd3d45;
459 pub const EFS_SUPER_MAGIC: ::c_long = 0x00414a53;
460 pub const EXT2_SUPER_MAGIC: ::c_long = 0x0000ef53;
461 pub const EXT3_SUPER_MAGIC: ::c_long = 0x0000ef53;
462 pub const EXT4_SUPER_MAGIC: ::c_long = 0x0000ef53;
463 pub const HPFS_SUPER_MAGIC: ::c_long = 0xf995e849;
464 pub const HUGETLBFS_MAGIC: ::c_long = 0x958458f6;
465 pub const ISOFS_SUPER_MAGIC: ::c_long = 0x00009660;
466 pub const JFFS2_SUPER_MAGIC: ::c_long = 0x000072b6;
467 pub const MINIX_SUPER_MAGIC: ::c_long = 0x0000137f;
468 pub const MINIX_SUPER_MAGIC2: ::c_long = 0x0000138f;
469 pub const MINIX2_SUPER_MAGIC: ::c_long = 0x00002468;
470 pub const MINIX2_SUPER_MAGIC2: ::c_long = 0x00002478;
471 pub const MSDOS_SUPER_MAGIC: ::c_long = 0x00004d44;
472 pub const NCP_SUPER_MAGIC: ::c_long = 0x0000564c;
473 pub const NFS_SUPER_MAGIC: ::c_long = 0x00006969;
474 pub const OPENPROM_SUPER_MAGIC: ::c_long = 0x00009fa1;
475 pub const PROC_SUPER_MAGIC: ::c_long = 0x00009fa0;
476 pub const QNX4_SUPER_MAGIC: ::c_long = 0x0000002f;
477 pub const REISERFS_SUPER_MAGIC: ::c_long = 0x52654973;
478 pub const SMB_SUPER_MAGIC: ::c_long = 0x0000517b;
479 pub const TMPFS_MAGIC: ::c_long = 0x01021994;
480 pub const USBDEVICE_SUPER_MAGIC: ::c_long = 0x00009fa2;
481 
482 pub const VEOF: usize = 4;
483 
484 pub const CPU_SETSIZE: ::c_int = 0x400;
485 
486 pub const PTRACE_TRACEME: ::c_uint = 0;
487 pub const PTRACE_PEEKTEXT: ::c_uint = 1;
488 pub const PTRACE_PEEKDATA: ::c_uint = 2;
489 pub const PTRACE_PEEKUSER: ::c_uint = 3;
490 pub const PTRACE_POKETEXT: ::c_uint = 4;
491 pub const PTRACE_POKEDATA: ::c_uint = 5;
492 pub const PTRACE_POKEUSER: ::c_uint = 6;
493 pub const PTRACE_CONT: ::c_uint = 7;
494 pub const PTRACE_KILL: ::c_uint = 8;
495 pub const PTRACE_SINGLESTEP: ::c_uint = 9;
496 pub const PTRACE_ATTACH: ::c_uint = 16;
497 pub const PTRACE_SYSCALL: ::c_uint = 24;
498 pub const PTRACE_SETOPTIONS: ::c_uint = 0x4200;
499 pub const PTRACE_GETEVENTMSG: ::c_uint = 0x4201;
500 pub const PTRACE_GETSIGINFO: ::c_uint = 0x4202;
501 pub const PTRACE_SETSIGINFO: ::c_uint = 0x4203;
502 pub const PTRACE_GETREGSET: ::c_uint = 0x4204;
503 pub const PTRACE_SETREGSET: ::c_uint = 0x4205;
504 pub const PTRACE_SEIZE: ::c_uint = 0x4206;
505 pub const PTRACE_INTERRUPT: ::c_uint = 0x4207;
506 pub const PTRACE_LISTEN: ::c_uint = 0x4208;
507 pub const PTRACE_PEEKSIGINFO: ::c_uint = 0x4209;
508 
509 pub const EPOLLWAKEUP: ::c_int = 0x20000000;
510 
511 pub const MAP_HUGETLB: ::c_int = 0x040000;
512 
513 pub const SEEK_DATA: ::c_int = 3;
514 pub const SEEK_HOLE: ::c_int = 4;
515 
516 pub const TCSANOW: ::c_int = 0;
517 pub const TCSADRAIN: ::c_int = 1;
518 pub const TCSAFLUSH: ::c_int = 2;
519 
520 pub const TIOCLINUX: ::c_ulong = 0x541C;
521 pub const TIOCGSERIAL: ::c_ulong = 0x541E;
522 
523 pub const RTLD_DEEPBIND: ::c_int = 0x8;
524 pub const RTLD_GLOBAL: ::c_int = 0x100;
525 pub const RTLD_NOLOAD: ::c_int = 0x4;
526 
527 pub const LINUX_REBOOT_MAGIC1: ::c_int = 0xfee1dead;
528 pub const LINUX_REBOOT_MAGIC2: ::c_int = 672274793;
529 pub const LINUX_REBOOT_MAGIC2A: ::c_int = 85072278;
530 pub const LINUX_REBOOT_MAGIC2B: ::c_int = 369367448;
531 pub const LINUX_REBOOT_MAGIC2C: ::c_int = 537993216;
532 
533 pub const LINUX_REBOOT_CMD_RESTART: ::c_int = 0x01234567;
534 pub const LINUX_REBOOT_CMD_HALT: ::c_int = 0xCDEF0123;
535 pub const LINUX_REBOOT_CMD_CAD_ON: ::c_int = 0x89ABCDEF;
536 pub const LINUX_REBOOT_CMD_CAD_OFF: ::c_int = 0x00000000;
537 pub const LINUX_REBOOT_CMD_POWER_OFF: ::c_int = 0x4321FEDC;
538 pub const LINUX_REBOOT_CMD_RESTART2: ::c_int = 0xA1B2C3D4;
539 pub const LINUX_REBOOT_CMD_SW_SUSPEND: ::c_int = 0xD000FCE2;
540 pub const LINUX_REBOOT_CMD_KEXEC: ::c_int = 0x45584543;
541 
542 pub const NETLINK_ROUTE: ::c_int = 0;
543 pub const NETLINK_UNUSED: ::c_int = 1;
544 pub const NETLINK_USERSOCK: ::c_int = 2;
545 pub const NETLINK_FIREWALL: ::c_int = 3;
546 pub const NETLINK_SOCK_DIAG: ::c_int = 4;
547 pub const NETLINK_NFLOG: ::c_int = 5;
548 pub const NETLINK_XFRM: ::c_int = 6;
549 pub const NETLINK_SELINUX: ::c_int = 7;
550 pub const NETLINK_ISCSI: ::c_int = 8;
551 pub const NETLINK_AUDIT: ::c_int = 9;
552 pub const NETLINK_FIB_LOOKUP: ::c_int = 10;
553 pub const NETLINK_CONNECTOR: ::c_int = 11;
554 pub const NETLINK_NETFILTER: ::c_int = 12;
555 pub const NETLINK_IP6_FW: ::c_int = 13;
556 pub const NETLINK_DNRTMSG: ::c_int = 14;
557 pub const NETLINK_KOBJECT_UEVENT: ::c_int = 15;
558 pub const NETLINK_GENERIC: ::c_int = 16;
559 pub const NETLINK_SCSITRANSPORT: ::c_int = 18;
560 pub const NETLINK_ECRYPTFS: ::c_int = 19;
561 pub const NETLINK_RDMA: ::c_int = 20;
562 pub const NETLINK_CRYPTO: ::c_int = 21;
563 pub const NETLINK_INET_DIAG: ::c_int = NETLINK_SOCK_DIAG;
564 
565 pub const MAX_LINKS: ::c_int = 32;
566 
567 pub const NLM_F_REQUEST: ::c_int = 1;
568 pub const NLM_F_MULTI: ::c_int = 2;
569 pub const NLM_F_ACK: ::c_int = 4;
570 pub const NLM_F_ECHO: ::c_int = 8;
571 pub const NLM_F_DUMP_INTR: ::c_int = 16;
572 pub const NLM_F_DUMP_FILTERED: ::c_int = 32;
573 
574 pub const NLM_F_ROOT: ::c_int = 0x100;
575 pub const NLM_F_MATCH: ::c_int = 0x200;
576 pub const NLM_F_ATOMIC: ::c_int = 0x400;
577 pub const NLM_F_DUMP: ::c_int = NLM_F_ROOT | NLM_F_MATCH;
578 
579 pub const NLM_F_REPLACE: ::c_int = 0x100;
580 pub const NLM_F_EXCL: ::c_int = 0x200;
581 pub const NLM_F_CREATE: ::c_int = 0x400;
582 pub const NLM_F_APPEND: ::c_int = 0x800;
583 
584 pub const NETLINK_ADD_MEMBERSHIP: ::c_int = 1;
585 pub const NETLINK_DROP_MEMBERSHIP: ::c_int = 2;
586 pub const NETLINK_PKTINFO: ::c_int = 3;
587 pub const NETLINK_BROADCAST_ERROR: ::c_int = 4;
588 pub const NETLINK_NO_ENOBUFS: ::c_int = 5;
589 pub const NETLINK_RX_RING: ::c_int = 6;
590 pub const NETLINK_TX_RING: ::c_int = 7;
591 pub const NETLINK_LISTEN_ALL_NSID: ::c_int = 8;
592 pub const NETLINK_LIST_MEMBERSHIPS: ::c_int = 9;
593 pub const NETLINK_CAP_ACK: ::c_int = 10;
594 
595 pub const NLA_F_NESTED: ::c_int = 1 << 15;
596 pub const NLA_F_NET_BYTEORDER: ::c_int = 1 << 14;
597 pub const NLA_TYPE_MASK: ::c_int = !(NLA_F_NESTED | NLA_F_NET_BYTEORDER);
598 
599 pub const NLA_ALIGNTO: ::c_int = 4;
600 
601 pub const GENL_UNS_ADMIN_PERM: ::c_int = 0x10;
602 
603 pub const GENL_ID_VFS_DQUOT: ::c_int = ::NLMSG_MIN_TYPE + 1;
604 pub const GENL_ID_PMCRAID: ::c_int = ::NLMSG_MIN_TYPE + 2;
605 
606 pub const TIOCM_LE: ::c_int = 0x001;
607 pub const TIOCM_DTR: ::c_int = 0x002;
608 pub const TIOCM_RTS: ::c_int = 0x004;
609 pub const TIOCM_ST: ::c_int = 0x008;
610 pub const TIOCM_SR: ::c_int = 0x010;
611 pub const TIOCM_CTS: ::c_int = 0x020;
612 pub const TIOCM_CAR: ::c_int = 0x040;
613 pub const TIOCM_RNG: ::c_int = 0x080;
614 pub const TIOCM_DSR: ::c_int = 0x100;
615 pub const TIOCM_CD: ::c_int = TIOCM_CAR;
616 pub const TIOCM_RI: ::c_int = TIOCM_RNG;
617 
618 pub const NF_NETDEV_INGRESS: ::c_int = 0;
619 pub const NF_NETDEV_NUMHOOKS: ::c_int = 1;
620 
621 pub const NFPROTO_INET: ::c_int = 1;
622 pub const NFPROTO_NETDEV: ::c_int = 5;
623 
624 // linux/netfilter/nf_tables.h
625 cfg_if!{
626     if #[cfg(any(target_arch = "arm", target_arch = "powerpc",
627                  target_arch = "powerpc64", target_arch = "aarch64"))] {
628         pub const NFT_TABLE_MAXNAMELEN: ::c_int = 32;
629         pub const NFT_CHAIN_MAXNAMELEN: ::c_int = 32;
630         pub const NFT_SET_MAXNAMELEN: ::c_int = 32;
631         pub const NFT_OBJ_MAXNAMELEN: ::c_int = 32;
632     } else if #[cfg(target_arch = "sparc64")] {
633         pub const NFT_TABLE_MAXNAMELEN: ::c_int = 32;
634         pub const NFT_CHAIN_MAXNAMELEN: ::c_int = 32;
635         pub const NFT_SET_MAXNAMELEN: ::c_int = 32;
636     } else {
637         pub const NFT_TABLE_MAXNAMELEN: ::c_int = 256;
638         pub const NFT_CHAIN_MAXNAMELEN: ::c_int = 256;
639         pub const NFT_SET_MAXNAMELEN: ::c_int = 256;
640         pub const NFT_OBJ_MAXNAMELEN: ::c_int = 256;
641     }
642 }
643 pub const NFT_USERDATA_MAXLEN: ::c_int = 256;
644 
645 pub const NFT_REG_VERDICT: ::c_int = 0;
646 pub const NFT_REG_1: ::c_int = 1;
647 pub const NFT_REG_2: ::c_int = 2;
648 pub const NFT_REG_3: ::c_int = 3;
649 pub const NFT_REG_4: ::c_int = 4;
650 pub const __NFT_REG_MAX: ::c_int = 5;
651 pub const NFT_REG32_00: ::c_int = 8;
652 pub const NFT_REG32_01: ::c_int = 9;
653 pub const NFT_REG32_02: ::c_int = 10;
654 pub const NFT_REG32_03: ::c_int = 11;
655 pub const NFT_REG32_04: ::c_int = 12;
656 pub const NFT_REG32_05: ::c_int = 13;
657 pub const NFT_REG32_06: ::c_int = 14;
658 pub const NFT_REG32_07: ::c_int = 15;
659 pub const NFT_REG32_08: ::c_int = 16;
660 pub const NFT_REG32_09: ::c_int = 17;
661 pub const NFT_REG32_10: ::c_int = 18;
662 pub const NFT_REG32_11: ::c_int = 19;
663 pub const NFT_REG32_12: ::c_int = 20;
664 pub const NFT_REG32_13: ::c_int = 21;
665 pub const NFT_REG32_14: ::c_int = 22;
666 pub const NFT_REG32_15: ::c_int = 23;
667 
668 pub const NFT_REG_SIZE: ::c_int = 16;
669 pub const NFT_REG32_SIZE: ::c_int = 4;
670 
671 pub const NFT_CONTINUE: ::c_int = -1;
672 pub const NFT_BREAK: ::c_int = -2;
673 pub const NFT_JUMP: ::c_int = -3;
674 pub const NFT_GOTO: ::c_int = -4;
675 pub const NFT_RETURN: ::c_int = -5;
676 
677 pub const NFT_MSG_NEWTABLE: ::c_int = 0;
678 pub const NFT_MSG_GETTABLE: ::c_int = 1;
679 pub const NFT_MSG_DELTABLE: ::c_int = 2;
680 pub const NFT_MSG_NEWCHAIN: ::c_int = 3;
681 pub const NFT_MSG_GETCHAIN: ::c_int = 4;
682 pub const NFT_MSG_DELCHAIN: ::c_int = 5;
683 pub const NFT_MSG_NEWRULE: ::c_int = 6;
684 pub const NFT_MSG_GETRULE: ::c_int = 7;
685 pub const NFT_MSG_DELRULE: ::c_int = 8;
686 pub const NFT_MSG_NEWSET: ::c_int = 9;
687 pub const NFT_MSG_GETSET: ::c_int = 10;
688 pub const NFT_MSG_DELSET: ::c_int = 11;
689 pub const NFT_MSG_NEWSETELEM: ::c_int = 12;
690 pub const NFT_MSG_GETSETELEM: ::c_int = 13;
691 pub const NFT_MSG_DELSETELEM: ::c_int = 14;
692 pub const NFT_MSG_NEWGEN: ::c_int = 15;
693 pub const NFT_MSG_GETGEN: ::c_int = 16;
694 pub const NFT_MSG_TRACE: ::c_int = 17;
695 cfg_if! {
696     if #[cfg(not(target_arch = "sparc64"))] {
697         pub const NFT_MSG_NEWOBJ: ::c_int = 18;
698         pub const NFT_MSG_GETOBJ: ::c_int = 19;
699         pub const NFT_MSG_DELOBJ: ::c_int = 20;
700         pub const NFT_MSG_GETOBJ_RESET: ::c_int = 21;
701         pub const NFT_MSG_MAX: ::c_int = 22;
702     } else {
703         pub const NFT_MSG_MAX: ::c_int = 18;
704     }
705 }
706 
707 pub const NFT_SET_ANONYMOUS: ::c_int = 0x1;
708 pub const NFT_SET_CONSTANT: ::c_int = 0x2;
709 pub const NFT_SET_INTERVAL: ::c_int = 0x4;
710 pub const NFT_SET_MAP: ::c_int = 0x8;
711 pub const NFT_SET_TIMEOUT: ::c_int = 0x10;
712 pub const NFT_SET_EVAL: ::c_int = 0x20;
713 
714 pub const NFT_SET_POL_PERFORMANCE: ::c_int = 0;
715 pub const NFT_SET_POL_MEMORY: ::c_int = 1;
716 
717 pub const NFT_SET_ELEM_INTERVAL_END: ::c_int = 0x1;
718 
719 pub const NFT_DATA_VALUE: ::c_uint = 0;
720 pub const NFT_DATA_VERDICT: ::c_uint = 0xffffff00;
721 
722 pub const NFT_DATA_RESERVED_MASK: ::c_uint = 0xffffff00;
723 
724 pub const NFT_DATA_VALUE_MAXLEN: ::c_int = 64;
725 
726 pub const NFT_BYTEORDER_NTOH: ::c_int = 0;
727 pub const NFT_BYTEORDER_HTON: ::c_int = 1;
728 
729 pub const NFT_CMP_EQ: ::c_int = 0;
730 pub const NFT_CMP_NEQ: ::c_int = 1;
731 pub const NFT_CMP_LT: ::c_int = 2;
732 pub const NFT_CMP_LTE: ::c_int = 3;
733 pub const NFT_CMP_GT: ::c_int = 4;
734 pub const NFT_CMP_GTE: ::c_int = 5;
735 
736 pub const NFT_RANGE_EQ: ::c_int = 0;
737 pub const NFT_RANGE_NEQ: ::c_int = 1;
738 
739 pub const NFT_LOOKUP_F_INV: ::c_int = (1 << 0);
740 
741 pub const NFT_DYNSET_OP_ADD: ::c_int = 0;
742 pub const NFT_DYNSET_OP_UPDATE: ::c_int = 1;
743 
744 pub const NFT_DYNSET_F_INV: ::c_int = (1 << 0);
745 
746 pub const NFT_PAYLOAD_LL_HEADER: ::c_int = 0;
747 pub const NFT_PAYLOAD_NETWORK_HEADER: ::c_int = 1;
748 pub const NFT_PAYLOAD_TRANSPORT_HEADER: ::c_int = 2;
749 
750 pub const NFT_PAYLOAD_CSUM_NONE: ::c_int = 0;
751 pub const NFT_PAYLOAD_CSUM_INET: ::c_int = 1;
752 
753 pub const NFT_META_LEN: ::c_int = 0;
754 pub const NFT_META_PROTOCOL: ::c_int = 1;
755 pub const NFT_META_PRIORITY: ::c_int = 2;
756 pub const NFT_META_MARK: ::c_int = 3;
757 pub const NFT_META_IIF: ::c_int = 4;
758 pub const NFT_META_OIF: ::c_int = 5;
759 pub const NFT_META_IIFNAME: ::c_int = 6;
760 pub const NFT_META_OIFNAME: ::c_int = 7;
761 pub const NFT_META_IIFTYPE: ::c_int = 8;
762 pub const NFT_META_OIFTYPE: ::c_int = 9;
763 pub const NFT_META_SKUID: ::c_int = 10;
764 pub const NFT_META_SKGID: ::c_int = 11;
765 pub const NFT_META_NFTRACE: ::c_int = 12;
766 pub const NFT_META_RTCLASSID: ::c_int = 13;
767 pub const NFT_META_SECMARK: ::c_int = 14;
768 pub const NFT_META_NFPROTO: ::c_int = 15;
769 pub const NFT_META_L4PROTO: ::c_int = 16;
770 pub const NFT_META_BRI_IIFNAME: ::c_int = 17;
771 pub const NFT_META_BRI_OIFNAME: ::c_int = 18;
772 pub const NFT_META_PKTTYPE: ::c_int = 19;
773 pub const NFT_META_CPU: ::c_int = 20;
774 pub const NFT_META_IIFGROUP: ::c_int = 21;
775 pub const NFT_META_OIFGROUP: ::c_int = 22;
776 pub const NFT_META_CGROUP: ::c_int = 23;
777 pub const NFT_META_PRANDOM: ::c_int = 24;
778 
779 pub const NFT_CT_STATE: ::c_int = 0;
780 pub const NFT_CT_DIRECTION: ::c_int = 1;
781 pub const NFT_CT_STATUS: ::c_int = 2;
782 pub const NFT_CT_MARK: ::c_int = 3;
783 pub const NFT_CT_SECMARK: ::c_int = 4;
784 pub const NFT_CT_EXPIRATION: ::c_int = 5;
785 pub const NFT_CT_HELPER: ::c_int = 6;
786 pub const NFT_CT_L3PROTOCOL: ::c_int = 7;
787 pub const NFT_CT_SRC: ::c_int = 8;
788 pub const NFT_CT_DST: ::c_int = 9;
789 pub const NFT_CT_PROTOCOL: ::c_int = 10;
790 pub const NFT_CT_PROTO_SRC: ::c_int = 11;
791 pub const NFT_CT_PROTO_DST: ::c_int = 12;
792 pub const NFT_CT_LABELS: ::c_int = 13;
793 pub const NFT_CT_PKTS: ::c_int = 14;
794 pub const NFT_CT_BYTES: ::c_int = 15;
795 
796 pub const NFT_LIMIT_PKTS: ::c_int = 0;
797 pub const NFT_LIMIT_PKT_BYTES: ::c_int = 1;
798 
799 pub const NFT_LIMIT_F_INV: ::c_int = (1 << 0);
800 
801 pub const NFT_QUEUE_FLAG_BYPASS: ::c_int = 0x01;
802 pub const NFT_QUEUE_FLAG_CPU_FANOUT: ::c_int = 0x02;
803 pub const NFT_QUEUE_FLAG_MASK: ::c_int = 0x03;
804 
805 pub const NFT_QUOTA_F_INV: ::c_int = (1 << 0);
806 
807 pub const NFT_REJECT_ICMP_UNREACH: ::c_int = 0;
808 pub const NFT_REJECT_TCP_RST: ::c_int = 1;
809 pub const NFT_REJECT_ICMPX_UNREACH: ::c_int = 2;
810 
811 pub const NFT_REJECT_ICMPX_NO_ROUTE: ::c_int = 0;
812 pub const NFT_REJECT_ICMPX_PORT_UNREACH: ::c_int = 1;
813 pub const NFT_REJECT_ICMPX_HOST_UNREACH: ::c_int = 2;
814 pub const NFT_REJECT_ICMPX_ADMIN_PROHIBITED: ::c_int = 3;
815 
816 pub const NFT_NAT_SNAT: ::c_int = 0;
817 pub const NFT_NAT_DNAT: ::c_int = 1;
818 
819 pub const NFT_TRACETYPE_UNSPEC: ::c_int = 0;
820 pub const NFT_TRACETYPE_POLICY: ::c_int = 1;
821 pub const NFT_TRACETYPE_RETURN: ::c_int = 2;
822 pub const NFT_TRACETYPE_RULE: ::c_int = 3;
823 
824 pub const NFT_NG_INCREMENTAL: ::c_int = 0;
825 pub const NFT_NG_RANDOM: ::c_int = 1;
826 
827 #[doc(hidden)]
828 pub const AF_MAX: ::c_int = 42;
829 #[doc(hidden)]
830 pub const PF_MAX: ::c_int = AF_MAX;
831 
832 cfg_if! {
833     if #[cfg(any(target_arch = "arm", target_arch = "x86",
834                  target_arch = "x86_64"))] {
835         pub const PTHREAD_STACK_MIN: ::size_t = 16384;
836     } else if #[cfg(target_arch = "sparc64")] {
837         pub const PTHREAD_STACK_MIN: ::size_t = 0x6000;
838     } else {
839         pub const PTHREAD_STACK_MIN: ::size_t = 131072;
840     }
841 }
842 pub const PTHREAD_MUTEX_ADAPTIVE_NP: ::c_int = 3;
843 
844 f! {
845     pub fn NLA_ALIGN(len: ::c_int) -> ::c_int {
846         return ((len) + NLA_ALIGNTO - 1) & !(NLA_ALIGNTO - 1)
847     }
848 }
849 
850 extern {
utmpxname(file: *const ::c_char) -> ::c_int851     pub fn utmpxname(file: *const ::c_char) -> ::c_int;
getutxent() -> *mut utmpx852     pub fn getutxent() -> *mut utmpx;
getutxid(ut: *const utmpx) -> *mut utmpx853     pub fn getutxid(ut: *const utmpx) -> *mut utmpx;
getutxline(ut: *const utmpx) -> *mut utmpx854     pub fn getutxline(ut: *const utmpx) -> *mut utmpx;
pututxline(ut: *const utmpx) -> *mut utmpx855     pub fn pututxline(ut: *const utmpx) -> *mut utmpx;
setutxent()856     pub fn setutxent();
endutxent()857     pub fn endutxent();
getpt() -> ::c_int858     pub fn getpt() -> ::c_int;
859 }
860 
861 #[link(name = "util")]
862 extern {
ioctl(fd: ::c_int, request: ::c_ulong, ...) -> ::c_int863     pub fn ioctl(fd: ::c_int, request: ::c_ulong, ...) -> ::c_int;
backtrace(buf: *mut *mut ::c_void, sz: ::c_int) -> ::c_int864     pub fn backtrace(buf: *mut *mut ::c_void,
865                      sz: ::c_int) -> ::c_int;
glob64(pattern: *const ::c_char, flags: ::c_int, errfunc: ::dox::Option<extern fn(epath: *const ::c_char, errno: ::c_int) -> ::c_int>, pglob: *mut glob64_t) -> ::c_int866     pub fn glob64(pattern: *const ::c_char,
867                   flags: ::c_int,
868                   errfunc: ::dox::Option<extern fn(epath: *const ::c_char,
869                                                    errno: ::c_int)
870                                                    -> ::c_int>,
871                   pglob: *mut glob64_t) -> ::c_int;
globfree64(pglob: *mut glob64_t)872     pub fn globfree64(pglob: *mut glob64_t);
ptrace(request: ::c_uint, ...) -> ::c_long873     pub fn ptrace(request: ::c_uint, ...) -> ::c_long;
pthread_attr_getaffinity_np(attr: *const ::pthread_attr_t, cpusetsize: ::size_t, cpuset: *mut ::cpu_set_t) -> ::c_int874     pub fn pthread_attr_getaffinity_np(attr: *const ::pthread_attr_t,
875                                        cpusetsize: ::size_t,
876                                        cpuset: *mut ::cpu_set_t) -> ::c_int;
pthread_attr_setaffinity_np(attr: *mut ::pthread_attr_t, cpusetsize: ::size_t, cpuset: *const ::cpu_set_t) -> ::c_int877     pub fn pthread_attr_setaffinity_np(attr: *mut ::pthread_attr_t,
878                                        cpusetsize: ::size_t,
879                                        cpuset: *const ::cpu_set_t) -> ::c_int;
getpriority(which: ::__priority_which_t, who: ::id_t) -> ::c_int880     pub fn getpriority(which: ::__priority_which_t, who: ::id_t) -> ::c_int;
setpriority(which: ::__priority_which_t, who: ::id_t, prio: ::c_int) -> ::c_int881     pub fn setpriority(which: ::__priority_which_t, who: ::id_t,
882                                        prio: ::c_int) -> ::c_int;
pthread_getaffinity_np(thread: ::pthread_t, cpusetsize: ::size_t, cpuset: *mut ::cpu_set_t) -> ::c_int883     pub fn pthread_getaffinity_np(thread: ::pthread_t,
884                                   cpusetsize: ::size_t,
885                                   cpuset: *mut ::cpu_set_t) -> ::c_int;
pthread_setaffinity_np(thread: ::pthread_t, cpusetsize: ::size_t, cpuset: *const ::cpu_set_t) -> ::c_int886     pub fn pthread_setaffinity_np(thread: ::pthread_t,
887                                   cpusetsize: ::size_t,
888                                   cpuset: *const ::cpu_set_t) -> ::c_int;
pthread_rwlockattr_getkind_np(attr: *const ::pthread_rwlockattr_t, val: *mut ::c_int) -> ::c_int889     pub fn pthread_rwlockattr_getkind_np(attr: *const ::pthread_rwlockattr_t,
890                                          val: *mut ::c_int) -> ::c_int;
pthread_rwlockattr_setkind_np(attr: *mut ::pthread_rwlockattr_t, val: ::c_int) -> ::c_int891     pub fn pthread_rwlockattr_setkind_np(attr: *mut ::pthread_rwlockattr_t,
892                                          val: ::c_int) -> ::c_int;
sched_getcpu() -> ::c_int893     pub fn sched_getcpu() -> ::c_int;
mallinfo() -> ::mallinfo894     pub fn mallinfo() -> ::mallinfo;
malloc_usable_size(ptr: *mut ::c_void) -> ::size_t895     pub fn malloc_usable_size(ptr: *mut ::c_void) -> ::size_t;
getauxval(type_: ::c_ulong) -> ::c_ulong896     pub fn getauxval(type_: ::c_ulong) -> ::c_ulong;
897     #[cfg_attr(target_os = "netbsd", link_name = "__getpwent_r50")]
898     #[cfg_attr(target_os = "solaris", link_name = "__posix_getpwent_r")]
getpwent_r(pwd: *mut ::unix::notbsd::linux::passwd, buf: *mut ::c_char, buflen: ::size_t, result: *mut *mut ::unix::notbsd ::linux::passwd) -> ::c_int899     pub fn getpwent_r(pwd: *mut ::unix::notbsd::linux::passwd,
900                       buf: *mut ::c_char,
901                       buflen: ::size_t,
902                       result: *mut *mut ::unix::notbsd
903                                         ::linux::passwd) -> ::c_int;
904     #[cfg_attr(target_os = "netbsd", link_name = "__getgrent_r50")]
905     #[cfg_attr(target_os = "solaris", link_name = "__posix_getgrent_r")]
getgrent_r(grp: *mut ::group, buf: *mut ::c_char, buflen: ::size_t, result: *mut *mut ::group) -> ::c_int906     pub fn getgrent_r(grp: *mut ::group,
907                       buf: *mut ::c_char,
908                       buflen: ::size_t,
909                       result: *mut *mut ::group) -> ::c_int;
910 }
911 
912 cfg_if! {
913     if #[cfg(any(target_arch = "x86",
914                  target_arch = "arm",
915                  target_arch = "powerpc"))] {
916         mod b32;
917         pub use self::b32::*;
918     } else if #[cfg(any(target_arch = "x86_64",
919                         target_arch = "aarch64",
920                         target_arch = "powerpc64",
921                         target_arch = "sparc64"))] {
922         mod b64;
923         pub use self::b64::*;
924     } else {
925         // Unknown target_arch
926     }
927 }
928