1 pub type c_char = i8;
2 pub type wchar_t = i32;
3 pub type useconds_t = u32;
4 pub type dev_t = u32;
5 pub type socklen_t = u32;
6 pub type pthread_t = c_ulong;
7 pub type mode_t = u32;
8 pub type ino64_t = u32;
9 pub type off64_t = i32;
10 pub type blkcnt64_t = i32;
11 pub type rlim64_t = u64;
12 pub type shmatt_t = ::c_ulong;
13 pub type mqd_t = ::c_int;
14 pub type msgqnum_t = ::c_ulong;
15 pub type msglen_t = ::c_ulong;
16 pub type nfds_t = ::c_ulong;
17 pub type nl_item = ::c_int;
18 pub type idtype_t = ::c_uint;
19 pub type loff_t = i32;
20 pub type pthread_key_t = ::c_uint;
21 
22 pub type clock_t = c_long;
23 pub type time_t = c_long;
24 pub type suseconds_t = c_long;
25 pub type ino_t = u32;
26 pub type off_t = i32;
27 pub type blkcnt_t = i32;
28 
29 pub type blksize_t = c_long;
30 pub type fsblkcnt_t = u32;
31 pub type fsfilcnt_t = u32;
32 pub type rlim_t = ::c_ulonglong;
33 pub type c_long = i32;
34 pub type c_ulong = u32;
35 pub type nlink_t = u32;
36 
37 #[cfg_attr(feature = "extra_traits", derive(Debug))]
38 pub enum fpos64_t {} // TODO: fill this out with a struct
39 impl ::Copy for fpos64_t {}
40 impl ::Clone for fpos64_t {
clone(&self) -> fpos64_t41     fn clone(&self) -> fpos64_t { *self }
42 }
43 
44 s! {
45     pub struct rlimit64 {
46         pub rlim_cur: rlim64_t,
47         pub rlim_max: rlim64_t,
48     }
49 
50     pub struct glob_t {
51         pub gl_pathc: ::size_t,
52         pub gl_pathv: *mut *mut c_char,
53         pub gl_offs: ::size_t,
54         pub gl_flags: ::c_int,
55 
56         __unused1: *mut ::c_void,
57         __unused2: *mut ::c_void,
58         __unused3: *mut ::c_void,
59         __unused4: *mut ::c_void,
60         __unused5: *mut ::c_void,
61     }
62 
63     pub struct passwd {
64         pub pw_name: *mut ::c_char,
65         pub pw_passwd: *mut ::c_char,
66         pub pw_uid: ::uid_t,
67         pub pw_gid: ::gid_t,
68         pub pw_gecos: *mut ::c_char,
69         pub pw_dir: *mut ::c_char,
70         pub pw_shell: *mut ::c_char,
71     }
72 
73     pub struct spwd {
74         pub sp_namp: *mut ::c_char,
75         pub sp_pwdp: *mut ::c_char,
76         pub sp_lstchg: ::c_long,
77         pub sp_min: ::c_long,
78         pub sp_max: ::c_long,
79         pub sp_warn: ::c_long,
80         pub sp_inact: ::c_long,
81         pub sp_expire: ::c_long,
82         pub sp_flag: ::c_ulong,
83     }
84 
85     pub struct statvfs {
86         pub f_bsize: ::c_ulong,
87         pub f_frsize: ::c_ulong,
88         pub f_blocks: ::fsblkcnt_t,
89         pub f_bfree: ::fsblkcnt_t,
90         pub f_bavail: ::fsblkcnt_t,
91         pub f_files: ::fsfilcnt_t,
92         pub f_ffree: ::fsfilcnt_t,
93         pub f_favail: ::fsfilcnt_t,
94         pub f_fsid: ::c_ulong,
95         __f_unused: ::c_int,
96         pub f_flag: ::c_ulong,
97         pub f_namemax: ::c_ulong,
98         __f_spare: [::c_int; 6],
99     }
100 
101     pub struct dqblk {
102         pub dqb_bhardlimit: u64,
103         pub dqb_bsoftlimit: u64,
104         pub dqb_curspace: u64,
105         pub dqb_ihardlimit: u64,
106         pub dqb_isoftlimit: u64,
107         pub dqb_curinodes: u64,
108         pub dqb_btime: u64,
109         pub dqb_itime: u64,
110         pub dqb_valid: u32,
111     }
112 
113     pub struct signalfd_siginfo {
114         pub ssi_signo: u32,
115         pub ssi_errno: i32,
116         pub ssi_code: i32,
117         pub ssi_pid: u32,
118         pub ssi_uid: u32,
119         pub ssi_fd: i32,
120         pub ssi_tid: u32,
121         pub ssi_band: u32,
122         pub ssi_overrun: u32,
123         pub ssi_trapno: u32,
124         pub ssi_status: i32,
125         pub ssi_int: i32,
126         pub ssi_ptr: u64,
127         pub ssi_utime: u64,
128         pub ssi_stime: u64,
129         pub ssi_addr: u64,
130         pub ssi_addr_lsb: u16,
131         _pad2: u16,
132         pub ssi_syscall: i32,
133         pub ssi_call_addr: u64,
134         pub ssi_arch: u32,
135         _pad: [u8; 28],
136     }
137 
138     pub struct fsid_t {
139         __val: [::c_int; 2],
140     }
141 
142     pub struct cpu_set_t {
143         bits: [u32; 32],
144     }
145 
146     pub struct if_nameindex {
147         pub if_index: ::c_uint,
148         pub if_name: *mut ::c_char,
149     }
150 
151     // System V IPC
152     pub struct msginfo {
153         pub msgpool: ::c_int,
154         pub msgmap: ::c_int,
155         pub msgmax: ::c_int,
156         pub msgmnb: ::c_int,
157         pub msgmni: ::c_int,
158         pub msgssz: ::c_int,
159         pub msgtql: ::c_int,
160         pub msgseg: ::c_ushort,
161     }
162 
163     pub struct sembuf {
164         pub sem_num: ::c_ushort,
165         pub sem_op: ::c_short,
166         pub sem_flg: ::c_short,
167     }
168 
169     pub struct aiocb {
170         pub aio_fildes: ::c_int,
171         pub aio_lio_opcode: ::c_int,
172         pub aio_reqprio: ::c_int,
173         pub aio_buf: *mut ::c_void,
174         pub aio_nbytes: ::size_t,
175         pub aio_sigevent: ::sigevent,
176         __td: *mut ::c_void,
177         __lock: [::c_int; 2],
178         __err: ::c_int,
179         __ret: ::ssize_t,
180         pub aio_offset: off_t,
181         __next: *mut ::c_void,
182         __prev: *mut ::c_void,
183         __dummy4: [::c_char; 24],
184     }
185 
186     pub struct sigaction {
187         pub sa_sigaction: ::sighandler_t,
188         pub sa_mask: ::sigset_t,
189         pub sa_flags: ::c_int,
190         pub sa_restorer: ::Option<extern fn()>,
191     }
192 
193     pub struct ipc_perm {
194         pub __ipc_perm_key: ::key_t,
195         pub uid: ::uid_t,
196         pub gid: ::gid_t,
197         pub cuid: ::uid_t,
198         pub cgid: ::gid_t,
199         pub mode: ::mode_t,
200         pub __seq: ::c_int,
201         __unused1: ::c_long,
202         __unused2: ::c_long
203     }
204 
205     pub struct termios {
206         pub c_iflag: ::tcflag_t,
207         pub c_oflag: ::tcflag_t,
208         pub c_cflag: ::tcflag_t,
209         pub c_lflag: ::tcflag_t,
210         pub c_line: ::cc_t,
211         pub c_cc: [::cc_t; ::NCCS],
212         pub __c_ispeed: ::speed_t,
213         pub __c_ospeed: ::speed_t,
214     }
215 
216     pub struct flock {
217         pub l_type: ::c_short,
218         pub l_whence: ::c_short,
219         pub l_start: ::off_t,
220         pub l_len: ::off_t,
221         pub l_pid: ::pid_t,
222     }
223 
224     pub struct pthread_attr_t {
225         __size: [u32; 11]
226     }
227 
228     pub struct sigset_t {
229         __val: [::c_ulong; 32],
230     }
231 
232     pub struct msghdr {
233         pub msg_name: *mut ::c_void,
234         pub msg_namelen: ::socklen_t,
235         pub msg_iov: *mut ::iovec,
236         pub msg_iovlen: ::c_int,
237         pub msg_control: *mut ::c_void,
238         pub msg_controllen: ::socklen_t,
239         pub msg_flags: ::c_int,
240     }
241 
242     pub struct cmsghdr {
243         pub cmsg_len: ::socklen_t,
244         pub cmsg_level: ::c_int,
245         pub cmsg_type: ::c_int,
246     }
247 
248     pub struct sem_t {
249         __val: [::c_int; 4],
250     }
251     pub struct stat {
252         pub st_dev: ::dev_t,
253         __st_dev_padding: ::c_int,
254         __st_ino_truncated: ::c_long,
255         pub st_mode: ::mode_t,
256         pub st_nlink: ::nlink_t,
257         pub st_uid: ::uid_t,
258         pub st_gid: ::gid_t,
259         pub st_rdev: ::dev_t,
260         __st_rdev_padding: ::c_int,
261         pub st_size: ::off_t,
262         pub st_blksize: ::blksize_t,
263         pub st_blocks: ::blkcnt_t,
264         pub st_atime: ::time_t,
265         pub st_atime_nsec: ::c_long,
266         pub st_mtime: ::time_t,
267         pub st_mtime_nsec: ::c_long,
268         pub st_ctime: ::time_t,
269         pub st_ctime_nsec: ::c_long,
270         pub st_ino: ::ino_t,
271     }
272 
273     pub struct stat64 {
274         pub st_dev: ::dev_t,
275         __st_dev_padding: ::c_int,
276         __st_ino_truncated: ::c_long,
277         pub st_mode: ::mode_t,
278         pub st_nlink: ::nlink_t,
279         pub st_uid: ::uid_t,
280         pub st_gid: ::gid_t,
281         pub st_rdev: ::dev_t,
282         __st_rdev_padding: ::c_int,
283         pub st_size: ::off_t,
284         pub st_blksize: ::blksize_t,
285         pub st_blocks: ::blkcnt_t,
286         pub st_atime: ::time_t,
287         pub st_atime_nsec: ::c_long,
288         pub st_mtime: ::time_t,
289         pub st_mtime_nsec: ::c_long,
290         pub st_ctime: ::time_t,
291         pub st_ctime_nsec: ::c_long,
292         pub st_ino: ::ino_t,
293     }
294 
295     pub struct stack_t {
296         pub ss_sp: *mut ::c_void,
297         pub ss_flags: ::c_int,
298         pub ss_size: ::size_t
299     }
300 
301     pub struct shmid_ds {
302         pub shm_perm: ::ipc_perm,
303         pub shm_segsz: ::size_t,
304         pub shm_atime: ::time_t,
305         __unused1: ::c_int,
306         pub shm_dtime: ::time_t,
307         __unused2: ::c_int,
308         pub shm_ctime: ::time_t,
309         __unused3: ::c_int,
310         pub shm_cpid: ::pid_t,
311         pub shm_lpid: ::pid_t,
312         pub shm_nattch: ::c_ulong,
313         __pad1: ::c_ulong,
314         __pad2: ::c_ulong,
315     }
316 
317     pub struct msqid_ds {
318         pub msg_perm: ::ipc_perm,
319         pub msg_stime: ::time_t,
320         __unused1: ::c_int,
321         pub msg_rtime: ::time_t,
322         __unused2: ::c_int,
323         pub msg_ctime: ::time_t,
324         __unused3: ::c_int,
325         __msg_cbytes: ::c_ulong,
326         pub msg_qnum: ::msgqnum_t,
327         pub msg_qbytes: ::msglen_t,
328         pub msg_lspid: ::pid_t,
329         pub msg_lrpid: ::pid_t,
330         __pad1: ::c_ulong,
331         __pad2: ::c_ulong,
332     }
333 
334     pub struct statfs {
335         pub f_type: ::c_ulong,
336         pub f_bsize: ::c_ulong,
337         pub f_blocks: ::fsblkcnt_t,
338         pub f_bfree: ::fsblkcnt_t,
339         pub f_bavail: ::fsblkcnt_t,
340         pub f_files: ::fsfilcnt_t,
341         pub f_ffree: ::fsfilcnt_t,
342         pub f_fsid: ::fsid_t,
343         pub f_namelen: ::c_ulong,
344         pub f_frsize: ::c_ulong,
345         pub f_flags: ::c_ulong,
346         pub f_spare: [::c_ulong; 4],
347     }
348 
349     pub struct siginfo_t {
350         pub si_signo: ::c_int,
351         pub si_errno: ::c_int,
352         pub si_code: ::c_int,
353         pub _pad: [::c_int; 29],
354         _align: [usize; 0],
355     }
356 
357     pub struct statfs64 {
358         pub f_type: ::c_ulong,
359         pub f_bsize: ::c_ulong,
360         pub f_blocks: ::fsblkcnt_t,
361         pub f_bfree: ::fsblkcnt_t,
362         pub f_bavail: ::fsblkcnt_t,
363         pub f_files: ::fsfilcnt_t,
364         pub f_ffree: ::fsfilcnt_t,
365         pub f_fsid: ::fsid_t,
366         pub f_namelen: ::c_ulong,
367         pub f_frsize: ::c_ulong,
368         pub f_flags: ::c_ulong,
369         pub f_spare: [::c_ulong; 4],
370     }
371 
372     pub struct statvfs64 {
373         pub f_bsize: ::c_ulong,
374         pub f_frsize: ::c_ulong,
375         pub f_blocks: u32,
376         pub f_bfree: u32,
377         pub f_bavail: u32,
378         pub f_files: u32,
379         pub f_ffree: u32,
380         pub f_favail: u32,
381         pub f_fsid: ::c_ulong,
382         __f_unused: ::c_int,
383         pub f_flag: ::c_ulong,
384         pub f_namemax: ::c_ulong,
385         __f_spare: [::c_int; 6],
386     }
387 
388     pub struct arpd_request {
389         pub req: ::c_ushort,
390         pub ip: u32,
391         pub dev: ::c_ulong,
392         pub stamp: ::c_ulong,
393         pub updated: ::c_ulong,
394         pub ha: [::c_uchar; ::MAX_ADDR_LEN],
395     }
396 }
397 
398 s_no_extra_traits! {
399     pub struct dirent {
400         pub d_ino: ::ino_t,
401         pub d_off: ::off_t,
402         pub d_reclen: ::c_ushort,
403         pub d_type: ::c_uchar,
404         pub d_name: [::c_char; 256],
405     }
406 
407     pub struct dirent64 {
408         pub d_ino: ::ino64_t,
409         pub d_off: ::off64_t,
410         pub d_reclen: ::c_ushort,
411         pub d_type: ::c_uchar,
412         pub d_name: [::c_char; 256],
413     }
414 
415     pub struct sysinfo {
416         pub uptime: ::c_ulong,
417         pub loads: [::c_ulong; 3],
418         pub totalram: ::c_ulong,
419         pub freeram: ::c_ulong,
420         pub sharedram: ::c_ulong,
421         pub bufferram: ::c_ulong,
422         pub totalswap: ::c_ulong,
423         pub freeswap: ::c_ulong,
424         pub procs: ::c_ushort,
425         pub pad: ::c_ushort,
426         pub totalhigh: ::c_ulong,
427         pub freehigh: ::c_ulong,
428         pub mem_unit: ::c_uint,
429         pub __reserved: [::c_char; 256],
430     }
431 
432     pub struct mq_attr {
433         pub mq_flags: ::c_long,
434         pub mq_maxmsg: ::c_long,
435         pub mq_msgsize: ::c_long,
436         pub mq_curmsgs: ::c_long,
437         pad: [::c_long; 4]
438     }
439 }
440 
441 cfg_if! {
442     if #[cfg(feature = "extra_traits")] {
443         impl PartialEq for dirent {
444             fn eq(&self, other: &dirent) -> bool {
445                 self.d_ino == other.d_ino
446                     && self.d_off == other.d_off
447                     && self.d_reclen == other.d_reclen
448                     && self.d_type == other.d_type
449                     && self
450                     .d_name
451                     .iter()
452                     .zip(other.d_name.iter())
453                     .all(|(a,b)| a == b)
454             }
455         }
456         impl Eq for dirent {}
457         impl ::fmt::Debug for dirent {
458             fn fmt(&self, f: &mut ::fmt::Formatter) -> ::fmt::Result {
459                 f.debug_struct("dirent")
460                     .field("d_ino", &self.d_ino)
461                     .field("d_off", &self.d_off)
462                     .field("d_reclen", &self.d_reclen)
463                     .field("d_type", &self.d_type)
464                     // FIXME: .field("d_name", &self.d_name)
465                     .finish()
466             }
467         }
468         impl ::hash::Hash for dirent {
469             fn hash<H: ::hash::Hasher>(&self, state: &mut H) {
470                 self.d_ino.hash(state);
471                 self.d_off.hash(state);
472                 self.d_reclen.hash(state);
473                 self.d_type.hash(state);
474                 self.d_name.hash(state);
475             }
476         }
477 
478         impl PartialEq for dirent64 {
479             fn eq(&self, other: &dirent64) -> bool {
480                 self.d_ino == other.d_ino
481                     && self.d_off == other.d_off
482                     && self.d_reclen == other.d_reclen
483                     && self.d_type == other.d_type
484                     && self
485                     .d_name
486                     .iter()
487                     .zip(other.d_name.iter())
488                     .all(|(a,b)| a == b)
489             }
490         }
491         impl Eq for dirent64 {}
492         impl ::fmt::Debug for dirent64 {
493             fn fmt(&self, f: &mut ::fmt::Formatter) -> ::fmt::Result {
494                 f.debug_struct("dirent64")
495                     .field("d_ino", &self.d_ino)
496                     .field("d_off", &self.d_off)
497                     .field("d_reclen", &self.d_reclen)
498                     .field("d_type", &self.d_type)
499                     // FIXME: .field("d_name", &self.d_name)
500                     .finish()
501             }
502         }
503         impl ::hash::Hash for dirent64 {
504             fn hash<H: ::hash::Hasher>(&self, state: &mut H) {
505                 self.d_ino.hash(state);
506                 self.d_off.hash(state);
507                 self.d_reclen.hash(state);
508                 self.d_type.hash(state);
509                 self.d_name.hash(state);
510             }
511         }
512 
513         impl PartialEq for sysinfo {
514             fn eq(&self, other: &sysinfo) -> bool {
515                 self.uptime == other.uptime
516                     && self.loads == other.loads
517                     && self.totalram == other.totalram
518                     && self.freeram == other.freeram
519                     && self.sharedram == other.sharedram
520                     && self.bufferram == other.bufferram
521                     && self.totalswap == other.totalswap
522                     && self.freeswap == other.freeswap
523                     && self.procs == other.procs
524                     && self.pad == other.pad
525                     && self.totalhigh == other.totalhigh
526                     && self.freehigh == other.freehigh
527                     && self.mem_unit == other.mem_unit
528                     && self
529                     .__reserved
530                     .iter()
531                     .zip(other.__reserved.iter())
532                     .all(|(a,b)| a == b)
533             }
534         }
535         impl Eq for sysinfo {}
536         impl ::fmt::Debug for sysinfo {
537             fn fmt(&self, f: &mut ::fmt::Formatter) -> ::fmt::Result {
538                 f.debug_struct("sysinfo")
539                     .field("uptime", &self.uptime)
540                     .field("loads", &self.loads)
541                     .field("totalram", &self.totalram)
542                     .field("freeram", &self.freeram)
543                     .field("sharedram", &self.sharedram)
544                     .field("bufferram", &self.bufferram)
545                     .field("totalswap", &self.totalswap)
546                     .field("freeswap", &self.freeswap)
547                     .field("procs", &self.procs)
548                     .field("pad", &self.pad)
549                     .field("totalhigh", &self.totalhigh)
550                     .field("freehigh", &self.freehigh)
551                     .field("mem_unit", &self.mem_unit)
552                     // FIXME: .field("__reserved", &self.__reserved)
553                     .finish()
554             }
555         }
556         impl ::hash::Hash for sysinfo {
557             fn hash<H: ::hash::Hasher>(&self, state: &mut H) {
558                 self.uptime.hash(state);
559                 self.loads.hash(state);
560                 self.totalram.hash(state);
561                 self.freeram.hash(state);
562                 self.sharedram.hash(state);
563                 self.bufferram.hash(state);
564                 self.totalswap.hash(state);
565                 self.freeswap.hash(state);
566                 self.procs.hash(state);
567                 self.pad.hash(state);
568                 self.totalhigh.hash(state);
569                 self.freehigh.hash(state);
570                 self.mem_unit.hash(state);
571                 self.__reserved.hash(state);
572             }
573         }
574 
575         impl PartialEq for mq_attr {
576             fn eq(&self, other: &mq_attr) -> bool {
577                 self.mq_flags == other.mq_flags &&
578                 self.mq_maxmsg == other.mq_maxmsg &&
579                 self.mq_msgsize == other.mq_msgsize &&
580                 self.mq_curmsgs == other.mq_curmsgs
581             }
582         }
583         impl Eq for mq_attr {}
584         impl ::fmt::Debug for mq_attr {
585             fn fmt(&self, f: &mut ::fmt::Formatter) -> ::fmt::Result {
586                 f.debug_struct("mq_attr")
587                     .field("mq_flags", &self.mq_flags)
588                     .field("mq_maxmsg", &self.mq_maxmsg)
589                     .field("mq_msgsize", &self.mq_msgsize)
590                     .field("mq_curmsgs", &self.mq_curmsgs)
591                     .finish()
592             }
593         }
594         impl ::hash::Hash for mq_attr {
595             fn hash<H: ::hash::Hasher>(&self, state: &mut H) {
596                 self.mq_flags.hash(state);
597                 self.mq_maxmsg.hash(state);
598                 self.mq_msgsize.hash(state);
599                 self.mq_curmsgs.hash(state);
600             }
601         }
602     }
603 }
604 
605 pub const MADV_SOFT_OFFLINE: ::c_int = 101;
606 pub const MS_NOUSER: ::c_ulong = 0x80000000;
607 pub const MS_RMT_MASK: ::c_ulong = 0x02800051;
608 
609 pub const ABDAY_1: ::nl_item = 0x20000;
610 pub const ABDAY_2: ::nl_item = 0x20001;
611 pub const ABDAY_3: ::nl_item = 0x20002;
612 pub const ABDAY_4: ::nl_item = 0x20003;
613 pub const ABDAY_5: ::nl_item = 0x20004;
614 pub const ABDAY_6: ::nl_item = 0x20005;
615 pub const ABDAY_7: ::nl_item = 0x20006;
616 
617 pub const DAY_1: ::nl_item = 0x20007;
618 pub const DAY_2: ::nl_item = 0x20008;
619 pub const DAY_3: ::nl_item = 0x20009;
620 pub const DAY_4: ::nl_item = 0x2000A;
621 pub const DAY_5: ::nl_item = 0x2000B;
622 pub const DAY_6: ::nl_item = 0x2000C;
623 pub const DAY_7: ::nl_item = 0x2000D;
624 
625 pub const ABMON_1: ::nl_item = 0x2000E;
626 pub const ABMON_2: ::nl_item = 0x2000F;
627 pub const ABMON_3: ::nl_item = 0x20010;
628 pub const ABMON_4: ::nl_item = 0x20011;
629 pub const ABMON_5: ::nl_item = 0x20012;
630 pub const ABMON_6: ::nl_item = 0x20013;
631 pub const ABMON_7: ::nl_item = 0x20014;
632 pub const ABMON_8: ::nl_item = 0x20015;
633 pub const ABMON_9: ::nl_item = 0x20016;
634 pub const ABMON_10: ::nl_item = 0x20017;
635 pub const ABMON_11: ::nl_item = 0x20018;
636 pub const ABMON_12: ::nl_item = 0x20019;
637 
638 pub const MON_1: ::nl_item = 0x2001A;
639 pub const MON_2: ::nl_item = 0x2001B;
640 pub const MON_3: ::nl_item = 0x2001C;
641 pub const MON_4: ::nl_item = 0x2001D;
642 pub const MON_5: ::nl_item = 0x2001E;
643 pub const MON_6: ::nl_item = 0x2001F;
644 pub const MON_7: ::nl_item = 0x20020;
645 pub const MON_8: ::nl_item = 0x20021;
646 pub const MON_9: ::nl_item = 0x20022;
647 pub const MON_10: ::nl_item = 0x20023;
648 pub const MON_11: ::nl_item = 0x20024;
649 pub const MON_12: ::nl_item = 0x20025;
650 
651 pub const AM_STR: ::nl_item = 0x20026;
652 pub const PM_STR: ::nl_item = 0x20027;
653 
654 pub const D_T_FMT: ::nl_item = 0x20028;
655 pub const D_FMT: ::nl_item = 0x20029;
656 pub const T_FMT: ::nl_item = 0x2002A;
657 pub const T_FMT_AMPM: ::nl_item = 0x2002B;
658 
659 pub const ERA: ::nl_item = 0x2002C;
660 pub const ERA_D_FMT: ::nl_item = 0x2002E;
661 pub const ALT_DIGITS: ::nl_item = 0x2002F;
662 pub const ERA_D_T_FMT: ::nl_item = 0x20030;
663 pub const ERA_T_FMT: ::nl_item = 0x20031;
664 
665 pub const CODESET: ::nl_item = 14;
666 
667 pub const CRNCYSTR: ::nl_item = 0x4000F;
668 
669 pub const RUSAGE_THREAD: ::c_int = 1;
670 pub const RUSAGE_CHILDREN: ::c_int = -1;
671 
672 pub const RADIXCHAR: ::nl_item = 0x10000;
673 pub const THOUSEP: ::nl_item = 0x10001;
674 
675 pub const YESEXPR: ::nl_item = 0x50000;
676 pub const NOEXPR: ::nl_item = 0x50001;
677 pub const YESSTR: ::nl_item = 0x50002;
678 pub const NOSTR: ::nl_item = 0x50003;
679 
680 pub const FILENAME_MAX: ::c_uint = 4096;
681 pub const L_tmpnam: ::c_uint = 20;
682 pub const _PC_LINK_MAX: ::c_int = 0;
683 pub const _PC_MAX_CANON: ::c_int = 1;
684 pub const _PC_MAX_INPUT: ::c_int = 2;
685 pub const _PC_NAME_MAX: ::c_int = 3;
686 pub const _PC_PATH_MAX: ::c_int = 4;
687 pub const _PC_PIPE_BUF: ::c_int = 5;
688 pub const _PC_CHOWN_RESTRICTED: ::c_int = 6;
689 pub const _PC_NO_TRUNC: ::c_int = 7;
690 pub const _PC_VDISABLE: ::c_int = 8;
691 pub const _PC_SYNC_IO: ::c_int = 9;
692 pub const _PC_ASYNC_IO: ::c_int = 10;
693 pub const _PC_PRIO_IO: ::c_int = 11;
694 pub const _PC_SOCK_MAXBUF: ::c_int = 12;
695 pub const _PC_FILESIZEBITS: ::c_int = 13;
696 pub const _PC_REC_INCR_XFER_SIZE: ::c_int = 14;
697 pub const _PC_REC_MAX_XFER_SIZE: ::c_int = 15;
698 pub const _PC_REC_MIN_XFER_SIZE: ::c_int = 16;
699 pub const _PC_REC_XFER_ALIGN: ::c_int = 17;
700 pub const _PC_ALLOC_SIZE_MIN: ::c_int = 18;
701 pub const _PC_SYMLINK_MAX: ::c_int = 19;
702 pub const _PC_2_SYMLINKS: ::c_int = 20;
703 
704 pub const _SC_ARG_MAX: ::c_int = 0;
705 pub const _SC_CHILD_MAX: ::c_int = 1;
706 pub const _SC_CLK_TCK: ::c_int = 2;
707 pub const _SC_NGROUPS_MAX: ::c_int = 3;
708 pub const _SC_OPEN_MAX: ::c_int = 4;
709 pub const _SC_STREAM_MAX: ::c_int = 5;
710 pub const _SC_TZNAME_MAX: ::c_int = 6;
711 pub const _SC_JOB_CONTROL: ::c_int = 7;
712 pub const _SC_SAVED_IDS: ::c_int = 8;
713 pub const _SC_REALTIME_SIGNALS: ::c_int = 9;
714 pub const _SC_PRIORITY_SCHEDULING: ::c_int = 10;
715 pub const _SC_TIMERS: ::c_int = 11;
716 pub const _SC_ASYNCHRONOUS_IO: ::c_int = 12;
717 pub const _SC_PRIORITIZED_IO: ::c_int = 13;
718 pub const _SC_SYNCHRONIZED_IO: ::c_int = 14;
719 pub const _SC_FSYNC: ::c_int = 15;
720 pub const _SC_MAPPED_FILES: ::c_int = 16;
721 pub const _SC_MEMLOCK: ::c_int = 17;
722 pub const _SC_MEMLOCK_RANGE: ::c_int = 18;
723 pub const _SC_MEMORY_PROTECTION: ::c_int = 19;
724 pub const _SC_MESSAGE_PASSING: ::c_int = 20;
725 pub const _SC_SEMAPHORES: ::c_int = 21;
726 pub const _SC_SHARED_MEMORY_OBJECTS: ::c_int = 22;
727 pub const _SC_AIO_LISTIO_MAX: ::c_int = 23;
728 pub const _SC_AIO_MAX: ::c_int = 24;
729 pub const _SC_AIO_PRIO_DELTA_MAX: ::c_int = 25;
730 pub const _SC_DELAYTIMER_MAX: ::c_int = 26;
731 pub const _SC_MQ_OPEN_MAX: ::c_int = 27;
732 pub const _SC_MQ_PRIO_MAX: ::c_int = 28;
733 pub const _SC_VERSION: ::c_int = 29;
734 pub const _SC_PAGESIZE: ::c_int = 30;
735 pub const _SC_PAGE_SIZE: ::c_int = _SC_PAGESIZE;
736 pub const _SC_RTSIG_MAX: ::c_int = 31;
737 pub const _SC_SEM_NSEMS_MAX: ::c_int = 32;
738 pub const _SC_SEM_VALUE_MAX: ::c_int = 33;
739 pub const _SC_SIGQUEUE_MAX: ::c_int = 34;
740 pub const _SC_TIMER_MAX: ::c_int = 35;
741 pub const _SC_BC_BASE_MAX: ::c_int = 36;
742 pub const _SC_BC_DIM_MAX: ::c_int = 37;
743 pub const _SC_BC_SCALE_MAX: ::c_int = 38;
744 pub const _SC_BC_STRING_MAX: ::c_int = 39;
745 pub const _SC_COLL_WEIGHTS_MAX: ::c_int = 40;
746 pub const _SC_EXPR_NEST_MAX: ::c_int = 42;
747 pub const _SC_LINE_MAX: ::c_int = 43;
748 pub const _SC_RE_DUP_MAX: ::c_int = 44;
749 pub const _SC_2_VERSION: ::c_int = 46;
750 pub const _SC_2_C_BIND: ::c_int = 47;
751 pub const _SC_2_C_DEV: ::c_int = 48;
752 pub const _SC_2_FORT_DEV: ::c_int = 49;
753 pub const _SC_2_FORT_RUN: ::c_int = 50;
754 pub const _SC_2_SW_DEV: ::c_int = 51;
755 pub const _SC_2_LOCALEDEF: ::c_int = 52;
756 pub const _SC_UIO_MAXIOV: ::c_int = 60;
757 pub const _SC_IOV_MAX: ::c_int = 60;
758 pub const _SC_THREADS: ::c_int = 67;
759 pub const _SC_THREAD_SAFE_FUNCTIONS: ::c_int = 68;
760 pub const _SC_GETGR_R_SIZE_MAX: ::c_int = 69;
761 pub const _SC_GETPW_R_SIZE_MAX: ::c_int = 70;
762 pub const _SC_LOGIN_NAME_MAX: ::c_int = 71;
763 pub const _SC_TTY_NAME_MAX: ::c_int = 72;
764 pub const _SC_THREAD_DESTRUCTOR_ITERATIONS: ::c_int = 73;
765 pub const _SC_THREAD_KEYS_MAX: ::c_int = 74;
766 pub const _SC_THREAD_STACK_MIN: ::c_int = 75;
767 pub const _SC_THREAD_THREADS_MAX: ::c_int = 76;
768 pub const _SC_THREAD_ATTR_STACKADDR: ::c_int = 77;
769 pub const _SC_THREAD_ATTR_STACKSIZE: ::c_int = 78;
770 pub const _SC_THREAD_PRIORITY_SCHEDULING: ::c_int = 79;
771 pub const _SC_THREAD_PRIO_INHERIT: ::c_int = 80;
772 pub const _SC_THREAD_PRIO_PROTECT: ::c_int = 81;
773 pub const _SC_THREAD_PROCESS_SHARED: ::c_int = 82;
774 pub const _SC_NPROCESSORS_CONF: ::c_int = 83;
775 pub const _SC_NPROCESSORS_ONLN: ::c_int = 84;
776 pub const _SC_PHYS_PAGES: ::c_int = 85;
777 pub const _SC_AVPHYS_PAGES: ::c_int = 86;
778 pub const _SC_ATEXIT_MAX: ::c_int = 87;
779 pub const _SC_PASS_MAX: ::c_int = 88;
780 pub const _SC_XOPEN_VERSION: ::c_int = 89;
781 pub const _SC_XOPEN_XCU_VERSION: ::c_int = 90;
782 pub const _SC_XOPEN_UNIX: ::c_int = 91;
783 pub const _SC_XOPEN_CRYPT: ::c_int = 92;
784 pub const _SC_XOPEN_ENH_I18N: ::c_int = 93;
785 pub const _SC_XOPEN_SHM: ::c_int = 94;
786 pub const _SC_2_CHAR_TERM: ::c_int = 95;
787 pub const _SC_2_UPE: ::c_int = 97;
788 pub const _SC_XOPEN_XPG2: ::c_int = 98;
789 pub const _SC_XOPEN_XPG3: ::c_int = 99;
790 pub const _SC_XOPEN_XPG4: ::c_int = 100;
791 pub const _SC_NZERO: ::c_int = 109;
792 pub const _SC_XBS5_ILP32_OFF32: ::c_int = 125;
793 pub const _SC_XBS5_ILP32_OFFBIG: ::c_int = 126;
794 pub const _SC_XBS5_LP64_OFF64: ::c_int = 127;
795 pub const _SC_XBS5_LPBIG_OFFBIG: ::c_int = 128;
796 pub const _SC_XOPEN_LEGACY: ::c_int = 129;
797 pub const _SC_XOPEN_REALTIME: ::c_int = 130;
798 pub const _SC_XOPEN_REALTIME_THREADS: ::c_int = 131;
799 pub const _SC_ADVISORY_INFO: ::c_int = 132;
800 pub const _SC_BARRIERS: ::c_int = 133;
801 pub const _SC_CLOCK_SELECTION: ::c_int = 137;
802 pub const _SC_CPUTIME: ::c_int = 138;
803 pub const _SC_THREAD_CPUTIME: ::c_int = 139;
804 pub const _SC_MONOTONIC_CLOCK: ::c_int = 149;
805 pub const _SC_READER_WRITER_LOCKS: ::c_int = 153;
806 pub const _SC_SPIN_LOCKS: ::c_int = 154;
807 pub const _SC_REGEXP: ::c_int = 155;
808 pub const _SC_SHELL: ::c_int = 157;
809 pub const _SC_SPAWN: ::c_int = 159;
810 pub const _SC_SPORADIC_SERVER: ::c_int = 160;
811 pub const _SC_THREAD_SPORADIC_SERVER: ::c_int = 161;
812 pub const _SC_TIMEOUTS: ::c_int = 164;
813 pub const _SC_TYPED_MEMORY_OBJECTS: ::c_int = 165;
814 pub const _SC_2_PBS: ::c_int = 168;
815 pub const _SC_2_PBS_ACCOUNTING: ::c_int = 169;
816 pub const _SC_2_PBS_LOCATE: ::c_int = 170;
817 pub const _SC_2_PBS_MESSAGE: ::c_int = 171;
818 pub const _SC_2_PBS_TRACK: ::c_int = 172;
819 pub const _SC_SYMLOOP_MAX: ::c_int = 173;
820 pub const _SC_STREAMS: ::c_int = 174;
821 pub const _SC_2_PBS_CHECKPOINT: ::c_int = 175;
822 pub const _SC_V6_ILP32_OFF32: ::c_int = 176;
823 pub const _SC_V6_ILP32_OFFBIG: ::c_int = 177;
824 pub const _SC_V6_LP64_OFF64: ::c_int = 178;
825 pub const _SC_V6_LPBIG_OFFBIG: ::c_int = 179;
826 pub const _SC_HOST_NAME_MAX: ::c_int = 180;
827 pub const _SC_TRACE: ::c_int = 181;
828 pub const _SC_TRACE_EVENT_FILTER: ::c_int = 182;
829 pub const _SC_TRACE_INHERIT: ::c_int = 183;
830 pub const _SC_TRACE_LOG: ::c_int = 184;
831 pub const _SC_IPV6: ::c_int = 235;
832 pub const _SC_RAW_SOCKETS: ::c_int = 236;
833 pub const _SC_V7_ILP32_OFF32: ::c_int = 237;
834 pub const _SC_V7_ILP32_OFFBIG: ::c_int = 238;
835 pub const _SC_V7_LP64_OFF64: ::c_int = 239;
836 pub const _SC_V7_LPBIG_OFFBIG: ::c_int = 240;
837 pub const _SC_SS_REPL_MAX: ::c_int = 241;
838 pub const _SC_TRACE_EVENT_NAME_MAX: ::c_int = 242;
839 pub const _SC_TRACE_NAME_MAX: ::c_int = 243;
840 pub const _SC_TRACE_SYS_MAX: ::c_int = 244;
841 pub const _SC_TRACE_USER_EVENT_MAX: ::c_int = 245;
842 pub const _SC_XOPEN_STREAMS: ::c_int = 246;
843 pub const _SC_THREAD_ROBUST_PRIO_INHERIT: ::c_int = 247;
844 pub const _SC_THREAD_ROBUST_PRIO_PROTECT: ::c_int = 248;
845 
846 pub const RLIM_SAVED_MAX: ::rlim_t = RLIM_INFINITY;
847 pub const RLIM_SAVED_CUR: ::rlim_t = RLIM_INFINITY;
848 
849 pub const GLOB_ERR: ::c_int = 1 << 0;
850 pub const GLOB_MARK: ::c_int = 1 << 1;
851 pub const GLOB_NOSORT: ::c_int = 1 << 2;
852 pub const GLOB_DOOFFS: ::c_int = 1 << 3;
853 pub const GLOB_NOCHECK: ::c_int = 1 << 4;
854 pub const GLOB_APPEND: ::c_int = 1 << 5;
855 pub const GLOB_NOESCAPE: ::c_int = 1 << 6;
856 
857 pub const GLOB_NOSPACE: ::c_int = 1;
858 pub const GLOB_ABORTED: ::c_int = 2;
859 pub const GLOB_NOMATCH: ::c_int = 3;
860 
861 pub const POSIX_MADV_NORMAL: ::c_int = 0;
862 pub const POSIX_MADV_RANDOM: ::c_int = 1;
863 pub const POSIX_MADV_SEQUENTIAL: ::c_int = 2;
864 pub const POSIX_MADV_WILLNEED: ::c_int = 3;
865 
866 pub const S_IEXEC: mode_t = 64;
867 pub const S_IWRITE: mode_t = 128;
868 pub const S_IREAD: mode_t = 256;
869 
870 pub const F_LOCK: ::c_int = 1;
871 pub const F_TEST: ::c_int = 3;
872 pub const F_TLOCK: ::c_int = 2;
873 pub const F_ULOCK: ::c_int = 0;
874 
875 pub const ST_RDONLY: ::c_ulong = 1;
876 pub const ST_NOSUID: ::c_ulong = 2;
877 pub const ST_NODEV: ::c_ulong = 4;
878 pub const ST_NOEXEC: ::c_ulong = 8;
879 pub const ST_SYNCHRONOUS: ::c_ulong = 16;
880 pub const ST_MANDLOCK: ::c_ulong = 64;
881 pub const ST_WRITE: ::c_ulong = 128;
882 pub const ST_APPEND: ::c_ulong = 256;
883 pub const ST_IMMUTABLE: ::c_ulong = 512;
884 pub const ST_NOATIME: ::c_ulong = 1024;
885 pub const ST_NODIRATIME: ::c_ulong = 2048;
886 
887 pub const RTLD_NEXT: *mut ::c_void = -1i64 as *mut ::c_void;
888 pub const RTLD_DEFAULT: *mut ::c_void = 0i64 as *mut ::c_void;
889 pub const RTLD_NODELETE: ::c_int = 0x1000;
890 pub const RTLD_NOW: ::c_int = 0x2;
891 
892 pub const TCP_MD5SIG: ::c_int = 14;
893 
894 align_const! {
895     pub const PTHREAD_MUTEX_INITIALIZER: pthread_mutex_t = pthread_mutex_t {
896         size: [0; __SIZEOF_PTHREAD_MUTEX_T],
897     };
898     pub const PTHREAD_COND_INITIALIZER: pthread_cond_t = pthread_cond_t {
899         size: [0; __SIZEOF_PTHREAD_COND_T],
900     };
901     pub const PTHREAD_RWLOCK_INITIALIZER: pthread_rwlock_t = pthread_rwlock_t {
902         size: [0; __SIZEOF_PTHREAD_RWLOCK_T],
903     };
904 }
905 
906 pub const PTHREAD_MUTEX_NORMAL: ::c_int = 0;
907 pub const PTHREAD_MUTEX_RECURSIVE: ::c_int = 1;
908 pub const PTHREAD_MUTEX_ERRORCHECK: ::c_int = 2;
909 pub const PTHREAD_MUTEX_DEFAULT: ::c_int = PTHREAD_MUTEX_NORMAL;
910 pub const PTHREAD_PROCESS_PRIVATE: ::c_int = 0;
911 pub const PTHREAD_PROCESS_SHARED: ::c_int = 1;
912 pub const __SIZEOF_PTHREAD_COND_T: usize = 48;
913 
914 pub const SCHED_OTHER: ::c_int = 0;
915 pub const SCHED_FIFO: ::c_int = 1;
916 pub const SCHED_RR: ::c_int = 2;
917 pub const SCHED_BATCH: ::c_int = 3;
918 pub const SCHED_IDLE: ::c_int = 5;
919 
920 pub const AF_IB: ::c_int = 27;
921 pub const AF_MPLS: ::c_int = 28;
922 pub const AF_NFC: ::c_int = 39;
923 pub const AF_VSOCK: ::c_int = 40;
924 pub const PF_IB: ::c_int = AF_IB;
925 pub const PF_MPLS: ::c_int = AF_MPLS;
926 pub const PF_NFC: ::c_int = AF_NFC;
927 pub const PF_VSOCK: ::c_int = AF_VSOCK;
928 
929 // System V IPC
930 pub const IPC_PRIVATE: ::key_t = 0;
931 
932 pub const IPC_CREAT: ::c_int = 0o1000;
933 pub const IPC_EXCL: ::c_int = 0o2000;
934 pub const IPC_NOWAIT: ::c_int = 0o4000;
935 
936 pub const IPC_RMID: ::c_int = 0;
937 pub const IPC_SET: ::c_int = 1;
938 pub const IPC_STAT: ::c_int = 2;
939 pub const IPC_INFO: ::c_int = 3;
940 pub const MSG_STAT: ::c_int = 11;
941 pub const MSG_INFO: ::c_int = 12;
942 
943 pub const MSG_NOERROR: ::c_int = 0o10000;
944 pub const MSG_EXCEPT: ::c_int = 0o20000;
945 
946 pub const SHM_R: ::c_int = 0o400;
947 pub const SHM_W: ::c_int = 0o200;
948 
949 pub const SHM_RDONLY: ::c_int = 0o10000;
950 pub const SHM_RND: ::c_int = 0o20000;
951 pub const SHM_REMAP: ::c_int = 0o40000;
952 pub const SHM_EXEC: ::c_int = 0o100000;
953 
954 pub const SHM_LOCK: ::c_int = 11;
955 pub const SHM_UNLOCK: ::c_int = 12;
956 
957 pub const SHM_HUGETLB: ::c_int = 0o4000;
958 pub const SHM_NORESERVE: ::c_int = 0o10000;
959 
960 pub const EPOLLRDHUP: ::c_int = 0x2000;
961 pub const EPOLLEXCLUSIVE: ::c_int = 0x10000000;
962 pub const EPOLLONESHOT: ::c_int = 0x40000000;
963 
964 pub const QFMT_VFS_OLD: ::c_int = 1;
965 pub const QFMT_VFS_V0: ::c_int = 2;
966 
967 pub const EFD_SEMAPHORE: ::c_int = 0x1;
968 
969 pub const LOG_NFACILITIES: ::c_int = 24;
970 
971 pub const SEM_FAILED: *mut ::sem_t = 0 as *mut sem_t;
972 
973 pub const RB_AUTOBOOT: ::c_int = 0x01234567u32 as i32;
974 pub const RB_HALT_SYSTEM: ::c_int = 0xcdef0123u32 as i32;
975 pub const RB_ENABLE_CAD: ::c_int = 0x89abcdefu32 as i32;
976 pub const RB_DISABLE_CAD: ::c_int = 0x00000000u32 as i32;
977 pub const RB_POWER_OFF: ::c_int = 0x4321fedcu32 as i32;
978 pub const RB_SW_SUSPEND: ::c_int = 0xd000fce2u32 as i32;
979 pub const RB_KEXEC: ::c_int = 0x45584543u32 as i32;
980 
981 pub const AI_PASSIVE: ::c_int = 0x0001;
982 pub const AI_CANONNAME: ::c_int = 0x0002;
983 pub const AI_NUMERICHOST: ::c_int = 0x0004;
984 pub const AI_V4MAPPED: ::c_int = 0x0008;
985 pub const AI_ALL: ::c_int = 0x0010;
986 pub const AI_ADDRCONFIG: ::c_int = 0x0020;
987 
988 pub const AI_NUMERICSERV: ::c_int = 0x0400;
989 
990 pub const EAI_BADFLAGS: ::c_int = -1;
991 pub const EAI_NONAME: ::c_int = -2;
992 pub const EAI_AGAIN: ::c_int = -3;
993 pub const EAI_FAIL: ::c_int = -4;
994 pub const EAI_FAMILY: ::c_int = -6;
995 pub const EAI_SOCKTYPE: ::c_int = -7;
996 pub const EAI_SERVICE: ::c_int = -8;
997 pub const EAI_MEMORY: ::c_int = -10;
998 pub const EAI_OVERFLOW: ::c_int = -12;
999 
1000 pub const NI_NUMERICHOST: ::c_int = 1;
1001 pub const NI_NUMERICSERV: ::c_int = 2;
1002 pub const NI_NOFQDN: ::c_int = 4;
1003 pub const NI_NAMEREQD: ::c_int = 8;
1004 pub const NI_DGRAM: ::c_int = 16;
1005 
1006 pub const SYNC_FILE_RANGE_WAIT_BEFORE: ::c_uint = 1;
1007 pub const SYNC_FILE_RANGE_WRITE: ::c_uint = 2;
1008 pub const SYNC_FILE_RANGE_WAIT_AFTER: ::c_uint = 4;
1009 
1010 pub const EAI_SYSTEM: ::c_int = -11;
1011 
1012 pub const AIO_CANCELED: ::c_int = 0;
1013 pub const AIO_NOTCANCELED: ::c_int = 1;
1014 pub const AIO_ALLDONE: ::c_int = 2;
1015 pub const LIO_READ: ::c_int = 0;
1016 pub const LIO_WRITE: ::c_int = 1;
1017 pub const LIO_NOP: ::c_int = 2;
1018 pub const LIO_WAIT: ::c_int = 0;
1019 pub const LIO_NOWAIT: ::c_int = 1;
1020 
1021 pub const MREMAP_MAYMOVE: ::c_int = 1;
1022 pub const MREMAP_FIXED: ::c_int = 2;
1023 
1024 pub const PR_SET_PDEATHSIG: ::c_int = 1;
1025 pub const PR_GET_PDEATHSIG: ::c_int = 2;
1026 
1027 pub const PR_GET_DUMPABLE: ::c_int = 3;
1028 pub const PR_SET_DUMPABLE: ::c_int = 4;
1029 
1030 pub const PR_GET_UNALIGN: ::c_int = 5;
1031 pub const PR_SET_UNALIGN: ::c_int = 6;
1032 pub const PR_UNALIGN_NOPRINT: ::c_int = 1;
1033 pub const PR_UNALIGN_SIGBUS: ::c_int = 2;
1034 
1035 pub const PR_GET_KEEPCAPS: ::c_int = 7;
1036 pub const PR_SET_KEEPCAPS: ::c_int = 8;
1037 
1038 pub const PR_GET_FPEMU: ::c_int = 9;
1039 pub const PR_SET_FPEMU: ::c_int = 10;
1040 pub const PR_FPEMU_NOPRINT: ::c_int = 1;
1041 pub const PR_FPEMU_SIGFPE: ::c_int = 2;
1042 
1043 pub const PR_GET_FPEXC: ::c_int = 11;
1044 pub const PR_SET_FPEXC: ::c_int = 12;
1045 pub const PR_FP_EXC_SW_ENABLE: ::c_int = 0x80;
1046 pub const PR_FP_EXC_DIV: ::c_int = 0x010000;
1047 pub const PR_FP_EXC_OVF: ::c_int = 0x020000;
1048 pub const PR_FP_EXC_UND: ::c_int = 0x040000;
1049 pub const PR_FP_EXC_RES: ::c_int = 0x080000;
1050 pub const PR_FP_EXC_INV: ::c_int = 0x100000;
1051 pub const PR_FP_EXC_DISABLED: ::c_int = 0;
1052 pub const PR_FP_EXC_NONRECOV: ::c_int = 1;
1053 pub const PR_FP_EXC_ASYNC: ::c_int = 2;
1054 pub const PR_FP_EXC_PRECISE: ::c_int = 3;
1055 
1056 pub const PR_GET_TIMING: ::c_int = 13;
1057 pub const PR_SET_TIMING: ::c_int = 14;
1058 pub const PR_TIMING_STATISTICAL: ::c_int = 0;
1059 pub const PR_TIMING_TIMESTAMP: ::c_int = 1;
1060 
1061 pub const PR_SET_NAME: ::c_int = 15;
1062 pub const PR_GET_NAME: ::c_int = 16;
1063 
1064 pub const PR_GET_ENDIAN: ::c_int = 19;
1065 pub const PR_SET_ENDIAN: ::c_int = 20;
1066 pub const PR_ENDIAN_BIG: ::c_int = 0;
1067 pub const PR_ENDIAN_LITTLE: ::c_int = 1;
1068 pub const PR_ENDIAN_PPC_LITTLE: ::c_int = 2;
1069 
1070 pub const PR_GET_SECCOMP: ::c_int = 21;
1071 pub const PR_SET_SECCOMP: ::c_int = 22;
1072 
1073 pub const PR_CAPBSET_READ: ::c_int = 23;
1074 pub const PR_CAPBSET_DROP: ::c_int = 24;
1075 
1076 pub const PR_GET_TSC: ::c_int = 25;
1077 pub const PR_SET_TSC: ::c_int = 26;
1078 pub const PR_TSC_ENABLE: ::c_int = 1;
1079 pub const PR_TSC_SIGSEGV: ::c_int = 2;
1080 
1081 pub const PR_GET_SECUREBITS: ::c_int = 27;
1082 pub const PR_SET_SECUREBITS: ::c_int = 28;
1083 
1084 pub const PR_SET_TIMERSLACK: ::c_int = 29;
1085 pub const PR_GET_TIMERSLACK: ::c_int = 30;
1086 
1087 pub const PR_TASK_PERF_EVENTS_DISABLE: ::c_int = 31;
1088 pub const PR_TASK_PERF_EVENTS_ENABLE: ::c_int = 32;
1089 
1090 pub const PR_MCE_KILL: ::c_int = 33;
1091 pub const PR_MCE_KILL_CLEAR: ::c_int = 0;
1092 pub const PR_MCE_KILL_SET: ::c_int = 1;
1093 
1094 pub const PR_MCE_KILL_LATE: ::c_int = 0;
1095 pub const PR_MCE_KILL_EARLY: ::c_int = 1;
1096 pub const PR_MCE_KILL_DEFAULT: ::c_int = 2;
1097 
1098 pub const PR_MCE_KILL_GET: ::c_int = 34;
1099 
1100 pub const PR_SET_MM: ::c_int = 35;
1101 pub const PR_SET_MM_START_CODE: ::c_int = 1;
1102 pub const PR_SET_MM_END_CODE: ::c_int = 2;
1103 pub const PR_SET_MM_START_DATA: ::c_int = 3;
1104 pub const PR_SET_MM_END_DATA: ::c_int = 4;
1105 pub const PR_SET_MM_START_STACK: ::c_int = 5;
1106 pub const PR_SET_MM_START_BRK: ::c_int = 6;
1107 pub const PR_SET_MM_BRK: ::c_int = 7;
1108 pub const PR_SET_MM_ARG_START: ::c_int = 8;
1109 pub const PR_SET_MM_ARG_END: ::c_int = 9;
1110 pub const PR_SET_MM_ENV_START: ::c_int = 10;
1111 pub const PR_SET_MM_ENV_END: ::c_int = 11;
1112 pub const PR_SET_MM_AUXV: ::c_int = 12;
1113 pub const PR_SET_MM_EXE_FILE: ::c_int = 13;
1114 pub const PR_SET_MM_MAP: ::c_int = 14;
1115 pub const PR_SET_MM_MAP_SIZE: ::c_int = 15;
1116 
1117 pub const PR_SET_PTRACER: ::c_int = 0x59616d61;
1118 
1119 pub const PR_SET_CHILD_SUBREAPER: ::c_int = 36;
1120 pub const PR_GET_CHILD_SUBREAPER: ::c_int = 37;
1121 
1122 pub const PR_SET_NO_NEW_PRIVS: ::c_int = 38;
1123 pub const PR_GET_NO_NEW_PRIVS: ::c_int = 39;
1124 
1125 pub const PR_GET_TID_ADDRESS: ::c_int = 40;
1126 
1127 pub const PR_SET_THP_DISABLE: ::c_int = 41;
1128 pub const PR_GET_THP_DISABLE: ::c_int = 42;
1129 
1130 pub const PR_MPX_ENABLE_MANAGEMENT: ::c_int = 43;
1131 pub const PR_MPX_DISABLE_MANAGEMENT: ::c_int = 44;
1132 
1133 pub const PR_SET_FP_MODE: ::c_int = 45;
1134 pub const PR_GET_FP_MODE: ::c_int = 46;
1135 pub const PR_FP_MODE_FR: ::c_int = 1 << 0;
1136 pub const PR_FP_MODE_FRE: ::c_int = 1 << 1;
1137 
1138 pub const PR_CAP_AMBIENT: ::c_int = 47;
1139 pub const PR_CAP_AMBIENT_IS_SET: ::c_int = 1;
1140 pub const PR_CAP_AMBIENT_RAISE: ::c_int = 2;
1141 pub const PR_CAP_AMBIENT_LOWER: ::c_int = 3;
1142 pub const PR_CAP_AMBIENT_CLEAR_ALL: ::c_int = 4;
1143 
1144 pub const ITIMER_REAL: ::c_int = 0;
1145 pub const ITIMER_VIRTUAL: ::c_int = 1;
1146 pub const ITIMER_PROF: ::c_int = 2;
1147 
1148 pub const XATTR_CREATE: ::c_int = 0x1;
1149 pub const XATTR_REPLACE: ::c_int = 0x2;
1150 
1151 pub const _POSIX_VDISABLE: ::cc_t = 0;
1152 
1153 pub const FALLOC_FL_KEEP_SIZE: ::c_int = 0x01;
1154 pub const FALLOC_FL_PUNCH_HOLE: ::c_int = 0x02;
1155 
1156 // On Linux, libc doesn't define this constant, libattr does instead.
1157 // We still define it for Linux as it's defined by libc on other platforms,
1158 // and it's mentioned in the man pages for getxattr and setxattr.
1159 pub const SFD_CLOEXEC: ::c_int = 0x080000;
1160 
1161 pub const NCCS: usize = 32;
1162 
1163 pub const O_TRUNC: ::c_int = 512;
1164 pub const O_NOATIME: ::c_int = 0o1000000;
1165 pub const O_CLOEXEC: ::c_int = 0x80000;
1166 
1167 pub const EBFONT: ::c_int = 59;
1168 pub const ENOSTR: ::c_int = 60;
1169 pub const ENODATA: ::c_int = 61;
1170 pub const ETIME: ::c_int = 62;
1171 pub const ENOSR: ::c_int = 63;
1172 pub const ENONET: ::c_int = 64;
1173 pub const ENOPKG: ::c_int = 65;
1174 pub const EREMOTE: ::c_int = 66;
1175 pub const ENOLINK: ::c_int = 67;
1176 pub const EADV: ::c_int = 68;
1177 pub const ESRMNT: ::c_int = 69;
1178 pub const ECOMM: ::c_int = 70;
1179 pub const EPROTO: ::c_int = 71;
1180 pub const EDOTDOT: ::c_int = 73;
1181 
1182 pub const SA_NODEFER: ::c_int = 0x40000000;
1183 pub const SA_RESETHAND: ::c_int = 0x80000000;
1184 pub const SA_RESTART: ::c_int = 0x10000000;
1185 pub const SA_NOCLDSTOP: ::c_int = 0x00000001;
1186 
1187 pub const EPOLL_CLOEXEC: ::c_int = 0x80000;
1188 
1189 pub const EFD_CLOEXEC: ::c_int = 0x80000;
1190 
1191 pub const BUFSIZ: ::c_uint = 1024;
1192 pub const TMP_MAX: ::c_uint = 10000;
1193 pub const FOPEN_MAX: ::c_uint = 1000;
1194 pub const O_PATH: ::c_int = 0o10000000;
1195 pub const O_EXEC: ::c_int = 0o10000000;
1196 pub const O_SEARCH: ::c_int = 0o10000000;
1197 pub const O_ACCMODE: ::c_int = 0o10000003;
1198 pub const O_NDELAY: ::c_int = O_NONBLOCK;
1199 pub const NI_MAXHOST: ::socklen_t = 255;
1200 pub const PTHREAD_STACK_MIN: ::size_t = 2048;
1201 pub const POSIX_FADV_DONTNEED: ::c_int = 4;
1202 pub const POSIX_FADV_NOREUSE: ::c_int = 5;
1203 
1204 pub const POSIX_MADV_DONTNEED: ::c_int = 0;
1205 
1206 pub const RLIM_INFINITY: ::rlim_t = !0;
1207 pub const RLIMIT_NLIMITS: ::c_int = 15;
1208 
1209 pub const MAP_ANONYMOUS: ::c_int = MAP_ANON;
1210 
1211 pub const TCP_THIN_LINEAR_TIMEOUTS: ::c_int = 16;
1212 pub const TCP_THIN_DUPACK: ::c_int = 17;
1213 pub const TCP_USER_TIMEOUT: ::c_int = 18;
1214 pub const TCP_REPAIR: ::c_int = 19;
1215 pub const TCP_REPAIR_QUEUE: ::c_int = 20;
1216 pub const TCP_QUEUE_SEQ: ::c_int = 21;
1217 pub const TCP_REPAIR_OPTIONS: ::c_int = 22;
1218 pub const TCP_FASTOPEN: ::c_int = 23;
1219 pub const TCP_TIMESTAMP: ::c_int = 24;
1220 
1221 #[doc(hidden)]
1222 #[deprecated(
1223     since = "0.2.55",
1224     note = "Use SIGSYS instead"
1225 )]
1226 pub const SIGUNUSED: ::c_int = ::SIGSYS;
1227 
1228 pub const __SIZEOF_PTHREAD_CONDATTR_T: usize = 4;
1229 pub const __SIZEOF_PTHREAD_MUTEXATTR_T: usize = 4;
1230 pub const __SIZEOF_PTHREAD_RWLOCKATTR_T: usize = 8;
1231 
1232 pub const CPU_SETSIZE: ::c_int = 128;
1233 
1234 pub const QFMT_VFS_V1: ::c_int = 4;
1235 
1236 pub const PTRACE_TRACEME: ::c_int = 0;
1237 pub const PTRACE_PEEKTEXT: ::c_int = 1;
1238 pub const PTRACE_PEEKDATA: ::c_int = 2;
1239 pub const PTRACE_PEEKUSER: ::c_int = 3;
1240 pub const PTRACE_POKETEXT: ::c_int = 4;
1241 pub const PTRACE_POKEDATA: ::c_int = 5;
1242 pub const PTRACE_POKEUSER: ::c_int = 6;
1243 pub const PTRACE_CONT: ::c_int = 7;
1244 pub const PTRACE_KILL: ::c_int = 8;
1245 pub const PTRACE_SINGLESTEP: ::c_int = 9;
1246 pub const PTRACE_ATTACH: ::c_int = 16;
1247 pub const PTRACE_DETACH: ::c_int = 17;
1248 pub const PTRACE_SYSCALL: ::c_int = 24;
1249 pub const PTRACE_SETOPTIONS: ::c_int = 0x4200;
1250 pub const PTRACE_GETEVENTMSG: ::c_int = 0x4201;
1251 pub const PTRACE_GETSIGINFO: ::c_int = 0x4202;
1252 pub const PTRACE_SETSIGINFO: ::c_int = 0x4203;
1253 pub const PTRACE_GETREGSET: ::c_int = 0x4204;
1254 pub const PTRACE_SETREGSET: ::c_int = 0x4205;
1255 pub const PTRACE_SEIZE: ::c_int = 0x4206;
1256 pub const PTRACE_INTERRUPT: ::c_int = 0x4207;
1257 pub const PTRACE_LISTEN: ::c_int = 0x4208;
1258 pub const PTRACE_PEEKSIGINFO: ::c_int = 0x4209;
1259 
1260 pub const EPOLLWAKEUP: ::c_int = 0x20000000;
1261 
1262 pub const PTRACE_GETFPREGS: ::c_uint = 14;
1263 pub const PTRACE_SETFPREGS: ::c_uint = 15;
1264 pub const PTRACE_GETFPXREGS: ::c_uint = 18;
1265 pub const PTRACE_SETFPXREGS: ::c_uint = 19;
1266 pub const PTRACE_GETREGS: ::c_uint = 12;
1267 pub const PTRACE_SETREGS: ::c_uint = 13;
1268 
1269 pub const EFD_NONBLOCK: ::c_int = ::O_NONBLOCK;
1270 
1271 pub const SFD_NONBLOCK: ::c_int = ::O_NONBLOCK;
1272 
1273 pub const TCSANOW: ::c_int = 0;
1274 pub const TCSADRAIN: ::c_int = 1;
1275 pub const TCSAFLUSH: ::c_int = 2;
1276 
1277 pub const TIOCINQ: ::c_int = ::FIONREAD;
1278 
1279 pub const RTLD_GLOBAL: ::c_int = 0x100;
1280 pub const RTLD_NOLOAD: ::c_int = 0x4;
1281 
1282 // TODO(#247) Temporarily musl-specific (available since musl 0.9.12 / Linux
1283 // kernel 3.10).  See also linux_like/mod.rs
1284 pub const CLOCK_SGI_CYCLE: ::clockid_t = 10;
1285 pub const CLOCK_TAI: ::clockid_t = 11;
1286 
1287 pub const MCL_CURRENT: ::c_int = 0x0001;
1288 pub const MCL_FUTURE: ::c_int = 0x0002;
1289 
1290 pub const SIGSTKSZ: ::size_t = 8192;
1291 pub const MINSIGSTKSZ: ::size_t = 2048;
1292 pub const CBAUD: ::tcflag_t = 0o0010017;
1293 pub const TAB1: ::c_int = 0x00000800;
1294 pub const TAB2: ::c_int = 0x00001000;
1295 pub const TAB3: ::c_int = 0x00001800;
1296 pub const CR1: ::c_int  = 0x00000200;
1297 pub const CR2: ::c_int  = 0x00000400;
1298 pub const CR3: ::c_int  = 0x00000600;
1299 pub const FF1: ::c_int  = 0x00008000;
1300 pub const BS1: ::c_int  = 0x00002000;
1301 pub const VT1: ::c_int  = 0x00004000;
1302 pub const VWERASE: usize = 14;
1303 pub const VREPRINT: usize = 12;
1304 pub const VSUSP: usize = 10;
1305 pub const VSTART: usize = 8;
1306 pub const VSTOP: usize = 9;
1307 pub const VDISCARD: usize = 13;
1308 pub const VTIME: usize = 5;
1309 pub const IXON: ::tcflag_t = 0x00000400;
1310 pub const IXOFF: ::tcflag_t = 0x00001000;
1311 pub const ONLCR: ::tcflag_t = 0x4;
1312 pub const CSIZE: ::tcflag_t = 0x00000030;
1313 pub const CS6: ::tcflag_t = 0x00000010;
1314 pub const CS7: ::tcflag_t = 0x00000020;
1315 pub const CS8: ::tcflag_t = 0x00000030;
1316 pub const CSTOPB: ::tcflag_t = 0x00000040;
1317 pub const CREAD: ::tcflag_t = 0x00000080;
1318 pub const PARENB: ::tcflag_t = 0x00000100;
1319 pub const PARODD: ::tcflag_t = 0x00000200;
1320 pub const HUPCL: ::tcflag_t = 0x00000400;
1321 pub const CLOCAL: ::tcflag_t = 0x00000800;
1322 pub const ECHOKE: ::tcflag_t = 0x00000800;
1323 pub const ECHOE: ::tcflag_t = 0x00000010;
1324 pub const ECHOK: ::tcflag_t = 0x00000020;
1325 pub const ECHONL: ::tcflag_t = 0x00000040;
1326 pub const ECHOPRT: ::tcflag_t = 0x00000400;
1327 pub const ECHOCTL: ::tcflag_t = 0x00000200;
1328 pub const ISIG: ::tcflag_t = 0x00000001;
1329 pub const ICANON: ::tcflag_t = 0x00000002;
1330 pub const PENDIN: ::tcflag_t = 0x00004000;
1331 pub const NOFLSH: ::tcflag_t = 0x00000080;
1332 pub const CBAUDEX: ::tcflag_t = 0o010000;
1333 pub const VSWTC: usize = 7;
1334 pub const OLCUC:  ::tcflag_t = 0o000002;
1335 pub const NLDLY:  ::tcflag_t = 0o000400;
1336 pub const CRDLY:  ::tcflag_t = 0o003000;
1337 pub const TABDLY: ::tcflag_t = 0o014000;
1338 pub const BSDLY:  ::tcflag_t = 0o020000;
1339 pub const FFDLY:  ::tcflag_t = 0o100000;
1340 pub const VTDLY:  ::tcflag_t = 0o040000;
1341 pub const XTABS:  ::tcflag_t = 0o014000;
1342 
1343 pub const B0: ::speed_t = 0o000000;
1344 pub const B50: ::speed_t = 0o000001;
1345 pub const B75: ::speed_t = 0o000002;
1346 pub const B110: ::speed_t = 0o000003;
1347 pub const B134: ::speed_t = 0o000004;
1348 pub const B150: ::speed_t = 0o000005;
1349 pub const B200: ::speed_t = 0o000006;
1350 pub const B300: ::speed_t = 0o000007;
1351 pub const B600: ::speed_t = 0o000010;
1352 pub const B1200: ::speed_t = 0o000011;
1353 pub const B1800: ::speed_t = 0o000012;
1354 pub const B2400: ::speed_t = 0o000013;
1355 pub const B4800: ::speed_t = 0o000014;
1356 pub const B9600: ::speed_t = 0o000015;
1357 pub const B19200: ::speed_t = 0o000016;
1358 pub const B38400: ::speed_t = 0o000017;
1359 pub const B57600: ::speed_t = 0o010001;
1360 pub const B115200: ::speed_t = 0o010002;
1361 pub const B230400: ::speed_t = 0o010003;
1362 pub const B460800: ::speed_t = 0o010004;
1363 pub const B500000: ::speed_t = 0o010005;
1364 pub const B576000: ::speed_t = 0o010006;
1365 pub const B921600: ::speed_t = 0o010007;
1366 pub const B1000000: ::speed_t = 0o010010;
1367 pub const B1152000: ::speed_t = 0o010011;
1368 pub const B1500000: ::speed_t = 0o010012;
1369 pub const B2000000: ::speed_t = 0o010013;
1370 pub const B2500000: ::speed_t = 0o010014;
1371 pub const B3000000: ::speed_t = 0o010015;
1372 pub const B3500000: ::speed_t = 0o010016;
1373 pub const B4000000: ::speed_t = 0o010017;
1374 
1375 pub const SO_BINDTODEVICE: ::c_int = 25;
1376 pub const SO_TIMESTAMP: ::c_int = 29;
1377 pub const SO_MARK: ::c_int = 36;
1378 pub const SO_RXQ_OVFL: ::c_int = 40;
1379 pub const SO_PEEK_OFF: ::c_int = 42;
1380 pub const SO_BUSY_POLL: ::c_int = 46;
1381 
1382 pub const __SIZEOF_PTHREAD_RWLOCK_T: usize = 32;
1383 pub const __SIZEOF_PTHREAD_MUTEX_T: usize = 28;
1384 
1385 pub const O_DIRECT: ::c_int = 0x4000;
1386 pub const O_DIRECTORY: ::c_int = 0x10000;
1387 pub const O_NOFOLLOW: ::c_int = 0x20000;
1388 pub const O_ASYNC: ::c_int = 0x2000;
1389 
1390 pub const FIOCLEX: ::c_int = 0x5451;
1391 pub const FIONBIO: ::c_int = 0x5421;
1392 
1393 pub const RLIMIT_RSS: ::c_int = 5;
1394 pub const RLIMIT_NOFILE: ::c_int = 7;
1395 pub const RLIMIT_AS: ::c_int = 9;
1396 pub const RLIMIT_NPROC: ::c_int = 6;
1397 pub const RLIMIT_MEMLOCK: ::c_int = 8;
1398 pub const RLIMIT_CPU: ::c_int = 0;
1399 pub const RLIMIT_FSIZE: ::c_int = 1;
1400 pub const RLIMIT_DATA: ::c_int = 2;
1401 pub const RLIMIT_STACK: ::c_int = 3;
1402 pub const RLIMIT_CORE: ::c_int = 4;
1403 pub const RLIMIT_LOCKS: ::c_int = 10;
1404 pub const RLIMIT_SIGPENDING: ::c_int = 11;
1405 pub const RLIMIT_MSGQUEUE: ::c_int = 12;
1406 pub const RLIMIT_NICE: ::c_int = 13;
1407 pub const RLIMIT_RTPRIO: ::c_int = 14;
1408 
1409 pub const O_APPEND: ::c_int = 1024;
1410 pub const O_CREAT: ::c_int = 64;
1411 pub const O_EXCL: ::c_int = 128;
1412 pub const O_NOCTTY: ::c_int = 256;
1413 pub const O_NONBLOCK: ::c_int = 2048;
1414 pub const O_SYNC: ::c_int = 1052672;
1415 pub const O_RSYNC: ::c_int = 1052672;
1416 pub const O_DSYNC: ::c_int = 4096;
1417 
1418 pub const SOCK_NONBLOCK: ::c_int = 2048;
1419 
1420 pub const MAP_ANON: ::c_int = 0x0020;
1421 pub const MAP_GROWSDOWN: ::c_int = 0x0100;
1422 pub const MAP_DENYWRITE: ::c_int = 0x0800;
1423 pub const MAP_EXECUTABLE: ::c_int = 0x01000;
1424 pub const MAP_LOCKED: ::c_int = 0x02000;
1425 pub const MAP_NORESERVE: ::c_int = 0x04000;
1426 pub const MAP_POPULATE: ::c_int = 0x08000;
1427 pub const MAP_NONBLOCK: ::c_int = 0x010000;
1428 pub const MAP_STACK: ::c_int = 0x020000;
1429 
1430 pub const SOCK_STREAM: ::c_int = 1;
1431 pub const SOCK_DGRAM: ::c_int = 2;
1432 pub const SOCK_SEQPACKET: ::c_int = 5;
1433 
1434 pub const SOL_SOCKET: ::c_int = 1;
1435 
1436 pub const EDEADLK: ::c_int = 35;
1437 pub const ENAMETOOLONG: ::c_int = 36;
1438 pub const ENOLCK: ::c_int = 37;
1439 pub const ENOSYS: ::c_int = 38;
1440 pub const ENOTEMPTY: ::c_int = 39;
1441 pub const ELOOP: ::c_int = 40;
1442 pub const ENOMSG: ::c_int = 42;
1443 pub const EIDRM: ::c_int = 43;
1444 pub const ECHRNG: ::c_int = 44;
1445 pub const EL2NSYNC: ::c_int = 45;
1446 pub const EL3HLT: ::c_int = 46;
1447 pub const EL3RST: ::c_int = 47;
1448 pub const ELNRNG: ::c_int = 48;
1449 pub const EUNATCH: ::c_int = 49;
1450 pub const ENOCSI: ::c_int = 50;
1451 pub const EL2HLT: ::c_int = 51;
1452 pub const EBADE: ::c_int = 52;
1453 pub const EBADR: ::c_int = 53;
1454 pub const EXFULL: ::c_int = 54;
1455 pub const ENOANO: ::c_int = 55;
1456 pub const EBADRQC: ::c_int = 56;
1457 pub const EBADSLT: ::c_int = 57;
1458 pub const EDEADLOCK: ::c_int = EDEADLK;
1459 pub const EMULTIHOP: ::c_int = 72;
1460 pub const EBADMSG: ::c_int = 74;
1461 pub const EOVERFLOW: ::c_int = 75;
1462 pub const ENOTUNIQ: ::c_int = 76;
1463 pub const EBADFD: ::c_int = 77;
1464 pub const EREMCHG: ::c_int = 78;
1465 pub const ELIBACC: ::c_int = 79;
1466 pub const ELIBBAD: ::c_int = 80;
1467 pub const ELIBSCN: ::c_int = 81;
1468 pub const ELIBMAX: ::c_int = 82;
1469 pub const ELIBEXEC: ::c_int = 83;
1470 pub const EILSEQ: ::c_int = 84;
1471 pub const ERESTART: ::c_int = 85;
1472 pub const ESTRPIPE: ::c_int = 86;
1473 pub const EUSERS: ::c_int = 87;
1474 pub const ENOTSOCK: ::c_int = 88;
1475 pub const EDESTADDRREQ: ::c_int = 89;
1476 pub const EMSGSIZE: ::c_int = 90;
1477 pub const EPROTOTYPE: ::c_int = 91;
1478 pub const ENOPROTOOPT: ::c_int = 92;
1479 pub const EPROTONOSUPPORT: ::c_int = 93;
1480 pub const ESOCKTNOSUPPORT: ::c_int = 94;
1481 pub const EOPNOTSUPP: ::c_int = 95;
1482 pub const ENOTSUP: ::c_int = EOPNOTSUPP;
1483 pub const EPFNOSUPPORT: ::c_int = 96;
1484 pub const EAFNOSUPPORT: ::c_int = 97;
1485 pub const EADDRINUSE: ::c_int = 98;
1486 pub const EADDRNOTAVAIL: ::c_int = 99;
1487 pub const ENETDOWN: ::c_int = 100;
1488 pub const ENETUNREACH: ::c_int = 101;
1489 pub const ENETRESET: ::c_int = 102;
1490 pub const ECONNABORTED: ::c_int = 103;
1491 pub const ECONNRESET: ::c_int = 104;
1492 pub const ENOBUFS: ::c_int = 105;
1493 pub const EISCONN: ::c_int = 106;
1494 pub const ENOTCONN: ::c_int = 107;
1495 pub const ESHUTDOWN: ::c_int = 108;
1496 pub const ETOOMANYREFS: ::c_int = 109;
1497 pub const ETIMEDOUT: ::c_int = 110;
1498 pub const ECONNREFUSED: ::c_int = 111;
1499 pub const EHOSTDOWN: ::c_int = 112;
1500 pub const EHOSTUNREACH: ::c_int = 113;
1501 pub const EALREADY: ::c_int = 114;
1502 pub const EINPROGRESS: ::c_int = 115;
1503 pub const ESTALE: ::c_int = 116;
1504 pub const EUCLEAN: ::c_int = 117;
1505 pub const ENOTNAM: ::c_int = 118;
1506 pub const ENAVAIL: ::c_int = 119;
1507 pub const EISNAM: ::c_int = 120;
1508 pub const EREMOTEIO: ::c_int = 121;
1509 pub const EDQUOT: ::c_int = 122;
1510 pub const ENOMEDIUM: ::c_int = 123;
1511 pub const EMEDIUMTYPE: ::c_int = 124;
1512 pub const ECANCELED: ::c_int = 125;
1513 pub const ENOKEY: ::c_int = 126;
1514 pub const EKEYEXPIRED: ::c_int = 127;
1515 pub const EKEYREVOKED: ::c_int = 128;
1516 pub const EKEYREJECTED: ::c_int = 129;
1517 pub const EOWNERDEAD: ::c_int = 130;
1518 pub const ENOTRECOVERABLE: ::c_int = 131;
1519 pub const ERFKILL: ::c_int = 132;
1520 pub const EHWPOISON: ::c_int = 133;
1521 
1522 pub const SO_REUSEADDR: ::c_int = 2;
1523 pub const SO_TYPE: ::c_int = 3;
1524 pub const SO_ERROR: ::c_int = 4;
1525 pub const SO_DONTROUTE: ::c_int = 5;
1526 pub const SO_BROADCAST: ::c_int = 6;
1527 pub const SO_SNDBUF: ::c_int = 7;
1528 pub const SO_RCVBUF: ::c_int = 8;
1529 pub const SO_KEEPALIVE: ::c_int = 9;
1530 pub const SO_OOBINLINE: ::c_int = 10;
1531 pub const SO_LINGER: ::c_int = 13;
1532 pub const SO_REUSEPORT: ::c_int = 15;
1533 pub const SO_RCVLOWAT: ::c_int = 18;
1534 pub const SO_SNDLOWAT: ::c_int = 19;
1535 pub const SO_RCVTIMEO: ::c_int = 20;
1536 pub const SO_SNDTIMEO: ::c_int = 21;
1537 pub const SO_ACCEPTCONN: ::c_int = 30;
1538 
1539 pub const SA_ONSTACK: ::c_int = 0x08000000;
1540 pub const SA_SIGINFO: ::c_int = 0x00000004;
1541 pub const SA_NOCLDWAIT: ::c_int = 0x00000002;
1542 
1543 pub const SIGCHLD: ::c_int = 17;
1544 pub const SIGBUS: ::c_int = 7;
1545 pub const SIGTTIN: ::c_int = 21;
1546 pub const SIGTTOU: ::c_int = 22;
1547 pub const SIGXCPU: ::c_int = 24;
1548 pub const SIGXFSZ: ::c_int = 25;
1549 pub const SIGVTALRM: ::c_int = 26;
1550 pub const SIGPROF: ::c_int = 27;
1551 pub const SIGWINCH: ::c_int = 28;
1552 pub const SIGUSR1: ::c_int = 10;
1553 pub const SIGUSR2: ::c_int = 12;
1554 pub const SIGCONT: ::c_int = 18;
1555 pub const SIGSTOP: ::c_int = 19;
1556 pub const SIGTSTP: ::c_int = 20;
1557 pub const SIGURG: ::c_int = 23;
1558 pub const SIGIO: ::c_int = 29;
1559 pub const SIGSYS: ::c_int = 31;
1560 pub const SIGSTKFLT: ::c_int = 16;
1561 pub const SIGPOLL: ::c_int = 29;
1562 pub const SIGPWR: ::c_int = 30;
1563 pub const SIG_SETMASK: ::c_int = 2;
1564 pub const SIG_BLOCK: ::c_int = 0x000000;
1565 pub const SIG_UNBLOCK: ::c_int = 0x01;
1566 
1567 pub const EXTPROC: ::tcflag_t = 0x00010000;
1568 
1569 pub const MAP_HUGETLB: ::c_int = 0x040000;
1570 
1571 pub const F_GETLK: ::c_int = 12;
1572 pub const F_GETOWN: ::c_int = 9;
1573 pub const F_SETLK: ::c_int = 13;
1574 pub const F_SETLKW: ::c_int = 14;
1575 pub const F_SETOWN: ::c_int = 8;
1576 
1577 pub const VEOF: usize = 4;
1578 pub const VEOL: usize = 11;
1579 pub const VEOL2: usize = 16;
1580 pub const VMIN: usize = 6;
1581 pub const IEXTEN: ::tcflag_t = 0x00008000;
1582 pub const TOSTOP: ::tcflag_t = 0x00000100;
1583 pub const FLUSHO: ::tcflag_t = 0x00001000;
1584 
1585 pub const TCGETS: ::c_int = 0x5401;
1586 pub const TCSETS: ::c_int = 0x5402;
1587 pub const TCSETSW: ::c_int = 0x5403;
1588 pub const TCSETSF: ::c_int = 0x5404;
1589 pub const TCGETA: ::c_int = 0x5405;
1590 pub const TCSETA: ::c_int = 0x5406;
1591 pub const TCSETAW: ::c_int = 0x5407;
1592 pub const TCSETAF: ::c_int = 0x5408;
1593 pub const TCSBRK: ::c_int = 0x5409;
1594 pub const TCXONC: ::c_int = 0x540A;
1595 pub const TCFLSH: ::c_int = 0x540B;
1596 pub const TIOCGSOFTCAR: ::c_int = 0x5419;
1597 pub const TIOCSSOFTCAR: ::c_int = 0x541A;
1598 pub const TIOCLINUX: ::c_int = 0x541C;
1599 pub const TIOCGSERIAL: ::c_int = 0x541E;
1600 pub const TIOCEXCL: ::c_int = 0x540C;
1601 pub const TIOCNXCL: ::c_int = 0x540D;
1602 pub const TIOCSCTTY: ::c_int = 0x540E;
1603 pub const TIOCGPGRP: ::c_int = 0x540F;
1604 pub const TIOCSPGRP: ::c_int = 0x5410;
1605 pub const TIOCOUTQ: ::c_int = 0x5411;
1606 pub const TIOCSTI: ::c_int = 0x5412;
1607 pub const TIOCGWINSZ: ::c_int = 0x5413;
1608 pub const TIOCSWINSZ: ::c_int = 0x5414;
1609 pub const TIOCMGET: ::c_int = 0x5415;
1610 pub const TIOCMBIS: ::c_int = 0x5416;
1611 pub const TIOCMBIC: ::c_int = 0x5417;
1612 pub const TIOCMSET: ::c_int = 0x5418;
1613 pub const FIONREAD: ::c_int = 0x541B;
1614 pub const TIOCCONS: ::c_int = 0x541D;
1615 
1616 pub const SYS_gettid: ::c_long = 224; // Valid for arm (32-bit) and x86 (32-bit)
1617 
1618 pub const POLLWRNORM: ::c_short = 0x100;
1619 pub const POLLWRBAND: ::c_short = 0x200;
1620 
1621 pub const TIOCM_LE: ::c_int = 0x001;
1622 pub const TIOCM_DTR: ::c_int = 0x002;
1623 pub const TIOCM_RTS: ::c_int = 0x004;
1624 pub const TIOCM_ST: ::c_int = 0x008;
1625 pub const TIOCM_SR: ::c_int = 0x010;
1626 pub const TIOCM_CTS: ::c_int = 0x020;
1627 pub const TIOCM_CAR: ::c_int = 0x040;
1628 pub const TIOCM_RNG: ::c_int = 0x080;
1629 pub const TIOCM_DSR: ::c_int = 0x100;
1630 pub const TIOCM_CD: ::c_int = TIOCM_CAR;
1631 pub const TIOCM_RI: ::c_int = TIOCM_RNG;
1632 pub const O_TMPFILE: ::c_int = 0x400000;
1633 
1634 pub const MAX_ADDR_LEN: usize = 7;
1635 pub const ARPD_UPDATE: ::c_ushort = 0x01;
1636 pub const ARPD_LOOKUP: ::c_ushort = 0x02;
1637 pub const ARPD_FLUSH: ::c_ushort = 0x03;
1638 pub const ATF_MAGIC: ::c_int = 0x80;
1639 
1640 f! {
1641     pub fn CMSG_NXTHDR(mhdr: *const msghdr,
1642                        cmsg: *const cmsghdr) -> *mut cmsghdr {
1643         if ((*cmsg).cmsg_len as usize) < ::mem::size_of::<cmsghdr>() {
1644             return 0 as *mut cmsghdr;
1645         };
1646         let next = (cmsg as usize +
1647                     super::CMSG_ALIGN((*cmsg).cmsg_len as usize))
1648             as *mut cmsghdr;
1649         let max = (*mhdr).msg_control as usize
1650             + (*mhdr).msg_controllen as usize;
1651         if (next.offset(1)) as usize > max {
1652             0 as *mut cmsghdr
1653         } else {
1654             next as *mut cmsghdr
1655         }
1656     }
1657 
1658     pub fn CPU_ZERO(cpuset: &mut cpu_set_t) -> () {
1659         for slot in cpuset.bits.iter_mut() {
1660             *slot = 0;
1661         }
1662     }
1663 
1664     pub fn CPU_SET(cpu: usize, cpuset: &mut cpu_set_t) -> () {
1665         let size_in_bits
1666             = 8 * ::mem::size_of_val(&cpuset.bits[0]); // 32, 64 etc
1667         let (idx, offset) = (cpu / size_in_bits, cpu % size_in_bits);
1668         cpuset.bits[idx] |= 1 << offset;
1669         ()
1670     }
1671 
1672     pub fn CPU_CLR(cpu: usize, cpuset: &mut cpu_set_t) -> () {
1673         let size_in_bits
1674             = 8 * ::mem::size_of_val(&cpuset.bits[0]); // 32, 64 etc
1675         let (idx, offset) = (cpu / size_in_bits, cpu % size_in_bits);
1676         cpuset.bits[idx] &= !(1 << offset);
1677         ()
1678     }
1679 
1680     pub fn CPU_ISSET(cpu: usize, cpuset: &cpu_set_t) -> bool {
1681         let size_in_bits = 8 * ::mem::size_of_val(&cpuset.bits[0]);
1682         let (idx, offset) = (cpu / size_in_bits, cpu % size_in_bits);
1683         0 != (cpuset.bits[idx] & (1 << offset))
1684     }
1685 
1686     pub fn CPU_EQUAL(set1: &cpu_set_t, set2: &cpu_set_t) -> bool {
1687         set1.bits == set2.bits
1688     }
1689 
1690     pub fn major(dev: ::dev_t) -> ::c_uint {
1691         // see
1692         // https://github.com/kripken/emscripten/blob/
1693         // master/system/include/libc/sys/sysmacros.h
1694         let mut major = 0;
1695         major |= (dev & 0x00000fff) >> 8;
1696         major |= (dev & 0xfffff000) >> 31 >> 1;
1697         major as ::c_uint
1698     }
1699 
1700     pub fn minor(dev: ::dev_t) -> ::c_uint {
1701         // see
1702         // https://github.com/kripken/emscripten/blob/
1703         // master/system/include/libc/sys/sysmacros.h
1704         let mut minor = 0;
1705         minor |= (dev & 0x000000ff) >> 0;
1706         minor |= (dev & 0xffffff00) >> 12;
1707         minor as ::c_uint
1708     }
1709 
1710     pub fn makedev(major: ::c_uint, minor: ::c_uint) -> ::dev_t {
1711         let major = major as ::dev_t;
1712         let minor = minor as ::dev_t;
1713         let mut dev = 0;
1714         dev |= (major & 0x00000fff) << 8;
1715         dev |= (major & 0xfffff000) << 31 << 1;
1716         dev |= (minor & 0x000000ff) << 0;
1717         dev |= (minor & 0xffffff00) << 12;
1718         dev
1719     }
1720 }
1721 
1722 extern {
getrlimit64(resource: ::c_int, rlim: *mut rlimit64) -> ::c_int1723     pub fn getrlimit64(resource: ::c_int,
1724                        rlim: *mut rlimit64) -> ::c_int;
setrlimit64(resource: ::c_int, rlim: *const rlimit64) -> ::c_int1725     pub fn setrlimit64(resource: ::c_int,
1726                        rlim: *const rlimit64) -> ::c_int;
getrlimit(resource: ::c_int, rlim: *mut ::rlimit) -> ::c_int1727     pub fn getrlimit(resource: ::c_int, rlim: *mut ::rlimit) -> ::c_int;
setrlimit(resource: ::c_int, rlim: *const ::rlimit) -> ::c_int1728     pub fn setrlimit(resource: ::c_int, rlim: *const ::rlimit) -> ::c_int;
strerror_r(errnum: ::c_int, buf: *mut c_char, buflen: ::size_t) -> ::c_int1729     pub fn strerror_r(errnum: ::c_int, buf: *mut c_char,
1730                       buflen: ::size_t) -> ::c_int;
1731 
abs(i: ::c_int) -> ::c_int1732     pub fn abs(i: ::c_int) -> ::c_int;
atof(s: *const ::c_char) -> ::c_double1733     pub fn atof(s: *const ::c_char) -> ::c_double;
labs(i: ::c_long) -> ::c_long1734     pub fn labs(i: ::c_long) -> ::c_long;
rand() -> ::c_int1735     pub fn rand() -> ::c_int;
srand(seed: ::c_uint)1736     pub fn srand(seed: ::c_uint);
1737 
gettimeofday(tp: *mut ::timeval, tz: *mut ::c_void) -> ::c_int1738     pub fn gettimeofday(tp: *mut ::timeval,
1739                         tz: *mut ::c_void) -> ::c_int;
1740 
setpwent()1741     pub fn setpwent();
endpwent()1742     pub fn endpwent();
getpwent() -> *mut passwd1743     pub fn getpwent() -> *mut passwd;
1744 
shm_open(name: *const c_char, oflag: ::c_int, mode: mode_t) -> ::c_int1745     pub fn shm_open(name: *const c_char, oflag: ::c_int,
1746                     mode: mode_t) -> ::c_int;
1747 
mprotect(addr: *mut ::c_void, len: ::size_t, prot: ::c_int) -> ::c_int1748     pub fn mprotect(addr: *mut ::c_void, len: ::size_t, prot: ::c_int)
1749                     -> ::c_int;
__errno_location() -> *mut ::c_int1750     pub fn __errno_location() -> *mut ::c_int;
1751 
fopen64(filename: *const c_char, mode: *const c_char) -> *mut ::FILE1752     pub fn fopen64(filename: *const c_char,
1753                    mode: *const c_char) -> *mut ::FILE;
freopen64(filename: *const c_char, mode: *const c_char, file: *mut ::FILE) -> *mut ::FILE1754     pub fn freopen64(filename: *const c_char, mode: *const c_char,
1755                      file: *mut ::FILE) -> *mut ::FILE;
tmpfile64() -> *mut ::FILE1756     pub fn tmpfile64() -> *mut ::FILE;
fgetpos64(stream: *mut ::FILE, ptr: *mut fpos64_t) -> ::c_int1757     pub fn fgetpos64(stream: *mut ::FILE, ptr: *mut fpos64_t) -> ::c_int;
fsetpos64(stream: *mut ::FILE, ptr: *const fpos64_t) -> ::c_int1758     pub fn fsetpos64(stream: *mut ::FILE, ptr: *const fpos64_t) -> ::c_int;
fseeko64(stream: *mut ::FILE, offset: ::off64_t, whence: ::c_int) -> ::c_int1759     pub fn fseeko64(stream: *mut ::FILE,
1760                     offset: ::off64_t,
1761                     whence: ::c_int) -> ::c_int;
ftello64(stream: *mut ::FILE) -> ::off64_t1762     pub fn ftello64(stream: *mut ::FILE) -> ::off64_t;
posix_fallocate(fd: ::c_int, offset: ::off_t, len: ::off_t) -> ::c_int1763     pub fn posix_fallocate(fd: ::c_int, offset: ::off_t,
1764                            len: ::off_t) -> ::c_int;
pwritev(fd: ::c_int, iov: *const ::iovec, iovcnt: ::c_int, offset: ::off_t) -> ::ssize_t1765     pub fn pwritev(fd: ::c_int,
1766                    iov: *const ::iovec,
1767                    iovcnt: ::c_int,
1768                    offset: ::off_t) -> ::ssize_t;
preadv(fd: ::c_int, iov: *const ::iovec, iovcnt: ::c_int, offset: ::off_t) -> ::ssize_t1769     pub fn preadv(fd: ::c_int,
1770                   iov: *const ::iovec,
1771                   iovcnt: ::c_int,
1772                   offset: ::off_t) -> ::ssize_t;
dup3(oldfd: ::c_int, newfd: ::c_int, flags: ::c_int) -> ::c_int1773     pub fn dup3(oldfd: ::c_int, newfd: ::c_int, flags: ::c_int) -> ::c_int;
mkostemp(template: *mut ::c_char, flags: ::c_int) -> ::c_int1774     pub fn mkostemp(template: *mut ::c_char, flags: ::c_int) -> ::c_int;
mkostemps(template: *mut ::c_char, suffixlen: ::c_int, flags: ::c_int) -> ::c_int1775     pub fn mkostemps(template: *mut ::c_char,
1776                      suffixlen: ::c_int,
1777                      flags: ::c_int) -> ::c_int;
nl_langinfo_l(item: ::nl_item, locale: ::locale_t) -> *mut ::c_char1778     pub fn nl_langinfo_l(item: ::nl_item, locale: ::locale_t) -> *mut ::c_char;
getnameinfo(sa: *const ::sockaddr, salen: ::socklen_t, host: *mut ::c_char, hostlen: ::socklen_t, serv: *mut ::c_char, sevlen: ::socklen_t, flags: ::c_int) -> ::c_int1779     pub fn getnameinfo(sa: *const ::sockaddr,
1780                        salen: ::socklen_t,
1781                        host: *mut ::c_char,
1782                        hostlen: ::socklen_t,
1783                        serv: *mut ::c_char,
1784                        sevlen: ::socklen_t,
1785                        flags: ::c_int) -> ::c_int;
getloadavg(loadavg: *mut ::c_double, nelem: ::c_int) -> ::c_int1786     pub fn getloadavg(loadavg: *mut ::c_double, nelem: ::c_int) -> ::c_int;
1787 
1788     // Not available now on Android
mkfifoat(dirfd: ::c_int, pathname: *const ::c_char, mode: ::mode_t) -> ::c_int1789     pub fn mkfifoat(dirfd: ::c_int, pathname: *const ::c_char,
1790                     mode: ::mode_t) -> ::c_int;
if_nameindex() -> *mut if_nameindex1791     pub fn if_nameindex() -> *mut if_nameindex;
if_freenameindex(ptr: *mut if_nameindex)1792     pub fn if_freenameindex(ptr: *mut if_nameindex);
1793 
mremap(addr: *mut ::c_void, len: ::size_t, new_len: ::size_t, flags: ::c_int, ...) -> *mut ::c_void1794     pub fn mremap(addr: *mut ::c_void,
1795                   len: ::size_t,
1796                   new_len: ::size_t,
1797                   flags: ::c_int,
1798                   ...) -> *mut ::c_void;
1799 
glob(pattern: *const c_char, flags: ::c_int, errfunc: ::Option<extern fn(epath: *const c_char, errno: ::c_int) -> ::c_int>, pglob: *mut ::glob_t) -> ::c_int1800     pub fn glob(pattern: *const c_char,
1801                 flags: ::c_int,
1802                 errfunc: ::Option<extern fn(epath: *const c_char,
1803                                           errno: ::c_int) -> ::c_int>,
1804                 pglob: *mut ::glob_t) -> ::c_int;
globfree(pglob: *mut ::glob_t)1805     pub fn globfree(pglob: *mut ::glob_t);
1806 
posix_madvise(addr: *mut ::c_void, len: ::size_t, advice: ::c_int) -> ::c_int1807     pub fn posix_madvise(addr: *mut ::c_void, len: ::size_t, advice: ::c_int)
1808                          -> ::c_int;
1809 
shm_unlink(name: *const ::c_char) -> ::c_int1810     pub fn shm_unlink(name: *const ::c_char) -> ::c_int;
1811 
seekdir(dirp: *mut ::DIR, loc: ::c_long)1812     pub fn seekdir(dirp: *mut ::DIR, loc: ::c_long);
1813 
telldir(dirp: *mut ::DIR) -> ::c_long1814     pub fn telldir(dirp: *mut ::DIR) -> ::c_long;
madvise(addr: *mut ::c_void, len: ::size_t, advice: ::c_int) -> ::c_int1815     pub fn madvise(addr: *mut ::c_void, len: ::size_t, advice: ::c_int)
1816                   -> ::c_int;
1817 
msync(addr: *mut ::c_void, len: ::size_t, flags: ::c_int) -> ::c_int1818     pub fn msync(addr: *mut ::c_void, len: ::size_t, flags: ::c_int) -> ::c_int;
1819 
recvfrom(socket: ::c_int, buf: *mut ::c_void, len: ::size_t, flags: ::c_int, addr: *mut ::sockaddr, addrlen: *mut ::socklen_t) -> ::ssize_t1820     pub fn recvfrom(socket: ::c_int, buf: *mut ::c_void, len: ::size_t,
1821                     flags: ::c_int, addr: *mut ::sockaddr,
1822                     addrlen: *mut ::socklen_t) -> ::ssize_t;
mkstemps(template: *mut ::c_char, suffixlen: ::c_int) -> ::c_int1823     pub fn mkstemps(template: *mut ::c_char, suffixlen: ::c_int) -> ::c_int;
nl_langinfo(item: ::nl_item) -> *mut ::c_char1824     pub fn nl_langinfo(item: ::nl_item) -> *mut ::c_char;
1825 
getdomainname(name: *mut ::c_char, len: ::size_t) -> ::c_int1826     pub fn getdomainname(name: *mut ::c_char, len: ::size_t) -> ::c_int;
setdomainname(name: *const ::c_char, len: ::size_t) -> ::c_int1827     pub fn setdomainname(name: *const ::c_char, len: ::size_t) -> ::c_int;
sendmmsg(sockfd: ::c_int, msgvec: *mut ::mmsghdr, vlen: ::c_uint, flags: ::c_uint) -> ::c_int1828     pub fn sendmmsg(sockfd: ::c_int, msgvec: *mut ::mmsghdr, vlen: ::c_uint,
1829                     flags: ::c_uint) -> ::c_int;
recvmmsg(sockfd: ::c_int, msgvec: *mut ::mmsghdr, vlen: ::c_uint, flags: ::c_uint, timeout: *mut ::timespec) -> ::c_int1830     pub fn recvmmsg(sockfd: ::c_int, msgvec: *mut ::mmsghdr, vlen: ::c_uint,
1831                     flags: ::c_uint, timeout: *mut ::timespec) -> ::c_int;
sync()1832     pub fn sync();
ioctl(fd: ::c_int, request: ::c_int, ...) -> ::c_int1833     pub fn ioctl(fd: ::c_int, request: ::c_int, ...) -> ::c_int;
getpriority(which: ::c_int, who: ::id_t) -> ::c_int1834     pub fn getpriority(which: ::c_int, who: ::id_t) -> ::c_int;
setpriority(which: ::c_int, who: ::id_t, prio: ::c_int) -> ::c_int1835     pub fn setpriority(which: ::c_int, who: ::id_t, prio: ::c_int) -> ::c_int;
pthread_create(native: *mut ::pthread_t, attr: *const ::pthread_attr_t, f: extern fn(*mut ::c_void) -> *mut ::c_void, value: *mut ::c_void) -> ::c_int1836     pub fn pthread_create(native: *mut ::pthread_t,
1837                           attr: *const ::pthread_attr_t,
1838                           f: extern fn(*mut ::c_void) -> *mut ::c_void,
1839                           value: *mut ::c_void) -> ::c_int;
1840 }
1841 
1842 cfg_if! {
1843     if #[cfg(libc_align)] {
1844         #[macro_use]
1845         mod align;
1846     } else {
1847         #[macro_use]
1848         mod no_align;
1849     }
1850 }
1851 expand_align!();
1852