xref: /aosp_15_r20/external/cronet/third_party/rust/chromium_crates_io/vendor/libc-0.2.153/src/unix/nto/mod.rs (revision 6777b5387eb2ff775bb5750e3f5d96f37fb7352b)
1 pub type clock_t = u32;
2 
3 pub type sa_family_t = u8;
4 pub type speed_t = ::c_uint;
5 pub type tcflag_t = ::c_uint;
6 pub type clockid_t = ::c_int;
7 pub type timer_t = ::c_int;
8 pub type key_t = ::c_uint;
9 pub type id_t = ::c_int;
10 
11 pub type useconds_t = u32;
12 pub type dev_t = u32;
13 pub type socklen_t = u32;
14 pub type mode_t = u32;
15 pub type rlim64_t = u64;
16 pub type mqd_t = ::c_int;
17 pub type nfds_t = ::c_uint;
18 pub type idtype_t = ::c_uint;
19 pub type errno_t = ::c_int;
20 pub type rsize_t = c_ulong;
21 
22 pub type Elf32_Half = u16;
23 pub type Elf32_Word = u32;
24 pub type Elf32_Off = u32;
25 pub type Elf32_Addr = u32;
26 pub type Elf32_Lword = u64;
27 pub type Elf32_Sword = i32;
28 
29 pub type Elf64_Half = u16;
30 pub type Elf64_Word = u32;
31 pub type Elf64_Off = u64;
32 pub type Elf64_Addr = u64;
33 pub type Elf64_Xword = u64;
34 pub type Elf64_Sxword = i64;
35 pub type Elf64_Lword = u64;
36 pub type Elf64_Sword = i32;
37 
38 pub type Elf32_Section = u16;
39 pub type Elf64_Section = u16;
40 
41 pub type _Time32t = u32;
42 
43 pub type pthread_t = ::c_int;
44 pub type regoff_t = ::ssize_t;
45 
46 pub type nlink_t = u32;
47 pub type blksize_t = u32;
48 pub type suseconds_t = i32;
49 
50 pub type ino_t = u64;
51 pub type off_t = i64;
52 pub type blkcnt_t = u64;
53 pub type msgqnum_t = u64;
54 pub type msglen_t = u64;
55 pub type fsblkcnt_t = u64;
56 pub type fsfilcnt_t = u64;
57 pub type rlim_t = u64;
58 pub type posix_spawn_file_actions_t = *mut ::c_void;
59 pub type posix_spawnattr_t = ::uintptr_t;
60 
61 pub type pthread_mutex_t = ::sync_t;
62 pub type pthread_mutexattr_t = ::_sync_attr;
63 pub type pthread_cond_t = ::sync_t;
64 pub type pthread_condattr_t = ::_sync_attr;
65 pub type pthread_rwlockattr_t = ::_sync_attr;
66 pub type pthread_key_t = ::c_int;
67 pub type pthread_spinlock_t = sync_t;
68 pub type pthread_barrierattr_t = _sync_attr;
69 pub type sem_t = sync_t;
70 
71 pub type nl_item = ::c_int;
72 
73 #[cfg_attr(feature = "extra_traits", derive(Debug))]
74 pub enum timezone {}
75 impl ::Copy for timezone {}
76 impl ::Clone for timezone {
clone(&self) -> timezone77     fn clone(&self) -> timezone {
78         *self
79     }
80 }
81 
82 s! {
83     pub struct dirent_extra {
84         pub d_datalen: u16,
85         pub d_type: u16,
86         pub d_reserved: u32,
87     }
88 
89     pub struct stat {
90         pub st_ino: ::ino_t,
91         pub st_size: ::off_t,
92         pub st_dev: ::dev_t,
93         pub st_rdev: ::dev_t,
94         pub st_uid: ::uid_t,
95         pub st_gid: ::gid_t,
96         pub __old_st_mtime: ::_Time32t,
97         pub __old_st_atime: ::_Time32t,
98         pub __old_st_ctime: ::_Time32t,
99         pub st_mode: ::mode_t,
100         pub st_nlink: ::nlink_t,
101         pub st_blocksize: ::blksize_t,
102         pub st_nblocks: i32,
103         pub st_blksize: ::blksize_t,
104         pub st_blocks: ::blkcnt_t,
105         pub st_mtim:    ::timespec,
106         pub st_atim:    ::timespec,
107         pub st_ctim:    ::timespec,
108     }
109 
110     pub struct ip_mreq {
111         pub imr_multiaddr: in_addr,
112         pub imr_interface: in_addr,
113     }
114 
115     #[repr(packed)]
116     pub struct in_addr {
117         pub s_addr: ::in_addr_t,
118     }
119 
120     pub struct sockaddr {
121         pub sa_len: u8,
122         pub sa_family: sa_family_t,
123         pub sa_data: [::c_char; 14],
124     }
125 
126     pub struct sockaddr_in {
127         pub sin_len: u8,
128         pub sin_family: sa_family_t,
129         pub sin_port: ::in_port_t,
130         pub sin_addr: ::in_addr,
131         pub sin_zero: [i8; 8],
132     }
133 
134     pub struct sockaddr_in6 {
135         pub sin6_len: u8,
136         pub sin6_family: sa_family_t,
137         pub sin6_port: ::in_port_t,
138         pub sin6_flowinfo: u32,
139         pub sin6_addr: ::in6_addr,
140         pub sin6_scope_id: u32,
141     }
142 
143     // The order of the `ai_addr` field in this struct is crucial
144     // for converting between the Rust and C types.
145     pub struct addrinfo {
146         pub ai_flags: ::c_int,
147         pub ai_family: ::c_int,
148         pub ai_socktype: ::c_int,
149         pub ai_protocol: ::c_int,
150         pub ai_addrlen: socklen_t,
151         pub ai_canonname: *mut c_char,
152         pub ai_addr: *mut ::sockaddr,
153         pub ai_next: *mut addrinfo,
154     }
155 
156     pub struct fd_set {
157         fds_bits: [::c_uint; 2 * FD_SETSIZE / ULONG_SIZE],
158     }
159 
160     pub struct tm {
161         pub tm_sec: ::c_int,
162         pub tm_min: ::c_int,
163         pub tm_hour: ::c_int,
164         pub tm_mday: ::c_int,
165         pub tm_mon: ::c_int,
166         pub tm_year: ::c_int,
167         pub tm_wday: ::c_int,
168         pub tm_yday: ::c_int,
169         pub tm_isdst: ::c_int,
170         pub tm_gmtoff: ::c_long,
171         pub tm_zone: *const ::c_char,
172     }
173 
174     #[repr(align(8))]
175     pub struct sched_param {
176         pub sched_priority: ::c_int,
177         pub sched_curpriority: ::c_int,
178         pub reserved: [::c_int; 10],
179     }
180 
181     #[repr(align(8))]
182     pub struct __sched_param {
183         pub __sched_priority: ::c_int,
184         pub __sched_curpriority: ::c_int,
185         pub reserved: [::c_int; 10],
186     }
187 
188     pub struct Dl_info {
189         pub dli_fname: *const ::c_char,
190         pub dli_fbase: *mut ::c_void,
191         pub dli_sname: *const ::c_char,
192         pub dli_saddr: *mut ::c_void,
193     }
194 
195     pub struct lconv {
196         pub currency_symbol: *mut ::c_char,
197         pub int_curr_symbol: *mut ::c_char,
198         pub mon_decimal_point: *mut ::c_char,
199         pub mon_grouping: *mut ::c_char,
200         pub mon_thousands_sep: *mut ::c_char,
201         pub negative_sign: *mut ::c_char,
202         pub positive_sign: *mut ::c_char,
203         pub frac_digits: ::c_char,
204         pub int_frac_digits: ::c_char,
205         pub n_cs_precedes: ::c_char,
206         pub n_sep_by_space: ::c_char,
207         pub n_sign_posn: ::c_char,
208         pub p_cs_precedes: ::c_char,
209         pub p_sep_by_space: ::c_char,
210         pub p_sign_posn: ::c_char,
211 
212         pub int_n_cs_precedes: ::c_char,
213         pub int_n_sep_by_space: ::c_char,
214         pub int_n_sign_posn: ::c_char,
215         pub int_p_cs_precedes: ::c_char,
216         pub int_p_sep_by_space: ::c_char,
217         pub int_p_sign_posn: ::c_char,
218 
219         pub decimal_point: *mut ::c_char,
220         pub grouping: *mut ::c_char,
221         pub thousands_sep: *mut ::c_char,
222 
223         pub _Frac_grouping: *mut ::c_char,
224         pub _Frac_sep: *mut ::c_char,
225         pub _False: *mut ::c_char,
226         pub _True: *mut ::c_char,
227 
228         pub _No: *mut ::c_char,
229         pub _Yes: *mut ::c_char,
230         pub _Nostr: *mut ::c_char,
231         pub _Yesstr: *mut ::c_char,
232         pub _Reserved: [*mut ::c_char; 8],
233         }
234 
235     pub struct in_pktinfo {
236         pub ipi_addr: ::in_addr,
237         pub ipi_ifindex: ::c_uint,
238     }
239 
240     pub struct ifaddrs {
241         pub ifa_next: *mut ifaddrs,
242         pub ifa_name: *mut c_char,
243         pub ifa_flags: ::c_uint,
244         pub ifa_addr: *mut ::sockaddr,
245         pub ifa_netmask: *mut ::sockaddr,
246         pub ifa_dstaddr: *mut ::sockaddr,
247         pub ifa_data: *mut ::c_void
248     }
249 
250     pub struct arpreq {
251         pub arp_pa: ::sockaddr,
252         pub arp_ha: ::sockaddr,
253         pub arp_flags: ::c_int,
254     }
255 
256     #[repr(packed)]
257     pub struct arphdr {
258         pub ar_hrd: u16,
259         pub ar_pro: u16,
260         pub ar_hln: u8,
261         pub ar_pln: u8,
262         pub ar_op: u16,
263     }
264 
265     pub struct mmsghdr {
266         pub msg_hdr: ::msghdr,
267         pub msg_len: ::c_uint,
268     }
269 
270     #[repr(align(8))]
271     pub struct siginfo_t {
272         pub si_signo: ::c_int,
273         pub si_code: ::c_int,
274         pub si_errno: ::c_int,
275         __data: [u8; 36], // union
276     }
277 
278     pub struct sigaction {
279         pub sa_sigaction: ::sighandler_t,
280         pub sa_flags: ::c_int,
281         pub sa_mask: ::sigset_t,
282     }
283 
284     pub struct _sync {
285         _union: ::c_uint,
286         __owner: ::c_uint,
287     }
288     pub struct rlimit64 {
289         pub rlim_cur: rlim64_t,
290         pub rlim_max: rlim64_t,
291     }
292 
293     pub struct glob_t {
294         pub gl_pathc: ::size_t,
295         pub gl_matchc: ::c_int,
296         pub gl_pathv: *mut *mut c_char,
297         pub gl_offs: ::size_t,
298         pub gl_flags: ::c_int,
299         pub gl_errfunc: extern "C" fn(*const ::c_char, ::c_int) -> ::c_int,
300 
301         __unused1: *mut ::c_void,
302         __unused2: *mut ::c_void,
303         __unused3: *mut ::c_void,
304         __unused4: *mut ::c_void,
305         __unused5: *mut ::c_void,
306     }
307 
308     pub struct passwd {
309         pub pw_name: *mut ::c_char,
310         pub pw_passwd: *mut ::c_char,
311         pub pw_uid: ::uid_t,
312         pub pw_gid: ::gid_t,
313         pub pw_age: *mut ::c_char,
314         pub pw_comment: *mut ::c_char,
315         pub pw_gecos: *mut ::c_char,
316         pub pw_dir: *mut ::c_char,
317         pub pw_shell: *mut ::c_char,
318     }
319 
320     pub struct if_nameindex {
321         pub if_index: ::c_uint,
322         pub if_name: *mut ::c_char,
323     }
324 
325     pub struct sembuf {
326         pub sem_num: ::c_ushort,
327         pub sem_op: ::c_short,
328         pub sem_flg: ::c_short,
329     }
330 
331     pub struct Elf32_Ehdr {
332         pub e_ident: [::c_uchar; 16],
333         pub e_type: Elf32_Half,
334         pub e_machine: Elf32_Half,
335         pub e_version: Elf32_Word,
336         pub e_entry: Elf32_Addr,
337         pub e_phoff: Elf32_Off,
338         pub e_shoff: Elf32_Off,
339         pub e_flags: Elf32_Word,
340         pub e_ehsize: Elf32_Half,
341         pub e_phentsize: Elf32_Half,
342         pub e_phnum: Elf32_Half,
343         pub e_shentsize: Elf32_Half,
344         pub e_shnum: Elf32_Half,
345         pub e_shstrndx: Elf32_Half,
346     }
347 
348     pub struct Elf64_Ehdr {
349         pub e_ident: [::c_uchar; 16],
350         pub e_type: Elf64_Half,
351         pub e_machine: Elf64_Half,
352         pub e_version: Elf64_Word,
353         pub e_entry: Elf64_Addr,
354         pub e_phoff: Elf64_Off,
355         pub e_shoff: Elf64_Off,
356         pub e_flags: Elf64_Word,
357         pub e_ehsize: Elf64_Half,
358         pub e_phentsize: Elf64_Half,
359         pub e_phnum: Elf64_Half,
360         pub e_shentsize: Elf64_Half,
361         pub e_shnum: Elf64_Half,
362         pub e_shstrndx: Elf64_Half,
363     }
364 
365     pub struct Elf32_Sym {
366         pub st_name: Elf32_Word,
367         pub st_value: Elf32_Addr,
368         pub st_size: Elf32_Word,
369         pub st_info: ::c_uchar,
370         pub st_other: ::c_uchar,
371         pub st_shndx: Elf32_Section,
372     }
373 
374     pub struct Elf64_Sym {
375         pub st_name: Elf64_Word,
376         pub st_info: ::c_uchar,
377         pub st_other: ::c_uchar,
378         pub st_shndx: Elf64_Section,
379         pub st_value: Elf64_Addr,
380         pub st_size: Elf64_Xword,
381     }
382 
383     pub struct Elf32_Phdr {
384         pub p_type: Elf32_Word,
385         pub p_offset: Elf32_Off,
386         pub p_vaddr: Elf32_Addr,
387         pub p_paddr: Elf32_Addr,
388         pub p_filesz: Elf32_Word,
389         pub p_memsz: Elf32_Word,
390         pub p_flags: Elf32_Word,
391         pub p_align: Elf32_Word,
392     }
393 
394     pub struct Elf64_Phdr {
395         pub p_type: Elf64_Word,
396         pub p_flags: Elf64_Word,
397         pub p_offset: Elf64_Off,
398         pub p_vaddr: Elf64_Addr,
399         pub p_paddr: Elf64_Addr,
400         pub p_filesz: Elf64_Xword,
401         pub p_memsz: Elf64_Xword,
402         pub p_align: Elf64_Xword,
403     }
404 
405     pub struct Elf32_Shdr {
406         pub sh_name: Elf32_Word,
407         pub sh_type: Elf32_Word,
408         pub sh_flags: Elf32_Word,
409         pub sh_addr: Elf32_Addr,
410         pub sh_offset: Elf32_Off,
411         pub sh_size: Elf32_Word,
412         pub sh_link: Elf32_Word,
413         pub sh_info: Elf32_Word,
414         pub sh_addralign: Elf32_Word,
415         pub sh_entsize: Elf32_Word,
416     }
417 
418     pub struct Elf64_Shdr {
419         pub sh_name: Elf64_Word,
420         pub sh_type: Elf64_Word,
421         pub sh_flags: Elf64_Xword,
422         pub sh_addr: Elf64_Addr,
423         pub sh_offset: Elf64_Off,
424         pub sh_size: Elf64_Xword,
425         pub sh_link: Elf64_Word,
426         pub sh_info: Elf64_Word,
427         pub sh_addralign: Elf64_Xword,
428         pub sh_entsize: Elf64_Xword,
429     }
430 
431     pub struct in6_pktinfo {
432         pub ipi6_addr: ::in6_addr,
433         pub ipi6_ifindex: ::c_uint,
434     }
435 
436     pub struct inotify_event {
437         pub wd: ::c_int,
438         pub mask: u32,
439         pub cookie: u32,
440         pub len: u32
441     }
442 
443     pub struct regmatch_t {
444         pub rm_so: regoff_t,
445         pub rm_eo: regoff_t,
446     }
447 
448     pub struct msghdr {
449         pub msg_name: *mut ::c_void,
450         pub msg_namelen: ::socklen_t,
451         pub msg_iov: *mut ::iovec,
452         pub msg_iovlen: ::c_int,
453         pub msg_control: *mut ::c_void,
454         pub msg_controllen: ::socklen_t,
455         pub msg_flags: ::c_int,
456     }
457 
458     pub struct cmsghdr {
459         pub cmsg_len: ::socklen_t,
460         pub cmsg_level: ::c_int,
461         pub cmsg_type: ::c_int,
462     }
463 
464     pub struct termios {
465         pub c_iflag: ::tcflag_t,
466         pub c_oflag: ::tcflag_t,
467         pub c_cflag: ::tcflag_t,
468         pub c_lflag: ::tcflag_t,
469         pub c_cc: [::cc_t; ::NCCS],
470         __reserved: [::c_uint; 3],
471         pub c_ispeed: ::speed_t,
472         pub c_ospeed: ::speed_t,
473     }
474 
475     pub struct mallinfo {
476         pub arena: ::c_int,
477         pub ordblks: ::c_int,
478         pub smblks: ::c_int,
479         pub hblks: ::c_int,
480         pub hblkhd: ::c_int,
481         pub usmblks: ::c_int,
482         pub fsmblks: ::c_int,
483         pub uordblks: ::c_int,
484         pub fordblks: ::c_int,
485         pub keepcost: ::c_int,
486     }
487 
488     pub struct flock {
489         pub l_type: i16,
490         pub l_whence: i16,
491         pub l_zero1: i32,
492         pub l_start: ::off_t,
493         pub l_len: ::off_t,
494         pub l_pid: ::pid_t,
495         pub l_sysid: u32,
496     }
497 
498     pub struct statvfs {
499         pub f_bsize: ::c_ulong,
500         pub f_frsize: ::c_ulong,
501         pub f_blocks: ::fsblkcnt_t,
502         pub f_bfree: ::fsblkcnt_t,
503         pub f_bavail: ::fsblkcnt_t,
504         pub f_files: ::fsfilcnt_t,
505         pub f_ffree: ::fsfilcnt_t,
506         pub f_favail: ::fsfilcnt_t,
507         pub f_fsid: ::c_ulong,
508         pub f_basetype: [::c_char; 16],
509         pub f_flag: ::c_ulong,
510         pub f_namemax: ::c_ulong,
511         f_filler: [::c_uint; 21],
512     }
513 
514     pub struct aiocb {
515         pub aio_fildes: ::c_int,
516         pub aio_reqprio: ::c_int,
517         pub aio_offset: off_t,
518         pub aio_buf: *mut ::c_void,
519         pub aio_nbytes: ::size_t,
520         pub aio_sigevent: ::sigevent,
521         pub aio_lio_opcode: ::c_int,
522         pub _aio_lio_state: *mut ::c_void,
523         _aio_pad: [::c_int; 3],
524         pub _aio_next: *mut ::aiocb,
525         pub _aio_flag: ::c_uint,
526         pub _aio_iotype: ::c_uint,
527         pub _aio_result: ::ssize_t,
528         pub _aio_error: ::c_uint,
529         pub _aio_suspend: *mut ::c_void,
530         pub _aio_plist: *mut ::c_void,
531         pub _aio_policy: ::c_int,
532         pub _aio_param: ::__sched_param,
533     }
534 
535     pub struct pthread_attr_t {
536         __data1: ::c_long,
537         __data2: [u8; 96]
538     }
539 
540     pub struct ipc_perm {
541         pub uid: ::uid_t,
542         pub gid: ::gid_t,
543         pub cuid: ::uid_t,
544         pub cgid: ::gid_t,
545         pub mode: ::mode_t,
546         pub seq: ::c_uint,
547         pub key: ::key_t,
548         _reserved: [::c_int; 4],
549     }
550 
551     pub struct regex_t {
552         re_magic: ::c_int,
553         re_nsub: ::size_t,
554         re_endp: *const ::c_char,
555         re_g: *mut ::c_void,
556     }
557 
558     pub struct _thread_attr {
559         pub __flags: ::c_int,
560         pub __stacksize: ::size_t,
561         pub __stackaddr: *mut ::c_void,
562         pub __exitfunc: ::Option<unsafe extern "C" fn(_fake: *mut ::c_void)>,
563         pub __policy: ::c_int,
564         pub __param: ::__sched_param,
565         pub __guardsize: ::c_uint,
566         pub __prealloc: ::c_uint,
567         __spare: [::c_int; 2],
568     }
569 
570     pub struct _sync_attr {
571         pub __protocol: ::c_int,
572         pub __flags: ::c_int,
573         pub __prioceiling: ::c_int,
574         pub __clockid: ::c_int,
575         pub __count: ::c_int,
576         __reserved: [::c_int; 3],
577     }
578 
579     pub struct sockcred {
580         pub sc_uid: ::uid_t,
581         pub sc_euid: ::uid_t,
582         pub sc_gid: ::gid_t,
583         pub sc_egid: ::gid_t,
584         pub sc_ngroups: ::c_int,
585         pub sc_groups: [::gid_t; 1],
586     }
587 
588     pub struct bpf_program {
589         pub bf_len: ::c_uint,
590         pub bf_insns: *mut ::bpf_insn,
591     }
592 
593     pub struct bpf_stat {
594         pub bs_recv: u64,
595         pub bs_drop: u64,
596         pub bs_capt: u64,
597         bs_padding: [u64; 13],
598     }
599 
600     pub struct bpf_version {
601         pub bv_major: ::c_ushort,
602         pub bv_minor: ::c_ushort,
603     }
604 
605     pub struct bpf_hdr {
606         pub bh_tstamp: ::timeval,
607         pub bh_caplen: u32,
608         pub bh_datalen: u32,
609         pub bh_hdrlen: u16,
610     }
611 
612     pub struct bpf_insn {
613         pub code: u16,
614         pub jt: ::c_uchar,
615         pub jf: ::c_uchar,
616         pub k: u32,
617     }
618 
619     pub struct bpf_dltlist {
620         pub bfl_len: ::c_uint,
621         pub bfl_list: *mut ::c_uint,
622     }
623 
624     pub struct unpcbid {
625         pub unp_pid: ::pid_t,
626         pub unp_euid: ::uid_t,
627         pub unp_egid: ::gid_t,
628     }
629 
630     pub struct dl_phdr_info {
631         pub dlpi_addr: ::Elf64_Addr,
632         pub dlpi_name: *const ::c_char,
633         pub dlpi_phdr: *const ::Elf64_Phdr,
634         pub dlpi_phnum: ::Elf64_Half,
635     }
636 
637     #[repr(align(8))]
638     pub struct ucontext_t {
639         pub uc_link: *mut ucontext_t,
640         pub uc_sigmask: ::sigset_t,
641         pub uc_stack: stack_t,
642         pub uc_mcontext: mcontext_t,
643     }
644 }
645 
646 s_no_extra_traits! {
647     pub struct sockaddr_un {
648         pub sun_len: u8,
649         pub sun_family: sa_family_t,
650         pub sun_path: [::c_char; 104]
651     }
652 
653     pub struct sockaddr_storage {
654         pub ss_len: u8,
655         pub ss_family: sa_family_t,
656         __ss_pad1: [::c_char; 6],
657         __ss_align: i64,
658         __ss_pad2: [::c_char; 112],
659     }
660 
661     pub struct utsname {
662         pub sysname: [::c_char; _SYSNAME_SIZE],
663         pub nodename: [::c_char; _SYSNAME_SIZE],
664         pub release: [::c_char; _SYSNAME_SIZE],
665         pub version: [::c_char; _SYSNAME_SIZE],
666         pub machine: [::c_char; _SYSNAME_SIZE],
667     }
668 
669     pub struct sigevent {
670         pub sigev_notify: ::c_int,
671         pub __padding1: ::c_int,
672         pub sigev_signo: ::c_int, // union
673         pub __padding2: ::c_int,
674         pub sigev_value: ::sigval,
675         __sigev_un2: usize, // union
676 
677     }
678     pub struct dirent {
679         pub d_ino: ::ino_t,
680         pub d_offset: ::off_t,
681         pub d_reclen: ::c_short,
682         pub d_namelen: ::c_short,
683         pub d_name: [::c_char; 1], // flex array
684     }
685 
686     pub struct sigset_t {
687         __val: [u32; 2],
688     }
689 
690     pub struct mq_attr {
691         pub mq_maxmsg: ::c_long,
692         pub mq_msgsize: ::c_long,
693         pub mq_flags: ::c_long,
694         pub mq_curmsgs: ::c_long,
695         pub mq_sendwait: ::c_long,
696         pub mq_recvwait: ::c_long,
697     }
698 
699     pub struct msg {
700         pub msg_next: *mut ::msg,
701         pub msg_type: ::c_long,
702         pub msg_ts: ::c_ushort,
703         pub msg_spot: ::c_short,
704         _pad: [u8; 4],
705     }
706 
707     pub struct msqid_ds {
708         pub msg_perm: ::ipc_perm,
709         pub msg_first: *mut ::msg,
710         pub msg_last: *mut ::msg,
711         pub msg_cbytes: ::msglen_t,
712         pub msg_qnum: ::msgqnum_t,
713         pub msg_qbytes: ::msglen_t,
714         pub msg_lspid: ::pid_t,
715         pub msg_lrpid: ::pid_t,
716         pub msg_stime: ::time_t,
717         msg_pad1: ::c_long,
718         pub msg_rtime: ::time_t,
719         msg_pad2: ::c_long,
720         pub msg_ctime: ::time_t,
721         msg_pad3: ::c_long,
722         msg_pad4: [::c_long; 4],
723     }
724 
725     pub struct sockaddr_dl {
726         pub sdl_len: ::c_uchar,
727         pub sdl_family: ::sa_family_t,
728         pub sdl_index: u16,
729         pub sdl_type: ::c_uchar,
730         pub sdl_nlen: ::c_uchar,
731         pub sdl_alen: ::c_uchar,
732         pub sdl_slen: ::c_uchar,
733         pub sdl_data: [::c_char; 12],
734     }
735 
736     pub struct sync_t {
737         __u: ::c_uint,                     // union
738         pub __owner: ::c_uint,
739     }
740 
741     #[repr(align(4))]
742     pub struct pthread_barrier_t {         // union
743         __pad: [u8; 28],                   // union
744     }
745 
746     pub struct pthread_rwlock_t {
747         pub __active: ::c_int,
748         pub __blockedwriters: ::c_int,
749         pub __blockedreaders: ::c_int,
750         pub __heavy: ::c_int,
751         pub __lock: ::pthread_mutex_t,     // union
752         pub __rcond: ::pthread_cond_t,     // union
753         pub __wcond: ::pthread_cond_t,     // union
754         pub __owner: ::c_uint,
755         pub __spare: ::c_uint,
756     }
757 }
758 
759 cfg_if! {
760     if #[cfg(feature = "extra_traits")] {
761         // sigevent
762         impl PartialEq for sigevent {
763             fn eq(&self, other: &sigevent) -> bool {
764                 self.sigev_notify == other.sigev_notify
765                     && self.sigev_signo == other.sigev_signo
766                     && self.sigev_value == other.sigev_value
767                     && self.__sigev_un2
768                         == other.__sigev_un2
769             }
770         }
771         impl Eq for sigevent {}
772         impl ::fmt::Debug for sigevent {
773             fn fmt(&self, f: &mut ::fmt::Formatter) -> ::fmt::Result {
774                 f.debug_struct("sigevent")
775                     .field("sigev_notify", &self.sigev_notify)
776                     .field("sigev_signo", &self.sigev_signo)
777                     .field("sigev_value", &self.sigev_value)
778                     .field("__sigev_un2",
779                         &self.__sigev_un2)
780                     .finish()
781             }
782         }
783         impl ::hash::Hash for sigevent {
784             fn hash<H: ::hash::Hasher>(&self, state: &mut H) {
785                 self.sigev_notify.hash(state);
786                 self.sigev_signo.hash(state);
787                 self.sigev_value.hash(state);
788                 self.__sigev_un2.hash(state);
789             }
790         }
791 
792         impl PartialEq for sockaddr_un {
793             fn eq(&self, other: &sockaddr_un) -> bool {
794                 self.sun_len == other.sun_len
795                     && self.sun_family == other.sun_family
796                     && self
797                     .sun_path
798                     .iter()
799                     .zip(other.sun_path.iter())
800                     .all(|(a,b)| a == b)
801             }
802         }
803         impl Eq for sockaddr_un {}
804         impl ::fmt::Debug for sockaddr_un {
805             fn fmt(&self, f: &mut ::fmt::Formatter) -> ::fmt::Result {
806                 f.debug_struct("sockaddr_un")
807                     .field("sun_len", &self.sun_len)
808                     .field("sun_family", &self.sun_family)
809                     // FIXME: .field("sun_path", &self.sun_path)
810                     .finish()
811             }
812         }
813 
814         impl ::hash::Hash for sockaddr_un {
815             fn hash<H: ::hash::Hasher>(&self, state: &mut H) {
816                 self.sun_len.hash(state);
817                 self.sun_family.hash(state);
818                 self.sun_path.hash(state);
819             }
820         }
821 
822         // sigset_t
823         impl PartialEq for sigset_t {
824             fn eq(&self, other: &sigset_t) -> bool {
825                 self.__val == other.__val
826             }
827         }
828         impl Eq for sigset_t {}
829         impl ::fmt::Debug for sigset_t {
830             fn fmt(&self, f: &mut ::fmt::Formatter) -> ::fmt::Result {
831                 f.debug_struct("sigset_t")
832                     .field("__val", &self.__val)
833                     .finish()
834             }
835         }
836         impl ::hash::Hash for sigset_t {
837             fn hash<H: ::hash::Hasher>(&self, state: &mut H) {
838                 self.__val.hash(state);
839             }
840         }
841 
842         // msg
843         impl ::fmt::Debug for msg {
844             fn fmt(&self, f: &mut ::fmt::Formatter) -> ::fmt::Result {
845                 f.debug_struct("msg")
846                     .field("msg_next", &self.msg_next)
847                     .field("msg_type", &self.msg_type)
848                     .field("msg_ts", &self.msg_ts)
849                     .field("msg_spot", &self.msg_spot)
850                 .finish()
851             }
852         }
853 
854         // msqid_ds
855         impl ::fmt::Debug for msqid_ds {
856             fn fmt(&self, f: &mut ::fmt::Formatter) -> ::fmt::Result {
857                 f.debug_struct("msqid_ds")
858                     .field("msg_perm", &self.msg_perm)
859                     .field("msg_first", &self.msg_first)
860                     .field("msg_cbytes", &self.msg_cbytes)
861                     .field("msg_qnum", &self.msg_qnum)
862                     .field("msg_qbytes", &self.msg_qbytes)
863                     .field("msg_lspid", &self.msg_lspid)
864                     .field("msg_lrpid", &self.msg_lrpid)
865                     .field("msg_stime", &self.msg_stime)
866                     .field("msg_rtime", &self.msg_rtime)
867                     .field("msg_ctime", &self.msg_ctime)
868                     .finish()
869             }
870         }
871 
872         // sockaddr_dl
873         impl ::fmt::Debug for sockaddr_dl {
874             fn fmt(&self, f: &mut ::fmt::Formatter) -> ::fmt::Result {
875                 f.debug_struct("sockaddr_dl")
876                     .field("sdl_len", &self.sdl_len)
877                     .field("sdl_family", &self.sdl_family)
878                     .field("sdl_index", &self.sdl_index)
879                     .field("sdl_type", &self.sdl_type)
880                     .field("sdl_nlen", &self.sdl_nlen)
881                     .field("sdl_alen", &self.sdl_alen)
882                     .field("sdl_slen", &self.sdl_slen)
883                     .field("sdl_data", &self.sdl_data)
884                     .finish()
885             }
886         }
887         impl PartialEq for sockaddr_dl {
888             fn eq(&self, other: &sockaddr_dl) -> bool {
889                 self.sdl_len == other.sdl_len
890                     && self.sdl_family == other.sdl_family
891                     && self.sdl_index == other.sdl_index
892                     && self.sdl_type == other.sdl_type
893                     && self.sdl_nlen == other.sdl_nlen
894                     && self.sdl_alen == other.sdl_alen
895                     && self.sdl_slen == other.sdl_slen
896                     && self
897                     .sdl_data
898                     .iter()
899                     .zip(other.sdl_data.iter())
900                     .all(|(a,b)| a == b)
901             }
902         }
903         impl Eq for sockaddr_dl {}
904         impl ::hash::Hash for sockaddr_dl {
905             fn hash<H: ::hash::Hasher>(&self, state: &mut H) {
906                 self.sdl_len.hash(state);
907                 self.sdl_family.hash(state);
908                 self.sdl_index.hash(state);
909                 self.sdl_type.hash(state);
910                 self.sdl_nlen.hash(state);
911                 self.sdl_alen.hash(state);
912                 self.sdl_slen.hash(state);
913                 self.sdl_data.hash(state);
914             }
915         }
916 
917         // sync_t
918         impl ::fmt::Debug for sync_t {
919             fn fmt(&self, f: &mut ::fmt::Formatter) -> ::fmt::Result {
920                 f.debug_struct("sync_t")
921                     .field("__owner", &self.__owner)
922                     .field("__u", &self.__u)
923                     .finish()
924             }
925         }
926 
927         // pthread_barrier_t
928         impl ::fmt::Debug for pthread_barrier_t {
929             fn fmt(&self, f: &mut ::fmt::Formatter) -> ::fmt::Result {
930                 f.debug_struct("pthread_barrier_t")
931                     .field("__pad", &self.__pad)
932                     .finish()
933             }
934         }
935 
936         // pthread_rwlock_t
937         impl ::fmt::Debug for pthread_rwlock_t {
938             fn fmt(&self, f: &mut ::fmt::Formatter) -> ::fmt::Result {
939                 f.debug_struct("pthread_rwlock_t")
940                     .field("__active", &self.__active)
941                     .field("__blockedwriters", &self.__blockedwriters)
942                     .field("__blockedreaders", &self.__blockedreaders)
943                     .field("__heavy", &self.__heavy)
944                     .field("__lock", &self.__lock)
945                     .field("__rcond", &self.__rcond)
946                     .field("__wcond", &self.__wcond)
947                     .field("__owner", &self.__owner)
948                     .field("__spare", &self.__spare)
949                 .finish()
950             }
951         }
952 
953         // syspage_entry
954         impl ::fmt::Debug for syspage_entry {
955             fn fmt(&self, f: &mut ::fmt::Formatter) -> ::fmt::Result {
956                 f.debug_struct("syspage_entry")
957                     .field("size", &self.size)
958                     .field("total_size", &self.total_size)
959                     .field("type_", &self.type_)
960                     .field("num_cpu", &self.num_cpu)
961                     .field("system_private", &self.system_private)
962                     .field("old_asinfo", &self.old_asinfo)
963                     .field("hwinfo", &self.hwinfo)
964                     .field("old_cpuinfo", &self.old_cpuinfo)
965                     .field("old_cacheattr", &self.old_cacheattr)
966                     .field("qtime", &self.qtime)
967                     .field("callout", &self.callout)
968                     .field("callin", &self.callin)
969                     .field("typed_strings", &self.typed_strings)
970                     .field("strings", &self.strings)
971                     .field("old_intrinfo", &self.old_intrinfo)
972                     .field("smp", &self.smp)
973                     .field("pminfo", &self.pminfo)
974                     .field("old_mdriver", &self.old_mdriver)
975                     .field("new_asinfo", &self.new_asinfo)
976                     .field("new_cpuinfo", &self.new_cpuinfo)
977                     .field("new_cacheattr", &self.new_cacheattr)
978                     .field("new_intrinfo", &self.new_intrinfo)
979                     .field("new_mdriver", &self.new_mdriver)
980                     .finish()
981             }
982         }
983 
984         impl PartialEq for utsname {
985             fn eq(&self, other: &utsname) -> bool {
986                 self.sysname
987                     .iter()
988                     .zip(other.sysname.iter())
989                     .all(|(a,b)| a == b)
990                     && self
991                     .nodename
992                     .iter()
993                     .zip(other.nodename.iter())
994                     .all(|(a,b)| a == b)
995                     && self
996                     .release
997                     .iter()
998                     .zip(other.release.iter())
999                     .all(|(a,b)| a == b)
1000                     && self
1001                     .version
1002                     .iter()
1003                     .zip(other.version.iter())
1004                     .all(|(a,b)| a == b)
1005                     && self
1006                     .machine
1007                     .iter()
1008                     .zip(other.machine.iter())
1009                     .all(|(a,b)| a == b)
1010             }
1011         }
1012 
1013         impl Eq for utsname {}
1014 
1015         impl ::fmt::Debug for utsname {
1016             fn fmt(&self, f: &mut ::fmt::Formatter) -> ::fmt::Result {
1017                 f.debug_struct("utsname")
1018                 // FIXME: .field("sysname", &self.sysname)
1019                 // FIXME: .field("nodename", &self.nodename)
1020                 // FIXME: .field("release", &self.release)
1021                 // FIXME: .field("version", &self.version)
1022                 // FIXME: .field("machine", &self.machine)
1023                     .finish()
1024             }
1025         }
1026 
1027         impl ::hash::Hash for utsname {
1028             fn hash<H: ::hash::Hasher>(&self, state: &mut H) {
1029                 self.sysname.hash(state);
1030                 self.nodename.hash(state);
1031                 self.release.hash(state);
1032                 self.version.hash(state);
1033                 self.machine.hash(state);
1034             }
1035         }
1036 
1037         impl PartialEq for mq_attr {
1038             fn eq(&self, other: &mq_attr) -> bool {
1039                 self.mq_maxmsg == other.mq_maxmsg &&
1040                 self.mq_msgsize == other.mq_msgsize &&
1041                 self.mq_flags == other.mq_flags &&
1042                 self.mq_curmsgs == other.mq_curmsgs &&
1043                 self.mq_msgsize == other.mq_msgsize &&
1044                 self.mq_sendwait == other.mq_sendwait &&
1045                 self.mq_recvwait == other.mq_recvwait
1046             }
1047         }
1048 
1049         impl Eq for mq_attr {}
1050 
1051         impl ::fmt::Debug for mq_attr {
1052             fn fmt(&self, f: &mut ::fmt::Formatter) -> ::fmt::Result {
1053                 f.debug_struct("mq_attr")
1054                     .field("mq_maxmsg", &self.mq_maxmsg)
1055                     .field("mq_msgsize", &self.mq_msgsize)
1056                     .field("mq_flags", &self.mq_flags)
1057                     .field("mq_curmsgs", &self.mq_curmsgs)
1058                     .field("mq_msgsize", &self.mq_msgsize)
1059                     .field("mq_sendwait", &self.mq_sendwait)
1060                     .field("mq_recvwait", &self.mq_recvwait)
1061                     .finish()
1062             }
1063         }
1064         impl ::hash::Hash for mq_attr {
1065             fn hash<H: ::hash::Hasher>(&self, state: &mut H) {
1066                 self.mq_maxmsg.hash(state);
1067                 self.mq_msgsize.hash(state);
1068                 self.mq_flags.hash(state);
1069                 self.mq_curmsgs.hash(state);
1070                 self.mq_sendwait.hash(state);
1071                 self.mq_recvwait.hash(state);
1072             }
1073         }
1074 
1075         impl PartialEq for sockaddr_storage {
1076             fn eq(&self, other: &sockaddr_storage) -> bool {
1077                 self.ss_len == other.ss_len
1078                     && self.ss_family == other.ss_family
1079                     && self.__ss_pad1 == other.__ss_pad1
1080                     && self.__ss_align == other.__ss_align
1081                     && self
1082                     .__ss_pad2
1083                     .iter()
1084                     .zip(other.__ss_pad2.iter())
1085                     .all(|(a, b)| a == b)
1086             }
1087         }
1088 
1089         impl Eq for sockaddr_storage {}
1090 
1091         impl ::fmt::Debug for sockaddr_storage {
1092             fn fmt(&self, f: &mut ::fmt::Formatter) -> ::fmt::Result {
1093                 f.debug_struct("sockaddr_storage")
1094                     .field("ss_len", &self.ss_len)
1095                     .field("ss_family", &self.ss_family)
1096                     .field("__ss_pad1", &self.__ss_pad1)
1097                     .field("__ss_align", &self.__ss_align)
1098                     // FIXME: .field("__ss_pad2", &self.__ss_pad2)
1099                     .finish()
1100             }
1101         }
1102 
1103         impl ::hash::Hash for sockaddr_storage {
1104             fn hash<H: ::hash::Hasher>(&self, state: &mut H) {
1105                 self.ss_len.hash(state);
1106                 self.ss_family.hash(state);
1107                 self.__ss_pad1.hash(state);
1108                 self.__ss_align.hash(state);
1109                 self.__ss_pad2.hash(state);
1110             }
1111         }
1112 
1113         impl PartialEq for dirent {
1114             fn eq(&self, other: &dirent) -> bool {
1115                 self.d_ino == other.d_ino
1116                     && self.d_offset == other.d_offset
1117                     && self.d_reclen == other.d_reclen
1118                     && self.d_namelen == other.d_namelen
1119                     && self
1120                     .d_name[..self.d_namelen as _]
1121                     .iter()
1122                     .zip(other.d_name.iter())
1123                     .all(|(a,b)| a == b)
1124             }
1125         }
1126 
1127         impl Eq for dirent {}
1128 
1129         impl ::fmt::Debug for dirent {
1130             fn fmt(&self, f: &mut ::fmt::Formatter) -> ::fmt::Result {
1131                 f.debug_struct("dirent")
1132                     .field("d_ino", &self.d_ino)
1133                     .field("d_offset", &self.d_offset)
1134                     .field("d_reclen", &self.d_reclen)
1135                     .field("d_namelen", &self.d_namelen)
1136                     .field("d_name", &&self.d_name[..self.d_namelen as _])
1137                     .finish()
1138             }
1139         }
1140 
1141         impl ::hash::Hash for dirent {
1142             fn hash<H: ::hash::Hasher>(&self, state: &mut H) {
1143                 self.d_ino.hash(state);
1144                 self.d_offset.hash(state);
1145                 self.d_reclen.hash(state);
1146                 self.d_namelen.hash(state);
1147                 self.d_name[..self.d_namelen as _].hash(state);
1148             }
1149         }
1150     }
1151 }
1152 
1153 pub const _SYSNAME_SIZE: usize = 256 + 1;
1154 pub const RLIM_INFINITY: ::rlim_t = 0xfffffffffffffffd;
1155 pub const O_LARGEFILE: ::c_int = 0o0100000;
1156 
1157 // intentionally not public, only used for fd_set
1158 cfg_if! {
1159     if #[cfg(target_pointer_width = "32")] {
1160         const ULONG_SIZE: usize = 32;
1161     } else if #[cfg(target_pointer_width = "64")] {
1162         const ULONG_SIZE: usize = 64;
1163     } else {
1164         // Unknown target_pointer_width
1165     }
1166 }
1167 
1168 pub const EXIT_FAILURE: ::c_int = 1;
1169 pub const EXIT_SUCCESS: ::c_int = 0;
1170 pub const RAND_MAX: ::c_int = 32767;
1171 pub const EOF: ::c_int = -1;
1172 pub const SEEK_SET: ::c_int = 0;
1173 pub const SEEK_CUR: ::c_int = 1;
1174 pub const SEEK_END: ::c_int = 2;
1175 pub const _IOFBF: ::c_int = 0;
1176 pub const _IONBF: ::c_int = 2;
1177 pub const _IOLBF: ::c_int = 1;
1178 
1179 pub const F_DUPFD: ::c_int = 0;
1180 pub const F_GETFD: ::c_int = 1;
1181 pub const F_SETFD: ::c_int = 2;
1182 pub const F_GETFL: ::c_int = 3;
1183 pub const F_SETFL: ::c_int = 4;
1184 
1185 pub const F_DUPFD_CLOEXEC: ::c_int = 5;
1186 
1187 pub const SIGTRAP: ::c_int = 5;
1188 
1189 pub const CLOCK_REALTIME: ::clockid_t = 0;
1190 pub const CLOCK_MONOTONIC: ::clockid_t = 2;
1191 pub const CLOCK_PROCESS_CPUTIME_ID: ::clockid_t = 3;
1192 pub const CLOCK_THREAD_CPUTIME_ID: ::clockid_t = 4;
1193 pub const TIMER_ABSTIME: ::c_uint = 0x80000000;
1194 
1195 pub const RUSAGE_SELF: ::c_int = 0;
1196 
1197 pub const F_OK: ::c_int = 0;
1198 pub const X_OK: ::c_int = 1;
1199 pub const W_OK: ::c_int = 2;
1200 pub const R_OK: ::c_int = 4;
1201 
1202 pub const STDIN_FILENO: ::c_int = 0;
1203 pub const STDOUT_FILENO: ::c_int = 1;
1204 pub const STDERR_FILENO: ::c_int = 2;
1205 
1206 pub const SIGHUP: ::c_int = 1;
1207 pub const SIGINT: ::c_int = 2;
1208 pub const SIGQUIT: ::c_int = 3;
1209 pub const SIGILL: ::c_int = 4;
1210 pub const SIGABRT: ::c_int = 6;
1211 pub const SIGFPE: ::c_int = 8;
1212 pub const SIGKILL: ::c_int = 9;
1213 pub const SIGSEGV: ::c_int = 11;
1214 pub const SIGPIPE: ::c_int = 13;
1215 pub const SIGALRM: ::c_int = 14;
1216 pub const SIGTERM: ::c_int = 15;
1217 
1218 pub const PROT_NONE: ::c_int = 0x00000000;
1219 pub const PROT_READ: ::c_int = 0x00000100;
1220 pub const PROT_WRITE: ::c_int = 0x00000200;
1221 pub const PROT_EXEC: ::c_int = 0x00000400;
1222 
1223 pub const MAP_FILE: ::c_int = 0;
1224 pub const MAP_SHARED: ::c_int = 1;
1225 pub const MAP_PRIVATE: ::c_int = 2;
1226 pub const MAP_FIXED: ::c_int = 0x10;
1227 
1228 pub const MAP_FAILED: *mut ::c_void = !0 as *mut ::c_void;
1229 
1230 pub const MS_ASYNC: ::c_int = 1;
1231 pub const MS_INVALIDATE: ::c_int = 4;
1232 pub const MS_SYNC: ::c_int = 2;
1233 
1234 pub const SCM_RIGHTS: ::c_int = 0x01;
1235 pub const SCM_TIMESTAMP: ::c_int = 0x02;
1236 pub const SCM_CREDS: ::c_int = 0x04;
1237 
1238 pub const MAP_TYPE: ::c_int = 0x3;
1239 
1240 pub const IFF_UP: ::c_int = 0x00000001;
1241 pub const IFF_BROADCAST: ::c_int = 0x00000002;
1242 pub const IFF_DEBUG: ::c_int = 0x00000004;
1243 pub const IFF_LOOPBACK: ::c_int = 0x00000008;
1244 pub const IFF_POINTOPOINT: ::c_int = 0x00000010;
1245 pub const IFF_NOTRAILERS: ::c_int = 0x00000020;
1246 pub const IFF_RUNNING: ::c_int = 0x00000040;
1247 pub const IFF_NOARP: ::c_int = 0x00000080;
1248 pub const IFF_PROMISC: ::c_int = 0x00000100;
1249 pub const IFF_ALLMULTI: ::c_int = 0x00000200;
1250 pub const IFF_MULTICAST: ::c_int = 0x00008000;
1251 
1252 pub const AF_UNSPEC: ::c_int = 0;
1253 pub const AF_UNIX: ::c_int = AF_LOCAL;
1254 pub const AF_LOCAL: ::c_int = 1;
1255 pub const AF_INET: ::c_int = 2;
1256 pub const AF_IPX: ::c_int = 23;
1257 pub const AF_APPLETALK: ::c_int = 16;
1258 pub const AF_INET6: ::c_int = 24;
1259 pub const AF_ROUTE: ::c_int = 17;
1260 pub const AF_SNA: ::c_int = 11;
1261 pub const AF_BLUETOOTH: ::c_int = 31;
1262 pub const AF_ISDN: ::c_int = 26;
1263 
1264 pub const PF_UNSPEC: ::c_int = AF_UNSPEC;
1265 pub const PF_UNIX: ::c_int = PF_LOCAL;
1266 pub const PF_LOCAL: ::c_int = AF_LOCAL;
1267 pub const PF_INET: ::c_int = AF_INET;
1268 pub const PF_IPX: ::c_int = AF_IPX;
1269 pub const PF_APPLETALK: ::c_int = AF_APPLETALK;
1270 pub const PF_INET6: ::c_int = AF_INET6;
1271 pub const pseudo_AF_KEY: ::c_int = 29;
1272 pub const PF_KEY: ::c_int = pseudo_AF_KEY;
1273 pub const PF_ROUTE: ::c_int = AF_ROUTE;
1274 pub const PF_SNA: ::c_int = AF_SNA;
1275 
1276 pub const PF_BLUETOOTH: ::c_int = AF_BLUETOOTH;
1277 pub const PF_ISDN: ::c_int = AF_ISDN;
1278 
1279 pub const SOMAXCONN: ::c_int = 128;
1280 
1281 pub const MSG_OOB: ::c_int = 0x0001;
1282 pub const MSG_PEEK: ::c_int = 0x0002;
1283 pub const MSG_DONTROUTE: ::c_int = 0x0004;
1284 pub const MSG_CTRUNC: ::c_int = 0x0020;
1285 pub const MSG_TRUNC: ::c_int = 0x0010;
1286 pub const MSG_DONTWAIT: ::c_int = 0x0080;
1287 pub const MSG_EOR: ::c_int = 0x0008;
1288 pub const MSG_WAITALL: ::c_int = 0x0040;
1289 pub const MSG_NOSIGNAL: ::c_int = 0x0800;
1290 pub const MSG_WAITFORONE: ::c_int = 0x2000;
1291 
1292 pub const IP_TOS: ::c_int = 3;
1293 pub const IP_TTL: ::c_int = 4;
1294 pub const IP_HDRINCL: ::c_int = 2;
1295 pub const IP_OPTIONS: ::c_int = 1;
1296 pub const IP_RECVOPTS: ::c_int = 5;
1297 pub const IP_RETOPTS: ::c_int = 8;
1298 pub const IP_PKTINFO: ::c_int = 25;
1299 pub const IP_IPSEC_POLICY_COMPAT: ::c_int = 22;
1300 pub const IP_MULTICAST_IF: ::c_int = 9;
1301 pub const IP_MULTICAST_TTL: ::c_int = 10;
1302 pub const IP_MULTICAST_LOOP: ::c_int = 11;
1303 pub const IP_ADD_MEMBERSHIP: ::c_int = 12;
1304 pub const IP_DROP_MEMBERSHIP: ::c_int = 13;
1305 pub const IP_DEFAULT_MULTICAST_TTL: ::c_int = 1;
1306 pub const IP_DEFAULT_MULTICAST_LOOP: ::c_int = 1;
1307 
1308 pub const IPPROTO_HOPOPTS: ::c_int = 0;
1309 pub const IPPROTO_IGMP: ::c_int = 2;
1310 pub const IPPROTO_IPIP: ::c_int = 4;
1311 pub const IPPROTO_EGP: ::c_int = 8;
1312 pub const IPPROTO_PUP: ::c_int = 12;
1313 pub const IPPROTO_IDP: ::c_int = 22;
1314 pub const IPPROTO_TP: ::c_int = 29;
1315 pub const IPPROTO_ROUTING: ::c_int = 43;
1316 pub const IPPROTO_FRAGMENT: ::c_int = 44;
1317 pub const IPPROTO_RSVP: ::c_int = 46;
1318 pub const IPPROTO_GRE: ::c_int = 47;
1319 pub const IPPROTO_ESP: ::c_int = 50;
1320 pub const IPPROTO_AH: ::c_int = 51;
1321 pub const IPPROTO_NONE: ::c_int = 59;
1322 pub const IPPROTO_DSTOPTS: ::c_int = 60;
1323 pub const IPPROTO_ENCAP: ::c_int = 98;
1324 pub const IPPROTO_PIM: ::c_int = 103;
1325 pub const IPPROTO_SCTP: ::c_int = 132;
1326 pub const IPPROTO_RAW: ::c_int = 255;
1327 pub const IPPROTO_MAX: ::c_int = 256;
1328 pub const IPPROTO_CARP: ::c_int = 112;
1329 pub const IPPROTO_DIVERT: ::c_int = 259;
1330 pub const IPPROTO_DONE: ::c_int = 257;
1331 pub const IPPROTO_EON: ::c_int = 80;
1332 pub const IPPROTO_ETHERIP: ::c_int = 97;
1333 pub const IPPROTO_GGP: ::c_int = 3;
1334 pub const IPPROTO_IPCOMP: ::c_int = 108;
1335 pub const IPPROTO_MOBILE: ::c_int = 55;
1336 
1337 pub const IPV6_RTHDR_LOOSE: ::c_int = 0;
1338 pub const IPV6_RTHDR_STRICT: ::c_int = 1;
1339 pub const IPV6_UNICAST_HOPS: ::c_int = 4;
1340 pub const IPV6_MULTICAST_IF: ::c_int = 9;
1341 pub const IPV6_MULTICAST_HOPS: ::c_int = 10;
1342 pub const IPV6_MULTICAST_LOOP: ::c_int = 11;
1343 pub const IPV6_JOIN_GROUP: ::c_int = 12;
1344 pub const IPV6_LEAVE_GROUP: ::c_int = 13;
1345 pub const IPV6_CHECKSUM: ::c_int = 26;
1346 pub const IPV6_V6ONLY: ::c_int = 27;
1347 pub const IPV6_IPSEC_POLICY_COMPAT: ::c_int = 28;
1348 pub const IPV6_RTHDRDSTOPTS: ::c_int = 35;
1349 pub const IPV6_RECVPKTINFO: ::c_int = 36;
1350 pub const IPV6_RECVHOPLIMIT: ::c_int = 37;
1351 pub const IPV6_RECVRTHDR: ::c_int = 38;
1352 pub const IPV6_RECVHOPOPTS: ::c_int = 39;
1353 pub const IPV6_RECVDSTOPTS: ::c_int = 40;
1354 pub const IPV6_RECVPATHMTU: ::c_int = 43;
1355 pub const IPV6_PATHMTU: ::c_int = 44;
1356 pub const IPV6_PKTINFO: ::c_int = 46;
1357 pub const IPV6_HOPLIMIT: ::c_int = 47;
1358 pub const IPV6_NEXTHOP: ::c_int = 48;
1359 pub const IPV6_HOPOPTS: ::c_int = 49;
1360 pub const IPV6_DSTOPTS: ::c_int = 50;
1361 pub const IPV6_RECVTCLASS: ::c_int = 57;
1362 pub const IPV6_TCLASS: ::c_int = 61;
1363 pub const IPV6_DONTFRAG: ::c_int = 62;
1364 
1365 pub const TCP_NODELAY: ::c_int = 0x01;
1366 pub const TCP_MAXSEG: ::c_int = 0x02;
1367 pub const TCP_MD5SIG: ::c_int = 0x10;
1368 pub const TCP_KEEPALIVE: ::c_int = 0x04;
1369 
1370 pub const SHUT_RD: ::c_int = 0;
1371 pub const SHUT_WR: ::c_int = 1;
1372 pub const SHUT_RDWR: ::c_int = 2;
1373 
1374 pub const LOCK_SH: ::c_int = 0x1;
1375 pub const LOCK_EX: ::c_int = 0x2;
1376 pub const LOCK_NB: ::c_int = 0x4;
1377 pub const LOCK_UN: ::c_int = 0x8;
1378 
1379 pub const SS_ONSTACK: ::c_int = 1;
1380 pub const SS_DISABLE: ::c_int = 2;
1381 
1382 pub const PATH_MAX: ::c_int = 1024;
1383 
1384 pub const UIO_MAXIOV: ::c_int = 1024;
1385 
1386 pub const FD_SETSIZE: usize = 256;
1387 
1388 pub const TCIOFF: ::c_int = 0x0002;
1389 pub const TCION: ::c_int = 0x0003;
1390 pub const TCOOFF: ::c_int = 0x0000;
1391 pub const TCOON: ::c_int = 0x0001;
1392 pub const TCIFLUSH: ::c_int = 0;
1393 pub const TCOFLUSH: ::c_int = 1;
1394 pub const TCIOFLUSH: ::c_int = 2;
1395 pub const NL0: ::tcflag_t = 0x000;
1396 pub const NL1: ::tcflag_t = 0x100;
1397 pub const TAB0: ::tcflag_t = 0x0000;
1398 pub const CR0: ::tcflag_t = 0x000;
1399 pub const FF0: ::tcflag_t = 0x0000;
1400 pub const BS0: ::tcflag_t = 0x0000;
1401 pub const VT0: ::tcflag_t = 0x0000;
1402 pub const VERASE: usize = 2;
1403 pub const VKILL: usize = 3;
1404 pub const VINTR: usize = 0;
1405 pub const VQUIT: usize = 1;
1406 pub const VLNEXT: usize = 15;
1407 pub const IGNBRK: ::tcflag_t = 0x00000001;
1408 pub const BRKINT: ::tcflag_t = 0x00000002;
1409 pub const IGNPAR: ::tcflag_t = 0x00000004;
1410 pub const PARMRK: ::tcflag_t = 0x00000008;
1411 pub const INPCK: ::tcflag_t = 0x00000010;
1412 pub const ISTRIP: ::tcflag_t = 0x00000020;
1413 pub const INLCR: ::tcflag_t = 0x00000040;
1414 pub const IGNCR: ::tcflag_t = 0x00000080;
1415 pub const ICRNL: ::tcflag_t = 0x00000100;
1416 pub const IXANY: ::tcflag_t = 0x00000800;
1417 pub const IMAXBEL: ::tcflag_t = 0x00002000;
1418 pub const OPOST: ::tcflag_t = 0x00000001;
1419 pub const CS5: ::tcflag_t = 0x00;
1420 pub const ECHO: ::tcflag_t = 0x00000008;
1421 pub const OCRNL: ::tcflag_t = 0x00000008;
1422 pub const ONOCR: ::tcflag_t = 0x00000010;
1423 pub const ONLRET: ::tcflag_t = 0x00000020;
1424 pub const OFILL: ::tcflag_t = 0x00000040;
1425 pub const OFDEL: ::tcflag_t = 0x00000080;
1426 
1427 pub const WNOHANG: ::c_int = 0x0040;
1428 pub const WUNTRACED: ::c_int = 0x0004;
1429 pub const WSTOPPED: ::c_int = WUNTRACED;
1430 pub const WEXITED: ::c_int = 0x0001;
1431 pub const WCONTINUED: ::c_int = 0x0008;
1432 pub const WNOWAIT: ::c_int = 0x0080;
1433 pub const WTRAPPED: ::c_int = 0x0002;
1434 
1435 pub const RTLD_LOCAL: ::c_int = 0x0200;
1436 pub const RTLD_LAZY: ::c_int = 0x0001;
1437 
1438 pub const POSIX_FADV_NORMAL: ::c_int = 0;
1439 pub const POSIX_FADV_RANDOM: ::c_int = 2;
1440 pub const POSIX_FADV_SEQUENTIAL: ::c_int = 1;
1441 pub const POSIX_FADV_WILLNEED: ::c_int = 3;
1442 
1443 pub const AT_FDCWD: ::c_int = -100;
1444 pub const AT_EACCESS: ::c_int = 0x0001;
1445 pub const AT_SYMLINK_NOFOLLOW: ::c_int = 0x0002;
1446 pub const AT_SYMLINK_FOLLOW: ::c_int = 0x0004;
1447 pub const AT_REMOVEDIR: ::c_int = 0x0008;
1448 
1449 pub const LOG_CRON: ::c_int = 9 << 3;
1450 pub const LOG_AUTHPRIV: ::c_int = 10 << 3;
1451 pub const LOG_FTP: ::c_int = 11 << 3;
1452 pub const LOG_PERROR: ::c_int = 0x20;
1453 
1454 pub const PIPE_BUF: usize = 5120;
1455 
1456 pub const CLD_EXITED: ::c_int = 1;
1457 pub const CLD_KILLED: ::c_int = 2;
1458 pub const CLD_DUMPED: ::c_int = 3;
1459 pub const CLD_TRAPPED: ::c_int = 4;
1460 pub const CLD_STOPPED: ::c_int = 5;
1461 pub const CLD_CONTINUED: ::c_int = 6;
1462 
1463 pub const UTIME_OMIT: c_long = 0x40000002;
1464 pub const UTIME_NOW: c_long = 0x40000001;
1465 
1466 pub const POLLIN: ::c_short = POLLRDNORM | POLLRDBAND;
1467 pub const POLLPRI: ::c_short = 0x0008;
1468 pub const POLLOUT: ::c_short = 0x0002;
1469 pub const POLLERR: ::c_short = 0x0020;
1470 pub const POLLHUP: ::c_short = 0x0040;
1471 pub const POLLNVAL: ::c_short = 0x1000;
1472 pub const POLLRDNORM: ::c_short = 0x0001;
1473 pub const POLLRDBAND: ::c_short = 0x0004;
1474 
1475 pub const IPTOS_LOWDELAY: u8 = 0x10;
1476 pub const IPTOS_THROUGHPUT: u8 = 0x08;
1477 pub const IPTOS_RELIABILITY: u8 = 0x04;
1478 pub const IPTOS_MINCOST: u8 = 0x02;
1479 
1480 pub const IPTOS_PREC_NETCONTROL: u8 = 0xe0;
1481 pub const IPTOS_PREC_INTERNETCONTROL: u8 = 0xc0;
1482 pub const IPTOS_PREC_CRITIC_ECP: u8 = 0xa0;
1483 pub const IPTOS_PREC_FLASHOVERRIDE: u8 = 0x80;
1484 pub const IPTOS_PREC_FLASH: u8 = 0x60;
1485 pub const IPTOS_PREC_IMMEDIATE: u8 = 0x40;
1486 pub const IPTOS_PREC_PRIORITY: u8 = 0x20;
1487 pub const IPTOS_PREC_ROUTINE: u8 = 0x00;
1488 
1489 pub const IPTOS_ECN_MASK: u8 = 0x03;
1490 pub const IPTOS_ECN_ECT1: u8 = 0x01;
1491 pub const IPTOS_ECN_ECT0: u8 = 0x02;
1492 pub const IPTOS_ECN_CE: u8 = 0x03;
1493 
1494 pub const IPOPT_CONTROL: u8 = 0x00;
1495 pub const IPOPT_RESERVED1: u8 = 0x20;
1496 pub const IPOPT_RESERVED2: u8 = 0x60;
1497 pub const IPOPT_LSRR: u8 = 131;
1498 pub const IPOPT_RR: u8 = 7;
1499 pub const IPOPT_SSRR: u8 = 137;
1500 pub const IPDEFTTL: u8 = 64;
1501 pub const IPOPT_OPTVAL: u8 = 0;
1502 pub const IPOPT_OLEN: u8 = 1;
1503 pub const IPOPT_OFFSET: u8 = 2;
1504 pub const IPOPT_MINOFF: u8 = 4;
1505 pub const IPOPT_NOP: u8 = 1;
1506 pub const IPOPT_EOL: u8 = 0;
1507 pub const IPOPT_TS: u8 = 68;
1508 pub const IPOPT_TS_TSONLY: u8 = 0;
1509 pub const IPOPT_TS_TSANDADDR: u8 = 1;
1510 pub const IPOPT_TS_PRESPEC: u8 = 3;
1511 
1512 pub const MAX_IPOPTLEN: u8 = 40;
1513 pub const IPVERSION: u8 = 4;
1514 pub const MAXTTL: u8 = 255;
1515 
1516 pub const ARPHRD_ETHER: u16 = 1;
1517 pub const ARPHRD_IEEE802: u16 = 6;
1518 pub const ARPHRD_ARCNET: u16 = 7;
1519 pub const ARPHRD_IEEE1394: u16 = 24;
1520 
1521 pub const SOL_SOCKET: ::c_int = 0xffff;
1522 
1523 pub const SO_DEBUG: ::c_int = 0x0001;
1524 pub const SO_REUSEADDR: ::c_int = 0x0004;
1525 pub const SO_TYPE: ::c_int = 0x1008;
1526 pub const SO_ERROR: ::c_int = 0x1007;
1527 pub const SO_DONTROUTE: ::c_int = 0x0010;
1528 pub const SO_BROADCAST: ::c_int = 0x0020;
1529 pub const SO_SNDBUF: ::c_int = 0x1001;
1530 pub const SO_RCVBUF: ::c_int = 0x1002;
1531 pub const SO_KEEPALIVE: ::c_int = 0x0008;
1532 pub const SO_OOBINLINE: ::c_int = 0x0100;
1533 pub const SO_LINGER: ::c_int = 0x0080;
1534 pub const SO_REUSEPORT: ::c_int = 0x0200;
1535 pub const SO_RCVLOWAT: ::c_int = 0x1004;
1536 pub const SO_SNDLOWAT: ::c_int = 0x1003;
1537 pub const SO_RCVTIMEO: ::c_int = 0x1006;
1538 pub const SO_SNDTIMEO: ::c_int = 0x1005;
1539 pub const SO_BINDTODEVICE: ::c_int = 0x0800;
1540 pub const SO_TIMESTAMP: ::c_int = 0x0400;
1541 pub const SO_ACCEPTCONN: ::c_int = 0x0002;
1542 
1543 pub const TIOCM_LE: ::c_int = 0x0100;
1544 pub const TIOCM_DTR: ::c_int = 0x0001;
1545 pub const TIOCM_RTS: ::c_int = 0x0002;
1546 pub const TIOCM_ST: ::c_int = 0x0200;
1547 pub const TIOCM_SR: ::c_int = 0x0400;
1548 pub const TIOCM_CTS: ::c_int = 0x1000;
1549 pub const TIOCM_CAR: ::c_int = TIOCM_CD;
1550 pub const TIOCM_CD: ::c_int = 0x8000;
1551 pub const TIOCM_RNG: ::c_int = TIOCM_RI;
1552 pub const TIOCM_RI: ::c_int = 0x4000;
1553 pub const TIOCM_DSR: ::c_int = 0x2000;
1554 
1555 pub const SCHED_OTHER: ::c_int = 3;
1556 pub const SCHED_FIFO: ::c_int = 1;
1557 pub const SCHED_RR: ::c_int = 2;
1558 
1559 pub const IPC_PRIVATE: ::key_t = 0;
1560 
1561 pub const IPC_CREAT: ::c_int = 0o001000;
1562 pub const IPC_EXCL: ::c_int = 0o002000;
1563 pub const IPC_NOWAIT: ::c_int = 0o004000;
1564 
1565 pub const IPC_RMID: ::c_int = 0;
1566 pub const IPC_SET: ::c_int = 1;
1567 pub const IPC_STAT: ::c_int = 2;
1568 
1569 pub const MSG_NOERROR: ::c_int = 0o010000;
1570 
1571 pub const LOG_NFACILITIES: ::c_int = 24;
1572 
1573 pub const SEM_FAILED: *mut ::sem_t = 0xFFFFFFFFFFFFFFFF as *mut sem_t;
1574 
1575 pub const AI_PASSIVE: ::c_int = 0x00000001;
1576 pub const AI_CANONNAME: ::c_int = 0x00000002;
1577 pub const AI_NUMERICHOST: ::c_int = 0x00000004;
1578 
1579 pub const AI_NUMERICSERV: ::c_int = 0x00000008;
1580 
1581 pub const EAI_BADFLAGS: ::c_int = 3;
1582 pub const EAI_NONAME: ::c_int = 8;
1583 pub const EAI_AGAIN: ::c_int = 2;
1584 pub const EAI_FAIL: ::c_int = 4;
1585 pub const EAI_NODATA: ::c_int = 7;
1586 pub const EAI_FAMILY: ::c_int = 5;
1587 pub const EAI_SOCKTYPE: ::c_int = 10;
1588 pub const EAI_SERVICE: ::c_int = 9;
1589 pub const EAI_MEMORY: ::c_int = 6;
1590 pub const EAI_SYSTEM: ::c_int = 11;
1591 pub const EAI_OVERFLOW: ::c_int = 14;
1592 
1593 pub const NI_NUMERICHOST: ::c_int = 0x00000002;
1594 pub const NI_NUMERICSERV: ::c_int = 0x00000008;
1595 pub const NI_NOFQDN: ::c_int = 0x00000001;
1596 pub const NI_NAMEREQD: ::c_int = 0x00000004;
1597 pub const NI_DGRAM: ::c_int = 0x00000010;
1598 
1599 pub const AIO_CANCELED: ::c_int = 0;
1600 pub const AIO_NOTCANCELED: ::c_int = 2;
1601 pub const AIO_ALLDONE: ::c_int = 1;
1602 pub const LIO_READ: ::c_int = 1;
1603 pub const LIO_WRITE: ::c_int = 2;
1604 pub const LIO_NOP: ::c_int = 0;
1605 pub const LIO_WAIT: ::c_int = 1;
1606 pub const LIO_NOWAIT: ::c_int = 0;
1607 
1608 pub const ITIMER_REAL: ::c_int = 0;
1609 pub const ITIMER_VIRTUAL: ::c_int = 1;
1610 pub const ITIMER_PROF: ::c_int = 2;
1611 
1612 pub const POSIX_SPAWN_RESETIDS: ::c_int = 0x00000010;
1613 pub const POSIX_SPAWN_SETPGROUP: ::c_int = 0x00000001;
1614 pub const POSIX_SPAWN_SETSIGDEF: ::c_int = 0x00000004;
1615 pub const POSIX_SPAWN_SETSIGMASK: ::c_int = 0x00000002;
1616 pub const POSIX_SPAWN_SETSCHEDPARAM: ::c_int = 0x00000400;
1617 pub const POSIX_SPAWN_SETSCHEDULER: ::c_int = 0x00000040;
1618 
1619 pub const IPTOS_ECN_NOT_ECT: u8 = 0x00;
1620 
1621 pub const RTF_UP: ::c_ushort = 0x0001;
1622 pub const RTF_GATEWAY: ::c_ushort = 0x0002;
1623 
1624 pub const RTF_HOST: ::c_ushort = 0x0004;
1625 pub const RTF_DYNAMIC: ::c_ushort = 0x0010;
1626 pub const RTF_MODIFIED: ::c_ushort = 0x0020;
1627 pub const RTF_REJECT: ::c_ushort = 0x0008;
1628 pub const RTF_STATIC: ::c_ushort = 0x0800;
1629 pub const RTF_XRESOLVE: ::c_ushort = 0x0200;
1630 pub const RTF_BROADCAST: u32 = 0x80000;
1631 pub const RTM_NEWADDR: u16 = 0xc;
1632 pub const RTM_DELADDR: u16 = 0xd;
1633 pub const RTA_DST: ::c_ushort = 0x1;
1634 pub const RTA_GATEWAY: ::c_ushort = 0x2;
1635 
1636 pub const UDP_ENCAP: ::c_int = 100;
1637 
1638 pub const IN_ACCESS: u32 = 0x00000001;
1639 pub const IN_MODIFY: u32 = 0x00000002;
1640 pub const IN_ATTRIB: u32 = 0x00000004;
1641 pub const IN_CLOSE_WRITE: u32 = 0x00000008;
1642 pub const IN_CLOSE_NOWRITE: u32 = 0x00000010;
1643 pub const IN_CLOSE: u32 = IN_CLOSE_WRITE | IN_CLOSE_NOWRITE;
1644 pub const IN_OPEN: u32 = 0x00000020;
1645 pub const IN_MOVED_FROM: u32 = 0x00000040;
1646 pub const IN_MOVED_TO: u32 = 0x00000080;
1647 pub const IN_MOVE: u32 = IN_MOVED_FROM | IN_MOVED_TO;
1648 pub const IN_CREATE: u32 = 0x00000100;
1649 pub const IN_DELETE: u32 = 0x00000200;
1650 pub const IN_DELETE_SELF: u32 = 0x00000400;
1651 pub const IN_MOVE_SELF: u32 = 0x00000800;
1652 pub const IN_UNMOUNT: u32 = 0x00002000;
1653 pub const IN_Q_OVERFLOW: u32 = 0x00004000;
1654 pub const IN_IGNORED: u32 = 0x00008000;
1655 pub const IN_ONLYDIR: u32 = 0x01000000;
1656 pub const IN_DONT_FOLLOW: u32 = 0x02000000;
1657 
1658 pub const IN_ISDIR: u32 = 0x40000000;
1659 pub const IN_ONESHOT: u32 = 0x80000000;
1660 
1661 pub const REG_EXTENDED: ::c_int = 0o0001;
1662 pub const REG_ICASE: ::c_int = 0o0002;
1663 pub const REG_NEWLINE: ::c_int = 0o0010;
1664 pub const REG_NOSUB: ::c_int = 0o0004;
1665 
1666 pub const REG_NOTBOL: ::c_int = 0o00001;
1667 pub const REG_NOTEOL: ::c_int = 0o00002;
1668 
1669 pub const REG_ENOSYS: ::c_int = 17;
1670 pub const REG_NOMATCH: ::c_int = 1;
1671 pub const REG_BADPAT: ::c_int = 2;
1672 pub const REG_ECOLLATE: ::c_int = 3;
1673 pub const REG_ECTYPE: ::c_int = 4;
1674 pub const REG_EESCAPE: ::c_int = 5;
1675 pub const REG_ESUBREG: ::c_int = 6;
1676 pub const REG_EBRACK: ::c_int = 7;
1677 pub const REG_EPAREN: ::c_int = 8;
1678 pub const REG_EBRACE: ::c_int = 9;
1679 pub const REG_BADBR: ::c_int = 10;
1680 pub const REG_ERANGE: ::c_int = 11;
1681 pub const REG_ESPACE: ::c_int = 12;
1682 pub const REG_BADRPT: ::c_int = 13;
1683 
1684 // errno.h
1685 pub const EOK: ::c_int = 0;
1686 pub const EWOULDBLOCK: ::c_int = EAGAIN;
1687 pub const EPERM: ::c_int = 1;
1688 pub const ENOENT: ::c_int = 2;
1689 pub const ESRCH: ::c_int = 3;
1690 pub const EINTR: ::c_int = 4;
1691 pub const EIO: ::c_int = 5;
1692 pub const ENXIO: ::c_int = 6;
1693 pub const E2BIG: ::c_int = 7;
1694 pub const ENOEXEC: ::c_int = 8;
1695 pub const EBADF: ::c_int = 9;
1696 pub const ECHILD: ::c_int = 10;
1697 pub const EAGAIN: ::c_int = 11;
1698 pub const ENOMEM: ::c_int = 12;
1699 pub const EACCES: ::c_int = 13;
1700 pub const EFAULT: ::c_int = 14;
1701 pub const ENOTBLK: ::c_int = 15;
1702 pub const EBUSY: ::c_int = 16;
1703 pub const EEXIST: ::c_int = 17;
1704 pub const EXDEV: ::c_int = 18;
1705 pub const ENODEV: ::c_int = 19;
1706 pub const ENOTDIR: ::c_int = 20;
1707 pub const EISDIR: ::c_int = 21;
1708 pub const EINVAL: ::c_int = 22;
1709 pub const ENFILE: ::c_int = 23;
1710 pub const EMFILE: ::c_int = 24;
1711 pub const ENOTTY: ::c_int = 25;
1712 pub const ETXTBSY: ::c_int = 26;
1713 pub const EFBIG: ::c_int = 27;
1714 pub const ENOSPC: ::c_int = 28;
1715 pub const ESPIPE: ::c_int = 29;
1716 pub const EROFS: ::c_int = 30;
1717 pub const EMLINK: ::c_int = 31;
1718 pub const EPIPE: ::c_int = 32;
1719 pub const EDOM: ::c_int = 33;
1720 pub const ERANGE: ::c_int = 34;
1721 pub const ENOMSG: ::c_int = 35;
1722 pub const EIDRM: ::c_int = 36;
1723 pub const ECHRNG: ::c_int = 37;
1724 pub const EL2NSYNC: ::c_int = 38;
1725 pub const EL3HLT: ::c_int = 39;
1726 pub const EL3RST: ::c_int = 40;
1727 pub const ELNRNG: ::c_int = 41;
1728 pub const EUNATCH: ::c_int = 42;
1729 pub const ENOCSI: ::c_int = 43;
1730 pub const EL2HLT: ::c_int = 44;
1731 pub const EDEADLK: ::c_int = 45;
1732 pub const ENOLCK: ::c_int = 46;
1733 pub const ECANCELED: ::c_int = 47;
1734 pub const EDQUOT: ::c_int = 49;
1735 pub const EBADE: ::c_int = 50;
1736 pub const EBADR: ::c_int = 51;
1737 pub const EXFULL: ::c_int = 52;
1738 pub const ENOANO: ::c_int = 53;
1739 pub const EBADRQC: ::c_int = 54;
1740 pub const EBADSLT: ::c_int = 55;
1741 pub const EDEADLOCK: ::c_int = 56;
1742 pub const EBFONT: ::c_int = 57;
1743 pub const EOWNERDEAD: ::c_int = 58;
1744 pub const ENOSTR: ::c_int = 60;
1745 pub const ENODATA: ::c_int = 61;
1746 pub const ETIME: ::c_int = 62;
1747 pub const ENOSR: ::c_int = 63;
1748 pub const ENONET: ::c_int = 64;
1749 pub const ENOPKG: ::c_int = 65;
1750 pub const EREMOTE: ::c_int = 66;
1751 pub const ENOLINK: ::c_int = 67;
1752 pub const EADV: ::c_int = 68;
1753 pub const ESRMNT: ::c_int = 69;
1754 pub const ECOMM: ::c_int = 70;
1755 pub const EPROTO: ::c_int = 71;
1756 pub const EMULTIHOP: ::c_int = 74;
1757 pub const EBADMSG: ::c_int = 77;
1758 pub const ENAMETOOLONG: ::c_int = 78;
1759 pub const EOVERFLOW: ::c_int = 79;
1760 pub const ENOTUNIQ: ::c_int = 80;
1761 pub const EBADFD: ::c_int = 81;
1762 pub const EREMCHG: ::c_int = 82;
1763 pub const ELIBACC: ::c_int = 83;
1764 pub const ELIBBAD: ::c_int = 84;
1765 pub const ELIBSCN: ::c_int = 85;
1766 pub const ELIBMAX: ::c_int = 86;
1767 pub const ELIBEXEC: ::c_int = 87;
1768 pub const EILSEQ: ::c_int = 88;
1769 pub const ENOSYS: ::c_int = 89;
1770 pub const ELOOP: ::c_int = 90;
1771 pub const ERESTART: ::c_int = 91;
1772 pub const ESTRPIPE: ::c_int = 92;
1773 pub const ENOTEMPTY: ::c_int = 93;
1774 pub const EUSERS: ::c_int = 94;
1775 pub const ENOTRECOVERABLE: ::c_int = 95;
1776 pub const EOPNOTSUPP: ::c_int = 103;
1777 pub const EFPOS: ::c_int = 110;
1778 pub const ESTALE: ::c_int = 122;
1779 pub const EINPROGRESS: ::c_int = 236;
1780 pub const EALREADY: ::c_int = 237;
1781 pub const ENOTSOCK: ::c_int = 238;
1782 pub const EDESTADDRREQ: ::c_int = 239;
1783 pub const EMSGSIZE: ::c_int = 240;
1784 pub const EPROTOTYPE: ::c_int = 241;
1785 pub const ENOPROTOOPT: ::c_int = 242;
1786 pub const EPROTONOSUPPORT: ::c_int = 243;
1787 pub const ESOCKTNOSUPPORT: ::c_int = 244;
1788 pub const EPFNOSUPPORT: ::c_int = 246;
1789 pub const EAFNOSUPPORT: ::c_int = 247;
1790 pub const EADDRINUSE: ::c_int = 248;
1791 pub const EADDRNOTAVAIL: ::c_int = 249;
1792 pub const ENETDOWN: ::c_int = 250;
1793 pub const ENETUNREACH: ::c_int = 251;
1794 pub const ENETRESET: ::c_int = 252;
1795 pub const ECONNABORTED: ::c_int = 253;
1796 pub const ECONNRESET: ::c_int = 254;
1797 pub const ENOBUFS: ::c_int = 255;
1798 pub const EISCONN: ::c_int = 256;
1799 pub const ENOTCONN: ::c_int = 257;
1800 pub const ESHUTDOWN: ::c_int = 258;
1801 pub const ETOOMANYREFS: ::c_int = 259;
1802 pub const ETIMEDOUT: ::c_int = 260;
1803 pub const ECONNREFUSED: ::c_int = 261;
1804 pub const EHOSTDOWN: ::c_int = 264;
1805 pub const EHOSTUNREACH: ::c_int = 265;
1806 pub const EBADRPC: ::c_int = 272;
1807 pub const ERPCMISMATCH: ::c_int = 273;
1808 pub const EPROGUNAVAIL: ::c_int = 274;
1809 pub const EPROGMISMATCH: ::c_int = 275;
1810 pub const EPROCUNAVAIL: ::c_int = 276;
1811 pub const ENOREMOTE: ::c_int = 300;
1812 pub const ENONDP: ::c_int = 301;
1813 pub const EBADFSYS: ::c_int = 302;
1814 pub const EMORE: ::c_int = 309;
1815 pub const ECTRLTERM: ::c_int = 310;
1816 pub const ENOLIC: ::c_int = 311;
1817 pub const ESRVRFAULT: ::c_int = 312;
1818 pub const EENDIAN: ::c_int = 313;
1819 pub const ESECTYPEINVAL: ::c_int = 314;
1820 
1821 pub const RUSAGE_CHILDREN: ::c_int = -1;
1822 pub const L_tmpnam: ::c_uint = 255;
1823 
1824 pub const _PC_LINK_MAX: ::c_int = 1;
1825 pub const _PC_MAX_CANON: ::c_int = 2;
1826 pub const _PC_MAX_INPUT: ::c_int = 3;
1827 pub const _PC_NAME_MAX: ::c_int = 4;
1828 pub const _PC_PATH_MAX: ::c_int = 5;
1829 pub const _PC_PIPE_BUF: ::c_int = 6;
1830 pub const _PC_CHOWN_RESTRICTED: ::c_int = 9;
1831 pub const _PC_NO_TRUNC: ::c_int = 7;
1832 pub const _PC_VDISABLE: ::c_int = 8;
1833 pub const _PC_SYNC_IO: ::c_int = 14;
1834 pub const _PC_ASYNC_IO: ::c_int = 12;
1835 pub const _PC_PRIO_IO: ::c_int = 13;
1836 pub const _PC_SOCK_MAXBUF: ::c_int = 15;
1837 pub const _PC_FILESIZEBITS: ::c_int = 16;
1838 pub const _PC_REC_INCR_XFER_SIZE: ::c_int = 22;
1839 pub const _PC_REC_MAX_XFER_SIZE: ::c_int = 23;
1840 pub const _PC_REC_MIN_XFER_SIZE: ::c_int = 24;
1841 pub const _PC_REC_XFER_ALIGN: ::c_int = 25;
1842 pub const _PC_ALLOC_SIZE_MIN: ::c_int = 21;
1843 pub const _PC_SYMLINK_MAX: ::c_int = 17;
1844 pub const _PC_2_SYMLINKS: ::c_int = 20;
1845 
1846 pub const _SC_PAGE_SIZE: ::c_int = _SC_PAGESIZE;
1847 pub const _SC_ARG_MAX: ::c_int = 1;
1848 pub const _SC_CHILD_MAX: ::c_int = 2;
1849 pub const _SC_CLK_TCK: ::c_int = 3;
1850 pub const _SC_NGROUPS_MAX: ::c_int = 4;
1851 pub const _SC_OPEN_MAX: ::c_int = 5;
1852 pub const _SC_JOB_CONTROL: ::c_int = 6;
1853 pub const _SC_SAVED_IDS: ::c_int = 7;
1854 pub const _SC_VERSION: ::c_int = 8;
1855 pub const _SC_PASS_MAX: ::c_int = 9;
1856 pub const _SC_PAGESIZE: ::c_int = 11;
1857 pub const _SC_XOPEN_VERSION: ::c_int = 12;
1858 pub const _SC_STREAM_MAX: ::c_int = 13;
1859 pub const _SC_TZNAME_MAX: ::c_int = 14;
1860 pub const _SC_AIO_LISTIO_MAX: ::c_int = 15;
1861 pub const _SC_AIO_MAX: ::c_int = 16;
1862 pub const _SC_AIO_PRIO_DELTA_MAX: ::c_int = 17;
1863 pub const _SC_DELAYTIMER_MAX: ::c_int = 18;
1864 pub const _SC_MQ_OPEN_MAX: ::c_int = 19;
1865 pub const _SC_MQ_PRIO_MAX: ::c_int = 20;
1866 pub const _SC_RTSIG_MAX: ::c_int = 21;
1867 pub const _SC_SEM_NSEMS_MAX: ::c_int = 22;
1868 pub const _SC_SEM_VALUE_MAX: ::c_int = 23;
1869 pub const _SC_SIGQUEUE_MAX: ::c_int = 24;
1870 pub const _SC_TIMER_MAX: ::c_int = 25;
1871 pub const _SC_ASYNCHRONOUS_IO: ::c_int = 26;
1872 pub const _SC_FSYNC: ::c_int = 27;
1873 pub const _SC_MAPPED_FILES: ::c_int = 28;
1874 pub const _SC_MEMLOCK: ::c_int = 29;
1875 pub const _SC_MEMLOCK_RANGE: ::c_int = 30;
1876 pub const _SC_MEMORY_PROTECTION: ::c_int = 31;
1877 pub const _SC_MESSAGE_PASSING: ::c_int = 32;
1878 pub const _SC_PRIORITIZED_IO: ::c_int = 33;
1879 pub const _SC_PRIORITY_SCHEDULING: ::c_int = 34;
1880 pub const _SC_REALTIME_SIGNALS: ::c_int = 35;
1881 pub const _SC_SEMAPHORES: ::c_int = 36;
1882 pub const _SC_SHARED_MEMORY_OBJECTS: ::c_int = 37;
1883 pub const _SC_SYNCHRONIZED_IO: ::c_int = 38;
1884 pub const _SC_TIMERS: ::c_int = 39;
1885 pub const _SC_GETGR_R_SIZE_MAX: ::c_int = 40;
1886 pub const _SC_GETPW_R_SIZE_MAX: ::c_int = 41;
1887 pub const _SC_LOGIN_NAME_MAX: ::c_int = 42;
1888 pub const _SC_THREAD_DESTRUCTOR_ITERATIONS: ::c_int = 43;
1889 pub const _SC_THREAD_KEYS_MAX: ::c_int = 44;
1890 pub const _SC_THREAD_STACK_MIN: ::c_int = 45;
1891 pub const _SC_THREAD_THREADS_MAX: ::c_int = 46;
1892 pub const _SC_TTY_NAME_MAX: ::c_int = 47;
1893 pub const _SC_THREADS: ::c_int = 48;
1894 pub const _SC_THREAD_ATTR_STACKADDR: ::c_int = 49;
1895 pub const _SC_THREAD_ATTR_STACKSIZE: ::c_int = 50;
1896 pub const _SC_THREAD_PRIORITY_SCHEDULING: ::c_int = 51;
1897 pub const _SC_THREAD_PRIO_INHERIT: ::c_int = 52;
1898 pub const _SC_THREAD_PRIO_PROTECT: ::c_int = 53;
1899 pub const _SC_THREAD_PROCESS_SHARED: ::c_int = 54;
1900 pub const _SC_THREAD_SAFE_FUNCTIONS: ::c_int = 55;
1901 pub const _SC_2_CHAR_TERM: ::c_int = 56;
1902 pub const _SC_2_C_BIND: ::c_int = 57;
1903 pub const _SC_2_C_DEV: ::c_int = 58;
1904 pub const _SC_2_C_VERSION: ::c_int = 59;
1905 pub const _SC_2_FORT_DEV: ::c_int = 60;
1906 pub const _SC_2_FORT_RUN: ::c_int = 61;
1907 pub const _SC_2_LOCALEDEF: ::c_int = 62;
1908 pub const _SC_2_SW_DEV: ::c_int = 63;
1909 pub const _SC_2_UPE: ::c_int = 64;
1910 pub const _SC_2_VERSION: ::c_int = 65;
1911 pub const _SC_ATEXIT_MAX: ::c_int = 66;
1912 pub const _SC_AVPHYS_PAGES: ::c_int = 67;
1913 pub const _SC_BC_BASE_MAX: ::c_int = 68;
1914 pub const _SC_BC_DIM_MAX: ::c_int = 69;
1915 pub const _SC_BC_SCALE_MAX: ::c_int = 70;
1916 pub const _SC_BC_STRING_MAX: ::c_int = 71;
1917 pub const _SC_CHARCLASS_NAME_MAX: ::c_int = 72;
1918 pub const _SC_CHAR_BIT: ::c_int = 73;
1919 pub const _SC_CHAR_MAX: ::c_int = 74;
1920 pub const _SC_CHAR_MIN: ::c_int = 75;
1921 pub const _SC_COLL_WEIGHTS_MAX: ::c_int = 76;
1922 pub const _SC_EQUIV_CLASS_MAX: ::c_int = 77;
1923 pub const _SC_EXPR_NEST_MAX: ::c_int = 78;
1924 pub const _SC_INT_MAX: ::c_int = 79;
1925 pub const _SC_INT_MIN: ::c_int = 80;
1926 pub const _SC_LINE_MAX: ::c_int = 81;
1927 pub const _SC_LONG_BIT: ::c_int = 82;
1928 pub const _SC_MB_LEN_MAX: ::c_int = 83;
1929 pub const _SC_NL_ARGMAX: ::c_int = 84;
1930 pub const _SC_NL_LANGMAX: ::c_int = 85;
1931 pub const _SC_NL_MSGMAX: ::c_int = 86;
1932 pub const _SC_NL_NMAX: ::c_int = 87;
1933 pub const _SC_NL_SETMAX: ::c_int = 88;
1934 pub const _SC_NL_TEXTMAX: ::c_int = 89;
1935 pub const _SC_NPROCESSORS_CONF: ::c_int = 90;
1936 pub const _SC_NPROCESSORS_ONLN: ::c_int = 91;
1937 pub const _SC_NZERO: ::c_int = 92;
1938 pub const _SC_PHYS_PAGES: ::c_int = 93;
1939 pub const _SC_PII: ::c_int = 94;
1940 pub const _SC_PII_INTERNET: ::c_int = 95;
1941 pub const _SC_PII_INTERNET_DGRAM: ::c_int = 96;
1942 pub const _SC_PII_INTERNET_STREAM: ::c_int = 97;
1943 pub const _SC_PII_OSI: ::c_int = 98;
1944 pub const _SC_PII_OSI_CLTS: ::c_int = 99;
1945 pub const _SC_PII_OSI_COTS: ::c_int = 100;
1946 pub const _SC_PII_OSI_M: ::c_int = 101;
1947 pub const _SC_PII_SOCKET: ::c_int = 102;
1948 pub const _SC_PII_XTI: ::c_int = 103;
1949 pub const _SC_POLL: ::c_int = 104;
1950 pub const _SC_RE_DUP_MAX: ::c_int = 105;
1951 pub const _SC_SCHAR_MAX: ::c_int = 106;
1952 pub const _SC_SCHAR_MIN: ::c_int = 107;
1953 pub const _SC_SELECT: ::c_int = 108;
1954 pub const _SC_SHRT_MAX: ::c_int = 109;
1955 pub const _SC_SHRT_MIN: ::c_int = 110;
1956 pub const _SC_SSIZE_MAX: ::c_int = 111;
1957 pub const _SC_T_IOV_MAX: ::c_int = 112;
1958 pub const _SC_UCHAR_MAX: ::c_int = 113;
1959 pub const _SC_UINT_MAX: ::c_int = 114;
1960 pub const _SC_UIO_MAXIOV: ::c_int = 115;
1961 pub const _SC_ULONG_MAX: ::c_int = 116;
1962 pub const _SC_USHRT_MAX: ::c_int = 117;
1963 pub const _SC_WORD_BIT: ::c_int = 118;
1964 pub const _SC_XOPEN_CRYPT: ::c_int = 119;
1965 pub const _SC_XOPEN_ENH_I18N: ::c_int = 120;
1966 pub const _SC_XOPEN_SHM: ::c_int = 121;
1967 pub const _SC_XOPEN_UNIX: ::c_int = 122;
1968 pub const _SC_XOPEN_XCU_VERSION: ::c_int = 123;
1969 pub const _SC_XOPEN_XPG2: ::c_int = 124;
1970 pub const _SC_XOPEN_XPG3: ::c_int = 125;
1971 pub const _SC_XOPEN_XPG4: ::c_int = 126;
1972 pub const _SC_XBS5_ILP32_OFF32: ::c_int = 127;
1973 pub const _SC_XBS5_ILP32_OFFBIG: ::c_int = 128;
1974 pub const _SC_XBS5_LP64_OFF64: ::c_int = 129;
1975 pub const _SC_XBS5_LPBIG_OFFBIG: ::c_int = 130;
1976 pub const _SC_ADVISORY_INFO: ::c_int = 131;
1977 pub const _SC_CPUTIME: ::c_int = 132;
1978 pub const _SC_SPAWN: ::c_int = 133;
1979 pub const _SC_SPORADIC_SERVER: ::c_int = 134;
1980 pub const _SC_THREAD_CPUTIME: ::c_int = 135;
1981 pub const _SC_THREAD_SPORADIC_SERVER: ::c_int = 136;
1982 pub const _SC_TIMEOUTS: ::c_int = 137;
1983 pub const _SC_BARRIERS: ::c_int = 138;
1984 pub const _SC_CLOCK_SELECTION: ::c_int = 139;
1985 pub const _SC_MONOTONIC_CLOCK: ::c_int = 140;
1986 pub const _SC_READER_WRITER_LOCKS: ::c_int = 141;
1987 pub const _SC_SPIN_LOCKS: ::c_int = 142;
1988 pub const _SC_TYPED_MEMORY_OBJECTS: ::c_int = 143;
1989 pub const _SC_TRACE_EVENT_FILTER: ::c_int = 144;
1990 pub const _SC_TRACE: ::c_int = 145;
1991 pub const _SC_TRACE_INHERIT: ::c_int = 146;
1992 pub const _SC_TRACE_LOG: ::c_int = 147;
1993 pub const _SC_2_PBS: ::c_int = 148;
1994 pub const _SC_2_PBS_ACCOUNTING: ::c_int = 149;
1995 pub const _SC_2_PBS_CHECKPOINT: ::c_int = 150;
1996 pub const _SC_2_PBS_LOCATE: ::c_int = 151;
1997 pub const _SC_2_PBS_MESSAGE: ::c_int = 152;
1998 pub const _SC_2_PBS_TRACK: ::c_int = 153;
1999 pub const _SC_HOST_NAME_MAX: ::c_int = 154;
2000 pub const _SC_IOV_MAX: ::c_int = 155;
2001 pub const _SC_IPV6: ::c_int = 156;
2002 pub const _SC_RAW_SOCKETS: ::c_int = 157;
2003 pub const _SC_REGEXP: ::c_int = 158;
2004 pub const _SC_SHELL: ::c_int = 159;
2005 pub const _SC_SS_REPL_MAX: ::c_int = 160;
2006 pub const _SC_SYMLOOP_MAX: ::c_int = 161;
2007 pub const _SC_TRACE_EVENT_NAME_MAX: ::c_int = 162;
2008 pub const _SC_TRACE_NAME_MAX: ::c_int = 163;
2009 pub const _SC_TRACE_SYS_MAX: ::c_int = 164;
2010 pub const _SC_TRACE_USER_EVENT_MAX: ::c_int = 165;
2011 pub const _SC_V6_ILP32_OFF32: ::c_int = 166;
2012 pub const _SC_V6_ILP32_OFFBIG: ::c_int = 167;
2013 pub const _SC_V6_LP64_OFF64: ::c_int = 168;
2014 pub const _SC_V6_LPBIG_OFFBIG: ::c_int = 169;
2015 pub const _SC_XOPEN_REALTIME: ::c_int = 170;
2016 pub const _SC_XOPEN_REALTIME_THREADS: ::c_int = 171;
2017 pub const _SC_XOPEN_LEGACY: ::c_int = 172;
2018 pub const _SC_XOPEN_STREAMS: ::c_int = 173;
2019 pub const _SC_V7_ILP32_OFF32: ::c_int = 176;
2020 pub const _SC_V7_ILP32_OFFBIG: ::c_int = 177;
2021 pub const _SC_V7_LP64_OFF64: ::c_int = 178;
2022 pub const _SC_V7_LPBIG_OFFBIG: ::c_int = 179;
2023 
2024 pub const GLOB_ERR: ::c_int = 0x0001;
2025 pub const GLOB_MARK: ::c_int = 0x0002;
2026 pub const GLOB_NOSORT: ::c_int = 0x0004;
2027 pub const GLOB_DOOFFS: ::c_int = 0x0008;
2028 pub const GLOB_NOCHECK: ::c_int = 0x0010;
2029 pub const GLOB_APPEND: ::c_int = 0x0020;
2030 pub const GLOB_NOESCAPE: ::c_int = 0x0040;
2031 
2032 pub const GLOB_NOSPACE: ::c_int = 1;
2033 pub const GLOB_ABORTED: ::c_int = 2;
2034 pub const GLOB_NOMATCH: ::c_int = 3;
2035 
2036 pub const S_IEXEC: mode_t = ::S_IXUSR;
2037 pub const S_IWRITE: mode_t = ::S_IWUSR;
2038 pub const S_IREAD: mode_t = ::S_IRUSR;
2039 
2040 pub const S_IFIFO: ::mode_t = 0x1000;
2041 pub const S_IFCHR: ::mode_t = 0x2000;
2042 pub const S_IFDIR: ::mode_t = 0x4000;
2043 pub const S_IFBLK: ::mode_t = 0x6000;
2044 pub const S_IFREG: ::mode_t = 0x8000;
2045 pub const S_IFLNK: ::mode_t = 0xA000;
2046 pub const S_IFSOCK: ::mode_t = 0xC000;
2047 pub const S_IFMT: ::mode_t = 0xF000;
2048 
2049 pub const S_IXOTH: ::mode_t = 0o000001;
2050 pub const S_IWOTH: ::mode_t = 0o000002;
2051 pub const S_IROTH: ::mode_t = 0o000004;
2052 pub const S_IRWXO: ::mode_t = 0o000007;
2053 pub const S_IXGRP: ::mode_t = 0o000010;
2054 pub const S_IWGRP: ::mode_t = 0o000020;
2055 pub const S_IRGRP: ::mode_t = 0o000040;
2056 pub const S_IRWXG: ::mode_t = 0o000070;
2057 pub const S_IXUSR: ::mode_t = 0o000100;
2058 pub const S_IWUSR: ::mode_t = 0o000200;
2059 pub const S_IRUSR: ::mode_t = 0o000400;
2060 pub const S_IRWXU: ::mode_t = 0o000700;
2061 
2062 pub const F_LOCK: ::c_int = 1;
2063 pub const F_TEST: ::c_int = 3;
2064 pub const F_TLOCK: ::c_int = 2;
2065 pub const F_ULOCK: ::c_int = 0;
2066 
2067 pub const ST_RDONLY: ::c_ulong = 0x01;
2068 pub const ST_NOSUID: ::c_ulong = 0x04;
2069 pub const ST_NOEXEC: ::c_ulong = 0x02;
2070 pub const ST_NOATIME: ::c_ulong = 0x20;
2071 
2072 pub const RTLD_NEXT: *mut ::c_void = -3i64 as *mut ::c_void;
2073 pub const RTLD_DEFAULT: *mut ::c_void = -2i64 as *mut ::c_void;
2074 pub const RTLD_NODELETE: ::c_int = 0x1000;
2075 pub const RTLD_NOW: ::c_int = 0x0002;
2076 
2077 pub const EMPTY: ::c_short = 0;
2078 pub const RUN_LVL: ::c_short = 1;
2079 pub const BOOT_TIME: ::c_short = 2;
2080 pub const NEW_TIME: ::c_short = 4;
2081 pub const OLD_TIME: ::c_short = 3;
2082 pub const INIT_PROCESS: ::c_short = 5;
2083 pub const LOGIN_PROCESS: ::c_short = 6;
2084 pub const USER_PROCESS: ::c_short = 7;
2085 pub const DEAD_PROCESS: ::c_short = 8;
2086 pub const ACCOUNTING: ::c_short = 9;
2087 
2088 pub const ENOTSUP: ::c_int = 48;
2089 
2090 pub const BUFSIZ: ::c_uint = 1024;
2091 pub const TMP_MAX: ::c_uint = 26 * 26 * 26;
2092 pub const FOPEN_MAX: ::c_uint = 16;
2093 pub const FILENAME_MAX: ::c_uint = 255;
2094 
2095 pub const NI_MAXHOST: ::socklen_t = 1025;
2096 pub const M_KEEP: ::c_int = 4;
2097 pub const REG_STARTEND: ::c_int = 0o00004;
2098 pub const VEOF: usize = 4;
2099 
2100 pub const RTLD_GLOBAL: ::c_int = 0x0100;
2101 pub const RTLD_NOLOAD: ::c_int = 0x0004;
2102 
2103 pub const O_RDONLY: ::c_int = 0o000000;
2104 pub const O_WRONLY: ::c_int = 0o000001;
2105 pub const O_RDWR: ::c_int = 0o000002;
2106 
2107 pub const O_EXEC: ::c_int = 0o00003;
2108 pub const O_ASYNC: ::c_int = 0o0200000;
2109 pub const O_NDELAY: ::c_int = O_NONBLOCK;
2110 pub const O_TRUNC: ::c_int = 0o001000;
2111 pub const O_CLOEXEC: ::c_int = 0o020000;
2112 pub const O_DIRECTORY: ::c_int = 0o4000000;
2113 pub const O_ACCMODE: ::c_int = 0o000007;
2114 pub const O_APPEND: ::c_int = 0o000010;
2115 pub const O_CREAT: ::c_int = 0o000400;
2116 pub const O_EXCL: ::c_int = 0o002000;
2117 pub const O_NOCTTY: ::c_int = 0o004000;
2118 pub const O_NONBLOCK: ::c_int = 0o000200;
2119 pub const O_SYNC: ::c_int = 0o000040;
2120 pub const O_RSYNC: ::c_int = 0o000100;
2121 pub const O_DSYNC: ::c_int = 0o000020;
2122 pub const O_NOFOLLOW: ::c_int = 0o010000;
2123 
2124 pub const POSIX_FADV_DONTNEED: ::c_int = 4;
2125 pub const POSIX_FADV_NOREUSE: ::c_int = 5;
2126 
2127 pub const SOCK_SEQPACKET: ::c_int = 5;
2128 pub const SOCK_STREAM: ::c_int = 1;
2129 pub const SOCK_DGRAM: ::c_int = 2;
2130 pub const SOCK_RAW: ::c_int = 3;
2131 pub const SOCK_RDM: ::c_int = 4;
2132 pub const SOCK_CLOEXEC: ::c_int = 0x10000000;
2133 
2134 pub const SA_SIGINFO: ::c_int = 0x0002;
2135 pub const SA_NOCLDWAIT: ::c_int = 0x0020;
2136 pub const SA_NODEFER: ::c_int = 0x0010;
2137 pub const SA_RESETHAND: ::c_int = 0x0004;
2138 pub const SA_NOCLDSTOP: ::c_int = 0x0001;
2139 
2140 pub const SIGTTIN: ::c_int = 26;
2141 pub const SIGTTOU: ::c_int = 27;
2142 pub const SIGXCPU: ::c_int = 30;
2143 pub const SIGXFSZ: ::c_int = 31;
2144 pub const SIGVTALRM: ::c_int = 28;
2145 pub const SIGPROF: ::c_int = 29;
2146 pub const SIGWINCH: ::c_int = 20;
2147 pub const SIGCHLD: ::c_int = 18;
2148 pub const SIGBUS: ::c_int = 10;
2149 pub const SIGUSR1: ::c_int = 16;
2150 pub const SIGUSR2: ::c_int = 17;
2151 pub const SIGCONT: ::c_int = 25;
2152 pub const SIGSTOP: ::c_int = 23;
2153 pub const SIGTSTP: ::c_int = 24;
2154 pub const SIGURG: ::c_int = 21;
2155 pub const SIGIO: ::c_int = SIGPOLL;
2156 pub const SIGSYS: ::c_int = 12;
2157 pub const SIGPOLL: ::c_int = 22;
2158 pub const SIGPWR: ::c_int = 19;
2159 pub const SIG_SETMASK: ::c_int = 2;
2160 pub const SIG_BLOCK: ::c_int = 0;
2161 pub const SIG_UNBLOCK: ::c_int = 1;
2162 
2163 pub const POLLWRNORM: ::c_short = ::POLLOUT;
2164 pub const POLLWRBAND: ::c_short = 0x0010;
2165 
2166 pub const F_SETLK: ::c_int = 106;
2167 pub const F_SETLKW: ::c_int = 107;
2168 pub const F_ALLOCSP: ::c_int = 110;
2169 pub const F_FREESP: ::c_int = 111;
2170 pub const F_GETLK: ::c_int = 114;
2171 
2172 pub const F_RDLCK: ::c_int = 1;
2173 pub const F_WRLCK: ::c_int = 2;
2174 pub const F_UNLCK: ::c_int = 3;
2175 
2176 pub const NCCS: usize = 40;
2177 
2178 pub const MAP_ANON: ::c_int = MAP_ANONYMOUS;
2179 pub const MAP_ANONYMOUS: ::c_int = 0x00080000;
2180 
2181 pub const MCL_CURRENT: ::c_int = 0x000000001;
2182 pub const MCL_FUTURE: ::c_int = 0x000000002;
2183 
2184 pub const _TIO_CBAUD: ::tcflag_t = 15;
2185 pub const CBAUD: ::tcflag_t = _TIO_CBAUD;
2186 pub const TAB1: ::tcflag_t = 0x0800;
2187 pub const TAB2: ::tcflag_t = 0x1000;
2188 pub const TAB3: ::tcflag_t = 0x1800;
2189 pub const CR1: ::tcflag_t = 0x200;
2190 pub const CR2: ::tcflag_t = 0x400;
2191 pub const CR3: ::tcflag_t = 0x600;
2192 pub const FF1: ::tcflag_t = 0x8000;
2193 pub const BS1: ::tcflag_t = 0x2000;
2194 pub const VT1: ::tcflag_t = 0x4000;
2195 pub const VWERASE: usize = 14;
2196 pub const VREPRINT: usize = 12;
2197 pub const VSUSP: usize = 10;
2198 pub const VSTART: usize = 8;
2199 pub const VSTOP: usize = 9;
2200 pub const VDISCARD: usize = 13;
2201 pub const VTIME: usize = 17;
2202 pub const IXON: ::tcflag_t = 0x00000400;
2203 pub const IXOFF: ::tcflag_t = 0x00001000;
2204 pub const ONLCR: ::tcflag_t = 0x00000004;
2205 pub const CSIZE: ::tcflag_t = 0x00000030;
2206 pub const CS6: ::tcflag_t = 0x10;
2207 pub const CS7: ::tcflag_t = 0x20;
2208 pub const CS8: ::tcflag_t = 0x30;
2209 pub const CSTOPB: ::tcflag_t = 0x00000040;
2210 pub const CREAD: ::tcflag_t = 0x00000080;
2211 pub const PARENB: ::tcflag_t = 0x00000100;
2212 pub const PARODD: ::tcflag_t = 0x00000200;
2213 pub const HUPCL: ::tcflag_t = 0x00000400;
2214 pub const CLOCAL: ::tcflag_t = 0x00000800;
2215 pub const ECHOKE: ::tcflag_t = 0x00000800;
2216 pub const ECHOE: ::tcflag_t = 0x00000010;
2217 pub const ECHOK: ::tcflag_t = 0x00000020;
2218 pub const ECHONL: ::tcflag_t = 0x00000040;
2219 pub const ECHOCTL: ::tcflag_t = 0x00000200;
2220 pub const ISIG: ::tcflag_t = 0x00000001;
2221 pub const ICANON: ::tcflag_t = 0x00000002;
2222 pub const NOFLSH: ::tcflag_t = 0x00000080;
2223 pub const OLCUC: ::tcflag_t = 0x00000002;
2224 pub const NLDLY: ::tcflag_t = 0x00000100;
2225 pub const CRDLY: ::tcflag_t = 0x00000600;
2226 pub const TABDLY: ::tcflag_t = 0x00001800;
2227 pub const BSDLY: ::tcflag_t = 0x00002000;
2228 pub const FFDLY: ::tcflag_t = 0x00008000;
2229 pub const VTDLY: ::tcflag_t = 0x00004000;
2230 pub const XTABS: ::tcflag_t = 0x1800;
2231 
2232 pub const B0: ::speed_t = 0;
2233 pub const B50: ::speed_t = 1;
2234 pub const B75: ::speed_t = 2;
2235 pub const B110: ::speed_t = 3;
2236 pub const B134: ::speed_t = 4;
2237 pub const B150: ::speed_t = 5;
2238 pub const B200: ::speed_t = 6;
2239 pub const B300: ::speed_t = 7;
2240 pub const B600: ::speed_t = 8;
2241 pub const B1200: ::speed_t = 9;
2242 pub const B1800: ::speed_t = 10;
2243 pub const B2400: ::speed_t = 11;
2244 pub const B4800: ::speed_t = 12;
2245 pub const B9600: ::speed_t = 13;
2246 pub const B19200: ::speed_t = 14;
2247 pub const B38400: ::speed_t = 15;
2248 pub const EXTA: ::speed_t = 14;
2249 pub const EXTB: ::speed_t = 15;
2250 pub const B57600: ::speed_t = 57600;
2251 pub const B115200: ::speed_t = 115200;
2252 
2253 pub const VEOL: usize = 5;
2254 pub const VEOL2: usize = 6;
2255 pub const VMIN: usize = 16;
2256 pub const IEXTEN: ::tcflag_t = 0x00008000;
2257 pub const TOSTOP: ::tcflag_t = 0x00000100;
2258 
2259 pub const TCSANOW: ::c_int = 0x0001;
2260 pub const TCSADRAIN: ::c_int = 0x0002;
2261 pub const TCSAFLUSH: ::c_int = 0x0004;
2262 
2263 pub const HW_MACHINE: ::c_int = 1;
2264 pub const HW_MODEL: ::c_int = 2;
2265 pub const HW_NCPU: ::c_int = 3;
2266 pub const HW_BYTEORDER: ::c_int = 4;
2267 pub const HW_PHYSMEM: ::c_int = 5;
2268 pub const HW_USERMEM: ::c_int = 6;
2269 pub const HW_PAGESIZE: ::c_int = 7;
2270 pub const HW_DISKNAMES: ::c_int = 8;
2271 pub const HW_IOSTATS: ::c_int = 9;
2272 pub const HW_MACHINE_ARCH: ::c_int = 10;
2273 pub const HW_ALIGNBYTES: ::c_int = 11;
2274 pub const HW_CNMAGIC: ::c_int = 12;
2275 pub const HW_PHYSMEM64: ::c_int = 13;
2276 pub const HW_USERMEM64: ::c_int = 14;
2277 pub const HW_IOSTATNAMES: ::c_int = 15;
2278 pub const HW_MAXID: ::c_int = 15;
2279 
2280 pub const CTL_UNSPEC: ::c_int = 0;
2281 pub const CTL_KERN: ::c_int = 1;
2282 pub const CTL_VM: ::c_int = 2;
2283 pub const CTL_VFS: ::c_int = 3;
2284 pub const CTL_NET: ::c_int = 4;
2285 pub const CTL_DEBUG: ::c_int = 5;
2286 pub const CTL_HW: ::c_int = 6;
2287 pub const CTL_MACHDEP: ::c_int = 7;
2288 pub const CTL_USER: ::c_int = 8;
2289 pub const CTL_QNX: ::c_int = 9;
2290 pub const CTL_PROC: ::c_int = 10;
2291 pub const CTL_VENDOR: ::c_int = 11;
2292 pub const CTL_EMUL: ::c_int = 12;
2293 pub const CTL_SECURITY: ::c_int = 13;
2294 pub const CTL_MAXID: ::c_int = 14;
2295 
2296 pub const DAY_1: ::nl_item = 8;
2297 pub const DAY_2: ::nl_item = 9;
2298 pub const DAY_3: ::nl_item = 10;
2299 pub const DAY_4: ::nl_item = 11;
2300 pub const DAY_5: ::nl_item = 12;
2301 pub const DAY_6: ::nl_item = 13;
2302 pub const DAY_7: ::nl_item = 14;
2303 
2304 pub const MON_1: ::nl_item = 22;
2305 pub const MON_2: ::nl_item = 23;
2306 pub const MON_3: ::nl_item = 24;
2307 pub const MON_4: ::nl_item = 25;
2308 pub const MON_5: ::nl_item = 26;
2309 pub const MON_6: ::nl_item = 27;
2310 pub const MON_7: ::nl_item = 28;
2311 pub const MON_8: ::nl_item = 29;
2312 pub const MON_9: ::nl_item = 30;
2313 pub const MON_10: ::nl_item = 31;
2314 pub const MON_11: ::nl_item = 32;
2315 pub const MON_12: ::nl_item = 33;
2316 
2317 pub const ABDAY_1: ::nl_item = 15;
2318 pub const ABDAY_2: ::nl_item = 16;
2319 pub const ABDAY_3: ::nl_item = 17;
2320 pub const ABDAY_4: ::nl_item = 18;
2321 pub const ABDAY_5: ::nl_item = 19;
2322 pub const ABDAY_6: ::nl_item = 20;
2323 pub const ABDAY_7: ::nl_item = 21;
2324 
2325 pub const ABMON_1: ::nl_item = 34;
2326 pub const ABMON_2: ::nl_item = 35;
2327 pub const ABMON_3: ::nl_item = 36;
2328 pub const ABMON_4: ::nl_item = 37;
2329 pub const ABMON_5: ::nl_item = 38;
2330 pub const ABMON_6: ::nl_item = 39;
2331 pub const ABMON_7: ::nl_item = 40;
2332 pub const ABMON_8: ::nl_item = 41;
2333 pub const ABMON_9: ::nl_item = 42;
2334 pub const ABMON_10: ::nl_item = 43;
2335 pub const ABMON_11: ::nl_item = 44;
2336 pub const ABMON_12: ::nl_item = 45;
2337 
2338 pub const AF_ARP: ::c_int = 28;
2339 pub const AF_CCITT: ::c_int = 10;
2340 pub const AF_CHAOS: ::c_int = 5;
2341 pub const AF_CNT: ::c_int = 21;
2342 pub const AF_COIP: ::c_int = 20;
2343 pub const AF_DATAKIT: ::c_int = 9;
2344 pub const AF_DECnet: ::c_int = 12;
2345 pub const AF_DLI: ::c_int = 13;
2346 pub const AF_E164: ::c_int = 26;
2347 pub const AF_ECMA: ::c_int = 8;
2348 pub const AF_HYLINK: ::c_int = 15;
2349 pub const AF_IEEE80211: ::c_int = 32;
2350 pub const AF_IMPLINK: ::c_int = 3;
2351 pub const AF_ISO: ::c_int = 7;
2352 pub const AF_LAT: ::c_int = 14;
2353 pub const AF_LINK: ::c_int = 18;
2354 pub const AF_NATM: ::c_int = 27;
2355 pub const AF_NS: ::c_int = 6;
2356 pub const AF_OSI: ::c_int = 7;
2357 pub const AF_PUP: ::c_int = 4;
2358 pub const ALT_DIGITS: ::nl_item = 50;
2359 pub const AM_STR: ::nl_item = 6;
2360 pub const B76800: ::speed_t = 76800;
2361 
2362 pub const BIOCFLUSH: ::c_int = 17000;
2363 pub const BIOCGBLEN: ::c_int = 1074020966;
2364 pub const BIOCGDLT: ::c_int = 1074020970;
2365 pub const BIOCGDLTLIST: ::c_int = -1072676233;
2366 pub const BIOCGETIF: ::c_int = 1083196011;
2367 pub const BIOCGHDRCMPLT: ::c_int = 1074020980;
2368 pub const BIOCGRTIMEOUT: ::c_int = 1074807406;
2369 pub const BIOCGSEESENT: ::c_int = 1074020984;
2370 pub const BIOCGSTATS: ::c_int = 1082147439;
2371 pub const BIOCIMMEDIATE: ::c_int = -2147204496;
2372 pub const BIOCPROMISC: ::c_int = 17001;
2373 pub const BIOCSBLEN: ::c_int = -1073462682;
2374 pub const BIOCSDLT: ::c_int = -2147204490;
2375 pub const BIOCSETF: ::c_int = -2146418073;
2376 pub const BIOCSETIF: ::c_int = -2138029460;
2377 pub const BIOCSHDRCMPLT: ::c_int = -2147204491;
2378 pub const BIOCSRTIMEOUT: ::c_int = -2146418067;
2379 pub const BIOCSSEESENT: ::c_int = -2147204487;
2380 pub const BIOCVERSION: ::c_int = 1074020977;
2381 
2382 pub const BPF_ALIGNMENT: usize = ::mem::size_of::<::c_long>();
2383 pub const CHAR_BIT: usize = 8;
2384 pub const CODESET: ::nl_item = 1;
2385 pub const CRNCYSTR: ::nl_item = 55;
2386 
2387 pub const D_FLAG_FILTER: ::c_int = 0x00000001;
2388 pub const D_FLAG_STAT: ::c_int = 0x00000002;
2389 pub const D_FLAG_STAT_FORM_MASK: ::c_int = 0x000000f0;
2390 pub const D_FLAG_STAT_FORM_T32_2001: ::c_int = 0x00000010;
2391 pub const D_FLAG_STAT_FORM_T32_2008: ::c_int = 0x00000020;
2392 pub const D_FLAG_STAT_FORM_T64_2008: ::c_int = 0x00000030;
2393 pub const D_FLAG_STAT_FORM_UNSET: ::c_int = 0x00000000;
2394 
2395 pub const D_FMT: ::nl_item = 3;
2396 pub const D_GETFLAG: ::c_int = 1;
2397 pub const D_SETFLAG: ::c_int = 2;
2398 pub const D_T_FMT: ::nl_item = 2;
2399 pub const ERA: ::nl_item = 46;
2400 pub const ERA_D_FMT: ::nl_item = 47;
2401 pub const ERA_D_T_FMT: ::nl_item = 48;
2402 pub const ERA_T_FMT: ::nl_item = 49;
2403 pub const RADIXCHAR: ::nl_item = 51;
2404 pub const THOUSEP: ::nl_item = 52;
2405 pub const YESEXPR: ::nl_item = 53;
2406 pub const NOEXPR: ::nl_item = 54;
2407 pub const F_GETOWN: ::c_int = 35;
2408 
2409 pub const FIONBIO: ::c_int = -2147195266;
2410 pub const FIOASYNC: ::c_int = -2147195267;
2411 pub const FIOCLEX: ::c_int = 26113;
2412 pub const FIOGETOWN: ::c_int = 1074030203;
2413 pub const FIONCLEX: ::c_int = 26114;
2414 pub const FIONREAD: ::c_int = 1074030207;
2415 pub const FIONSPACE: ::c_int = 1074030200;
2416 pub const FIONWRITE: ::c_int = 1074030201;
2417 pub const FIOSETOWN: ::c_int = -2147195268;
2418 
2419 pub const F_SETOWN: ::c_int = 36;
2420 pub const IFF_ACCEPTRTADV: ::c_int = 0x40000000;
2421 pub const IFF_IP6FORWARDING: ::c_int = 0x20000000;
2422 pub const IFF_LINK0: ::c_int = 0x00001000;
2423 pub const IFF_LINK1: ::c_int = 0x00002000;
2424 pub const IFF_LINK2: ::c_int = 0x00004000;
2425 pub const IFF_OACTIVE: ::c_int = 0x00000400;
2426 pub const IFF_SHIM: ::c_int = 0x80000000;
2427 pub const IFF_SIMPLEX: ::c_int = 0x00000800;
2428 pub const IHFLOW: tcflag_t = 0x00000001;
2429 pub const IIDLE: tcflag_t = 0x00000008;
2430 pub const IP_RECVDSTADDR: ::c_int = 7;
2431 pub const IP_RECVIF: ::c_int = 20;
2432 pub const IPTOS_ECN_NOTECT: u8 = 0x00;
2433 pub const IUCLC: tcflag_t = 0x00000200;
2434 pub const IUTF8: tcflag_t = 0x0004000;
2435 
2436 pub const KERN_ARGMAX: ::c_int = 8;
2437 pub const KERN_ARND: ::c_int = 81;
2438 pub const KERN_BOOTTIME: ::c_int = 21;
2439 pub const KERN_CLOCKRATE: ::c_int = 12;
2440 pub const KERN_FILE: ::c_int = 15;
2441 pub const KERN_HOSTID: ::c_int = 11;
2442 pub const KERN_HOSTNAME: ::c_int = 10;
2443 pub const KERN_IOV_MAX: ::c_int = 38;
2444 pub const KERN_JOB_CONTROL: ::c_int = 19;
2445 pub const KERN_LOGSIGEXIT: ::c_int = 46;
2446 pub const KERN_MAXFILES: ::c_int = 7;
2447 pub const KERN_MAXID: ::c_int = 83;
2448 pub const KERN_MAXPROC: ::c_int = 6;
2449 pub const KERN_MAXVNODES: ::c_int = 5;
2450 pub const KERN_NGROUPS: ::c_int = 18;
2451 pub const KERN_OSRELEASE: ::c_int = 2;
2452 pub const KERN_OSREV: ::c_int = 3;
2453 pub const KERN_OSTYPE: ::c_int = 1;
2454 pub const KERN_POSIX1: ::c_int = 17;
2455 pub const KERN_PROC: ::c_int = 14;
2456 pub const KERN_PROC_ALL: ::c_int = 0;
2457 pub const KERN_PROC_ARGS: ::c_int = 48;
2458 pub const KERN_PROC_ENV: ::c_int = 3;
2459 pub const KERN_PROC_GID: ::c_int = 7;
2460 pub const KERN_PROC_PGRP: ::c_int = 2;
2461 pub const KERN_PROC_PID: ::c_int = 1;
2462 pub const KERN_PROC_RGID: ::c_int = 8;
2463 pub const KERN_PROC_RUID: ::c_int = 6;
2464 pub const KERN_PROC_SESSION: ::c_int = 3;
2465 pub const KERN_PROC_TTY: ::c_int = 4;
2466 pub const KERN_PROC_UID: ::c_int = 5;
2467 pub const KERN_PROF: ::c_int = 16;
2468 pub const KERN_SAVED_IDS: ::c_int = 20;
2469 pub const KERN_SECURELVL: ::c_int = 9;
2470 pub const KERN_VERSION: ::c_int = 4;
2471 pub const KERN_VNODE: ::c_int = 13;
2472 
2473 pub const LC_ALL: ::c_int = 63;
2474 pub const LC_COLLATE: ::c_int = 1;
2475 pub const LC_CTYPE: ::c_int = 2;
2476 pub const LC_MESSAGES: ::c_int = 32;
2477 pub const LC_MONETARY: ::c_int = 4;
2478 pub const LC_NUMERIC: ::c_int = 8;
2479 pub const LC_TIME: ::c_int = 16;
2480 
2481 pub const LOCAL_CONNWAIT: ::c_int = 0x0002;
2482 pub const LOCAL_CREDS: ::c_int = 0x0001;
2483 pub const LOCAL_PEEREID: ::c_int = 0x0003;
2484 
2485 pub const MAP_STACK: ::c_int = 0x00001000;
2486 pub const MNT_NOEXEC: ::c_int = 0x02;
2487 pub const MNT_NOSUID: ::c_int = 0x04;
2488 pub const MNT_RDONLY: ::c_int = 0x01;
2489 
2490 pub const MSG_NOTIFICATION: ::c_int = 0x0400;
2491 
2492 pub const NET_RT_DUMP: ::c_int = 1;
2493 pub const NET_RT_FLAGS: ::c_int = 2;
2494 pub const NET_RT_IFLIST: ::c_int = 4;
2495 pub const NI_NUMERICSCOPE: ::c_int = 0x00000040;
2496 pub const OHFLOW: tcflag_t = 0x00000002;
2497 pub const P_ALL: idtype_t = 0;
2498 pub const PARSTK: tcflag_t = 0x00000004;
2499 pub const PF_ARP: ::c_int = 28;
2500 pub const PF_CCITT: ::c_int = 10;
2501 pub const PF_CHAOS: ::c_int = 5;
2502 pub const PF_CNT: ::c_int = 21;
2503 pub const PF_COIP: ::c_int = 20;
2504 pub const PF_DATAKIT: ::c_int = 9;
2505 pub const PF_DECnet: ::c_int = 12;
2506 pub const PF_DLI: ::c_int = 13;
2507 pub const PF_ECMA: ::c_int = 8;
2508 pub const PF_HYLINK: ::c_int = 15;
2509 pub const PF_IMPLINK: ::c_int = 3;
2510 pub const PF_ISO: ::c_int = 7;
2511 pub const PF_LAT: ::c_int = 14;
2512 pub const PF_LINK: ::c_int = 18;
2513 pub const PF_NATM: ::c_int = 27;
2514 pub const PF_OSI: ::c_int = 7;
2515 pub const PF_PIP: ::c_int = 25;
2516 pub const PF_PUP: ::c_int = 4;
2517 pub const PF_RTIP: ::c_int = 22;
2518 pub const PF_XTP: ::c_int = 19;
2519 pub const PM_STR: ::nl_item = 7;
2520 pub const POSIX_MADV_DONTNEED: ::c_int = 4;
2521 pub const POSIX_MADV_NORMAL: ::c_int = 0;
2522 pub const POSIX_MADV_RANDOM: ::c_int = 2;
2523 pub const POSIX_MADV_SEQUENTIAL: ::c_int = 1;
2524 pub const POSIX_MADV_WILLNEED: ::c_int = 3;
2525 pub const _POSIX_VDISABLE: ::c_int = 0;
2526 pub const P_PGID: idtype_t = 2;
2527 pub const P_PID: idtype_t = 1;
2528 pub const PRIO_PGRP: ::c_int = 1;
2529 pub const PRIO_PROCESS: ::c_int = 0;
2530 pub const PRIO_USER: ::c_int = 2;
2531 pub const pseudo_AF_HDRCMPLT: ::c_int = 30;
2532 pub const pseudo_AF_PIP: ::c_int = 25;
2533 pub const pseudo_AF_RTIP: ::c_int = 22;
2534 pub const pseudo_AF_XTP: ::c_int = 19;
2535 pub const REG_ASSERT: ::c_int = 15;
2536 pub const REG_ATOI: ::c_int = 255;
2537 pub const REG_BACKR: ::c_int = 0x400;
2538 pub const REG_BASIC: ::c_int = 0x00;
2539 pub const REG_DUMP: ::c_int = 0x80;
2540 pub const REG_EMPTY: ::c_int = 14;
2541 pub const REG_INVARG: ::c_int = 16;
2542 pub const REG_ITOA: ::c_int = 0o400;
2543 pub const REG_LARGE: ::c_int = 0x200;
2544 pub const REG_NOSPEC: ::c_int = 0x10;
2545 pub const REG_OK: ::c_int = 0;
2546 pub const REG_PEND: ::c_int = 0x20;
2547 pub const REG_TRACE: ::c_int = 0x100;
2548 
2549 pub const RLIMIT_AS: ::c_int = 6;
2550 pub const RLIMIT_CORE: ::c_int = 4;
2551 pub const RLIMIT_CPU: ::c_int = 0;
2552 pub const RLIMIT_DATA: ::c_int = 2;
2553 pub const RLIMIT_FSIZE: ::c_int = 1;
2554 pub const RLIMIT_MEMLOCK: ::c_int = 7;
2555 pub const RLIMIT_NOFILE: ::c_int = 5;
2556 pub const RLIMIT_NPROC: ::c_int = 8;
2557 pub const RLIMIT_RSS: ::c_int = 6;
2558 pub const RLIMIT_STACK: ::c_int = 3;
2559 pub const RLIMIT_VMEM: ::c_int = 6;
2560 #[deprecated(since = "0.2.64", note = "Not stable across OS versions")]
2561 pub const RLIM_NLIMITS: ::c_int = 14;
2562 
2563 pub const SCHED_ADJTOHEAD: ::c_int = 5;
2564 pub const SCHED_ADJTOTAIL: ::c_int = 6;
2565 pub const SCHED_MAXPOLICY: ::c_int = 7;
2566 pub const SCHED_SETPRIO: ::c_int = 7;
2567 pub const SCHED_SPORADIC: ::c_int = 4;
2568 
2569 pub const SHM_ANON: *mut ::c_char = -1isize as *mut ::c_char;
2570 pub const SIGCLD: ::c_int = SIGCHLD;
2571 pub const SIGDEADLK: ::c_int = 7;
2572 pub const SIGEMT: ::c_int = 7;
2573 pub const SIGEV_NONE: ::c_int = 0;
2574 pub const SIGEV_SIGNAL: ::c_int = 129;
2575 pub const SIGEV_THREAD: ::c_int = 135;
2576 pub const SIOCGIFADDR: ::c_int = -1064277727;
2577 pub const SO_FIB: ::c_int = 0x100a;
2578 pub const SO_OVERFLOWED: ::c_int = 0x1009;
2579 pub const SO_SETFIB: ::c_int = 0x100a;
2580 pub const SO_TXPRIO: ::c_int = 0x100b;
2581 pub const SO_USELOOPBACK: ::c_int = 0x0040;
2582 pub const SO_VLANPRIO: ::c_int = 0x100c;
2583 pub const _SS_ALIGNSIZE: usize = ::mem::size_of::<i64>();
2584 pub const _SS_MAXSIZE: usize = 128;
2585 pub const _SS_PAD1SIZE: usize = _SS_ALIGNSIZE - 2;
2586 pub const _SS_PAD2SIZE: usize = _SS_MAXSIZE - 2 - _SS_PAD1SIZE - _SS_ALIGNSIZE;
2587 pub const TC_CPOSIX: tcflag_t = CLOCAL | CREAD | CSIZE | CSTOPB | HUPCL | PARENB | PARODD;
2588 pub const TCGETS: ::c_int = 0x404c540d;
2589 pub const TC_IPOSIX: tcflag_t =
2590     BRKINT | ICRNL | IGNBRK | IGNPAR | INLCR | INPCK | ISTRIP | IXOFF | IXON | PARMRK;
2591 pub const TC_LPOSIX: tcflag_t =
2592     ECHO | ECHOE | ECHOK | ECHONL | ICANON | IEXTEN | ISIG | NOFLSH | TOSTOP;
2593 pub const TC_OPOSIX: tcflag_t = OPOST;
2594 pub const T_FMT_AMPM: ::nl_item = 5;
2595 
2596 pub const TIOCCBRK: ::c_int = 29818;
2597 pub const TIOCCDTR: ::c_int = 29816;
2598 pub const TIOCDRAIN: ::c_int = 29790;
2599 pub const TIOCEXCL: ::c_int = 29709;
2600 pub const TIOCFLUSH: ::c_int = -2147191792;
2601 pub const TIOCGETA: ::c_int = 1078752275;
2602 pub const TIOCGPGRP: ::c_int = 1074033783;
2603 pub const TIOCGWINSZ: ::c_int = 1074295912;
2604 pub const TIOCMBIC: ::c_int = -2147191701;
2605 pub const TIOCMBIS: ::c_int = -2147191700;
2606 pub const TIOCMGET: ::c_int = 1074033770;
2607 pub const TIOCMSET: ::c_int = -2147191699;
2608 pub const TIOCNOTTY: ::c_int = 29809;
2609 pub const TIOCNXCL: ::c_int = 29710;
2610 pub const TIOCOUTQ: ::c_int = 1074033779;
2611 pub const TIOCPKT: ::c_int = -2147191696;
2612 pub const TIOCPKT_DATA: ::c_int = 0x00;
2613 pub const TIOCPKT_DOSTOP: ::c_int = 0x20;
2614 pub const TIOCPKT_FLUSHREAD: ::c_int = 0x01;
2615 pub const TIOCPKT_FLUSHWRITE: ::c_int = 0x02;
2616 pub const TIOCPKT_IOCTL: ::c_int = 0x40;
2617 pub const TIOCPKT_NOSTOP: ::c_int = 0x10;
2618 pub const TIOCPKT_START: ::c_int = 0x08;
2619 pub const TIOCPKT_STOP: ::c_int = 0x04;
2620 pub const TIOCSBRK: ::c_int = 29819;
2621 pub const TIOCSCTTY: ::c_int = 29793;
2622 pub const TIOCSDTR: ::c_int = 29817;
2623 pub const TIOCSETA: ::c_int = -2142473196;
2624 pub const TIOCSETAF: ::c_int = -2142473194;
2625 pub const TIOCSETAW: ::c_int = -2142473195;
2626 pub const TIOCSPGRP: ::c_int = -2147191690;
2627 pub const TIOCSTART: ::c_int = 29806;
2628 pub const TIOCSTI: ::c_int = -2147388302;
2629 pub const TIOCSTOP: ::c_int = 29807;
2630 pub const TIOCSWINSZ: ::c_int = -2146929561;
2631 
2632 pub const USER_CS_PATH: ::c_int = 1;
2633 pub const USER_BC_BASE_MAX: ::c_int = 2;
2634 pub const USER_BC_DIM_MAX: ::c_int = 3;
2635 pub const USER_BC_SCALE_MAX: ::c_int = 4;
2636 pub const USER_BC_STRING_MAX: ::c_int = 5;
2637 pub const USER_COLL_WEIGHTS_MAX: ::c_int = 6;
2638 pub const USER_EXPR_NEST_MAX: ::c_int = 7;
2639 pub const USER_LINE_MAX: ::c_int = 8;
2640 pub const USER_RE_DUP_MAX: ::c_int = 9;
2641 pub const USER_POSIX2_VERSION: ::c_int = 10;
2642 pub const USER_POSIX2_C_BIND: ::c_int = 11;
2643 pub const USER_POSIX2_C_DEV: ::c_int = 12;
2644 pub const USER_POSIX2_CHAR_TERM: ::c_int = 13;
2645 pub const USER_POSIX2_FORT_DEV: ::c_int = 14;
2646 pub const USER_POSIX2_FORT_RUN: ::c_int = 15;
2647 pub const USER_POSIX2_LOCALEDEF: ::c_int = 16;
2648 pub const USER_POSIX2_SW_DEV: ::c_int = 17;
2649 pub const USER_POSIX2_UPE: ::c_int = 18;
2650 pub const USER_STREAM_MAX: ::c_int = 19;
2651 pub const USER_TZNAME_MAX: ::c_int = 20;
2652 pub const USER_ATEXIT_MAX: ::c_int = 21;
2653 pub const USER_MAXID: ::c_int = 22;
2654 
2655 pub const VDOWN: usize = 31;
2656 pub const VINS: usize = 32;
2657 pub const VDEL: usize = 33;
2658 pub const VRUB: usize = 34;
2659 pub const VCAN: usize = 35;
2660 pub const VHOME: usize = 36;
2661 pub const VEND: usize = 37;
2662 pub const VSPARE3: usize = 38;
2663 pub const VSPARE4: usize = 39;
2664 pub const VSWTCH: usize = 7;
2665 pub const VDSUSP: usize = 11;
2666 pub const VFWD: usize = 18;
2667 pub const VLOGIN: usize = 19;
2668 pub const VPREFIX: usize = 20;
2669 pub const VSUFFIX: usize = 24;
2670 pub const VLEFT: usize = 28;
2671 pub const VRIGHT: usize = 29;
2672 pub const VUP: usize = 30;
2673 pub const XCASE: tcflag_t = 0x00000004;
2674 
2675 pub const PTHREAD_CREATE_JOINABLE: ::c_int = 0x00;
2676 pub const PTHREAD_CREATE_DETACHED: ::c_int = 0x01;
2677 
2678 pub const PTHREAD_MUTEX_ERRORCHECK: ::c_int = 1;
2679 pub const PTHREAD_MUTEX_RECURSIVE: ::c_int = 2;
2680 pub const PTHREAD_MUTEX_NORMAL: ::c_int = 3;
2681 pub const PTHREAD_STACK_MIN: ::size_t = 256;
2682 pub const PTHREAD_MUTEX_DEFAULT: ::c_int = 0;
2683 pub const PTHREAD_MUTEX_STALLED: ::c_int = 0x00;
2684 pub const PTHREAD_MUTEX_ROBUST: ::c_int = 0x10;
2685 pub const PTHREAD_PROCESS_PRIVATE: ::c_int = 0x00;
2686 pub const PTHREAD_PROCESS_SHARED: ::c_int = 0x01;
2687 
2688 pub const PTHREAD_KEYS_MAX: usize = 128;
2689 
2690 pub const PTHREAD_MUTEX_INITIALIZER: pthread_mutex_t = pthread_mutex_t {
2691     __u: 0x80000000,
2692     __owner: 0xffffffff,
2693 };
2694 pub const PTHREAD_COND_INITIALIZER: pthread_cond_t = pthread_cond_t {
2695     __u: CLOCK_REALTIME as u32,
2696     __owner: 0xfffffffb,
2697 };
2698 pub const PTHREAD_RWLOCK_INITIALIZER: pthread_rwlock_t = pthread_rwlock_t {
2699     __active: 0,
2700     __blockedwriters: 0,
2701     __blockedreaders: 0,
2702     __heavy: 0,
2703     __lock: PTHREAD_MUTEX_INITIALIZER,
2704     __rcond: PTHREAD_COND_INITIALIZER,
2705     __wcond: PTHREAD_COND_INITIALIZER,
2706     __owner: -2i32 as ::c_uint,
2707     __spare: 0,
2708 };
2709 
2710 const_fn! {
2711     {const} fn _CMSG_ALIGN(len: usize) -> usize {
2712         len + ::mem::size_of::<usize>() - 1 & !(::mem::size_of::<usize>() - 1)
2713     }
2714 
2715     {const} fn _ALIGN(p: usize, b: usize) -> usize {
2716         (p + b - 1) & !(b-1)
2717     }
2718 }
2719 
2720 f! {
2721     pub fn CMSG_FIRSTHDR(mhdr: *const msghdr) -> *mut cmsghdr {
2722         if (*mhdr).msg_controllen as usize >= ::mem::size_of::<cmsghdr>() {
2723             (*mhdr).msg_control as *mut cmsghdr
2724         } else {
2725             0 as *mut cmsghdr
2726         }
2727     }
2728 
2729     pub fn CMSG_NXTHDR(mhdr: *const ::msghdr, cmsg: *const ::cmsghdr)
2730         -> *mut ::cmsghdr
2731     {
2732         let msg = _CMSG_ALIGN((*cmsg).cmsg_len as usize);
2733         let next = cmsg as usize + msg + _CMSG_ALIGN(::mem::size_of::<::cmsghdr>());
2734         if next > (*mhdr).msg_control as usize + (*mhdr).msg_controllen as usize {
2735            0 as *mut ::cmsghdr
2736         } else {
2737             (cmsg as usize + msg) as *mut ::cmsghdr
2738         }
2739     }
2740 
2741     pub fn CMSG_DATA(cmsg: *const ::cmsghdr) -> *mut ::c_uchar {
2742         (cmsg as *mut ::c_uchar)
2743             .offset(_CMSG_ALIGN(::mem::size_of::<::cmsghdr>()) as isize)
2744     }
2745 
2746     pub {const} fn CMSG_LEN(length: ::c_uint) -> ::c_uint {
2747         _CMSG_ALIGN(::mem::size_of::<::cmsghdr>()) as ::c_uint + length
2748     }
2749 
2750     pub {const} fn CMSG_SPACE(length: ::c_uint) -> ::c_uint {
2751         (_CMSG_ALIGN(::mem::size_of::<cmsghdr>()) + _CMSG_ALIGN(length as usize) )
2752             as ::c_uint
2753     }
2754 
2755     pub fn FD_CLR(fd: ::c_int, set: *mut fd_set) -> () {
2756         let fd = fd as usize;
2757         let size = ::mem::size_of_val(&(*set).fds_bits[0]) * 8;
2758         (*set).fds_bits[fd / size] &= !(1 << (fd % size));
2759         return
2760     }
2761 
2762     pub fn FD_ISSET(fd: ::c_int, set: *const fd_set) -> bool {
2763         let fd = fd as usize;
2764         let size = ::mem::size_of_val(&(*set).fds_bits[0]) * 8;
2765         return ((*set).fds_bits[fd / size] & (1 << (fd % size))) != 0
2766     }
2767 
2768     pub fn FD_SET(fd: ::c_int, set: *mut fd_set) -> () {
2769         let fd = fd as usize;
2770         let size = ::mem::size_of_val(&(*set).fds_bits[0]) * 8;
2771         (*set).fds_bits[fd / size] |= 1 << (fd % size);
2772         return
2773     }
2774 
2775     pub fn FD_ZERO(set: *mut fd_set) -> () {
2776         for slot in (*set).fds_bits.iter_mut() {
2777             *slot = 0;
2778         }
2779     }
2780 
2781     pub fn _DEXTRA_FIRST(_d: *const dirent) -> *mut ::dirent_extra {
2782         let _f = &((*(_d)).d_name) as *const _;
2783         let _s = _d as usize;
2784 
2785         _ALIGN(_s + _f as usize - _s + (*_d).d_namelen as usize + 1, 8) as *mut ::dirent_extra
2786     }
2787 
2788     pub fn _DEXTRA_VALID(_x: *const ::dirent_extra, _d: *const dirent) -> bool {
2789         let sz = _x as usize - _d as usize + ::mem::size_of::<::dirent_extra>();
2790         let rsz = (*_d).d_reclen as usize;
2791 
2792         if sz > rsz || sz + (*_x).d_datalen as usize > rsz {
2793             false
2794         } else {
2795             true
2796         }
2797     }
2798 
2799     pub fn _DEXTRA_NEXT(_x: *const ::dirent_extra) -> *mut ::dirent_extra {
2800         _ALIGN(
2801             _x as usize + ::mem::size_of::<::dirent_extra>() + (*_x).d_datalen as usize, 8
2802         ) as *mut ::dirent_extra
2803     }
2804 
2805     pub fn SOCKCREDSIZE(ngrps: usize) -> usize {
2806         let ngrps = if ngrps > 0 {
2807             ngrps - 1
2808         } else {
2809             0
2810         };
2811         ::mem::size_of::<sockcred>() + ::mem::size_of::<::gid_t>() * ngrps
2812     }
2813 
2814     pub fn major(dev: ::dev_t) -> ::c_uint {
2815         ((dev as ::c_uint) >> 10) & 0x3f
2816     }
2817 
2818     pub fn minor(dev: ::dev_t) -> ::c_uint {
2819         (dev as ::c_uint) & 0x3ff
2820     }
2821 }
2822 
2823 safe_f! {
2824     pub {const} fn WIFSTOPPED(status: ::c_int) -> bool {
2825         (status & 0xff) == 0x7f
2826     }
2827 
2828     pub {const} fn WSTOPSIG(status: ::c_int) -> ::c_int {
2829         (status >> 8) & 0xff
2830     }
2831 
2832     pub {const} fn WIFCONTINUED(status: ::c_int) -> bool {
2833         status == 0xffff
2834     }
2835 
2836     pub {const} fn WIFSIGNALED(status: ::c_int) -> bool {
2837         ((status & 0x7f) + 1) as i8 >= 2
2838     }
2839 
2840     pub {const} fn WTERMSIG(status: ::c_int) -> ::c_int {
2841         status & 0x7f
2842     }
2843 
2844     pub {const} fn WIFEXITED(status: ::c_int) -> bool {
2845         (status & 0x7f) == 0
2846     }
2847 
2848     pub {const} fn WEXITSTATUS(status: ::c_int) -> ::c_int {
2849         (status >> 8) & 0xff
2850     }
2851 
2852     pub {const} fn WCOREDUMP(status: ::c_int) -> bool {
2853         (status & 0x80) != 0
2854     }
2855 
2856     pub {const} fn IPTOS_ECN(x: u8) -> u8 {
2857         x & ::IPTOS_ECN_MASK
2858     }
2859 
2860     pub {const} fn makedev(major: ::c_uint, minor: ::c_uint) -> ::dev_t {
2861         ((major << 10) | (minor)) as ::dev_t
2862     }
2863 }
2864 
2865 // Network related functions are provided by libsocket and regex
2866 // functions are provided by libregex.
2867 #[link(name = "socket")]
2868 #[link(name = "regex")]
2869 
2870 extern "C" {
sem_destroy(sem: *mut sem_t) -> ::c_int2871     pub fn sem_destroy(sem: *mut sem_t) -> ::c_int;
sem_init(sem: *mut sem_t, pshared: ::c_int, value: ::c_uint) -> ::c_int2872     pub fn sem_init(sem: *mut sem_t, pshared: ::c_int, value: ::c_uint) -> ::c_int;
fdatasync(fd: ::c_int) -> ::c_int2873     pub fn fdatasync(fd: ::c_int) -> ::c_int;
getpriority(which: ::c_int, who: ::id_t) -> ::c_int2874     pub fn getpriority(which: ::c_int, who: ::id_t) -> ::c_int;
setpriority(which: ::c_int, who: ::id_t, prio: ::c_int) -> ::c_int2875     pub fn setpriority(which: ::c_int, who: ::id_t, prio: ::c_int) -> ::c_int;
mkfifoat(dirfd: ::c_int, pathname: *const ::c_char, mode: ::mode_t) -> ::c_int2876     pub fn mkfifoat(dirfd: ::c_int, pathname: *const ::c_char, mode: ::mode_t) -> ::c_int;
mknodat( __fd: ::c_int, pathname: *const ::c_char, mode: ::mode_t, dev: ::dev_t, ) -> ::c_int2877     pub fn mknodat(
2878         __fd: ::c_int,
2879         pathname: *const ::c_char,
2880         mode: ::mode_t,
2881         dev: ::dev_t,
2882     ) -> ::c_int;
2883 
clock_getres(clk_id: ::clockid_t, tp: *mut ::timespec) -> ::c_int2884     pub fn clock_getres(clk_id: ::clockid_t, tp: *mut ::timespec) -> ::c_int;
clock_gettime(clk_id: ::clockid_t, tp: *mut ::timespec) -> ::c_int2885     pub fn clock_gettime(clk_id: ::clockid_t, tp: *mut ::timespec) -> ::c_int;
clock_settime(clk_id: ::clockid_t, tp: *const ::timespec) -> ::c_int2886     pub fn clock_settime(clk_id: ::clockid_t, tp: *const ::timespec) -> ::c_int;
clock_getcpuclockid(pid: ::pid_t, clk_id: *mut ::clockid_t) -> ::c_int2887     pub fn clock_getcpuclockid(pid: ::pid_t, clk_id: *mut ::clockid_t) -> ::c_int;
2888 
pthread_attr_getstack( attr: *const ::pthread_attr_t, stackaddr: *mut *mut ::c_void, stacksize: *mut ::size_t, ) -> ::c_int2889     pub fn pthread_attr_getstack(
2890         attr: *const ::pthread_attr_t,
2891         stackaddr: *mut *mut ::c_void,
2892         stacksize: *mut ::size_t,
2893     ) -> ::c_int;
memalign(align: ::size_t, size: ::size_t) -> *mut ::c_void2894     pub fn memalign(align: ::size_t, size: ::size_t) -> *mut ::c_void;
setgroups(ngroups: ::c_int, ptr: *const ::gid_t) -> ::c_int2895     pub fn setgroups(ngroups: ::c_int, ptr: *const ::gid_t) -> ::c_int;
2896 
posix_fadvise(fd: ::c_int, offset: ::off_t, len: ::off_t, advise: ::c_int) -> ::c_int2897     pub fn posix_fadvise(fd: ::c_int, offset: ::off_t, len: ::off_t, advise: ::c_int) -> ::c_int;
futimens(fd: ::c_int, times: *const ::timespec) -> ::c_int2898     pub fn futimens(fd: ::c_int, times: *const ::timespec) -> ::c_int;
nl_langinfo(item: ::nl_item) -> *mut ::c_char2899     pub fn nl_langinfo(item: ::nl_item) -> *mut ::c_char;
2900 
utimensat( dirfd: ::c_int, path: *const ::c_char, times: *const ::timespec, flag: ::c_int, ) -> ::c_int2901     pub fn utimensat(
2902         dirfd: ::c_int,
2903         path: *const ::c_char,
2904         times: *const ::timespec,
2905         flag: ::c_int,
2906     ) -> ::c_int;
2907 
pthread_condattr_getclock( attr: *const pthread_condattr_t, clock_id: *mut clockid_t, ) -> ::c_int2908     pub fn pthread_condattr_getclock(
2909         attr: *const pthread_condattr_t,
2910         clock_id: *mut clockid_t,
2911     ) -> ::c_int;
pthread_condattr_setclock( attr: *mut pthread_condattr_t, clock_id: ::clockid_t, ) -> ::c_int2912     pub fn pthread_condattr_setclock(
2913         attr: *mut pthread_condattr_t,
2914         clock_id: ::clockid_t,
2915     ) -> ::c_int;
pthread_condattr_setpshared(attr: *mut pthread_condattr_t, pshared: ::c_int) -> ::c_int2916     pub fn pthread_condattr_setpshared(attr: *mut pthread_condattr_t, pshared: ::c_int) -> ::c_int;
pthread_mutexattr_setpshared( attr: *mut pthread_mutexattr_t, pshared: ::c_int, ) -> ::c_int2917     pub fn pthread_mutexattr_setpshared(
2918         attr: *mut pthread_mutexattr_t,
2919         pshared: ::c_int,
2920     ) -> ::c_int;
pthread_rwlockattr_getpshared( attr: *const pthread_rwlockattr_t, val: *mut ::c_int, ) -> ::c_int2921     pub fn pthread_rwlockattr_getpshared(
2922         attr: *const pthread_rwlockattr_t,
2923         val: *mut ::c_int,
2924     ) -> ::c_int;
pthread_rwlockattr_setpshared(attr: *mut pthread_rwlockattr_t, val: ::c_int) -> ::c_int2925     pub fn pthread_rwlockattr_setpshared(attr: *mut pthread_rwlockattr_t, val: ::c_int) -> ::c_int;
ptsname_r(fd: ::c_int, buf: *mut ::c_char, buflen: ::size_t) -> *mut ::c_char2926     pub fn ptsname_r(fd: ::c_int, buf: *mut ::c_char, buflen: ::size_t) -> *mut ::c_char;
clearenv() -> ::c_int2927     pub fn clearenv() -> ::c_int;
waitid(idtype: idtype_t, id: id_t, infop: *mut ::siginfo_t, options: ::c_int) -> ::c_int2928     pub fn waitid(idtype: idtype_t, id: id_t, infop: *mut ::siginfo_t, options: ::c_int)
2929         -> ::c_int;
wait4( pid: ::pid_t, status: *mut ::c_int, options: ::c_int, rusage: *mut ::rusage, ) -> ::pid_t2930     pub fn wait4(
2931         pid: ::pid_t,
2932         status: *mut ::c_int,
2933         options: ::c_int,
2934         rusage: *mut ::rusage,
2935     ) -> ::pid_t;
execvpe( file: *const ::c_char, argv: *const *const ::c_char, envp: *const *const ::c_char, ) -> ::c_int2936     pub fn execvpe(
2937         file: *const ::c_char,
2938         argv: *const *const ::c_char,
2939         envp: *const *const ::c_char,
2940     ) -> ::c_int;
2941 
getifaddrs(ifap: *mut *mut ::ifaddrs) -> ::c_int2942     pub fn getifaddrs(ifap: *mut *mut ::ifaddrs) -> ::c_int;
freeifaddrs(ifa: *mut ::ifaddrs)2943     pub fn freeifaddrs(ifa: *mut ::ifaddrs);
bind(socket: ::c_int, address: *const ::sockaddr, address_len: ::socklen_t) -> ::c_int2944     pub fn bind(socket: ::c_int, address: *const ::sockaddr, address_len: ::socklen_t) -> ::c_int;
2945 
writev(fd: ::c_int, iov: *const ::iovec, iovcnt: ::c_int) -> ::ssize_t2946     pub fn writev(fd: ::c_int, iov: *const ::iovec, iovcnt: ::c_int) -> ::ssize_t;
readv(fd: ::c_int, iov: *const ::iovec, iovcnt: ::c_int) -> ::ssize_t2947     pub fn readv(fd: ::c_int, iov: *const ::iovec, iovcnt: ::c_int) -> ::ssize_t;
2948 
sendmsg(fd: ::c_int, msg: *const ::msghdr, flags: ::c_int) -> ::ssize_t2949     pub fn sendmsg(fd: ::c_int, msg: *const ::msghdr, flags: ::c_int) -> ::ssize_t;
recvmsg(fd: ::c_int, msg: *mut ::msghdr, flags: ::c_int) -> ::ssize_t2950     pub fn recvmsg(fd: ::c_int, msg: *mut ::msghdr, flags: ::c_int) -> ::ssize_t;
openpty( amaster: *mut ::c_int, aslave: *mut ::c_int, name: *mut ::c_char, termp: *mut termios, winp: *mut ::winsize, ) -> ::c_int2951     pub fn openpty(
2952         amaster: *mut ::c_int,
2953         aslave: *mut ::c_int,
2954         name: *mut ::c_char,
2955         termp: *mut termios,
2956         winp: *mut ::winsize,
2957     ) -> ::c_int;
forkpty( amaster: *mut ::c_int, name: *mut ::c_char, termp: *mut termios, winp: *mut ::winsize, ) -> ::pid_t2958     pub fn forkpty(
2959         amaster: *mut ::c_int,
2960         name: *mut ::c_char,
2961         termp: *mut termios,
2962         winp: *mut ::winsize,
2963     ) -> ::pid_t;
login_tty(fd: ::c_int) -> ::c_int2964     pub fn login_tty(fd: ::c_int) -> ::c_int;
2965 
uname(buf: *mut ::utsname) -> ::c_int2966     pub fn uname(buf: *mut ::utsname) -> ::c_int;
2967 
getpeereid(socket: ::c_int, euid: *mut ::uid_t, egid: *mut ::gid_t) -> ::c_int2968     pub fn getpeereid(socket: ::c_int, euid: *mut ::uid_t, egid: *mut ::gid_t) -> ::c_int;
2969 
strerror_r(errnum: ::c_int, buf: *mut c_char, buflen: ::size_t) -> ::c_int2970     pub fn strerror_r(errnum: ::c_int, buf: *mut c_char, buflen: ::size_t) -> ::c_int;
2971 
abs(i: ::c_int) -> ::c_int2972     pub fn abs(i: ::c_int) -> ::c_int;
labs(i: ::c_long) -> ::c_long2973     pub fn labs(i: ::c_long) -> ::c_long;
rand() -> ::c_int2974     pub fn rand() -> ::c_int;
srand(seed: ::c_uint)2975     pub fn srand(seed: ::c_uint);
2976 
setpwent()2977     pub fn setpwent();
endpwent()2978     pub fn endpwent();
getpwent() -> *mut passwd2979     pub fn getpwent() -> *mut passwd;
setgrent()2980     pub fn setgrent();
endgrent()2981     pub fn endgrent();
getgrent() -> *mut ::group2982     pub fn getgrent() -> *mut ::group;
setspent()2983     pub fn setspent();
endspent()2984     pub fn endspent();
2985 
shm_open(name: *const c_char, oflag: ::c_int, mode: mode_t) -> ::c_int2986     pub fn shm_open(name: *const c_char, oflag: ::c_int, mode: mode_t) -> ::c_int;
2987 
ftok(pathname: *const ::c_char, proj_id: ::c_int) -> ::key_t2988     pub fn ftok(pathname: *const ::c_char, proj_id: ::c_int) -> ::key_t;
mprotect(addr: *mut ::c_void, len: ::size_t, prot: ::c_int) -> ::c_int2989     pub fn mprotect(addr: *mut ::c_void, len: ::size_t, prot: ::c_int) -> ::c_int;
2990 
posix_fallocate(fd: ::c_int, offset: ::off_t, len: ::off_t) -> ::c_int2991     pub fn posix_fallocate(fd: ::c_int, offset: ::off_t, len: ::off_t) -> ::c_int;
mkostemp(template: *mut ::c_char, flags: ::c_int) -> ::c_int2992     pub fn mkostemp(template: *mut ::c_char, flags: ::c_int) -> ::c_int;
mkostemps(template: *mut ::c_char, suffixlen: ::c_int, flags: ::c_int) -> ::c_int2993     pub fn mkostemps(template: *mut ::c_char, suffixlen: ::c_int, flags: ::c_int) -> ::c_int;
sigtimedwait( set: *const sigset_t, info: *mut siginfo_t, timeout: *const ::timespec, ) -> ::c_int2994     pub fn sigtimedwait(
2995         set: *const sigset_t,
2996         info: *mut siginfo_t,
2997         timeout: *const ::timespec,
2998     ) -> ::c_int;
sigwaitinfo(set: *const sigset_t, info: *mut siginfo_t) -> ::c_int2999     pub fn sigwaitinfo(set: *const sigset_t, info: *mut siginfo_t) -> ::c_int;
pthread_setschedprio(native: ::pthread_t, priority: ::c_int) -> ::c_int3000     pub fn pthread_setschedprio(native: ::pthread_t, priority: ::c_int) -> ::c_int;
3001 
if_nameindex() -> *mut if_nameindex3002     pub fn if_nameindex() -> *mut if_nameindex;
if_freenameindex(ptr: *mut if_nameindex)3003     pub fn if_freenameindex(ptr: *mut if_nameindex);
3004 
glob( pattern: *const c_char, flags: ::c_int, errfunc: ::Option<extern "C" fn(epath: *const c_char, errno: ::c_int) -> ::c_int>, pglob: *mut ::glob_t, ) -> ::c_int3005     pub fn glob(
3006         pattern: *const c_char,
3007         flags: ::c_int,
3008         errfunc: ::Option<extern "C" fn(epath: *const c_char, errno: ::c_int) -> ::c_int>,
3009         pglob: *mut ::glob_t,
3010     ) -> ::c_int;
globfree(pglob: *mut ::glob_t)3011     pub fn globfree(pglob: *mut ::glob_t);
3012 
posix_madvise(addr: *mut ::c_void, len: ::size_t, advice: ::c_int) -> ::c_int3013     pub fn posix_madvise(addr: *mut ::c_void, len: ::size_t, advice: ::c_int) -> ::c_int;
3014 
shm_unlink(name: *const ::c_char) -> ::c_int3015     pub fn shm_unlink(name: *const ::c_char) -> ::c_int;
3016 
seekdir(dirp: *mut ::DIR, loc: ::c_long)3017     pub fn seekdir(dirp: *mut ::DIR, loc: ::c_long);
3018 
telldir(dirp: *mut ::DIR) -> ::c_long3019     pub fn telldir(dirp: *mut ::DIR) -> ::c_long;
3020 
msync(addr: *mut ::c_void, len: ::size_t, flags: ::c_int) -> ::c_int3021     pub fn msync(addr: *mut ::c_void, len: ::size_t, flags: ::c_int) -> ::c_int;
3022 
recvfrom( socket: ::c_int, buf: *mut ::c_void, len: ::size_t, flags: ::c_int, addr: *mut ::sockaddr, addrlen: *mut ::socklen_t, ) -> ::ssize_t3023     pub fn recvfrom(
3024         socket: ::c_int,
3025         buf: *mut ::c_void,
3026         len: ::size_t,
3027         flags: ::c_int,
3028         addr: *mut ::sockaddr,
3029         addrlen: *mut ::socklen_t,
3030     ) -> ::ssize_t;
mkstemps(template: *mut ::c_char, suffixlen: ::c_int) -> ::c_int3031     pub fn mkstemps(template: *mut ::c_char, suffixlen: ::c_int) -> ::c_int;
3032 
getdomainname(name: *mut ::c_char, len: ::size_t) -> ::c_int3033     pub fn getdomainname(name: *mut ::c_char, len: ::size_t) -> ::c_int;
setdomainname(name: *const ::c_char, len: ::size_t) -> ::c_int3034     pub fn setdomainname(name: *const ::c_char, len: ::size_t) -> ::c_int;
sync()3035     pub fn sync();
pthread_getschedparam( native: ::pthread_t, policy: *mut ::c_int, param: *mut ::sched_param, ) -> ::c_int3036     pub fn pthread_getschedparam(
3037         native: ::pthread_t,
3038         policy: *mut ::c_int,
3039         param: *mut ::sched_param,
3040     ) -> ::c_int;
umount(target: *const ::c_char, flags: ::c_int) -> ::c_int3041     pub fn umount(target: *const ::c_char, flags: ::c_int) -> ::c_int;
sched_get_priority_max(policy: ::c_int) -> ::c_int3042     pub fn sched_get_priority_max(policy: ::c_int) -> ::c_int;
settimeofday(tv: *const ::timeval, tz: *const ::c_void) -> ::c_int3043     pub fn settimeofday(tv: *const ::timeval, tz: *const ::c_void) -> ::c_int;
sched_rr_get_interval(pid: ::pid_t, tp: *mut ::timespec) -> ::c_int3044     pub fn sched_rr_get_interval(pid: ::pid_t, tp: *mut ::timespec) -> ::c_int;
sem_timedwait(sem: *mut sem_t, abstime: *const ::timespec) -> ::c_int3045     pub fn sem_timedwait(sem: *mut sem_t, abstime: *const ::timespec) -> ::c_int;
sem_getvalue(sem: *mut sem_t, sval: *mut ::c_int) -> ::c_int3046     pub fn sem_getvalue(sem: *mut sem_t, sval: *mut ::c_int) -> ::c_int;
sched_setparam(pid: ::pid_t, param: *const ::sched_param) -> ::c_int3047     pub fn sched_setparam(pid: ::pid_t, param: *const ::sched_param) -> ::c_int;
mount( special_device: *const ::c_char, mount_directory: *const ::c_char, flags: ::c_int, mount_type: *const ::c_char, mount_data: *const ::c_void, mount_datalen: ::c_int, ) -> ::c_int3048     pub fn mount(
3049         special_device: *const ::c_char,
3050         mount_directory: *const ::c_char,
3051         flags: ::c_int,
3052         mount_type: *const ::c_char,
3053         mount_data: *const ::c_void,
3054         mount_datalen: ::c_int,
3055     ) -> ::c_int;
sched_getparam(pid: ::pid_t, param: *mut ::sched_param) -> ::c_int3056     pub fn sched_getparam(pid: ::pid_t, param: *mut ::sched_param) -> ::c_int;
pthread_mutex_consistent(mutex: *mut pthread_mutex_t) -> ::c_int3057     pub fn pthread_mutex_consistent(mutex: *mut pthread_mutex_t) -> ::c_int;
pthread_mutex_timedlock( lock: *mut pthread_mutex_t, abstime: *const ::timespec, ) -> ::c_int3058     pub fn pthread_mutex_timedlock(
3059         lock: *mut pthread_mutex_t,
3060         abstime: *const ::timespec,
3061     ) -> ::c_int;
pthread_spin_init(lock: *mut ::pthread_spinlock_t, pshared: ::c_int) -> ::c_int3062     pub fn pthread_spin_init(lock: *mut ::pthread_spinlock_t, pshared: ::c_int) -> ::c_int;
pthread_spin_destroy(lock: *mut ::pthread_spinlock_t) -> ::c_int3063     pub fn pthread_spin_destroy(lock: *mut ::pthread_spinlock_t) -> ::c_int;
pthread_spin_lock(lock: *mut ::pthread_spinlock_t) -> ::c_int3064     pub fn pthread_spin_lock(lock: *mut ::pthread_spinlock_t) -> ::c_int;
pthread_spin_trylock(lock: *mut ::pthread_spinlock_t) -> ::c_int3065     pub fn pthread_spin_trylock(lock: *mut ::pthread_spinlock_t) -> ::c_int;
pthread_spin_unlock(lock: *mut ::pthread_spinlock_t) -> ::c_int3066     pub fn pthread_spin_unlock(lock: *mut ::pthread_spinlock_t) -> ::c_int;
pthread_barrierattr_init(__attr: *mut ::pthread_barrierattr_t) -> ::c_int3067     pub fn pthread_barrierattr_init(__attr: *mut ::pthread_barrierattr_t) -> ::c_int;
pthread_barrierattr_destroy(__attr: *mut ::pthread_barrierattr_t) -> ::c_int3068     pub fn pthread_barrierattr_destroy(__attr: *mut ::pthread_barrierattr_t) -> ::c_int;
pthread_barrierattr_getpshared( __attr: *const ::pthread_barrierattr_t, __pshared: *mut ::c_int, ) -> ::c_int3069     pub fn pthread_barrierattr_getpshared(
3070         __attr: *const ::pthread_barrierattr_t,
3071         __pshared: *mut ::c_int,
3072     ) -> ::c_int;
pthread_barrierattr_setpshared( __attr: *mut ::pthread_barrierattr_t, __pshared: ::c_int, ) -> ::c_int3073     pub fn pthread_barrierattr_setpshared(
3074         __attr: *mut ::pthread_barrierattr_t,
3075         __pshared: ::c_int,
3076     ) -> ::c_int;
pthread_barrier_init( __barrier: *mut ::pthread_barrier_t, __attr: *const ::pthread_barrierattr_t, __count: ::c_uint, ) -> ::c_int3077     pub fn pthread_barrier_init(
3078         __barrier: *mut ::pthread_barrier_t,
3079         __attr: *const ::pthread_barrierattr_t,
3080         __count: ::c_uint,
3081     ) -> ::c_int;
pthread_barrier_destroy(__barrier: *mut ::pthread_barrier_t) -> ::c_int3082     pub fn pthread_barrier_destroy(__barrier: *mut ::pthread_barrier_t) -> ::c_int;
pthread_barrier_wait(__barrier: *mut ::pthread_barrier_t) -> ::c_int3083     pub fn pthread_barrier_wait(__barrier: *mut ::pthread_barrier_t) -> ::c_int;
3084 
sched_getscheduler(pid: ::pid_t) -> ::c_int3085     pub fn sched_getscheduler(pid: ::pid_t) -> ::c_int;
clock_nanosleep( clk_id: ::clockid_t, flags: ::c_int, rqtp: *const ::timespec, rmtp: *mut ::timespec, ) -> ::c_int3086     pub fn clock_nanosleep(
3087         clk_id: ::clockid_t,
3088         flags: ::c_int,
3089         rqtp: *const ::timespec,
3090         rmtp: *mut ::timespec,
3091     ) -> ::c_int;
pthread_attr_getguardsize( attr: *const ::pthread_attr_t, guardsize: *mut ::size_t, ) -> ::c_int3092     pub fn pthread_attr_getguardsize(
3093         attr: *const ::pthread_attr_t,
3094         guardsize: *mut ::size_t,
3095     ) -> ::c_int;
pthread_attr_setguardsize(attr: *mut ::pthread_attr_t, guardsize: ::size_t) -> ::c_int3096     pub fn pthread_attr_setguardsize(attr: *mut ::pthread_attr_t, guardsize: ::size_t) -> ::c_int;
sethostname(name: *const ::c_char, len: ::size_t) -> ::c_int3097     pub fn sethostname(name: *const ::c_char, len: ::size_t) -> ::c_int;
sched_get_priority_min(policy: ::c_int) -> ::c_int3098     pub fn sched_get_priority_min(policy: ::c_int) -> ::c_int;
pthread_condattr_getpshared( attr: *const pthread_condattr_t, pshared: *mut ::c_int, ) -> ::c_int3099     pub fn pthread_condattr_getpshared(
3100         attr: *const pthread_condattr_t,
3101         pshared: *mut ::c_int,
3102     ) -> ::c_int;
pthread_setschedparam( native: ::pthread_t, policy: ::c_int, param: *const ::sched_param, ) -> ::c_int3103     pub fn pthread_setschedparam(
3104         native: ::pthread_t,
3105         policy: ::c_int,
3106         param: *const ::sched_param,
3107     ) -> ::c_int;
sched_setscheduler( pid: ::pid_t, policy: ::c_int, param: *const ::sched_param, ) -> ::c_int3108     pub fn sched_setscheduler(
3109         pid: ::pid_t,
3110         policy: ::c_int,
3111         param: *const ::sched_param,
3112     ) -> ::c_int;
sigsuspend(mask: *const ::sigset_t) -> ::c_int3113     pub fn sigsuspend(mask: *const ::sigset_t) -> ::c_int;
getgrgid_r( gid: ::gid_t, grp: *mut ::group, buf: *mut ::c_char, buflen: ::size_t, result: *mut *mut ::group, ) -> ::c_int3114     pub fn getgrgid_r(
3115         gid: ::gid_t,
3116         grp: *mut ::group,
3117         buf: *mut ::c_char,
3118         buflen: ::size_t,
3119         result: *mut *mut ::group,
3120     ) -> ::c_int;
sem_close(sem: *mut sem_t) -> ::c_int3121     pub fn sem_close(sem: *mut sem_t) -> ::c_int;
getdtablesize() -> ::c_int3122     pub fn getdtablesize() -> ::c_int;
getgrnam_r( name: *const ::c_char, grp: *mut ::group, buf: *mut ::c_char, buflen: ::size_t, result: *mut *mut ::group, ) -> ::c_int3123     pub fn getgrnam_r(
3124         name: *const ::c_char,
3125         grp: *mut ::group,
3126         buf: *mut ::c_char,
3127         buflen: ::size_t,
3128         result: *mut *mut ::group,
3129     ) -> ::c_int;
initgroups(user: *const ::c_char, group: ::gid_t) -> ::c_int3130     pub fn initgroups(user: *const ::c_char, group: ::gid_t) -> ::c_int;
pthread_sigmask(how: ::c_int, set: *const sigset_t, oldset: *mut sigset_t) -> ::c_int3131     pub fn pthread_sigmask(how: ::c_int, set: *const sigset_t, oldset: *mut sigset_t) -> ::c_int;
sem_open(name: *const ::c_char, oflag: ::c_int, ...) -> *mut sem_t3132     pub fn sem_open(name: *const ::c_char, oflag: ::c_int, ...) -> *mut sem_t;
getgrnam(name: *const ::c_char) -> *mut ::group3133     pub fn getgrnam(name: *const ::c_char) -> *mut ::group;
pthread_cancel(thread: ::pthread_t) -> ::c_int3134     pub fn pthread_cancel(thread: ::pthread_t) -> ::c_int;
pthread_kill(thread: ::pthread_t, sig: ::c_int) -> ::c_int3135     pub fn pthread_kill(thread: ::pthread_t, sig: ::c_int) -> ::c_int;
sem_unlink(name: *const ::c_char) -> ::c_int3136     pub fn sem_unlink(name: *const ::c_char) -> ::c_int;
daemon(nochdir: ::c_int, noclose: ::c_int) -> ::c_int3137     pub fn daemon(nochdir: ::c_int, noclose: ::c_int) -> ::c_int;
getpwnam_r( name: *const ::c_char, pwd: *mut passwd, buf: *mut ::c_char, buflen: ::size_t, result: *mut *mut passwd, ) -> ::c_int3138     pub fn getpwnam_r(
3139         name: *const ::c_char,
3140         pwd: *mut passwd,
3141         buf: *mut ::c_char,
3142         buflen: ::size_t,
3143         result: *mut *mut passwd,
3144     ) -> ::c_int;
getpwuid_r( uid: ::uid_t, pwd: *mut passwd, buf: *mut ::c_char, buflen: ::size_t, result: *mut *mut passwd, ) -> ::c_int3145     pub fn getpwuid_r(
3146         uid: ::uid_t,
3147         pwd: *mut passwd,
3148         buf: *mut ::c_char,
3149         buflen: ::size_t,
3150         result: *mut *mut passwd,
3151     ) -> ::c_int;
sigwait(set: *const sigset_t, sig: *mut ::c_int) -> ::c_int3152     pub fn sigwait(set: *const sigset_t, sig: *mut ::c_int) -> ::c_int;
pthread_atfork( prepare: ::Option<unsafe extern "C" fn()>, parent: ::Option<unsafe extern "C" fn()>, child: ::Option<unsafe extern "C" fn()>, ) -> ::c_int3153     pub fn pthread_atfork(
3154         prepare: ::Option<unsafe extern "C" fn()>,
3155         parent: ::Option<unsafe extern "C" fn()>,
3156         child: ::Option<unsafe extern "C" fn()>,
3157     ) -> ::c_int;
getgrgid(gid: ::gid_t) -> *mut ::group3158     pub fn getgrgid(gid: ::gid_t) -> *mut ::group;
getgrouplist( user: *const ::c_char, group: ::gid_t, groups: *mut ::gid_t, ngroups: *mut ::c_int, ) -> ::c_int3159     pub fn getgrouplist(
3160         user: *const ::c_char,
3161         group: ::gid_t,
3162         groups: *mut ::gid_t,
3163         ngroups: *mut ::c_int,
3164     ) -> ::c_int;
pthread_mutexattr_getpshared( attr: *const pthread_mutexattr_t, pshared: *mut ::c_int, ) -> ::c_int3165     pub fn pthread_mutexattr_getpshared(
3166         attr: *const pthread_mutexattr_t,
3167         pshared: *mut ::c_int,
3168     ) -> ::c_int;
pthread_mutexattr_getrobust( attr: *const pthread_mutexattr_t, robustness: *mut ::c_int, ) -> ::c_int3169     pub fn pthread_mutexattr_getrobust(
3170         attr: *const pthread_mutexattr_t,
3171         robustness: *mut ::c_int,
3172     ) -> ::c_int;
pthread_mutexattr_setrobust( attr: *mut pthread_mutexattr_t, robustness: ::c_int, ) -> ::c_int3173     pub fn pthread_mutexattr_setrobust(
3174         attr: *mut pthread_mutexattr_t,
3175         robustness: ::c_int,
3176     ) -> ::c_int;
pthread_create( native: *mut ::pthread_t, attr: *const ::pthread_attr_t, f: extern "C" fn(*mut ::c_void) -> *mut ::c_void, value: *mut ::c_void, ) -> ::c_int3177     pub fn pthread_create(
3178         native: *mut ::pthread_t,
3179         attr: *const ::pthread_attr_t,
3180         f: extern "C" fn(*mut ::c_void) -> *mut ::c_void,
3181         value: *mut ::c_void,
3182     ) -> ::c_int;
getitimer(which: ::c_int, curr_value: *mut ::itimerval) -> ::c_int3183     pub fn getitimer(which: ::c_int, curr_value: *mut ::itimerval) -> ::c_int;
setitimer( which: ::c_int, value: *const ::itimerval, ovalue: *mut ::itimerval, ) -> ::c_int3184     pub fn setitimer(
3185         which: ::c_int,
3186         value: *const ::itimerval,
3187         ovalue: *mut ::itimerval,
3188     ) -> ::c_int;
posix_spawn( pid: *mut ::pid_t, path: *const ::c_char, file_actions: *const ::posix_spawn_file_actions_t, attrp: *const ::posix_spawnattr_t, argv: *const *mut ::c_char, envp: *const *mut ::c_char, ) -> ::c_int3189     pub fn posix_spawn(
3190         pid: *mut ::pid_t,
3191         path: *const ::c_char,
3192         file_actions: *const ::posix_spawn_file_actions_t,
3193         attrp: *const ::posix_spawnattr_t,
3194         argv: *const *mut ::c_char,
3195         envp: *const *mut ::c_char,
3196     ) -> ::c_int;
posix_spawnp( pid: *mut ::pid_t, file: *const ::c_char, file_actions: *const ::posix_spawn_file_actions_t, attrp: *const ::posix_spawnattr_t, argv: *const *mut ::c_char, envp: *const *mut ::c_char, ) -> ::c_int3197     pub fn posix_spawnp(
3198         pid: *mut ::pid_t,
3199         file: *const ::c_char,
3200         file_actions: *const ::posix_spawn_file_actions_t,
3201         attrp: *const ::posix_spawnattr_t,
3202         argv: *const *mut ::c_char,
3203         envp: *const *mut ::c_char,
3204     ) -> ::c_int;
posix_spawnattr_init(attr: *mut posix_spawnattr_t) -> ::c_int3205     pub fn posix_spawnattr_init(attr: *mut posix_spawnattr_t) -> ::c_int;
posix_spawnattr_destroy(attr: *mut posix_spawnattr_t) -> ::c_int3206     pub fn posix_spawnattr_destroy(attr: *mut posix_spawnattr_t) -> ::c_int;
posix_spawnattr_getsigdefault( attr: *const posix_spawnattr_t, default: *mut ::sigset_t, ) -> ::c_int3207     pub fn posix_spawnattr_getsigdefault(
3208         attr: *const posix_spawnattr_t,
3209         default: *mut ::sigset_t,
3210     ) -> ::c_int;
posix_spawnattr_setsigdefault( attr: *mut posix_spawnattr_t, default: *const ::sigset_t, ) -> ::c_int3211     pub fn posix_spawnattr_setsigdefault(
3212         attr: *mut posix_spawnattr_t,
3213         default: *const ::sigset_t,
3214     ) -> ::c_int;
posix_spawnattr_getsigmask( attr: *const posix_spawnattr_t, default: *mut ::sigset_t, ) -> ::c_int3215     pub fn posix_spawnattr_getsigmask(
3216         attr: *const posix_spawnattr_t,
3217         default: *mut ::sigset_t,
3218     ) -> ::c_int;
posix_spawnattr_setsigmask( attr: *mut posix_spawnattr_t, default: *const ::sigset_t, ) -> ::c_int3219     pub fn posix_spawnattr_setsigmask(
3220         attr: *mut posix_spawnattr_t,
3221         default: *const ::sigset_t,
3222     ) -> ::c_int;
posix_spawnattr_getflags( attr: *const posix_spawnattr_t, flags: *mut ::c_short, ) -> ::c_int3223     pub fn posix_spawnattr_getflags(
3224         attr: *const posix_spawnattr_t,
3225         flags: *mut ::c_short,
3226     ) -> ::c_int;
posix_spawnattr_setflags(attr: *mut posix_spawnattr_t, flags: ::c_short) -> ::c_int3227     pub fn posix_spawnattr_setflags(attr: *mut posix_spawnattr_t, flags: ::c_short) -> ::c_int;
posix_spawnattr_getpgroup( attr: *const posix_spawnattr_t, flags: *mut ::pid_t, ) -> ::c_int3228     pub fn posix_spawnattr_getpgroup(
3229         attr: *const posix_spawnattr_t,
3230         flags: *mut ::pid_t,
3231     ) -> ::c_int;
posix_spawnattr_setpgroup(attr: *mut posix_spawnattr_t, flags: ::pid_t) -> ::c_int3232     pub fn posix_spawnattr_setpgroup(attr: *mut posix_spawnattr_t, flags: ::pid_t) -> ::c_int;
posix_spawnattr_getschedpolicy( attr: *const posix_spawnattr_t, flags: *mut ::c_int, ) -> ::c_int3233     pub fn posix_spawnattr_getschedpolicy(
3234         attr: *const posix_spawnattr_t,
3235         flags: *mut ::c_int,
3236     ) -> ::c_int;
posix_spawnattr_setschedpolicy(attr: *mut posix_spawnattr_t, flags: ::c_int) -> ::c_int3237     pub fn posix_spawnattr_setschedpolicy(attr: *mut posix_spawnattr_t, flags: ::c_int) -> ::c_int;
posix_spawnattr_getschedparam( attr: *const posix_spawnattr_t, param: *mut ::sched_param, ) -> ::c_int3238     pub fn posix_spawnattr_getschedparam(
3239         attr: *const posix_spawnattr_t,
3240         param: *mut ::sched_param,
3241     ) -> ::c_int;
posix_spawnattr_setschedparam( attr: *mut posix_spawnattr_t, param: *const ::sched_param, ) -> ::c_int3242     pub fn posix_spawnattr_setschedparam(
3243         attr: *mut posix_spawnattr_t,
3244         param: *const ::sched_param,
3245     ) -> ::c_int;
3246 
posix_spawn_file_actions_init(actions: *mut posix_spawn_file_actions_t) -> ::c_int3247     pub fn posix_spawn_file_actions_init(actions: *mut posix_spawn_file_actions_t) -> ::c_int;
posix_spawn_file_actions_destroy(actions: *mut posix_spawn_file_actions_t) -> ::c_int3248     pub fn posix_spawn_file_actions_destroy(actions: *mut posix_spawn_file_actions_t) -> ::c_int;
posix_spawn_file_actions_addopen( actions: *mut posix_spawn_file_actions_t, fd: ::c_int, path: *const ::c_char, oflag: ::c_int, mode: ::mode_t, ) -> ::c_int3249     pub fn posix_spawn_file_actions_addopen(
3250         actions: *mut posix_spawn_file_actions_t,
3251         fd: ::c_int,
3252         path: *const ::c_char,
3253         oflag: ::c_int,
3254         mode: ::mode_t,
3255     ) -> ::c_int;
posix_spawn_file_actions_addclose( actions: *mut posix_spawn_file_actions_t, fd: ::c_int, ) -> ::c_int3256     pub fn posix_spawn_file_actions_addclose(
3257         actions: *mut posix_spawn_file_actions_t,
3258         fd: ::c_int,
3259     ) -> ::c_int;
posix_spawn_file_actions_adddup2( actions: *mut posix_spawn_file_actions_t, fd: ::c_int, newfd: ::c_int, ) -> ::c_int3260     pub fn posix_spawn_file_actions_adddup2(
3261         actions: *mut posix_spawn_file_actions_t,
3262         fd: ::c_int,
3263         newfd: ::c_int,
3264     ) -> ::c_int;
popen(command: *const c_char, mode: *const c_char) -> *mut ::FILE3265     pub fn popen(command: *const c_char, mode: *const c_char) -> *mut ::FILE;
faccessat( dirfd: ::c_int, pathname: *const ::c_char, mode: ::c_int, flags: ::c_int, ) -> ::c_int3266     pub fn faccessat(
3267         dirfd: ::c_int,
3268         pathname: *const ::c_char,
3269         mode: ::c_int,
3270         flags: ::c_int,
3271     ) -> ::c_int;
inotify_rm_watch(fd: ::c_int, wd: ::c_int) -> ::c_int3272     pub fn inotify_rm_watch(fd: ::c_int, wd: ::c_int) -> ::c_int;
inotify_init() -> ::c_int3273     pub fn inotify_init() -> ::c_int;
inotify_add_watch(fd: ::c_int, path: *const ::c_char, mask: u32) -> ::c_int3274     pub fn inotify_add_watch(fd: ::c_int, path: *const ::c_char, mask: u32) -> ::c_int;
3275 
gettid() -> ::pid_t3276     pub fn gettid() -> ::pid_t;
3277 
pthread_getcpuclockid(thread: ::pthread_t, clk_id: *mut ::clockid_t) -> ::c_int3278     pub fn pthread_getcpuclockid(thread: ::pthread_t, clk_id: *mut ::clockid_t) -> ::c_int;
3279 
getnameinfo( sa: *const ::sockaddr, salen: ::socklen_t, host: *mut ::c_char, hostlen: ::socklen_t, serv: *mut ::c_char, servlen: ::socklen_t, flags: ::c_int, ) -> ::c_int3280     pub fn getnameinfo(
3281         sa: *const ::sockaddr,
3282         salen: ::socklen_t,
3283         host: *mut ::c_char,
3284         hostlen: ::socklen_t,
3285         serv: *mut ::c_char,
3286         servlen: ::socklen_t,
3287         flags: ::c_int,
3288     ) -> ::c_int;
3289 
sendmmsg( sockfd: ::c_int, msgvec: *mut ::mmsghdr, vlen: ::c_uint, flags: ::c_uint, ) -> ::c_int3290     pub fn sendmmsg(
3291         sockfd: ::c_int,
3292         msgvec: *mut ::mmsghdr,
3293         vlen: ::c_uint,
3294         flags: ::c_uint,
3295     ) -> ::c_int;
recvmmsg( sockfd: ::c_int, msgvec: *mut ::mmsghdr, vlen: ::c_uint, flags: ::c_uint, timeout: *mut ::timespec, ) -> ::c_int3296     pub fn recvmmsg(
3297         sockfd: ::c_int,
3298         msgvec: *mut ::mmsghdr,
3299         vlen: ::c_uint,
3300         flags: ::c_uint,
3301         timeout: *mut ::timespec,
3302     ) -> ::c_int;
3303 
mallopt(param: ::c_int, value: i64) -> ::c_int3304     pub fn mallopt(param: ::c_int, value: i64) -> ::c_int;
gettimeofday(tp: *mut ::timeval, tz: *mut ::c_void) -> ::c_int3305     pub fn gettimeofday(tp: *mut ::timeval, tz: *mut ::c_void) -> ::c_int;
3306 
ctermid(s: *mut ::c_char) -> *mut ::c_char3307     pub fn ctermid(s: *mut ::c_char) -> *mut ::c_char;
ioctl(fd: ::c_int, request: ::c_int, ...) -> ::c_int3308     pub fn ioctl(fd: ::c_int, request: ::c_int, ...) -> ::c_int;
3309 
mallinfo() -> ::mallinfo3310     pub fn mallinfo() -> ::mallinfo;
getpwent_r( pwd: *mut ::passwd, buf: *mut ::c_char, __bufsize: ::c_int, __result: *mut *mut ::passwd, ) -> ::c_int3311     pub fn getpwent_r(
3312         pwd: *mut ::passwd,
3313         buf: *mut ::c_char,
3314         __bufsize: ::c_int,
3315         __result: *mut *mut ::passwd,
3316     ) -> ::c_int;
pthread_getname_np(thread: ::pthread_t, name: *mut ::c_char, len: ::c_int) -> ::c_int3317     pub fn pthread_getname_np(thread: ::pthread_t, name: *mut ::c_char, len: ::c_int) -> ::c_int;
pthread_setname_np(thread: ::pthread_t, name: *const ::c_char) -> ::c_int3318     pub fn pthread_setname_np(thread: ::pthread_t, name: *const ::c_char) -> ::c_int;
3319 
sysctl( _: *const ::c_int, _: ::c_uint, _: *mut ::c_void, _: *mut ::size_t, _: *const ::c_void, _: ::size_t, ) -> ::c_int3320     pub fn sysctl(
3321         _: *const ::c_int,
3322         _: ::c_uint,
3323         _: *mut ::c_void,
3324         _: *mut ::size_t,
3325         _: *const ::c_void,
3326         _: ::size_t,
3327     ) -> ::c_int;
3328 
getrlimit(resource: ::c_int, rlim: *mut ::rlimit) -> ::c_int3329     pub fn getrlimit(resource: ::c_int, rlim: *mut ::rlimit) -> ::c_int;
setrlimit(resource: ::c_int, rlp: *const ::rlimit) -> ::c_int3330     pub fn setrlimit(resource: ::c_int, rlp: *const ::rlimit) -> ::c_int;
3331 
lio_listio( __mode: ::c_int, __list: *const *mut aiocb, __nent: ::c_int, __sig: *mut sigevent, ) -> ::c_int3332     pub fn lio_listio(
3333         __mode: ::c_int,
3334         __list: *const *mut aiocb,
3335         __nent: ::c_int,
3336         __sig: *mut sigevent,
3337     ) -> ::c_int;
3338 
dl_iterate_phdr( callback: ::Option< unsafe extern "C" fn( info: *const dl_phdr_info, size: ::size_t, data: *mut ::c_void, ) -> ::c_int, >, data: *mut ::c_void, ) -> ::c_int3339     pub fn dl_iterate_phdr(
3340         callback: ::Option<
3341             unsafe extern "C" fn(
3342                 info: *const dl_phdr_info,
3343                 size: ::size_t,
3344                 data: *mut ::c_void,
3345             ) -> ::c_int,
3346         >,
3347         data: *mut ::c_void,
3348     ) -> ::c_int;
3349 
memset_s(s: *mut ::c_void, smax: ::size_t, c: ::c_int, n: ::size_t) -> ::c_int3350     pub fn memset_s(s: *mut ::c_void, smax: ::size_t, c: ::c_int, n: ::size_t) -> ::c_int;
3351 
regcomp( __preg: *mut ::regex_t, __pattern: *const ::c_char, __cflags: ::c_int, ) -> ::c_int3352     pub fn regcomp(
3353         __preg: *mut ::regex_t,
3354         __pattern: *const ::c_char,
3355         __cflags: ::c_int,
3356     ) -> ::c_int;
regexec( __preg: *const ::regex_t, __str: *const ::c_char, __nmatch: ::size_t, __pmatch: *mut ::regmatch_t, __eflags: ::c_int, ) -> ::c_int3357     pub fn regexec(
3358         __preg: *const ::regex_t,
3359         __str: *const ::c_char,
3360         __nmatch: ::size_t,
3361         __pmatch: *mut ::regmatch_t,
3362         __eflags: ::c_int,
3363     ) -> ::c_int;
regerror( __errcode: ::c_int, __preg: *const ::regex_t, __errbuf: *mut ::c_char, __errbuf_size: ::size_t, ) -> ::size_t3364     pub fn regerror(
3365         __errcode: ::c_int,
3366         __preg: *const ::regex_t,
3367         __errbuf: *mut ::c_char,
3368         __errbuf_size: ::size_t,
3369     ) -> ::size_t;
regfree(__preg: *mut ::regex_t)3370     pub fn regfree(__preg: *mut ::regex_t);
dirfd(__dirp: *mut ::DIR) -> ::c_int3371     pub fn dirfd(__dirp: *mut ::DIR) -> ::c_int;
dircntl(dir: *mut ::DIR, cmd: ::c_int, ...) -> ::c_int3372     pub fn dircntl(dir: *mut ::DIR, cmd: ::c_int, ...) -> ::c_int;
3373 
aio_cancel(__fd: ::c_int, __aiocbp: *mut ::aiocb) -> ::c_int3374     pub fn aio_cancel(__fd: ::c_int, __aiocbp: *mut ::aiocb) -> ::c_int;
aio_error(__aiocbp: *const ::aiocb) -> ::c_int3375     pub fn aio_error(__aiocbp: *const ::aiocb) -> ::c_int;
aio_fsync(__operation: ::c_int, __aiocbp: *mut ::aiocb) -> ::c_int3376     pub fn aio_fsync(__operation: ::c_int, __aiocbp: *mut ::aiocb) -> ::c_int;
aio_read(__aiocbp: *mut ::aiocb) -> ::c_int3377     pub fn aio_read(__aiocbp: *mut ::aiocb) -> ::c_int;
aio_return(__aiocpb: *mut ::aiocb) -> ::ssize_t3378     pub fn aio_return(__aiocpb: *mut ::aiocb) -> ::ssize_t;
aio_suspend( __list: *const *const ::aiocb, __nent: ::c_int, __timeout: *const ::timespec, ) -> ::c_int3379     pub fn aio_suspend(
3380         __list: *const *const ::aiocb,
3381         __nent: ::c_int,
3382         __timeout: *const ::timespec,
3383     ) -> ::c_int;
aio_write(__aiocpb: *mut ::aiocb) -> ::c_int3384     pub fn aio_write(__aiocpb: *mut ::aiocb) -> ::c_int;
3385 
mq_close(__mqdes: ::mqd_t) -> ::c_int3386     pub fn mq_close(__mqdes: ::mqd_t) -> ::c_int;
mq_getattr(__mqdes: ::mqd_t, __mqstat: *mut ::mq_attr) -> ::c_int3387     pub fn mq_getattr(__mqdes: ::mqd_t, __mqstat: *mut ::mq_attr) -> ::c_int;
mq_notify(__mqdes: ::mqd_t, __notification: *const ::sigevent) -> ::c_int3388     pub fn mq_notify(__mqdes: ::mqd_t, __notification: *const ::sigevent) -> ::c_int;
mq_open(__name: *const ::c_char, __oflag: ::c_int, ...) -> ::mqd_t3389     pub fn mq_open(__name: *const ::c_char, __oflag: ::c_int, ...) -> ::mqd_t;
mq_receive( __mqdes: ::mqd_t, __msg_ptr: *mut ::c_char, __msg_len: ::size_t, __msg_prio: *mut ::c_uint, ) -> ::ssize_t3390     pub fn mq_receive(
3391         __mqdes: ::mqd_t,
3392         __msg_ptr: *mut ::c_char,
3393         __msg_len: ::size_t,
3394         __msg_prio: *mut ::c_uint,
3395     ) -> ::ssize_t;
mq_send( __mqdes: ::mqd_t, __msg_ptr: *const ::c_char, __msg_len: ::size_t, __msg_prio: ::c_uint, ) -> ::c_int3396     pub fn mq_send(
3397         __mqdes: ::mqd_t,
3398         __msg_ptr: *const ::c_char,
3399         __msg_len: ::size_t,
3400         __msg_prio: ::c_uint,
3401     ) -> ::c_int;
mq_setattr( __mqdes: ::mqd_t, __mqstat: *const mq_attr, __omqstat: *mut mq_attr, ) -> ::c_int3402     pub fn mq_setattr(
3403         __mqdes: ::mqd_t,
3404         __mqstat: *const mq_attr,
3405         __omqstat: *mut mq_attr,
3406     ) -> ::c_int;
mq_timedreceive( __mqdes: ::mqd_t, __msg_ptr: *mut ::c_char, __msg_len: ::size_t, __msg_prio: *mut ::c_uint, __abs_timeout: *const ::timespec, ) -> ::ssize_t3407     pub fn mq_timedreceive(
3408         __mqdes: ::mqd_t,
3409         __msg_ptr: *mut ::c_char,
3410         __msg_len: ::size_t,
3411         __msg_prio: *mut ::c_uint,
3412         __abs_timeout: *const ::timespec,
3413     ) -> ::ssize_t;
mq_timedsend( __mqdes: ::mqd_t, __msg_ptr: *const ::c_char, __msg_len: ::size_t, __msg_prio: ::c_uint, __abs_timeout: *const ::timespec, ) -> ::c_int3414     pub fn mq_timedsend(
3415         __mqdes: ::mqd_t,
3416         __msg_ptr: *const ::c_char,
3417         __msg_len: ::size_t,
3418         __msg_prio: ::c_uint,
3419         __abs_timeout: *const ::timespec,
3420     ) -> ::c_int;
mq_unlink(__name: *const ::c_char) -> ::c_int3421     pub fn mq_unlink(__name: *const ::c_char) -> ::c_int;
__get_errno_ptr() -> *mut ::c_int3422     pub fn __get_errno_ptr() -> *mut ::c_int;
3423 
3424     // System page, see https://www.qnx.com/developers/docs/7.1#com.qnx.doc.neutrino.building/topic/syspage/syspage_about.html
3425     pub static mut _syspage_ptr: *mut syspage_entry;
3426 
3427     // Function on the stack after a call to pthread_create().  This is used
3428     // as a sentinel to work around an infitnite loop in the unwinding code.
__my_thread_exit(value_ptr: *mut *const ::c_void)3429     pub fn __my_thread_exit(value_ptr: *mut *const ::c_void);
3430 }
3431 
3432 // Models the implementation in stdlib.h.  Ctest will fail if trying to use the
3433 // default symbol from libc
atexit(cb: extern "C" fn()) -> ::c_int3434 pub unsafe fn atexit(cb: extern "C" fn()) -> ::c_int {
3435     extern "C" {
3436         static __dso_handle: *mut ::c_void;
3437         pub fn __cxa_atexit(
3438             cb: extern "C" fn(),
3439             __arg: *mut ::c_void,
3440             __dso: *mut ::c_void,
3441         ) -> ::c_int;
3442     }
3443     __cxa_atexit(cb, 0 as *mut ::c_void, __dso_handle)
3444 }
3445 
3446 impl siginfo_t {
si_addr(&self) -> *mut ::c_void3447     pub unsafe fn si_addr(&self) -> *mut ::c_void {
3448         #[repr(C)]
3449         struct siginfo_si_addr {
3450             _pad: [u8; 32],
3451             si_addr: *mut ::c_void,
3452         }
3453         (*(self as *const siginfo_t as *const siginfo_si_addr)).si_addr
3454     }
3455 
si_value(&self) -> ::sigval3456     pub unsafe fn si_value(&self) -> ::sigval {
3457         #[repr(C)]
3458         struct siginfo_si_value {
3459             _pad: [u8; 32],
3460             si_value: ::sigval,
3461         }
3462         (*(self as *const siginfo_t as *const siginfo_si_value)).si_value
3463     }
3464 
si_pid(&self) -> ::pid_t3465     pub unsafe fn si_pid(&self) -> ::pid_t {
3466         #[repr(C)]
3467         struct siginfo_si_pid {
3468             _pad: [u8; 16],
3469             si_pid: ::pid_t,
3470         }
3471         (*(self as *const siginfo_t as *const siginfo_si_pid)).si_pid
3472     }
3473 
si_uid(&self) -> ::uid_t3474     pub unsafe fn si_uid(&self) -> ::uid_t {
3475         #[repr(C)]
3476         struct siginfo_si_uid {
3477             _pad: [u8; 24],
3478             si_uid: ::uid_t,
3479         }
3480         (*(self as *const siginfo_t as *const siginfo_si_uid)).si_uid
3481     }
3482 
si_status(&self) -> ::c_int3483     pub unsafe fn si_status(&self) -> ::c_int {
3484         #[repr(C)]
3485         struct siginfo_si_status {
3486             _pad: [u8; 28],
3487             si_status: ::c_int,
3488         }
3489         (*(self as *const siginfo_t as *const siginfo_si_status)).si_status
3490     }
3491 }
3492 
3493 cfg_if! {
3494     if #[cfg(target_arch = "x86_64")] {
3495         mod x86_64;
3496         pub use self::x86_64::*;
3497     }
3498     else if #[cfg(target_arch = "aarch64")] {
3499         mod aarch64;
3500         pub use self::aarch64::*;
3501     }
3502     else {
3503         panic!("Unsupported arch");
3504     }
3505 }
3506 
3507 mod neutrino;
3508 pub use self::neutrino::*;
3509