1use crate::prelude::*;
7
8pub type intmax_t = i64;
11pub type uintmax_t = u64;
12
13pub type locale_t = *mut c_void;
14
15pub type size_t = usize;
16pub type ptrdiff_t = isize;
17pub type intptr_t = isize;
18pub type uintptr_t = usize;
19pub type ssize_t = isize;
20
21pub type pid_t = i32;
22pub type uid_t = u32;
23pub type gid_t = u32;
24pub type in_addr_t = u32;
25pub type in_port_t = u16;
26pub type sighandler_t = size_t;
27pub type cc_t = c_uchar;
28pub type sa_family_t = u16;
29pub type pthread_key_t = c_uint;
30pub type speed_t = c_uint;
31pub type tcflag_t = c_uint;
32pub type clockid_t = c_int;
33pub type key_t = c_int;
34pub type id_t = c_uint;
35pub type useconds_t = u32;
36pub type dev_t = u64;
37pub type socklen_t = u32;
38pub type pthread_t = c_ulong;
39pub type mode_t = u32;
40pub type ino64_t = u64;
41pub type off64_t = i64;
42pub type blkcnt64_t = i64;
43pub type rlim64_t = u64;
44pub type mqd_t = c_int;
45pub type nfds_t = c_ulong;
46pub type nl_item = c_int;
47pub type idtype_t = c_uint;
48pub type loff_t = c_longlong;
49
50pub type __u8 = c_uchar;
51pub type __u16 = c_ushort;
52pub type __s16 = c_short;
53pub type __u32 = c_uint;
54pub type __s32 = c_int;
55
56pub type Elf32_Half = u16;
57pub type Elf32_Word = u32;
58pub type Elf32_Off = u32;
59pub type Elf32_Addr = u32;
60
61pub type Elf64_Half = u16;
62pub type Elf64_Word = u32;
63pub type Elf64_Off = u64;
64pub type Elf64_Addr = u64;
65pub type Elf64_Xword = u64;
66
67pub type clock_t = c_long;
68pub type time_t = c_long;
69pub type suseconds_t = c_long;
70pub type ino_t = u64;
71pub type off_t = i64;
72pub type blkcnt_t = i64;
73
74pub type shmatt_t = c_ulong;
75pub type msgqnum_t = c_ulong;
76pub type msglen_t = c_ulong;
77pub type fsblkcnt_t = c_ulonglong;
78pub type fsfilcnt_t = c_ulonglong;
79pub type rlim_t = c_ulonglong;
80
81extern_ty! {
82 pub type timezone;
83 pub type DIR;
84 pub type fpos64_t; }
86
87unsafe impl Send for DIR {}
89unsafe impl Sync for DIR {}
90
91s! {
94 pub struct group {
95 pub gr_name: *mut c_char,
96 pub gr_passwd: *mut c_char,
97 pub gr_gid: crate::gid_t,
98 pub gr_mem: *mut *mut c_char,
99 }
100
101 pub struct utimbuf {
102 pub actime: time_t,
103 pub modtime: time_t,
104 }
105
106 #[derive(Default)]
107 pub struct timeval {
108 pub tv_sec: time_t,
109 pub tv_usec: suseconds_t,
110 }
111
112 #[derive(Default)]
113 pub struct timespec {
114 pub tv_sec: time_t,
115 pub tv_nsec: c_long,
116 }
117
118 pub struct rlimit {
121 pub rlim_cur: rlim_t,
122 pub rlim_max: rlim_t,
123 }
124
125 pub struct rusage {
126 pub ru_utime: timeval,
127 pub ru_stime: timeval,
128 pub ru_maxrss: c_long,
129 #[cfg(all(target_arch = "x86_64", target_pointer_width = "32"))]
130 __pad1: Padding<u32>,
131 pub ru_ixrss: c_long,
132 #[cfg(all(target_arch = "x86_64", target_pointer_width = "32"))]
133 __pad2: Padding<u32>,
134 pub ru_idrss: c_long,
135 #[cfg(all(target_arch = "x86_64", target_pointer_width = "32"))]
136 __pad3: Padding<u32>,
137 pub ru_isrss: c_long,
138 #[cfg(all(target_arch = "x86_64", target_pointer_width = "32"))]
139 __pad4: Padding<u32>,
140 pub ru_minflt: c_long,
141 #[cfg(all(target_arch = "x86_64", target_pointer_width = "32"))]
142 __pad5: Padding<u32>,
143 pub ru_majflt: c_long,
144 #[cfg(all(target_arch = "x86_64", target_pointer_width = "32"))]
145 __pad6: Padding<u32>,
146 pub ru_nswap: c_long,
147 #[cfg(all(target_arch = "x86_64", target_pointer_width = "32"))]
148 __pad7: Padding<u32>,
149 pub ru_inblock: c_long,
150 #[cfg(all(target_arch = "x86_64", target_pointer_width = "32"))]
151 __pad8: Padding<u32>,
152 pub ru_oublock: c_long,
153 #[cfg(all(target_arch = "x86_64", target_pointer_width = "32"))]
154 __pad9: Padding<u32>,
155 pub ru_msgsnd: c_long,
156 #[cfg(all(target_arch = "x86_64", target_pointer_width = "32"))]
157 __pad10: Padding<u32>,
158 pub ru_msgrcv: c_long,
159 #[cfg(all(target_arch = "x86_64", target_pointer_width = "32"))]
160 __pad11: Padding<u32>,
161 pub ru_nsignals: c_long,
162 #[cfg(all(target_arch = "x86_64", target_pointer_width = "32"))]
163 __pad12: Padding<u32>,
164 pub ru_nvcsw: c_long,
165 #[cfg(all(target_arch = "x86_64", target_pointer_width = "32"))]
166 __pad13: Padding<u32>,
167 pub ru_nivcsw: c_long,
168 #[cfg(all(target_arch = "x86_64", target_pointer_width = "32"))]
169 __pad14: Padding<u32>,
170 }
171
172 pub struct in_addr {
173 pub s_addr: in_addr_t,
174 }
175
176 pub struct in6_addr {
177 pub s6_addr: [u8; 16],
178 }
179
180 pub struct ip_mreq {
181 pub imr_multiaddr: in_addr,
182 pub imr_interface: in_addr,
183 }
184
185 pub struct ip_mreqn {
186 pub imr_multiaddr: in_addr,
187 pub imr_address: in_addr,
188 pub imr_ifindex: c_int,
189 }
190
191 pub struct ipv6_mreq {
192 pub ipv6mr_multiaddr: in6_addr,
193 pub ipv6mr_interface: c_uint,
194 }
195
196 pub struct hostent {
197 pub h_name: *mut c_char,
198 pub h_aliases: *mut *mut c_char,
199 pub h_addrtype: c_int,
200 pub h_length: c_int,
201 pub h_addr_list: *mut *mut c_char,
202 }
203
204 pub struct iovec {
205 pub iov_base: *mut c_void,
206 pub iov_len: size_t,
207 }
208
209 pub struct pollfd {
210 pub fd: c_int,
211 pub events: c_short,
212 pub revents: c_short,
213 }
214
215 pub struct winsize {
216 pub ws_row: c_ushort,
217 pub ws_col: c_ushort,
218 pub ws_xpixel: c_ushort,
219 pub ws_ypixel: c_ushort,
220 }
221
222 pub struct linger {
223 pub l_onoff: c_int,
224 pub l_linger: c_int,
225 }
226
227 pub struct sigval {
228 pub sival_ptr: *mut c_void,
230 }
231
232 pub struct itimerval {
234 pub it_interval: crate::timeval,
235 pub it_value: crate::timeval,
236 }
237
238 pub struct tms {
240 pub tms_utime: crate::clock_t,
241 pub tms_stime: crate::clock_t,
242 pub tms_cutime: crate::clock_t,
243 pub tms_cstime: crate::clock_t,
244 }
245
246 pub struct servent {
247 pub s_name: *mut c_char,
248 pub s_aliases: *mut *mut c_char,
249 pub s_port: c_int,
250 pub s_proto: *mut c_char,
251 }
252
253 pub struct protoent {
254 pub p_name: *mut c_char,
255 pub p_aliases: *mut *mut c_char,
256 pub p_proto: c_int,
257 }
258
259 pub struct aiocb {
260 pub aio_fildes: c_int,
261 pub aio_lio_opcode: c_int,
262 pub aio_reqprio: c_int,
263 pub aio_buf: *mut c_void,
264 pub aio_nbytes: size_t,
265 pub aio_sigevent: crate::sigevent,
266 __td: *mut c_void,
267 __lock: [c_int; 2],
268 __err: c_int,
269 __ret: ssize_t,
270 pub aio_offset: off_t,
271 __next: *mut c_void,
272 __prev: *mut c_void,
273 #[cfg(target_pointer_width = "32")]
274 __dummy4: [c_char; 24],
275 #[cfg(target_pointer_width = "64")]
276 __dummy4: [c_char; 16],
277 }
278
279 #[allow(unpredictable_function_pointer_comparisons)]
281 pub struct sigaction {
282 pub sa_sigaction: crate::sighandler_t,
283 pub sa_mask: crate::sigset_t,
284 pub sa_flags: c_int,
285 pub sa_restorer: Option<extern "C" fn()>,
286 }
287
288 pub struct termios {
289 pub c_iflag: crate::tcflag_t,
290 pub c_oflag: crate::tcflag_t,
291 pub c_cflag: crate::tcflag_t,
292 pub c_lflag: crate::tcflag_t,
293 pub c_line: crate::cc_t,
294 pub c_cc: [crate::cc_t; crate::NCCS],
295 pub __c_ispeed: crate::speed_t,
296 pub __c_ospeed: crate::speed_t,
297 }
298
299 pub struct flock {
300 pub l_type: c_short,
301 pub l_whence: c_short,
302 pub l_start: off_t,
303 pub l_len: off_t,
304 pub l_pid: crate::pid_t,
305 }
306
307 pub struct ucred {
308 pub pid: crate::pid_t,
309 pub uid: crate::uid_t,
310 pub gid: crate::gid_t,
311 }
312
313 pub struct sockaddr {
314 pub sa_family: sa_family_t,
315 pub sa_data: [c_char; 14],
316 }
317
318 pub struct sockaddr_in {
319 pub sin_family: sa_family_t,
320 pub sin_port: crate::in_port_t,
321 pub sin_addr: crate::in_addr,
322 pub sin_zero: [u8; 8],
323 }
324
325 pub struct sockaddr_in6 {
326 pub sin6_family: sa_family_t,
327 pub sin6_port: crate::in_port_t,
328 pub sin6_flowinfo: u32,
329 pub sin6_addr: crate::in6_addr,
330 pub sin6_scope_id: u32,
331 }
332
333 pub struct sockaddr_vm {
334 pub svm_family: sa_family_t,
335 svm_reserved1: Padding<c_ushort>,
336 pub svm_port: crate::in_port_t,
337 pub svm_cid: c_uint,
338 pub svm_zero: [u8; 4],
339 }
340
341 pub struct addrinfo {
342 pub ai_flags: c_int,
343 pub ai_family: c_int,
344 pub ai_socktype: c_int,
345 pub ai_protocol: c_int,
346 pub ai_addrlen: socklen_t,
347
348 pub ai_addr: *mut crate::sockaddr,
349
350 pub ai_canonname: *mut c_char,
351
352 pub ai_next: *mut addrinfo,
353 }
354
355 pub struct sockaddr_ll {
356 pub sll_family: c_ushort,
357 pub sll_protocol: c_ushort,
358 pub sll_ifindex: c_int,
359 pub sll_hatype: c_ushort,
360 pub sll_pkttype: c_uchar,
361 pub sll_halen: c_uchar,
362 pub sll_addr: [c_uchar; 8],
363 }
364
365 pub struct fd_set {
366 fds_bits: [c_ulong; FD_SETSIZE as usize / ULONG_SIZE],
367 }
368
369 pub struct tm {
370 pub tm_sec: c_int,
371 pub tm_min: c_int,
372 pub tm_hour: c_int,
373 pub tm_mday: c_int,
374 pub tm_mon: c_int,
375 pub tm_year: c_int,
376 pub tm_wday: c_int,
377 pub tm_yday: c_int,
378 pub tm_isdst: c_int,
379 pub tm_gmtoff: c_long,
380 pub tm_zone: *const c_char,
381 }
382
383 pub struct sched_param {
384 pub sched_priority: c_int,
385 pub sched_ss_low_priority: c_int,
386 pub sched_ss_repl_period: crate::timespec,
387 pub sched_ss_init_budget: crate::timespec,
388 pub sched_ss_max_repl: c_int,
389 }
390
391 pub struct Dl_info {
392 pub dli_fname: *const c_char,
393 pub dli_fbase: *mut c_void,
394 pub dli_sname: *const c_char,
395 pub dli_saddr: *mut c_void,
396 }
397
398 pub struct epoll_event {
399 pub events: u32,
400 pub u64: u64,
401 }
402
403 pub struct lconv {
404 pub decimal_point: *mut c_char,
405 pub thousands_sep: *mut c_char,
406 pub grouping: *mut c_char,
407 pub int_curr_symbol: *mut c_char,
408 pub currency_symbol: *mut c_char,
409 pub mon_decimal_point: *mut c_char,
410 pub mon_thousands_sep: *mut c_char,
411 pub mon_grouping: *mut c_char,
412 pub positive_sign: *mut c_char,
413 pub negative_sign: *mut c_char,
414 pub int_frac_digits: c_char,
415 pub frac_digits: c_char,
416 pub p_cs_precedes: c_char,
417 pub p_sep_by_space: c_char,
418 pub n_cs_precedes: c_char,
419 pub n_sep_by_space: c_char,
420 pub p_sign_posn: c_char,
421 pub n_sign_posn: c_char,
422 pub int_p_cs_precedes: c_char,
423 pub int_p_sep_by_space: c_char,
424 pub int_n_cs_precedes: c_char,
425 pub int_n_sep_by_space: c_char,
426 pub int_p_sign_posn: c_char,
427 pub int_n_sign_posn: c_char,
428 }
429
430 pub struct rlimit64 {
431 pub rlim_cur: rlim64_t,
432 pub rlim_max: rlim64_t,
433 }
434
435 pub struct glob_t {
436 pub gl_pathc: size_t,
437 pub gl_pathv: *mut *mut c_char,
438 pub gl_offs: size_t,
439 pub gl_flags: c_int,
440
441 __unused1: Padding<*mut c_void>,
442 __unused2: Padding<*mut c_void>,
443 __unused3: Padding<*mut c_void>,
444 __unused4: Padding<*mut c_void>,
445 __unused5: Padding<*mut c_void>,
446 }
447
448 pub struct ifaddrs {
449 pub ifa_next: *mut ifaddrs,
450 pub ifa_name: *mut c_char,
451 pub ifa_flags: c_uint,
452 pub ifa_addr: *mut crate::sockaddr,
453 pub ifa_netmask: *mut crate::sockaddr,
454 pub ifa_ifu: *mut crate::sockaddr, pub ifa_data: *mut c_void,
456 }
457
458 pub struct passwd {
459 pub pw_name: *mut c_char,
460 pub pw_passwd: *mut c_char,
461 pub pw_uid: crate::uid_t,
462 pub pw_gid: crate::gid_t,
463 pub pw_gecos: *mut c_char,
464 pub pw_dir: *mut c_char,
465 pub pw_shell: *mut c_char,
466 }
467
468 pub struct spwd {
469 pub sp_namp: *mut c_char,
470 pub sp_pwdp: *mut c_char,
471 pub sp_lstchg: c_long,
472 pub sp_min: c_long,
473 pub sp_max: c_long,
474 pub sp_warn: c_long,
475 pub sp_inact: c_long,
476 pub sp_expire: c_long,
477 pub sp_flag: c_ulong,
478 }
479
480 pub struct statvfs {
481 pub f_bsize: c_ulong,
482 pub f_frsize: c_ulong,
483 pub f_blocks: crate::fsblkcnt_t,
484 pub f_bfree: crate::fsblkcnt_t,
485 pub f_bavail: crate::fsblkcnt_t,
486 pub f_files: crate::fsfilcnt_t,
487 pub f_ffree: crate::fsfilcnt_t,
488 pub f_favail: crate::fsfilcnt_t,
489 #[cfg(target_endian = "little")]
490 pub f_fsid: c_ulong,
491 #[cfg(all(target_pointer_width = "32", not(target_arch = "x86_64")))]
492 __f_unused: Padding<c_int>,
493 #[cfg(target_endian = "big")]
494 pub f_fsid: c_ulong,
495 pub f_flag: c_ulong,
496 pub f_namemax: c_ulong,
497 __f_spare: [c_int; 6],
498 }
499
500 pub struct dqblk {
501 pub dqb_bhardlimit: u64,
502 pub dqb_bsoftlimit: u64,
503 pub dqb_curspace: u64,
504 pub dqb_ihardlimit: u64,
505 pub dqb_isoftlimit: u64,
506 pub dqb_curinodes: u64,
507 pub dqb_btime: u64,
508 pub dqb_itime: u64,
509 pub dqb_valid: u32,
510 }
511
512 pub struct signalfd_siginfo {
513 pub ssi_signo: u32,
514 pub ssi_errno: i32,
515 pub ssi_code: i32,
516 pub ssi_pid: u32,
517 pub ssi_uid: u32,
518 pub ssi_fd: i32,
519 pub ssi_tid: u32,
520 pub ssi_band: u32,
521 pub ssi_overrun: u32,
522 pub ssi_trapno: u32,
523 pub ssi_status: i32,
524 pub ssi_int: i32,
525 pub ssi_ptr: u64,
526 pub ssi_utime: u64,
527 pub ssi_stime: u64,
528 pub ssi_addr: u64,
529 pub ssi_addr_lsb: u16,
530 _pad2: Padding<u16>,
531 pub ssi_syscall: i32,
532 pub ssi_call_addr: u64,
533 pub ssi_arch: u32,
534 _pad: Padding<[u8; 28]>,
535 }
536
537 pub struct itimerspec {
538 pub it_interval: crate::timespec,
539 pub it_value: crate::timespec,
540 }
541
542 pub struct fsid_t {
543 __val: [c_int; 2],
544 }
545
546 pub struct cpu_set_t {
547 #[cfg(all(target_pointer_width = "32", not(target_arch = "x86_64")))]
548 bits: [u32; 32],
549 #[cfg(not(all(target_pointer_width = "32", not(target_arch = "x86_64"))))]
550 bits: [u64; 16],
551 }
552
553 pub struct if_nameindex {
554 pub if_index: c_uint,
555 pub if_name: *mut c_char,
556 }
557
558 pub struct msginfo {
560 pub msgpool: c_int,
561 pub msgmap: c_int,
562 pub msgmax: c_int,
563 pub msgmnb: c_int,
564 pub msgmni: c_int,
565 pub msgssz: c_int,
566 pub msgtql: c_int,
567 pub msgseg: c_ushort,
568 }
569
570 pub struct mmsghdr {
571 pub msg_hdr: crate::msghdr,
572 pub msg_len: c_uint,
573 }
574
575 pub struct sembuf {
576 pub sem_num: c_ushort,
577 pub sem_op: c_short,
578 pub sem_flg: c_short,
579 }
580
581 pub struct input_event {
582 pub time: crate::timeval,
583 pub type_: crate::__u16,
584 pub code: crate::__u16,
585 pub value: crate::__s32,
586 }
587
588 pub struct input_id {
589 pub bustype: crate::__u16,
590 pub vendor: crate::__u16,
591 pub product: crate::__u16,
592 pub version: crate::__u16,
593 }
594
595 pub struct input_absinfo {
596 pub value: crate::__s32,
597 pub minimum: crate::__s32,
598 pub maximum: crate::__s32,
599 pub fuzz: crate::__s32,
600 pub flat: crate::__s32,
601 pub resolution: crate::__s32,
602 }
603
604 pub struct input_keymap_entry {
605 pub flags: crate::__u8,
606 pub len: crate::__u8,
607 pub index: crate::__u16,
608 pub keycode: crate::__u32,
609 pub scancode: [crate::__u8; 32],
610 }
611
612 pub struct input_mask {
613 pub type_: crate::__u32,
614 pub codes_size: crate::__u32,
615 pub codes_ptr: crate::__u64,
616 }
617
618 pub struct ff_replay {
619 pub length: crate::__u16,
620 pub delay: crate::__u16,
621 }
622
623 pub struct ff_trigger {
624 pub button: crate::__u16,
625 pub interval: crate::__u16,
626 }
627
628 pub struct ff_envelope {
629 pub attack_length: crate::__u16,
630 pub attack_level: crate::__u16,
631 pub fade_length: crate::__u16,
632 pub fade_level: crate::__u16,
633 }
634
635 pub struct ff_constant_effect {
636 pub level: crate::__s16,
637 pub envelope: ff_envelope,
638 }
639
640 pub struct ff_ramp_effect {
641 pub start_level: crate::__s16,
642 pub end_level: crate::__s16,
643 pub envelope: ff_envelope,
644 }
645
646 pub struct ff_condition_effect {
647 pub right_saturation: crate::__u16,
648 pub left_saturation: crate::__u16,
649
650 pub right_coeff: crate::__s16,
651 pub left_coeff: crate::__s16,
652
653 pub deadband: crate::__u16,
654 pub center: crate::__s16,
655 }
656
657 pub struct ff_periodic_effect {
658 pub waveform: crate::__u16,
659 pub period: crate::__u16,
660 pub magnitude: crate::__s16,
661 pub offset: crate::__s16,
662 pub phase: crate::__u16,
663
664 pub envelope: ff_envelope,
665
666 pub custom_len: crate::__u32,
667 pub custom_data: *mut crate::__s16,
668 }
669
670 pub struct ff_rumble_effect {
671 pub strong_magnitude: crate::__u16,
672 pub weak_magnitude: crate::__u16,
673 }
674
675 pub struct ff_effect {
676 pub type_: crate::__u16,
677 pub id: crate::__s16,
678 pub direction: crate::__u16,
679 pub trigger: ff_trigger,
680 pub replay: ff_replay,
681 #[cfg(target_pointer_width = "64")]
683 pub u: [u64; 4],
684 #[cfg(target_pointer_width = "32")]
685 pub u: [u32; 7],
686 }
687
688 pub struct dl_phdr_info {
689 #[cfg(target_pointer_width = "64")]
690 pub dlpi_addr: Elf64_Addr,
691 #[cfg(target_pointer_width = "32")]
692 pub dlpi_addr: Elf32_Addr,
693
694 pub dlpi_name: *const c_char,
695
696 #[cfg(target_pointer_width = "64")]
697 pub dlpi_phdr: *const Elf64_Phdr,
698 #[cfg(target_pointer_width = "32")]
699 pub dlpi_phdr: *const Elf32_Phdr,
700
701 #[cfg(target_pointer_width = "64")]
702 pub dlpi_phnum: Elf64_Half,
703 #[cfg(target_pointer_width = "32")]
704 pub dlpi_phnum: Elf32_Half,
705
706 pub dlpi_adds: c_ulonglong,
707 pub dlpi_subs: c_ulonglong,
708 pub dlpi_tls_modid: size_t,
709 pub dlpi_tls_data: *mut c_void,
710 }
711
712 pub struct Elf32_Phdr {
713 pub p_type: Elf32_Word,
714 pub p_offset: Elf32_Off,
715 pub p_vaddr: Elf32_Addr,
716 pub p_paddr: Elf32_Addr,
717 pub p_filesz: Elf32_Word,
718 pub p_memsz: Elf32_Word,
719 pub p_flags: Elf32_Word,
720 pub p_align: Elf32_Word,
721 }
722
723 pub struct Elf64_Phdr {
724 pub p_type: Elf64_Word,
725 pub p_flags: Elf64_Word,
726 pub p_offset: Elf64_Off,
727 pub p_vaddr: Elf64_Addr,
728 pub p_paddr: Elf64_Addr,
729 pub p_filesz: Elf64_Xword,
730 pub p_memsz: Elf64_Xword,
731 pub p_align: Elf64_Xword,
732 }
733
734 pub struct statfs64 {
735 pub f_type: c_ulong,
736 pub f_bsize: c_ulong,
737 pub f_blocks: crate::fsblkcnt_t,
738 pub f_bfree: crate::fsblkcnt_t,
739 pub f_bavail: crate::fsblkcnt_t,
740 pub f_files: crate::fsfilcnt_t,
741 pub f_ffree: crate::fsfilcnt_t,
742 pub f_fsid: crate::fsid_t,
743 pub f_namelen: c_ulong,
744 pub f_frsize: c_ulong,
745 pub f_flags: c_ulong,
746 pub f_spare: [c_ulong; 4],
747 }
748
749 pub struct statvfs64 {
750 pub f_bsize: c_ulong,
751 pub f_frsize: c_ulong,
752 pub f_blocks: u64,
753 pub f_bfree: u64,
754 pub f_bavail: u64,
755 pub f_files: u64,
756 pub f_ffree: u64,
757 pub f_favail: u64,
758 pub f_fsid: c_ulong,
759 pub f_flag: c_ulong,
760 pub f_namemax: c_ulong,
761 __f_spare: [c_int; 6],
762 }
763
764 pub struct stack_t {
765 pub ss_sp: *mut c_void,
766 pub ss_flags: c_int,
767 pub ss_size: size_t,
768 }
769
770 pub struct pthread_attr_t {
771 __size: [u64; 7],
772 }
773
774 pub struct sigset_t {
775 __val: [c_ulong; 16],
776 }
777
778 pub struct shmid_ds {
779 pub shm_perm: crate::ipc_perm,
780 pub shm_segsz: size_t,
781 pub shm_atime: crate::time_t,
782 pub shm_dtime: crate::time_t,
783 pub shm_ctime: crate::time_t,
784 pub shm_cpid: crate::pid_t,
785 pub shm_lpid: crate::pid_t,
786 pub shm_nattch: c_ulong,
787 __pad1: Padding<c_ulong>,
788 __pad2: Padding<c_ulong>,
789 }
790
791 pub struct msqid_ds {
792 pub msg_perm: crate::ipc_perm,
793 pub msg_stime: crate::time_t,
794 pub msg_rtime: crate::time_t,
795 pub msg_ctime: crate::time_t,
796 pub __msg_cbytes: c_ulong,
797 pub msg_qnum: crate::msgqnum_t,
798 pub msg_qbytes: crate::msglen_t,
799 pub msg_lspid: crate::pid_t,
800 pub msg_lrpid: crate::pid_t,
801 __pad1: Padding<c_ulong>,
802 __pad2: Padding<c_ulong>,
803 }
804
805 pub struct statfs {
806 pub f_type: c_ulong,
807 pub f_bsize: c_ulong,
808 pub f_blocks: crate::fsblkcnt_t,
809 pub f_bfree: crate::fsblkcnt_t,
810 pub f_bavail: crate::fsblkcnt_t,
811 pub f_files: crate::fsfilcnt_t,
812 pub f_ffree: crate::fsfilcnt_t,
813 pub f_fsid: crate::fsid_t,
814 pub f_namelen: c_ulong,
815 pub f_frsize: c_ulong,
816 pub f_flags: c_ulong,
817 pub f_spare: [c_ulong; 4],
818 }
819
820 pub struct msghdr {
821 pub msg_name: *mut c_void,
822 pub msg_namelen: crate::socklen_t,
823 pub msg_iov: *mut crate::iovec,
824 pub msg_iovlen: c_int,
825 __pad1: Padding<c_int>,
826 pub msg_control: *mut c_void,
827 pub msg_controllen: crate::socklen_t,
828 __pad2: Padding<crate::socklen_t>,
829 pub msg_flags: c_int,
830 }
831
832 pub struct cmsghdr {
833 pub cmsg_len: crate::socklen_t,
834 pub __pad1: c_int,
835 pub cmsg_level: c_int,
836 pub cmsg_type: c_int,
837 }
838
839 pub struct sem_t {
840 __val: [c_int; 8],
841 }
842
843 pub struct siginfo_t {
844 pub si_signo: c_int,
845 pub si_errno: c_int,
846 pub si_code: c_int,
847 pub _pad: [c_int; 29],
848 _align: [usize; 0],
849 }
850
851 pub struct termios2 {
852 pub c_iflag: crate::tcflag_t,
853 pub c_oflag: crate::tcflag_t,
854 pub c_cflag: crate::tcflag_t,
855 pub c_lflag: crate::tcflag_t,
856 pub c_line: crate::cc_t,
857 pub c_cc: [crate::cc_t; 19],
858 pub c_ispeed: crate::speed_t,
859 pub c_ospeed: crate::speed_t,
860 }
861
862 pub struct in6_pktinfo {
863 pub ipi6_addr: crate::in6_addr,
864 pub ipi6_ifindex: c_uint,
865 }
866
867 #[cfg_attr(
868 any(target_pointer_width = "32", target_arch = "x86_64"),
869 repr(align(4))
870 )]
871 #[cfg_attr(
872 not(any(target_pointer_width = "32", target_arch = "x86_64")),
873 repr(align(8))
874 )]
875 pub struct pthread_mutexattr_t {
876 size: [u8; crate::__SIZEOF_PTHREAD_MUTEXATTR_T],
877 }
878
879 #[cfg_attr(target_pointer_width = "32", repr(align(4)))]
880 #[cfg_attr(target_pointer_width = "64", repr(align(8)))]
881 pub struct pthread_rwlockattr_t {
882 size: [u8; crate::__SIZEOF_PTHREAD_RWLOCKATTR_T],
883 }
884
885 #[repr(align(4))]
886 pub struct pthread_condattr_t {
887 size: [u8; crate::__SIZEOF_PTHREAD_CONDATTR_T],
888 }
889
890 pub struct sysinfo {
891 pub uptime: c_ulong,
892 pub loads: [c_ulong; 3],
893 pub totalram: c_ulong,
894 pub freeram: c_ulong,
895 pub sharedram: c_ulong,
896 pub bufferram: c_ulong,
897 pub totalswap: c_ulong,
898 pub freeswap: c_ulong,
899 pub procs: c_ushort,
900 pub pad: c_ushort,
901 pub totalhigh: c_ulong,
902 pub freehigh: c_ulong,
903 pub mem_unit: c_uint,
904 __reserved: Padding<[c_char; 256]>,
905 }
906
907 pub struct sockaddr_un {
908 pub sun_family: sa_family_t,
909 pub sun_path: [c_char; 108],
910 }
911
912 pub struct sockaddr_storage {
913 pub ss_family: sa_family_t,
914 __ss_pad2: Padding<[u8; 128 - 2 - 8]>,
915 __ss_align: size_t,
916 }
917
918 pub struct utsname {
919 pub sysname: [c_char; 65],
920 pub nodename: [c_char; 65],
921 pub release: [c_char; 65],
922 pub version: [c_char; 65],
923 pub machine: [c_char; 65],
924 pub domainname: [c_char; 65],
925 }
926
927 pub struct dirent {
928 pub d_ino: crate::ino_t,
929 pub d_off: off_t,
930 pub d_reclen: c_ushort,
931 pub d_type: c_uchar,
932 pub d_name: [c_char; 256],
933 }
934
935 pub struct dirent64 {
936 pub d_ino: crate::ino64_t,
937 pub d_off: off64_t,
938 pub d_reclen: c_ushort,
939 pub d_type: c_uchar,
940 pub d_name: [c_char; 256],
941 }
942
943 pub struct mq_attr {
946 #[cfg(all(target_arch = "x86_64", target_pointer_width = "32"))]
947 pub mq_flags: i64,
948 #[cfg(all(target_arch = "x86_64", target_pointer_width = "32"))]
949 pub mq_maxmsg: i64,
950 #[cfg(all(target_arch = "x86_64", target_pointer_width = "32"))]
951 pub mq_msgsize: i64,
952 #[cfg(all(target_arch = "x86_64", target_pointer_width = "32"))]
953 pub mq_curmsgs: i64,
954 #[cfg(all(target_arch = "x86_64", target_pointer_width = "32"))]
955 pad: Padding<[i64; 4]>,
956
957 #[cfg(not(all(target_arch = "x86_64", target_pointer_width = "32")))]
958 pub mq_flags: c_long,
959 #[cfg(not(all(target_arch = "x86_64", target_pointer_width = "32")))]
960 pub mq_maxmsg: c_long,
961 #[cfg(not(all(target_arch = "x86_64", target_pointer_width = "32")))]
962 pub mq_msgsize: c_long,
963 #[cfg(not(all(target_arch = "x86_64", target_pointer_width = "32")))]
964 pub mq_curmsgs: c_long,
965 #[cfg(not(all(target_arch = "x86_64", target_pointer_width = "32")))]
966 pad: Padding<[c_long; 4]>,
967 }
968
969 pub struct sockaddr_nl {
970 pub nl_family: crate::sa_family_t,
971 nl_pad: Padding<c_ushort>,
972 pub nl_pid: u32,
973 pub nl_groups: u32,
974 }
975
976 #[allow(unpredictable_function_pointer_comparisons)]
978 pub struct sigevent {
979 pub sigev_value: crate::sigval,
980 pub sigev_signo: c_int,
981 pub sigev_notify: c_int,
982 pub sigev_notify_function: fn(crate::sigval),
983 pub sigev_notify_attributes: *mut pthread_attr_t,
984 pub __pad: [c_char; 56 - 3 * 8],
985 }
986
987 #[cfg_attr(
988 all(
989 target_pointer_width = "32",
990 any(target_arch = "arm", target_arch = "x86_64")
991 ),
992 repr(align(4))
993 )]
994 #[cfg_attr(
995 any(
996 target_pointer_width = "64",
997 not(any(target_arch = "arm", target_arch = "x86_64"))
998 ),
999 repr(align(8))
1000 )]
1001 pub struct pthread_mutex_t {
1002 size: [u8; crate::__SIZEOF_PTHREAD_MUTEX_T],
1003 }
1004
1005 #[cfg_attr(
1006 all(
1007 target_pointer_width = "32",
1008 any(target_arch = "arm", target_arch = "x86_64")
1009 ),
1010 repr(align(4))
1011 )]
1012 #[cfg_attr(
1013 any(
1014 target_pointer_width = "64",
1015 not(any(target_arch = "arm", target_arch = "x86_64"))
1016 ),
1017 repr(align(8))
1018 )]
1019 pub struct pthread_rwlock_t {
1020 size: [u8; crate::__SIZEOF_PTHREAD_RWLOCK_T],
1021 }
1022
1023 #[cfg_attr(target_pointer_width = "32", repr(align(4)))]
1024 #[cfg_attr(target_pointer_width = "64", repr(align(8)))]
1025 #[cfg_attr(target_arch = "x86", repr(align(4)))]
1026 #[cfg_attr(not(target_arch = "x86"), repr(align(8)))]
1027 pub struct pthread_cond_t {
1028 size: [u8; crate::__SIZEOF_PTHREAD_COND_T],
1029 }
1030}
1031
1032pub const INT_MIN: c_int = -2147483648;
1035pub const INT_MAX: c_int = 2147483647;
1036
1037pub const SIG_DFL: sighandler_t = 0 as sighandler_t;
1038pub const SIG_IGN: sighandler_t = 1 as sighandler_t;
1039pub const SIG_ERR: sighandler_t = !0 as sighandler_t;
1040
1041pub const DT_UNKNOWN: u8 = 0;
1042pub const DT_FIFO: u8 = 1;
1043pub const DT_CHR: u8 = 2;
1044pub const DT_DIR: u8 = 4;
1045pub const DT_BLK: u8 = 6;
1046pub const DT_REG: u8 = 8;
1047pub const DT_LNK: u8 = 10;
1048pub const DT_SOCK: u8 = 12;
1049
1050pub const FD_CLOEXEC: c_int = 0x1;
1051
1052pub const USRQUOTA: c_int = 0;
1053pub const GRPQUOTA: c_int = 1;
1054
1055pub const SIGIOT: c_int = 6;
1056
1057pub const S_ISUID: mode_t = 0o4000;
1058pub const S_ISGID: mode_t = 0o2000;
1059pub const S_ISVTX: mode_t = 0o1000;
1060
1061pub const IF_NAMESIZE: size_t = 16;
1062pub const IFNAMSIZ: size_t = IF_NAMESIZE;
1063
1064pub const LOG_EMERG: c_int = 0;
1065pub const LOG_ALERT: c_int = 1;
1066pub const LOG_CRIT: c_int = 2;
1067pub const LOG_ERR: c_int = 3;
1068pub const LOG_WARNING: c_int = 4;
1069pub const LOG_NOTICE: c_int = 5;
1070pub const LOG_INFO: c_int = 6;
1071pub const LOG_DEBUG: c_int = 7;
1072
1073pub const LOG_KERN: c_int = 0;
1074pub const LOG_USER: c_int = 1 << 3;
1075pub const LOG_MAIL: c_int = 2 << 3;
1076pub const LOG_DAEMON: c_int = 3 << 3;
1077pub const LOG_AUTH: c_int = 4 << 3;
1078pub const LOG_SYSLOG: c_int = 5 << 3;
1079pub const LOG_LPR: c_int = 6 << 3;
1080pub const LOG_NEWS: c_int = 7 << 3;
1081pub const LOG_UUCP: c_int = 8 << 3;
1082pub const LOG_LOCAL0: c_int = 16 << 3;
1083pub const LOG_LOCAL1: c_int = 17 << 3;
1084pub const LOG_LOCAL2: c_int = 18 << 3;
1085pub const LOG_LOCAL3: c_int = 19 << 3;
1086pub const LOG_LOCAL4: c_int = 20 << 3;
1087pub const LOG_LOCAL5: c_int = 21 << 3;
1088pub const LOG_LOCAL6: c_int = 22 << 3;
1089pub const LOG_LOCAL7: c_int = 23 << 3;
1090
1091pub const LOG_PID: c_int = 0x01;
1092pub const LOG_CONS: c_int = 0x02;
1093pub const LOG_ODELAY: c_int = 0x04;
1094pub const LOG_NDELAY: c_int = 0x08;
1095pub const LOG_NOWAIT: c_int = 0x10;
1096
1097pub const LOG_PRIMASK: c_int = 7;
1098pub const LOG_FACMASK: c_int = 0x3f8;
1099
1100pub const PRIO_PROCESS: c_int = 0;
1101pub const PRIO_PGRP: c_int = 1;
1102pub const PRIO_USER: c_int = 2;
1103
1104pub const PRIO_MIN: c_int = -20;
1105pub const PRIO_MAX: c_int = 20;
1106
1107pub const IPPROTO_ICMP: c_int = 1;
1108pub const IPPROTO_ICMPV6: c_int = 58;
1109pub const IPPROTO_TCP: c_int = 6;
1110pub const IPPROTO_UDP: c_int = 17;
1111pub const IPPROTO_IP: c_int = 0;
1112pub const IPPROTO_IPV6: c_int = 41;
1113
1114pub const INADDR_LOOPBACK: in_addr_t = 2130706433;
1115pub const INADDR_ANY: in_addr_t = 0;
1116pub const INADDR_BROADCAST: in_addr_t = 4294967295;
1117pub const INADDR_NONE: in_addr_t = 4294967295;
1118
1119pub const EXIT_FAILURE: c_int = 1;
1120pub const EXIT_SUCCESS: c_int = 0;
1121pub const RAND_MAX: c_int = 2147483647;
1122pub const EOF: c_int = -1;
1123pub const SEEK_SET: c_int = 0;
1124pub const SEEK_CUR: c_int = 1;
1125pub const SEEK_END: c_int = 2;
1126pub const _IOFBF: c_int = 0;
1127pub const _IONBF: c_int = 2;
1128pub const _IOLBF: c_int = 1;
1129
1130pub const F_DUPFD: c_int = 0;
1131pub const F_GETFD: c_int = 1;
1132pub const F_SETFD: c_int = 2;
1133pub const F_GETFL: c_int = 3;
1134pub const F_SETFL: c_int = 4;
1135
1136pub const F_SETLEASE: c_int = 1024;
1138pub const F_GETLEASE: c_int = 1025;
1139pub const F_NOTIFY: c_int = 1026;
1140pub const F_CANCELLK: c_int = 1029;
1141pub const F_DUPFD_CLOEXEC: c_int = 1030;
1142pub const F_SETPIPE_SZ: c_int = 1031;
1143pub const F_GETPIPE_SZ: c_int = 1032;
1144pub const F_ADD_SEALS: c_int = 1033;
1145pub const F_GET_SEALS: c_int = 1034;
1146
1147pub const F_SEAL_SEAL: c_int = 0x0001;
1148pub const F_SEAL_SHRINK: c_int = 0x0002;
1149pub const F_SEAL_GROW: c_int = 0x0004;
1150pub const F_SEAL_WRITE: c_int = 0x0008;
1151
1152pub const SIGTRAP: c_int = 5;
1155
1156pub const PTHREAD_CREATE_JOINABLE: c_int = 0;
1157pub const PTHREAD_CREATE_DETACHED: c_int = 1;
1158
1159pub const CLOCK_REALTIME: crate::clockid_t = 0;
1160pub const CLOCK_MONOTONIC: crate::clockid_t = 1;
1161pub const CLOCK_PROCESS_CPUTIME_ID: crate::clockid_t = 2;
1162pub const CLOCK_THREAD_CPUTIME_ID: crate::clockid_t = 3;
1163pub const CLOCK_MONOTONIC_RAW: crate::clockid_t = 4;
1164pub const CLOCK_REALTIME_COARSE: crate::clockid_t = 5;
1165pub const CLOCK_MONOTONIC_COARSE: crate::clockid_t = 6;
1166pub const CLOCK_BOOTTIME: crate::clockid_t = 7;
1167pub const CLOCK_REALTIME_ALARM: crate::clockid_t = 8;
1168pub const CLOCK_BOOTTIME_ALARM: crate::clockid_t = 9;
1169pub const CLOCK_SGI_CYCLE: crate::clockid_t = 10;
1170pub const CLOCK_TAI: crate::clockid_t = 11;
1171pub const TIMER_ABSTIME: c_int = 1;
1172
1173pub const RLIMIT_CPU: c_int = 0;
1174pub const RLIMIT_FSIZE: c_int = 1;
1175pub const RLIMIT_DATA: c_int = 2;
1176pub const RLIMIT_STACK: c_int = 3;
1177pub const RLIMIT_CORE: c_int = 4;
1178pub const RLIMIT_LOCKS: c_int = 10;
1179pub const RLIMIT_SIGPENDING: c_int = 11;
1180pub const RLIMIT_MSGQUEUE: c_int = 12;
1181pub const RLIMIT_NICE: c_int = 13;
1182pub const RLIMIT_RTPRIO: c_int = 14;
1183
1184pub const RUSAGE_SELF: c_int = 0;
1185
1186pub const O_RDONLY: c_int = 0;
1187pub const O_WRONLY: c_int = 1;
1188pub const O_RDWR: c_int = 2;
1189
1190pub const S_IFIFO: mode_t = 0o1_0000;
1191pub const S_IFCHR: mode_t = 0o2_0000;
1192pub const S_IFBLK: mode_t = 0o6_0000;
1193pub const S_IFDIR: mode_t = 0o4_0000;
1194pub const S_IFREG: mode_t = 0o10_0000;
1195pub const S_IFLNK: mode_t = 0o12_0000;
1196pub const S_IFSOCK: mode_t = 0o14_0000;
1197pub const S_IFMT: mode_t = 0o17_0000;
1198pub const S_IRWXU: mode_t = 0o0700;
1199pub const S_IXUSR: mode_t = 0o0100;
1200pub const S_IWUSR: mode_t = 0o0200;
1201pub const S_IRUSR: mode_t = 0o0400;
1202pub const S_IRWXG: mode_t = 0o0070;
1203pub const S_IXGRP: mode_t = 0o0010;
1204pub const S_IWGRP: mode_t = 0o0020;
1205pub const S_IRGRP: mode_t = 0o0040;
1206pub const S_IRWXO: mode_t = 0o0007;
1207pub const S_IXOTH: mode_t = 0o0001;
1208pub const S_IWOTH: mode_t = 0o0002;
1209pub const S_IROTH: mode_t = 0o0004;
1210pub const F_OK: c_int = 0;
1211pub const R_OK: c_int = 4;
1212pub const W_OK: c_int = 2;
1213pub const X_OK: c_int = 1;
1214pub const SIGHUP: c_int = 1;
1215pub const SIGINT: c_int = 2;
1216pub const SIGQUIT: c_int = 3;
1217pub const SIGILL: c_int = 4;
1218pub const SIGABRT: c_int = 6;
1219pub const SIGFPE: c_int = 8;
1220pub const SIGKILL: c_int = 9;
1221pub const SIGSEGV: c_int = 11;
1222pub const SIGPIPE: c_int = 13;
1223pub const SIGALRM: c_int = 14;
1224pub const SIGTERM: c_int = 15;
1225
1226pub const PROT_NONE: c_int = 0;
1227pub const PROT_READ: c_int = 1;
1228pub const PROT_WRITE: c_int = 2;
1229pub const PROT_EXEC: c_int = 4;
1230
1231pub const LC_CTYPE: c_int = 0;
1232pub const LC_NUMERIC: c_int = 1;
1233pub const LC_TIME: c_int = 2;
1234pub const LC_COLLATE: c_int = 3;
1235pub const LC_MONETARY: c_int = 4;
1236pub const LC_MESSAGES: c_int = 5;
1237pub const LC_ALL: c_int = 6;
1238pub const LC_CTYPE_MASK: c_int = 1 << LC_CTYPE;
1239pub const LC_NUMERIC_MASK: c_int = 1 << LC_NUMERIC;
1240pub const LC_TIME_MASK: c_int = 1 << LC_TIME;
1241pub const LC_COLLATE_MASK: c_int = 1 << LC_COLLATE;
1242pub const LC_MONETARY_MASK: c_int = 1 << LC_MONETARY;
1243pub const LC_MESSAGES_MASK: c_int = 1 << LC_MESSAGES;
1244pub const MAP_FILE: c_int = 0x0000;
1247pub const MAP_SHARED: c_int = 0x0001;
1248pub const MAP_PRIVATE: c_int = 0x0002;
1249pub const MAP_FIXED: c_int = 0x0010;
1250
1251pub const MAP_FAILED: *mut c_void = !0 as *mut c_void;
1252
1253pub const MS_ASYNC: c_int = 0x0001;
1255pub const MS_INVALIDATE: c_int = 0x0002;
1256pub const MS_SYNC: c_int = 0x0004;
1257
1258pub const MS_RDONLY: c_ulong = 0x01;
1260pub const MS_NOSUID: c_ulong = 0x02;
1261pub const MS_NODEV: c_ulong = 0x04;
1262pub const MS_NOEXEC: c_ulong = 0x08;
1263pub const MS_SYNCHRONOUS: c_ulong = 0x10;
1264pub const MS_REMOUNT: c_ulong = 0x20;
1265pub const MS_MANDLOCK: c_ulong = 0x40;
1266pub const MS_DIRSYNC: c_ulong = 0x80;
1267pub const MS_NOATIME: c_ulong = 0x0400;
1268pub const MS_NODIRATIME: c_ulong = 0x0800;
1269pub const MS_BIND: c_ulong = 0x1000;
1270pub const MS_MOVE: c_ulong = 0x2000;
1271pub const MS_REC: c_ulong = 0x4000;
1272pub const MS_SILENT: c_ulong = 0x8000;
1273pub const MS_POSIXACL: c_ulong = 0x010000;
1274pub const MS_UNBINDABLE: c_ulong = 0x020000;
1275pub const MS_PRIVATE: c_ulong = 0x040000;
1276pub const MS_SLAVE: c_ulong = 0x080000;
1277pub const MS_SHARED: c_ulong = 0x100000;
1278pub const MS_RELATIME: c_ulong = 0x200000;
1279pub const MS_KERNMOUNT: c_ulong = 0x400000;
1280pub const MS_I_VERSION: c_ulong = 0x800000;
1281pub const MS_STRICTATIME: c_ulong = 0x1000000;
1282pub const MS_ACTIVE: c_ulong = 0x40000000;
1283pub const MS_NOUSER: c_ulong = 0x80000000;
1284pub const MS_MGC_VAL: c_ulong = 0xc0ed0000;
1285pub const MS_MGC_MSK: c_ulong = 0xffff0000;
1286pub const MS_RMT_MASK: c_ulong = 0x800051;
1287
1288pub const EPERM: c_int = 1;
1289pub const ENOENT: c_int = 2;
1290pub const ESRCH: c_int = 3;
1291pub const EINTR: c_int = 4;
1292pub const EIO: c_int = 5;
1293pub const ENXIO: c_int = 6;
1294pub const E2BIG: c_int = 7;
1295pub const ENOEXEC: c_int = 8;
1296pub const EBADF: c_int = 9;
1297pub const ECHILD: c_int = 10;
1298pub const EAGAIN: c_int = 11;
1299pub const ENOMEM: c_int = 12;
1300pub const EACCES: c_int = 13;
1301pub const EFAULT: c_int = 14;
1302pub const ENOTBLK: c_int = 15;
1303pub const EBUSY: c_int = 16;
1304pub const EEXIST: c_int = 17;
1305pub const EXDEV: c_int = 18;
1306pub const ENODEV: c_int = 19;
1307pub const ENOTDIR: c_int = 20;
1308pub const EISDIR: c_int = 21;
1309pub const EINVAL: c_int = 22;
1310pub const ENFILE: c_int = 23;
1311pub const EMFILE: c_int = 24;
1312pub const ENOTTY: c_int = 25;
1313pub const ETXTBSY: c_int = 26;
1314pub const EFBIG: c_int = 27;
1315pub const ENOSPC: c_int = 28;
1316pub const ESPIPE: c_int = 29;
1317pub const EROFS: c_int = 30;
1318pub const EMLINK: c_int = 31;
1319pub const EPIPE: c_int = 32;
1320pub const EDOM: c_int = 33;
1321pub const ERANGE: c_int = 34;
1322pub const EWOULDBLOCK: c_int = EAGAIN;
1323
1324pub const SCM_RIGHTS: c_int = 0x01;
1325pub const SCM_CREDENTIALS: c_int = 0x02;
1326
1327pub const PROT_GROWSDOWN: c_int = 0x1000000;
1328pub const PROT_GROWSUP: c_int = 0x2000000;
1329
1330pub const MAP_TYPE: c_int = 0x000f;
1331
1332pub const MADV_NORMAL: c_int = 0;
1333pub const MADV_RANDOM: c_int = 1;
1334pub const MADV_SEQUENTIAL: c_int = 2;
1335pub const MADV_WILLNEED: c_int = 3;
1336pub const MADV_DONTNEED: c_int = 4;
1337pub const MADV_FREE: c_int = 8;
1338pub const MADV_REMOVE: c_int = 9;
1339pub const MADV_DONTFORK: c_int = 10;
1340pub const MADV_DOFORK: c_int = 11;
1341pub const MADV_MERGEABLE: c_int = 12;
1342pub const MADV_UNMERGEABLE: c_int = 13;
1343pub const MADV_HUGEPAGE: c_int = 14;
1344pub const MADV_NOHUGEPAGE: c_int = 15;
1345pub const MADV_DONTDUMP: c_int = 16;
1346pub const MADV_DODUMP: c_int = 17;
1347pub const MADV_HWPOISON: c_int = 100;
1348pub const MADV_SOFT_OFFLINE: c_int = 101;
1349
1350pub const IFF_UP: c_int = 0x1;
1351pub const IFF_BROADCAST: c_int = 0x2;
1352pub const IFF_DEBUG: c_int = 0x4;
1353pub const IFF_LOOPBACK: c_int = 0x8;
1354pub const IFF_POINTOPOINT: c_int = 0x10;
1355pub const IFF_NOTRAILERS: c_int = 0x20;
1356pub const IFF_RUNNING: c_int = 0x40;
1357pub const IFF_NOARP: c_int = 0x80;
1358pub const IFF_PROMISC: c_int = 0x100;
1359pub const IFF_ALLMULTI: c_int = 0x200;
1360pub const IFF_MASTER: c_int = 0x400;
1361pub const IFF_SLAVE: c_int = 0x800;
1362pub const IFF_MULTICAST: c_int = 0x1000;
1363pub const IFF_PORTSEL: c_int = 0x2000;
1364pub const IFF_AUTOMEDIA: c_int = 0x4000;
1365pub const IFF_DYNAMIC: c_int = 0x8000;
1366pub const IFF_TUN: c_int = 0x0001;
1367pub const IFF_TAP: c_int = 0x0002;
1368pub const IFF_NO_PI: c_int = 0x1000;
1369
1370pub const SOL_IP: c_int = 0;
1371pub const SOL_TCP: c_int = 6;
1372pub const SOL_UDP: c_int = 17;
1373pub const SOL_IPV6: c_int = 41;
1374pub const SOL_ICMPV6: c_int = 58;
1375pub const SOL_RAW: c_int = 255;
1376pub const SOL_DECNET: c_int = 261;
1377pub const SOL_X25: c_int = 262;
1378pub const SOL_PACKET: c_int = 263;
1379pub const SOL_ATM: c_int = 264;
1380pub const SOL_AAL: c_int = 265;
1381pub const SOL_IRDA: c_int = 266;
1382pub const SOL_NETBEUI: c_int = 267;
1383pub const SOL_LLC: c_int = 268;
1384pub const SOL_DCCP: c_int = 269;
1385pub const SOL_NETLINK: c_int = 270;
1386pub const SOL_TIPC: c_int = 271;
1387
1388pub const AF_UNSPEC: c_int = 0;
1389pub const AF_UNIX: c_int = 1;
1390pub const AF_LOCAL: c_int = 1;
1391pub const AF_INET: c_int = 2;
1392pub const AF_AX25: c_int = 3;
1393pub const AF_IPX: c_int = 4;
1394pub const AF_APPLETALK: c_int = 5;
1395pub const AF_NETROM: c_int = 6;
1396pub const AF_BRIDGE: c_int = 7;
1397pub const AF_ATMPVC: c_int = 8;
1398pub const AF_X25: c_int = 9;
1399pub const AF_INET6: c_int = 10;
1400pub const AF_ROSE: c_int = 11;
1401pub const AF_DECnet: c_int = 12;
1402pub const AF_NETBEUI: c_int = 13;
1403pub const AF_SECURITY: c_int = 14;
1404pub const AF_KEY: c_int = 15;
1405pub const AF_NETLINK: c_int = 16;
1406pub const AF_ROUTE: c_int = AF_NETLINK;
1407pub const AF_PACKET: c_int = 17;
1408pub const AF_ASH: c_int = 18;
1409pub const AF_ECONET: c_int = 19;
1410pub const AF_ATMSVC: c_int = 20;
1411pub const AF_RDS: c_int = 21;
1412pub const AF_SNA: c_int = 22;
1413pub const AF_IRDA: c_int = 23;
1414pub const AF_PPPOX: c_int = 24;
1415pub const AF_WANPIPE: c_int = 25;
1416pub const AF_LLC: c_int = 26;
1417pub const AF_CAN: c_int = 29;
1418pub const AF_TIPC: c_int = 30;
1419pub const AF_BLUETOOTH: c_int = 31;
1420pub const AF_IUCV: c_int = 32;
1421pub const AF_RXRPC: c_int = 33;
1422pub const AF_ISDN: c_int = 34;
1423pub const AF_PHONET: c_int = 35;
1424pub const AF_IEEE802154: c_int = 36;
1425pub const AF_CAIF: c_int = 37;
1426pub const AF_ALG: c_int = 38;
1427
1428pub const PF_UNSPEC: c_int = AF_UNSPEC;
1429pub const PF_UNIX: c_int = AF_UNIX;
1430pub const PF_LOCAL: c_int = AF_LOCAL;
1431pub const PF_INET: c_int = AF_INET;
1432pub const PF_AX25: c_int = AF_AX25;
1433pub const PF_IPX: c_int = AF_IPX;
1434pub const PF_APPLETALK: c_int = AF_APPLETALK;
1435pub const PF_NETROM: c_int = AF_NETROM;
1436pub const PF_BRIDGE: c_int = AF_BRIDGE;
1437pub const PF_ATMPVC: c_int = AF_ATMPVC;
1438pub const PF_X25: c_int = AF_X25;
1439pub const PF_INET6: c_int = AF_INET6;
1440pub const PF_ROSE: c_int = AF_ROSE;
1441pub const PF_DECnet: c_int = AF_DECnet;
1442pub const PF_NETBEUI: c_int = AF_NETBEUI;
1443pub const PF_SECURITY: c_int = AF_SECURITY;
1444pub const PF_KEY: c_int = AF_KEY;
1445pub const PF_NETLINK: c_int = AF_NETLINK;
1446pub const PF_ROUTE: c_int = AF_ROUTE;
1447pub const PF_PACKET: c_int = AF_PACKET;
1448pub const PF_ASH: c_int = AF_ASH;
1449pub const PF_ECONET: c_int = AF_ECONET;
1450pub const PF_ATMSVC: c_int = AF_ATMSVC;
1451pub const PF_RDS: c_int = AF_RDS;
1452pub const PF_SNA: c_int = AF_SNA;
1453pub const PF_IRDA: c_int = AF_IRDA;
1454pub const PF_PPPOX: c_int = AF_PPPOX;
1455pub const PF_WANPIPE: c_int = AF_WANPIPE;
1456pub const PF_LLC: c_int = AF_LLC;
1457pub const PF_CAN: c_int = AF_CAN;
1458pub const PF_TIPC: c_int = AF_TIPC;
1459pub const PF_BLUETOOTH: c_int = AF_BLUETOOTH;
1460pub const PF_IUCV: c_int = AF_IUCV;
1461pub const PF_RXRPC: c_int = AF_RXRPC;
1462pub const PF_ISDN: c_int = AF_ISDN;
1463pub const PF_PHONET: c_int = AF_PHONET;
1464pub const PF_IEEE802154: c_int = AF_IEEE802154;
1465pub const PF_CAIF: c_int = AF_CAIF;
1466pub const PF_ALG: c_int = AF_ALG;
1467
1468pub const SOMAXCONN: c_int = 128;
1469
1470pub const MSG_OOB: c_int = 1;
1471pub const MSG_PEEK: c_int = 2;
1472pub const MSG_DONTROUTE: c_int = 4;
1473pub const MSG_CTRUNC: c_int = 8;
1474pub const MSG_TRUNC: c_int = 0x20;
1475pub const MSG_DONTWAIT: c_int = 0x40;
1476pub const MSG_EOR: c_int = 0x80;
1477pub const MSG_WAITALL: c_int = 0x100;
1478pub const MSG_FIN: c_int = 0x200;
1479pub const MSG_SYN: c_int = 0x400;
1480pub const MSG_CONFIRM: c_int = 0x800;
1481pub const MSG_RST: c_int = 0x1000;
1482pub const MSG_ERRQUEUE: c_int = 0x2000;
1483pub const MSG_NOSIGNAL: c_int = 0x4000;
1484pub const MSG_MORE: c_int = 0x8000;
1485pub const MSG_WAITFORONE: c_int = 0x10000;
1486pub const MSG_FASTOPEN: c_int = 0x20000000;
1487pub const MSG_CMSG_CLOEXEC: c_int = 0x40000000;
1488
1489pub const SCM_TIMESTAMP: c_int = SO_TIMESTAMP;
1490
1491pub const SOCK_RAW: c_int = 3;
1492pub const SOCK_RDM: c_int = 4;
1493
1494pub const IP_TOS: c_int = 1;
1495pub const IP_TTL: c_int = 2;
1496pub const IP_HDRINCL: c_int = 3;
1497pub const IP_RECVTOS: c_int = 13;
1498pub const IP_FREEBIND: c_int = 15;
1499pub const IP_TRANSPARENT: c_int = 19;
1500pub const IP_MULTICAST_IF: c_int = 32;
1501pub const IP_MULTICAST_TTL: c_int = 33;
1502pub const IP_MULTICAST_LOOP: c_int = 34;
1503pub const IP_ADD_MEMBERSHIP: c_int = 35;
1504pub const IP_DROP_MEMBERSHIP: c_int = 36;
1505
1506pub const IPV6_UNICAST_HOPS: c_int = 16;
1507pub const IPV6_MULTICAST_IF: c_int = 17;
1508pub const IPV6_MULTICAST_HOPS: c_int = 18;
1509pub const IPV6_MULTICAST_LOOP: c_int = 19;
1510pub const IPV6_ADD_MEMBERSHIP: c_int = 20;
1511pub const IPV6_DROP_MEMBERSHIP: c_int = 21;
1512pub const IPV6_V6ONLY: c_int = 26;
1513pub const IPV6_RECVPKTINFO: c_int = 49;
1514pub const IPV6_RECVTCLASS: c_int = 66;
1515pub const IPV6_TCLASS: c_int = 67;
1516
1517pub const TCP_NODELAY: c_int = 1;
1518pub const TCP_MAXSEG: c_int = 2;
1519pub const TCP_CORK: c_int = 3;
1520pub const TCP_KEEPIDLE: c_int = 4;
1521pub const TCP_KEEPINTVL: c_int = 5;
1522pub const TCP_KEEPCNT: c_int = 6;
1523pub const TCP_SYNCNT: c_int = 7;
1524pub const TCP_LINGER2: c_int = 8;
1525pub const TCP_DEFER_ACCEPT: c_int = 9;
1526pub const TCP_WINDOW_CLAMP: c_int = 10;
1527pub const TCP_INFO: c_int = 11;
1528pub const TCP_QUICKACK: c_int = 12;
1529pub const TCP_CONGESTION: c_int = 13;
1530
1531pub const SO_DEBUG: c_int = 1;
1532
1533pub const SHUT_RD: c_int = 0;
1534pub const SHUT_WR: c_int = 1;
1535pub const SHUT_RDWR: c_int = 2;
1536
1537pub const LOCK_SH: c_int = 1;
1538pub const LOCK_EX: c_int = 2;
1539pub const LOCK_NB: c_int = 4;
1540pub const LOCK_UN: c_int = 8;
1541
1542pub const SS_ONSTACK: c_int = 1;
1543pub const SS_DISABLE: c_int = 2;
1544
1545pub const PATH_MAX: c_int = 4096;
1548
1549pub const FD_SETSIZE: usize = 1024;
1550
1551pub const EPOLLIN: c_int = 0x1;
1552pub const EPOLLPRI: c_int = 0x2;
1553pub const EPOLLOUT: c_int = 0x4;
1554pub const EPOLLRDNORM: c_int = 0x40;
1555pub const EPOLLRDBAND: c_int = 0x80;
1556pub const EPOLLWRNORM: c_int = 0x100;
1557pub const EPOLLWRBAND: c_int = 0x200;
1558pub const EPOLLMSG: c_int = 0x400;
1559pub const EPOLLERR: c_int = 0x8;
1560pub const EPOLLHUP: c_int = 0x10;
1561pub const EPOLLET: c_int = u32_cast_int(0x80000000);
1562
1563pub const EPOLL_CTL_ADD: c_int = 1;
1564pub const EPOLL_CTL_MOD: c_int = 3;
1565pub const EPOLL_CTL_DEL: c_int = 2;
1566
1567pub const MNT_DETACH: c_int = 0x2;
1568pub const MNT_EXPIRE: c_int = 0x4;
1569
1570pub const Q_GETFMT: c_int = 0x800004;
1571pub const Q_GETINFO: c_int = 0x800005;
1572pub const Q_SETINFO: c_int = 0x800006;
1573pub const QIF_BLIMITS: u32 = 1;
1574pub const QIF_SPACE: u32 = 2;
1575pub const QIF_ILIMITS: u32 = 4;
1576pub const QIF_INODES: u32 = 8;
1577pub const QIF_BTIME: u32 = 16;
1578pub const QIF_ITIME: u32 = 32;
1579pub const QIF_LIMITS: u32 = 5;
1580pub const QIF_USAGE: u32 = 10;
1581pub const QIF_TIMES: u32 = 48;
1582pub const QIF_ALL: u32 = 63;
1583
1584pub const MNT_FORCE: c_int = 0x1;
1585
1586pub const Q_SYNC: c_int = 0x800001;
1587pub const Q_QUOTAON: c_int = 0x800002;
1588pub const Q_QUOTAOFF: c_int = 0x800003;
1589pub const Q_GETQUOTA: c_int = 0x800007;
1590pub const Q_SETQUOTA: c_int = 0x800008;
1591
1592pub const TCIOFF: c_int = 2;
1593pub const TCION: c_int = 3;
1594pub const TCOOFF: c_int = 0;
1595pub const TCOON: c_int = 1;
1596pub const TCIFLUSH: c_int = 0;
1597pub const TCOFLUSH: c_int = 1;
1598pub const TCIOFLUSH: c_int = 2;
1599pub const NL0: c_int = 0x00000000;
1600pub const NL1: c_int = 0x00000100;
1601pub const TAB0: c_int = 0x00000000;
1602pub const CR0: c_int = 0x00000000;
1603pub const FF0: c_int = 0x00000000;
1604pub const BS0: c_int = 0x00000000;
1605pub const VT0: c_int = 0x00000000;
1606pub const VERASE: usize = 2;
1607pub const VKILL: usize = 3;
1608pub const VINTR: usize = 0;
1609pub const VQUIT: usize = 1;
1610pub const VLNEXT: usize = 15;
1611pub const IGNBRK: crate::tcflag_t = 0x00000001;
1612pub const BRKINT: crate::tcflag_t = 0x00000002;
1613pub const IGNPAR: crate::tcflag_t = 0x00000004;
1614pub const PARMRK: crate::tcflag_t = 0x00000008;
1615pub const INPCK: crate::tcflag_t = 0x00000010;
1616pub const ISTRIP: crate::tcflag_t = 0x00000020;
1617pub const INLCR: crate::tcflag_t = 0x00000040;
1618pub const IGNCR: crate::tcflag_t = 0x00000080;
1619pub const ICRNL: crate::tcflag_t = 0x00000100;
1620pub const IXANY: crate::tcflag_t = 0x00000800;
1621pub const IMAXBEL: crate::tcflag_t = 0x00002000;
1622pub const OPOST: crate::tcflag_t = 0x1;
1623pub const CS5: crate::tcflag_t = 0x00000000;
1624pub const CRTSCTS: crate::tcflag_t = 0x80000000;
1625pub const ECHO: crate::tcflag_t = 0x00000008;
1626pub const OCRNL: crate::tcflag_t = 0o000010;
1627pub const ONOCR: crate::tcflag_t = 0o000020;
1628pub const ONLRET: crate::tcflag_t = 0o000040;
1629pub const OFILL: crate::tcflag_t = 0o000100;
1630pub const OFDEL: crate::tcflag_t = 0o000200;
1631
1632pub const CLONE_VM: c_int = 0x100;
1633pub const CLONE_FS: c_int = 0x200;
1634pub const CLONE_FILES: c_int = 0x400;
1635pub const CLONE_SIGHAND: c_int = 0x800;
1636pub const CLONE_PTRACE: c_int = 0x2000;
1637pub const CLONE_VFORK: c_int = 0x4000;
1638pub const CLONE_PARENT: c_int = 0x8000;
1639pub const CLONE_THREAD: c_int = 0x10000;
1640pub const CLONE_NEWNS: c_int = 0x20000;
1641pub const CLONE_SYSVSEM: c_int = 0x40000;
1642pub const CLONE_SETTLS: c_int = 0x80000;
1643pub const CLONE_PARENT_SETTID: c_int = 0x100000;
1644pub const CLONE_CHILD_CLEARTID: c_int = 0x200000;
1645pub const CLONE_DETACHED: c_int = 0x400000;
1646pub const CLONE_UNTRACED: c_int = 0x800000;
1647pub const CLONE_CHILD_SETTID: c_int = 0x01000000;
1648pub const CLONE_NEWUTS: c_int = 0x04000000;
1649pub const CLONE_NEWIPC: c_int = 0x08000000;
1650pub const CLONE_NEWUSER: c_int = 0x10000000;
1651pub const CLONE_NEWPID: c_int = 0x20000000;
1652pub const CLONE_NEWNET: c_int = 0x40000000;
1653pub const CLONE_IO: c_int = u32_cast_int(0x80000000);
1654pub const CLONE_NEWCGROUP: c_int = 0x02000000;
1655
1656pub const WNOHANG: c_int = 0x00000001;
1657pub const WUNTRACED: c_int = 0x00000002;
1658pub const WSTOPPED: c_int = WUNTRACED;
1659pub const WEXITED: c_int = 0x00000004;
1660pub const WCONTINUED: c_int = 0x00000008;
1661pub const WNOWAIT: c_int = 0x01000000;
1662
1663pub const PTRACE_O_TRACESYSGOOD: c_int = 0x00000001;
1665pub const PTRACE_O_TRACEFORK: c_int = 0x00000002;
1666pub const PTRACE_O_TRACEVFORK: c_int = 0x00000004;
1667pub const PTRACE_O_TRACECLONE: c_int = 0x00000008;
1668pub const PTRACE_O_TRACEEXEC: c_int = 0x00000010;
1669pub const PTRACE_O_TRACEVFORKDONE: c_int = 0x00000020;
1670pub const PTRACE_O_TRACEEXIT: c_int = 0x00000040;
1671pub const PTRACE_O_TRACESECCOMP: c_int = 0x00000080;
1672pub const PTRACE_O_EXITKILL: c_int = 0x00100000;
1673pub const PTRACE_O_SUSPEND_SECCOMP: c_int = 0x00200000;
1674pub const PTRACE_O_MASK: c_int = 0x003000ff;
1675
1676pub const PTRACE_EVENT_FORK: c_int = 1;
1678pub const PTRACE_EVENT_VFORK: c_int = 2;
1679pub const PTRACE_EVENT_CLONE: c_int = 3;
1680pub const PTRACE_EVENT_EXEC: c_int = 4;
1681pub const PTRACE_EVENT_VFORK_DONE: c_int = 5;
1682pub const PTRACE_EVENT_EXIT: c_int = 6;
1683pub const PTRACE_EVENT_SECCOMP: c_int = 7;
1684pub const __WNOTHREAD: c_int = 0x20000000;
1688pub const __WALL: c_int = 0x40000000;
1689pub const __WCLONE: c_int = u32_cast_int(0x80000000);
1690
1691pub const SPLICE_F_MOVE: c_uint = 0x01;
1692pub const SPLICE_F_NONBLOCK: c_uint = 0x02;
1693pub const SPLICE_F_MORE: c_uint = 0x04;
1694pub const SPLICE_F_GIFT: c_uint = 0x08;
1695
1696pub const RTLD_LOCAL: c_int = 0;
1697pub const RTLD_LAZY: c_int = 1;
1698
1699pub const POSIX_FADV_NORMAL: c_int = 0;
1700pub const POSIX_FADV_RANDOM: c_int = 1;
1701pub const POSIX_FADV_SEQUENTIAL: c_int = 2;
1702pub const POSIX_FADV_WILLNEED: c_int = 3;
1703
1704pub const AT_FDCWD: c_int = -100;
1705pub const AT_SYMLINK_NOFOLLOW: c_int = 0x100;
1706pub const AT_REMOVEDIR: c_int = 0x200;
1707pub const AT_EACCESS: c_int = 0x200;
1708pub const AT_SYMLINK_FOLLOW: c_int = 0x400;
1709pub const AT_NO_AUTOMOUNT: c_int = 0x800;
1710pub const AT_EMPTY_PATH: c_int = 0x1000;
1711
1712pub const LOG_CRON: c_int = 9 << 3;
1713pub const LOG_AUTHPRIV: c_int = 10 << 3;
1714pub const LOG_FTP: c_int = 11 << 3;
1715pub const LOG_PERROR: c_int = 0x20;
1716
1717pub const PIPE_BUF: usize = 4096;
1718
1719pub const SI_LOAD_SHIFT: c_uint = 16;
1720
1721pub const CLD_EXITED: c_int = 1;
1722pub const CLD_KILLED: c_int = 2;
1723pub const CLD_DUMPED: c_int = 3;
1724pub const CLD_TRAPPED: c_int = 4;
1725pub const CLD_STOPPED: c_int = 5;
1726pub const CLD_CONTINUED: c_int = 6;
1727
1728pub const SIGEV_SIGNAL: c_int = 0;
1729pub const SIGEV_NONE: c_int = 1;
1730pub const SIGEV_THREAD: c_int = 2;
1731
1732pub const P_ALL: idtype_t = 0;
1733pub const P_PID: idtype_t = 1;
1734pub const P_PGID: idtype_t = 2;
1735
1736pub const UTIME_OMIT: c_long = 1073741822;
1737pub const UTIME_NOW: c_long = 1073741823;
1738
1739pub const POLLIN: c_short = 0x1;
1740pub const POLLPRI: c_short = 0x2;
1741pub const POLLOUT: c_short = 0x4;
1742pub const POLLERR: c_short = 0x8;
1743pub const POLLHUP: c_short = 0x10;
1744pub const POLLNVAL: c_short = 0x20;
1745pub const POLLRDNORM: c_short = 0x040;
1746pub const POLLRDBAND: c_short = 0x080;
1747
1748pub const ABDAY_1: crate::nl_item = 0x20000;
1749pub const ABDAY_2: crate::nl_item = 0x20001;
1750pub const ABDAY_3: crate::nl_item = 0x20002;
1751pub const ABDAY_4: crate::nl_item = 0x20003;
1752pub const ABDAY_5: crate::nl_item = 0x20004;
1753pub const ABDAY_6: crate::nl_item = 0x20005;
1754pub const ABDAY_7: crate::nl_item = 0x20006;
1755
1756pub const DAY_1: crate::nl_item = 0x20007;
1757pub const DAY_2: crate::nl_item = 0x20008;
1758pub const DAY_3: crate::nl_item = 0x20009;
1759pub const DAY_4: crate::nl_item = 0x2000A;
1760pub const DAY_5: crate::nl_item = 0x2000B;
1761pub const DAY_6: crate::nl_item = 0x2000C;
1762pub const DAY_7: crate::nl_item = 0x2000D;
1763
1764pub const ABMON_1: crate::nl_item = 0x2000E;
1765pub const ABMON_2: crate::nl_item = 0x2000F;
1766pub const ABMON_3: crate::nl_item = 0x20010;
1767pub const ABMON_4: crate::nl_item = 0x20011;
1768pub const ABMON_5: crate::nl_item = 0x20012;
1769pub const ABMON_6: crate::nl_item = 0x20013;
1770pub const ABMON_7: crate::nl_item = 0x20014;
1771pub const ABMON_8: crate::nl_item = 0x20015;
1772pub const ABMON_9: crate::nl_item = 0x20016;
1773pub const ABMON_10: crate::nl_item = 0x20017;
1774pub const ABMON_11: crate::nl_item = 0x20018;
1775pub const ABMON_12: crate::nl_item = 0x20019;
1776
1777pub const MON_1: crate::nl_item = 0x2001A;
1778pub const MON_2: crate::nl_item = 0x2001B;
1779pub const MON_3: crate::nl_item = 0x2001C;
1780pub const MON_4: crate::nl_item = 0x2001D;
1781pub const MON_5: crate::nl_item = 0x2001E;
1782pub const MON_6: crate::nl_item = 0x2001F;
1783pub const MON_7: crate::nl_item = 0x20020;
1784pub const MON_8: crate::nl_item = 0x20021;
1785pub const MON_9: crate::nl_item = 0x20022;
1786pub const MON_10: crate::nl_item = 0x20023;
1787pub const MON_11: crate::nl_item = 0x20024;
1788pub const MON_12: crate::nl_item = 0x20025;
1789
1790pub const AM_STR: crate::nl_item = 0x20026;
1791pub const PM_STR: crate::nl_item = 0x20027;
1792
1793pub const D_T_FMT: crate::nl_item = 0x20028;
1794pub const D_FMT: crate::nl_item = 0x20029;
1795pub const T_FMT: crate::nl_item = 0x2002A;
1796pub const T_FMT_AMPM: crate::nl_item = 0x2002B;
1797
1798pub const ERA: crate::nl_item = 0x2002C;
1799pub const ERA_D_FMT: crate::nl_item = 0x2002E;
1800pub const ALT_DIGITS: crate::nl_item = 0x2002F;
1801pub const ERA_D_T_FMT: crate::nl_item = 0x20030;
1802pub const ERA_T_FMT: crate::nl_item = 0x20031;
1803
1804pub const CODESET: crate::nl_item = 14;
1805
1806pub const CRNCYSTR: crate::nl_item = 0x4000F;
1807
1808pub const RUSAGE_THREAD: c_int = 1;
1809pub const RUSAGE_CHILDREN: c_int = -1;
1810
1811pub const RADIXCHAR: crate::nl_item = 0x10000;
1812pub const THOUSEP: crate::nl_item = 0x10001;
1813
1814pub const YESEXPR: crate::nl_item = 0x50000;
1815pub const NOEXPR: crate::nl_item = 0x50001;
1816pub const YESSTR: crate::nl_item = 0x50002;
1817pub const NOSTR: crate::nl_item = 0x50003;
1818
1819pub const FILENAME_MAX: c_uint = 4096;
1820pub const L_tmpnam: c_uint = 20;
1821pub const _PC_LINK_MAX: c_int = 0;
1822pub const _PC_MAX_CANON: c_int = 1;
1823pub const _PC_MAX_INPUT: c_int = 2;
1824pub const _PC_NAME_MAX: c_int = 3;
1825pub const _PC_PATH_MAX: c_int = 4;
1826pub const _PC_PIPE_BUF: c_int = 5;
1827pub const _PC_CHOWN_RESTRICTED: c_int = 6;
1828pub const _PC_NO_TRUNC: c_int = 7;
1829pub const _PC_VDISABLE: c_int = 8;
1830pub const _PC_SYNC_IO: c_int = 9;
1831pub const _PC_ASYNC_IO: c_int = 10;
1832pub const _PC_PRIO_IO: c_int = 11;
1833pub const _PC_SOCK_MAXBUF: c_int = 12;
1834pub const _PC_FILESIZEBITS: c_int = 13;
1835pub const _PC_REC_INCR_XFER_SIZE: c_int = 14;
1836pub const _PC_REC_MAX_XFER_SIZE: c_int = 15;
1837pub const _PC_REC_MIN_XFER_SIZE: c_int = 16;
1838pub const _PC_REC_XFER_ALIGN: c_int = 17;
1839pub const _PC_ALLOC_SIZE_MIN: c_int = 18;
1840pub const _PC_SYMLINK_MAX: c_int = 19;
1841pub const _PC_2_SYMLINKS: c_int = 20;
1842
1843pub const _SC_ARG_MAX: c_int = 0;
1844pub const _SC_CHILD_MAX: c_int = 1;
1845pub const _SC_CLK_TCK: c_int = 2;
1846pub const _SC_NGROUPS_MAX: c_int = 3;
1847pub const _SC_OPEN_MAX: c_int = 4;
1848pub const _SC_STREAM_MAX: c_int = 5;
1849pub const _SC_TZNAME_MAX: c_int = 6;
1850pub const _SC_JOB_CONTROL: c_int = 7;
1851pub const _SC_SAVED_IDS: c_int = 8;
1852pub const _SC_REALTIME_SIGNALS: c_int = 9;
1853pub const _SC_PRIORITY_SCHEDULING: c_int = 10;
1854pub const _SC_TIMERS: c_int = 11;
1855pub const _SC_ASYNCHRONOUS_IO: c_int = 12;
1856pub const _SC_PRIORITIZED_IO: c_int = 13;
1857pub const _SC_SYNCHRONIZED_IO: c_int = 14;
1858pub const _SC_FSYNC: c_int = 15;
1859pub const _SC_MAPPED_FILES: c_int = 16;
1860pub const _SC_MEMLOCK: c_int = 17;
1861pub const _SC_MEMLOCK_RANGE: c_int = 18;
1862pub const _SC_MEMORY_PROTECTION: c_int = 19;
1863pub const _SC_MESSAGE_PASSING: c_int = 20;
1864pub const _SC_SEMAPHORES: c_int = 21;
1865pub const _SC_SHARED_MEMORY_OBJECTS: c_int = 22;
1866pub const _SC_AIO_LISTIO_MAX: c_int = 23;
1867pub const _SC_AIO_MAX: c_int = 24;
1868pub const _SC_AIO_PRIO_DELTA_MAX: c_int = 25;
1869pub const _SC_DELAYTIMER_MAX: c_int = 26;
1870pub const _SC_MQ_OPEN_MAX: c_int = 27;
1871pub const _SC_MQ_PRIO_MAX: c_int = 28;
1872pub const _SC_VERSION: c_int = 29;
1873pub const _SC_PAGESIZE: c_int = 30;
1874pub const _SC_PAGE_SIZE: c_int = _SC_PAGESIZE;
1875pub const _SC_RTSIG_MAX: c_int = 31;
1876pub const _SC_SEM_NSEMS_MAX: c_int = 32;
1877pub const _SC_SEM_VALUE_MAX: c_int = 33;
1878pub const _SC_SIGQUEUE_MAX: c_int = 34;
1879pub const _SC_TIMER_MAX: c_int = 35;
1880pub const _SC_BC_BASE_MAX: c_int = 36;
1881pub const _SC_BC_DIM_MAX: c_int = 37;
1882pub const _SC_BC_SCALE_MAX: c_int = 38;
1883pub const _SC_BC_STRING_MAX: c_int = 39;
1884pub const _SC_COLL_WEIGHTS_MAX: c_int = 40;
1885pub const _SC_EXPR_NEST_MAX: c_int = 42;
1886pub const _SC_LINE_MAX: c_int = 43;
1887pub const _SC_RE_DUP_MAX: c_int = 44;
1888pub const _SC_2_VERSION: c_int = 46;
1889pub const _SC_2_C_BIND: c_int = 47;
1890pub const _SC_2_C_DEV: c_int = 48;
1891pub const _SC_2_FORT_DEV: c_int = 49;
1892pub const _SC_2_FORT_RUN: c_int = 50;
1893pub const _SC_2_SW_DEV: c_int = 51;
1894pub const _SC_2_LOCALEDEF: c_int = 52;
1895pub const _SC_UIO_MAXIOV: c_int = 60;
1896pub const _SC_IOV_MAX: c_int = 60;
1897pub const _SC_THREADS: c_int = 67;
1898pub const _SC_THREAD_SAFE_FUNCTIONS: c_int = 68;
1899pub const _SC_GETGR_R_SIZE_MAX: c_int = 69;
1900pub const _SC_GETPW_R_SIZE_MAX: c_int = 70;
1901pub const _SC_LOGIN_NAME_MAX: c_int = 71;
1902pub const _SC_TTY_NAME_MAX: c_int = 72;
1903pub const _SC_THREAD_DESTRUCTOR_ITERATIONS: c_int = 73;
1904pub const _SC_THREAD_KEYS_MAX: c_int = 74;
1905pub const _SC_THREAD_STACK_MIN: c_int = 75;
1906pub const _SC_THREAD_THREADS_MAX: c_int = 76;
1907pub const _SC_THREAD_ATTR_STACKADDR: c_int = 77;
1908pub const _SC_THREAD_ATTR_STACKSIZE: c_int = 78;
1909pub const _SC_THREAD_PRIORITY_SCHEDULING: c_int = 79;
1910pub const _SC_THREAD_PRIO_INHERIT: c_int = 80;
1911pub const _SC_THREAD_PRIO_PROTECT: c_int = 81;
1912pub const _SC_THREAD_PROCESS_SHARED: c_int = 82;
1913pub const _SC_NPROCESSORS_CONF: c_int = 83;
1914pub const _SC_NPROCESSORS_ONLN: c_int = 84;
1915pub const _SC_PHYS_PAGES: c_int = 85;
1916pub const _SC_AVPHYS_PAGES: c_int = 86;
1917pub const _SC_ATEXIT_MAX: c_int = 87;
1918pub const _SC_PASS_MAX: c_int = 88;
1919pub const _SC_XOPEN_VERSION: c_int = 89;
1920pub const _SC_XOPEN_XCU_VERSION: c_int = 90;
1921pub const _SC_XOPEN_UNIX: c_int = 91;
1922pub const _SC_XOPEN_CRYPT: c_int = 92;
1923pub const _SC_XOPEN_ENH_I18N: c_int = 93;
1924pub const _SC_XOPEN_SHM: c_int = 94;
1925pub const _SC_2_CHAR_TERM: c_int = 95;
1926pub const _SC_2_UPE: c_int = 97;
1927pub const _SC_XOPEN_XPG2: c_int = 98;
1928pub const _SC_XOPEN_XPG3: c_int = 99;
1929pub const _SC_XOPEN_XPG4: c_int = 100;
1930pub const _SC_NZERO: c_int = 109;
1931pub const _SC_XBS5_ILP32_OFF32: c_int = 125;
1932pub const _SC_XBS5_ILP32_OFFBIG: c_int = 126;
1933pub const _SC_XBS5_LP64_OFF64: c_int = 127;
1934pub const _SC_XBS5_LPBIG_OFFBIG: c_int = 128;
1935pub const _SC_XOPEN_LEGACY: c_int = 129;
1936pub const _SC_XOPEN_REALTIME: c_int = 130;
1937pub const _SC_XOPEN_REALTIME_THREADS: c_int = 131;
1938pub const _SC_ADVISORY_INFO: c_int = 132;
1939pub const _SC_BARRIERS: c_int = 133;
1940pub const _SC_CLOCK_SELECTION: c_int = 137;
1941pub const _SC_CPUTIME: c_int = 138;
1942pub const _SC_THREAD_CPUTIME: c_int = 139;
1943pub const _SC_MONOTONIC_CLOCK: c_int = 149;
1944pub const _SC_READER_WRITER_LOCKS: c_int = 153;
1945pub const _SC_SPIN_LOCKS: c_int = 154;
1946pub const _SC_REGEXP: c_int = 155;
1947pub const _SC_SHELL: c_int = 157;
1948pub const _SC_SPAWN: c_int = 159;
1949pub const _SC_SPORADIC_SERVER: c_int = 160;
1950pub const _SC_THREAD_SPORADIC_SERVER: c_int = 161;
1951pub const _SC_TIMEOUTS: c_int = 164;
1952pub const _SC_TYPED_MEMORY_OBJECTS: c_int = 165;
1953pub const _SC_2_PBS: c_int = 168;
1954pub const _SC_2_PBS_ACCOUNTING: c_int = 169;
1955pub const _SC_2_PBS_LOCATE: c_int = 170;
1956pub const _SC_2_PBS_MESSAGE: c_int = 171;
1957pub const _SC_2_PBS_TRACK: c_int = 172;
1958pub const _SC_SYMLOOP_MAX: c_int = 173;
1959pub const _SC_STREAMS: c_int = 174;
1960pub const _SC_2_PBS_CHECKPOINT: c_int = 175;
1961pub const _SC_V6_ILP32_OFF32: c_int = 176;
1962pub const _SC_V6_ILP32_OFFBIG: c_int = 177;
1963pub const _SC_V6_LP64_OFF64: c_int = 178;
1964pub const _SC_V6_LPBIG_OFFBIG: c_int = 179;
1965pub const _SC_HOST_NAME_MAX: c_int = 180;
1966pub const _SC_TRACE: c_int = 181;
1967pub const _SC_TRACE_EVENT_FILTER: c_int = 182;
1968pub const _SC_TRACE_INHERIT: c_int = 183;
1969pub const _SC_TRACE_LOG: c_int = 184;
1970pub const _SC_IPV6: c_int = 235;
1971pub const _SC_RAW_SOCKETS: c_int = 236;
1972pub const _SC_V7_ILP32_OFF32: c_int = 237;
1973pub const _SC_V7_ILP32_OFFBIG: c_int = 238;
1974pub const _SC_V7_LP64_OFF64: c_int = 239;
1975pub const _SC_V7_LPBIG_OFFBIG: c_int = 240;
1976pub const _SC_SS_REPL_MAX: c_int = 241;
1977pub const _SC_TRACE_EVENT_NAME_MAX: c_int = 242;
1978pub const _SC_TRACE_NAME_MAX: c_int = 243;
1979pub const _SC_TRACE_SYS_MAX: c_int = 244;
1980pub const _SC_TRACE_USER_EVENT_MAX: c_int = 245;
1981pub const _SC_XOPEN_STREAMS: c_int = 246;
1982pub const _SC_THREAD_ROBUST_PRIO_INHERIT: c_int = 247;
1983pub const _SC_THREAD_ROBUST_PRIO_PROTECT: c_int = 248;
1984
1985pub const RLIM_SAVED_MAX: crate::rlim_t = RLIM_INFINITY;
1986pub const RLIM_SAVED_CUR: crate::rlim_t = RLIM_INFINITY;
1987
1988pub const GLOB_ERR: c_int = 1 << 0;
1989pub const GLOB_MARK: c_int = 1 << 1;
1990pub const GLOB_NOSORT: c_int = 1 << 2;
1991pub const GLOB_DOOFFS: c_int = 1 << 3;
1992pub const GLOB_NOCHECK: c_int = 1 << 4;
1993pub const GLOB_APPEND: c_int = 1 << 5;
1994pub const GLOB_NOESCAPE: c_int = 1 << 6;
1995
1996pub const GLOB_NOSPACE: c_int = 1;
1997pub const GLOB_ABORTED: c_int = 2;
1998pub const GLOB_NOMATCH: c_int = 3;
1999
2000pub const POSIX_MADV_NORMAL: c_int = 0;
2001pub const POSIX_MADV_RANDOM: c_int = 1;
2002pub const POSIX_MADV_SEQUENTIAL: c_int = 2;
2003pub const POSIX_MADV_WILLNEED: c_int = 3;
2004
2005pub const S_IEXEC: mode_t = 0o0100;
2006pub const S_IWRITE: mode_t = 0o0200;
2007pub const S_IREAD: mode_t = 0o0400;
2008
2009pub const F_LOCK: c_int = 1;
2010pub const F_TEST: c_int = 3;
2011pub const F_TLOCK: c_int = 2;
2012pub const F_ULOCK: c_int = 0;
2013
2014pub const IFF_LOWER_UP: c_int = 0x10000;
2015pub const IFF_DORMANT: c_int = 0x20000;
2016pub const IFF_ECHO: c_int = 0x40000;
2017
2018pub const ST_RDONLY: c_ulong = 1;
2019pub const ST_NOSUID: c_ulong = 2;
2020pub const ST_NODEV: c_ulong = 4;
2021pub const ST_NOEXEC: c_ulong = 8;
2022pub const ST_SYNCHRONOUS: c_ulong = 16;
2023pub const ST_MANDLOCK: c_ulong = 64;
2024pub const ST_WRITE: c_ulong = 128;
2025pub const ST_APPEND: c_ulong = 256;
2026pub const ST_IMMUTABLE: c_ulong = 512;
2027pub const ST_NOATIME: c_ulong = 1024;
2028pub const ST_NODIRATIME: c_ulong = 2048;
2029
2030pub const RTLD_NEXT: *mut c_void = -1i64 as *mut c_void;
2031pub const RTLD_DEFAULT: *mut c_void = ptr::null_mut();
2032pub const RTLD_NODELETE: c_int = 0x1000;
2033pub const RTLD_NOW: c_int = 0x2;
2034
2035pub const TCP_MD5SIG: c_int = 14;
2036
2037pub const PTHREAD_MUTEX_INITIALIZER: pthread_mutex_t = pthread_mutex_t {
2038 size: [0; __SIZEOF_PTHREAD_MUTEX_T],
2039};
2040pub const PTHREAD_COND_INITIALIZER: pthread_cond_t = pthread_cond_t {
2041 size: [0; __SIZEOF_PTHREAD_COND_T],
2042};
2043pub const PTHREAD_RWLOCK_INITIALIZER: pthread_rwlock_t = pthread_rwlock_t {
2044 size: [0; __SIZEOF_PTHREAD_RWLOCK_T],
2045};
2046pub const PTHREAD_MUTEX_NORMAL: c_int = 0;
2047pub const PTHREAD_MUTEX_RECURSIVE: c_int = 1;
2048pub const PTHREAD_MUTEX_ERRORCHECK: c_int = 2;
2049pub const PTHREAD_MUTEX_DEFAULT: c_int = PTHREAD_MUTEX_NORMAL;
2050pub const PTHREAD_PROCESS_PRIVATE: c_int = 0;
2051pub const PTHREAD_PROCESS_SHARED: c_int = 1;
2052pub const __SIZEOF_PTHREAD_COND_T: usize = 48;
2053
2054pub const RENAME_NOREPLACE: c_int = 1;
2055pub const RENAME_EXCHANGE: c_int = 2;
2056pub const RENAME_WHITEOUT: c_int = 4;
2057
2058pub const SCHED_OTHER: c_int = 0;
2059pub const SCHED_FIFO: c_int = 1;
2060pub const SCHED_RR: c_int = 2;
2061pub const SCHED_BATCH: c_int = 3;
2062pub const SCHED_IDLE: c_int = 5;
2063
2064pub const IPPROTO_HOPOPTS: c_int = 0;
2070pub const IPPROTO_IGMP: c_int = 2;
2073pub const IPPROTO_IPIP: c_int = 4;
2075pub const IPPROTO_EGP: c_int = 8;
2078pub const IPPROTO_PUP: c_int = 12;
2080pub const IPPROTO_IDP: c_int = 22;
2083pub const IPPROTO_TP: c_int = 29;
2085pub const IPPROTO_DCCP: c_int = 33;
2087pub const IPPROTO_ROUTING: c_int = 43;
2090pub const IPPROTO_FRAGMENT: c_int = 44;
2092pub const IPPROTO_RSVP: c_int = 46;
2094pub const IPPROTO_GRE: c_int = 47;
2096pub const IPPROTO_ESP: c_int = 50;
2098pub const IPPROTO_AH: c_int = 51;
2100pub const IPPROTO_NONE: c_int = 59;
2103pub const IPPROTO_DSTOPTS: c_int = 60;
2105pub const IPPROTO_MTP: c_int = 92;
2106pub const IPPROTO_BEETPH: c_int = 94;
2107pub const IPPROTO_ENCAP: c_int = 98;
2109pub const IPPROTO_PIM: c_int = 103;
2111pub const IPPROTO_COMP: c_int = 108;
2113pub const IPPROTO_SCTP: c_int = 132;
2115pub const IPPROTO_MH: c_int = 135;
2116pub const IPPROTO_UDPLITE: c_int = 136;
2117pub const IPPROTO_MPLS: c_int = 137;
2118pub const IPPROTO_RAW: c_int = 255;
2120pub const IPPROTO_MAX: c_int = 256;
2121
2122pub const AF_IB: c_int = 27;
2123pub const AF_MPLS: c_int = 28;
2124pub const AF_NFC: c_int = 39;
2125pub const AF_VSOCK: c_int = 40;
2126pub const PF_IB: c_int = AF_IB;
2127pub const PF_MPLS: c_int = AF_MPLS;
2128pub const PF_NFC: c_int = AF_NFC;
2129pub const PF_VSOCK: c_int = AF_VSOCK;
2130
2131pub const IPC_PRIVATE: crate::key_t = 0;
2133
2134pub const IPC_CREAT: c_int = 0o1000;
2135pub const IPC_EXCL: c_int = 0o2000;
2136pub const IPC_NOWAIT: c_int = 0o4000;
2137
2138pub const IPC_RMID: c_int = 0;
2139pub const IPC_SET: c_int = 1;
2140pub const IPC_STAT: c_int = 2;
2141pub const IPC_INFO: c_int = 3;
2142pub const MSG_STAT: c_int = 11;
2143pub const MSG_INFO: c_int = 12;
2144
2145pub const MSG_NOERROR: c_int = 0o10000;
2146pub const MSG_EXCEPT: c_int = 0o20000;
2147pub const MSG_COPY: c_int = 0o40000;
2148
2149pub const SHM_R: c_int = 0o400;
2150pub const SHM_W: c_int = 0o200;
2151
2152pub const SHM_RDONLY: c_int = 0o10000;
2153pub const SHM_RND: c_int = 0o20000;
2154pub const SHM_REMAP: c_int = 0o40000;
2155pub const SHM_EXEC: c_int = 0o100000;
2156
2157pub const SHM_LOCK: c_int = 11;
2158pub const SHM_UNLOCK: c_int = 12;
2159
2160pub const SHM_HUGETLB: c_int = 0o4000;
2161pub const SHM_NORESERVE: c_int = 0o10000;
2162
2163pub const EPOLLRDHUP: c_int = 0x2000;
2164pub const EPOLLEXCLUSIVE: c_int = 0x10000000;
2165pub const EPOLLONESHOT: c_int = 0x40000000;
2166
2167pub const QFMT_VFS_OLD: c_int = 1;
2168pub const QFMT_VFS_V0: c_int = 2;
2169pub const QFMT_VFS_V1: c_int = 4;
2170
2171pub const EFD_SEMAPHORE: c_int = 0x1;
2172
2173pub const LOG_NFACILITIES: c_int = 24;
2174
2175pub const SEM_FAILED: *mut crate::sem_t = ptr::null_mut();
2176
2177pub const RB_AUTOBOOT: c_int = 0x01234567u32 as i32;
2178pub const RB_HALT_SYSTEM: c_int = 0xcdef0123u32 as i32;
2179pub const RB_ENABLE_CAD: c_int = 0x89abcdefu32 as i32;
2180pub const RB_DISABLE_CAD: c_int = 0x00000000u32 as i32;
2181pub const RB_POWER_OFF: c_int = 0x4321fedcu32 as i32;
2182pub const RB_SW_SUSPEND: c_int = 0xd000fce2u32 as i32;
2183pub const RB_KEXEC: c_int = 0x45584543u32 as i32;
2184
2185pub const AI_PASSIVE: c_int = 0x0001;
2186pub const AI_CANONNAME: c_int = 0x0002;
2187pub const AI_NUMERICHOST: c_int = 0x0004;
2188pub const AI_V4MAPPED: c_int = 0x0008;
2189pub const AI_ALL: c_int = 0x0010;
2190pub const AI_ADDRCONFIG: c_int = 0x0020;
2191
2192pub const AI_NUMERICSERV: c_int = 0x0400;
2193
2194pub const EAI_BADFLAGS: c_int = -1;
2195pub const EAI_NONAME: c_int = -2;
2196pub const EAI_AGAIN: c_int = -3;
2197pub const EAI_FAIL: c_int = -4;
2198pub const EAI_FAMILY: c_int = -6;
2199pub const EAI_SOCKTYPE: c_int = -7;
2200pub const EAI_SERVICE: c_int = -8;
2201pub const EAI_MEMORY: c_int = -10;
2202pub const EAI_OVERFLOW: c_int = -12;
2203
2204pub const NI_NUMERICHOST: c_int = 1;
2205pub const NI_NUMERICSERV: c_int = 2;
2206pub const NI_NOFQDN: c_int = 4;
2207pub const NI_NAMEREQD: c_int = 8;
2208pub const NI_DGRAM: c_int = 16;
2209
2210pub const SYNC_FILE_RANGE_WAIT_BEFORE: c_uint = 1;
2211pub const SYNC_FILE_RANGE_WRITE: c_uint = 2;
2212pub const SYNC_FILE_RANGE_WAIT_AFTER: c_uint = 4;
2213
2214pub const EAI_SYSTEM: c_int = -11;
2215
2216pub const AIO_CANCELED: c_int = 0;
2217pub const AIO_NOTCANCELED: c_int = 1;
2218pub const AIO_ALLDONE: c_int = 2;
2219pub const LIO_READ: c_int = 0;
2220pub const LIO_WRITE: c_int = 1;
2221pub const LIO_NOP: c_int = 2;
2222pub const LIO_WAIT: c_int = 0;
2223pub const LIO_NOWAIT: c_int = 1;
2224
2225pub const MREMAP_MAYMOVE: c_int = 1;
2226pub const MREMAP_FIXED: c_int = 2;
2227
2228pub const PR_SET_PDEATHSIG: c_int = 1;
2229pub const PR_GET_PDEATHSIG: c_int = 2;
2230
2231pub const PR_GET_DUMPABLE: c_int = 3;
2232pub const PR_SET_DUMPABLE: c_int = 4;
2233
2234pub const PR_GET_UNALIGN: c_int = 5;
2235pub const PR_SET_UNALIGN: c_int = 6;
2236pub const PR_UNALIGN_NOPRINT: c_int = 1;
2237pub const PR_UNALIGN_SIGBUS: c_int = 2;
2238
2239pub const PR_GET_KEEPCAPS: c_int = 7;
2240pub const PR_SET_KEEPCAPS: c_int = 8;
2241
2242pub const PR_GET_FPEMU: c_int = 9;
2243pub const PR_SET_FPEMU: c_int = 10;
2244pub const PR_FPEMU_NOPRINT: c_int = 1;
2245pub const PR_FPEMU_SIGFPE: c_int = 2;
2246
2247pub const PR_GET_FPEXC: c_int = 11;
2248pub const PR_SET_FPEXC: c_int = 12;
2249pub const PR_FP_EXC_SW_ENABLE: c_int = 0x80;
2250pub const PR_FP_EXC_DIV: c_int = 0x010000;
2251pub const PR_FP_EXC_OVF: c_int = 0x020000;
2252pub const PR_FP_EXC_UND: c_int = 0x040000;
2253pub const PR_FP_EXC_RES: c_int = 0x080000;
2254pub const PR_FP_EXC_INV: c_int = 0x100000;
2255pub const PR_FP_EXC_DISABLED: c_int = 0;
2256pub const PR_FP_EXC_NONRECOV: c_int = 1;
2257pub const PR_FP_EXC_ASYNC: c_int = 2;
2258pub const PR_FP_EXC_PRECISE: c_int = 3;
2259
2260pub const PR_GET_TIMING: c_int = 13;
2261pub const PR_SET_TIMING: c_int = 14;
2262pub const PR_TIMING_STATISTICAL: c_int = 0;
2263pub const PR_TIMING_TIMESTAMP: c_int = 1;
2264
2265pub const PR_SET_NAME: c_int = 15;
2266pub const PR_GET_NAME: c_int = 16;
2267
2268pub const PR_GET_ENDIAN: c_int = 19;
2269pub const PR_SET_ENDIAN: c_int = 20;
2270pub const PR_ENDIAN_BIG: c_int = 0;
2271pub const PR_ENDIAN_LITTLE: c_int = 1;
2272pub const PR_ENDIAN_PPC_LITTLE: c_int = 2;
2273
2274pub const PR_GET_SECCOMP: c_int = 21;
2275pub const PR_SET_SECCOMP: c_int = 22;
2276
2277pub const PR_CAPBSET_READ: c_int = 23;
2278pub const PR_CAPBSET_DROP: c_int = 24;
2279
2280pub const PR_GET_TSC: c_int = 25;
2281pub const PR_SET_TSC: c_int = 26;
2282pub const PR_TSC_ENABLE: c_int = 1;
2283pub const PR_TSC_SIGSEGV: c_int = 2;
2284
2285pub const PR_GET_SECUREBITS: c_int = 27;
2286pub const PR_SET_SECUREBITS: c_int = 28;
2287
2288pub const PR_SET_TIMERSLACK: c_int = 29;
2289pub const PR_GET_TIMERSLACK: c_int = 30;
2290
2291pub const PR_TASK_PERF_EVENTS_DISABLE: c_int = 31;
2292pub const PR_TASK_PERF_EVENTS_ENABLE: c_int = 32;
2293
2294pub const PR_MCE_KILL: c_int = 33;
2295pub const PR_MCE_KILL_CLEAR: c_int = 0;
2296pub const PR_MCE_KILL_SET: c_int = 1;
2297
2298pub const PR_MCE_KILL_LATE: c_int = 0;
2299pub const PR_MCE_KILL_EARLY: c_int = 1;
2300pub const PR_MCE_KILL_DEFAULT: c_int = 2;
2301
2302pub const PR_MCE_KILL_GET: c_int = 34;
2303
2304pub const PR_SET_MM: c_int = 35;
2305pub const PR_SET_MM_START_CODE: c_int = 1;
2306pub const PR_SET_MM_END_CODE: c_int = 2;
2307pub const PR_SET_MM_START_DATA: c_int = 3;
2308pub const PR_SET_MM_END_DATA: c_int = 4;
2309pub const PR_SET_MM_START_STACK: c_int = 5;
2310pub const PR_SET_MM_START_BRK: c_int = 6;
2311pub const PR_SET_MM_BRK: c_int = 7;
2312pub const PR_SET_MM_ARG_START: c_int = 8;
2313pub const PR_SET_MM_ARG_END: c_int = 9;
2314pub const PR_SET_MM_ENV_START: c_int = 10;
2315pub const PR_SET_MM_ENV_END: c_int = 11;
2316pub const PR_SET_MM_AUXV: c_int = 12;
2317pub const PR_SET_MM_EXE_FILE: c_int = 13;
2318pub const PR_SET_MM_MAP: c_int = 14;
2319pub const PR_SET_MM_MAP_SIZE: c_int = 15;
2320
2321pub const PR_SET_PTRACER: c_int = 0x59616d61;
2322pub const PR_SET_PTRACER_ANY: c_ulong = 0xffffffffffffffff;
2323
2324pub const PR_SET_CHILD_SUBREAPER: c_int = 36;
2325pub const PR_GET_CHILD_SUBREAPER: c_int = 37;
2326
2327pub const PR_SET_NO_NEW_PRIVS: c_int = 38;
2328pub const PR_GET_NO_NEW_PRIVS: c_int = 39;
2329
2330pub const PR_GET_TID_ADDRESS: c_int = 40;
2331
2332pub const PR_SET_THP_DISABLE: c_int = 41;
2333pub const PR_GET_THP_DISABLE: c_int = 42;
2334
2335pub const PR_MPX_ENABLE_MANAGEMENT: c_int = 43;
2336pub const PR_MPX_DISABLE_MANAGEMENT: c_int = 44;
2337
2338pub const PR_SET_FP_MODE: c_int = 45;
2339pub const PR_GET_FP_MODE: c_int = 46;
2340pub const PR_FP_MODE_FR: c_int = 1 << 0;
2341pub const PR_FP_MODE_FRE: c_int = 1 << 1;
2342
2343pub const PR_CAP_AMBIENT: c_int = 47;
2344pub const PR_CAP_AMBIENT_IS_SET: c_int = 1;
2345pub const PR_CAP_AMBIENT_RAISE: c_int = 2;
2346pub const PR_CAP_AMBIENT_LOWER: c_int = 3;
2347pub const PR_CAP_AMBIENT_CLEAR_ALL: c_int = 4;
2348
2349pub const ITIMER_REAL: c_int = 0;
2350pub const ITIMER_VIRTUAL: c_int = 1;
2351pub const ITIMER_PROF: c_int = 2;
2352
2353pub const TFD_CLOEXEC: c_int = O_CLOEXEC;
2354pub const TFD_NONBLOCK: c_int = O_NONBLOCK;
2355pub const TFD_TIMER_ABSTIME: c_int = 1;
2356
2357pub const XATTR_CREATE: c_int = 0x1;
2358pub const XATTR_REPLACE: c_int = 0x2;
2359
2360pub const _POSIX_VDISABLE: crate::cc_t = 0;
2361
2362pub const FALLOC_FL_KEEP_SIZE: c_int = 0x01;
2363pub const FALLOC_FL_PUNCH_HOLE: c_int = 0x02;
2364pub const FALLOC_FL_COLLAPSE_RANGE: c_int = 0x08;
2365pub const FALLOC_FL_ZERO_RANGE: c_int = 0x10;
2366pub const FALLOC_FL_INSERT_RANGE: c_int = 0x20;
2367pub const FALLOC_FL_UNSHARE_RANGE: c_int = 0x40;
2368
2369pub const ENOATTR: c_int = crate::ENODATA;
2373
2374pub const SO_ORIGINAL_DST: c_int = 80;
2375pub const IUTF8: crate::tcflag_t = 0x00004000;
2376pub const CMSPAR: crate::tcflag_t = 0o10000000000;
2377
2378pub const MFD_CLOEXEC: c_uint = 0x0001;
2379pub const MFD_ALLOW_SEALING: c_uint = 0x0002;
2380
2381pub const PT_NULL: u32 = 0;
2385pub const PT_LOAD: u32 = 1;
2386pub const PT_DYNAMIC: u32 = 2;
2387pub const PT_INTERP: u32 = 3;
2388pub const PT_NOTE: u32 = 4;
2389pub const PT_SHLIB: u32 = 5;
2390pub const PT_PHDR: u32 = 6;
2391pub const PT_TLS: u32 = 7;
2392pub const PT_NUM: u32 = 8;
2393pub const PT_LOOS: u32 = 0x60000000;
2394pub const PT_GNU_EH_FRAME: u32 = 0x6474e550;
2395pub const PT_GNU_STACK: u32 = 0x6474e551;
2396pub const PT_GNU_RELRO: u32 = 0x6474e552;
2397
2398pub const ETH_P_LOOP: c_int = 0x0060;
2400pub const ETH_P_PUP: c_int = 0x0200;
2401pub const ETH_P_PUPAT: c_int = 0x0201;
2402pub const ETH_P_IP: c_int = 0x0800;
2403pub const ETH_P_X25: c_int = 0x0805;
2404pub const ETH_P_ARP: c_int = 0x0806;
2405pub const ETH_P_BPQ: c_int = 0x08FF;
2406pub const ETH_P_IEEEPUP: c_int = 0x0a00;
2407pub const ETH_P_IEEEPUPAT: c_int = 0x0a01;
2408pub const ETH_P_BATMAN: c_int = 0x4305;
2409pub const ETH_P_DEC: c_int = 0x6000;
2410pub const ETH_P_DNA_DL: c_int = 0x6001;
2411pub const ETH_P_DNA_RC: c_int = 0x6002;
2412pub const ETH_P_DNA_RT: c_int = 0x6003;
2413pub const ETH_P_LAT: c_int = 0x6004;
2414pub const ETH_P_DIAG: c_int = 0x6005;
2415pub const ETH_P_CUST: c_int = 0x6006;
2416pub const ETH_P_SCA: c_int = 0x6007;
2417pub const ETH_P_TEB: c_int = 0x6558;
2418pub const ETH_P_RARP: c_int = 0x8035;
2419pub const ETH_P_ATALK: c_int = 0x809B;
2420pub const ETH_P_AARP: c_int = 0x80F3;
2421pub const ETH_P_8021Q: c_int = 0x8100;
2422pub const ETH_P_IPX: c_int = 0x8137;
2423pub const ETH_P_IPV6: c_int = 0x86DD;
2424pub const ETH_P_PAUSE: c_int = 0x8808;
2425pub const ETH_P_SLOW: c_int = 0x8809;
2426pub const ETH_P_WCCP: c_int = 0x883E;
2427pub const ETH_P_MPLS_UC: c_int = 0x8847;
2428pub const ETH_P_MPLS_MC: c_int = 0x8848;
2429pub const ETH_P_ATMMPOA: c_int = 0x884c;
2430pub const ETH_P_PPP_DISC: c_int = 0x8863;
2431pub const ETH_P_PPP_SES: c_int = 0x8864;
2432pub const ETH_P_LINK_CTL: c_int = 0x886c;
2433pub const ETH_P_ATMFATE: c_int = 0x8884;
2434pub const ETH_P_PAE: c_int = 0x888E;
2435pub const ETH_P_AOE: c_int = 0x88A2;
2436pub const ETH_P_8021AD: c_int = 0x88A8;
2437pub const ETH_P_802_EX1: c_int = 0x88B5;
2438pub const ETH_P_TIPC: c_int = 0x88CA;
2439pub const ETH_P_8021AH: c_int = 0x88E7;
2440pub const ETH_P_MVRP: c_int = 0x88F5;
2441pub const ETH_P_1588: c_int = 0x88F7;
2442pub const ETH_P_PRP: c_int = 0x88FB;
2443pub const ETH_P_FCOE: c_int = 0x8906;
2444pub const ETH_P_TDLS: c_int = 0x890D;
2445pub const ETH_P_FIP: c_int = 0x8914;
2446pub const ETH_P_80221: c_int = 0x8917;
2447pub const ETH_P_LOOPBACK: c_int = 0x9000;
2448pub const ETH_P_QINQ1: c_int = 0x9100;
2449pub const ETH_P_QINQ2: c_int = 0x9200;
2450pub const ETH_P_QINQ3: c_int = 0x9300;
2451pub const ETH_P_EDSA: c_int = 0xDADA;
2452pub const ETH_P_AF_IUCV: c_int = 0xFBFB;
2453
2454pub const ETH_P_802_3_MIN: c_int = 0x0600;
2455
2456pub const ETH_P_802_3: c_int = 0x0001;
2457pub const ETH_P_AX25: c_int = 0x0002;
2458pub const ETH_P_ALL: c_int = 0x0003;
2459pub const ETH_P_802_2: c_int = 0x0004;
2460pub const ETH_P_SNAP: c_int = 0x0005;
2461pub const ETH_P_DDCMP: c_int = 0x0006;
2462pub const ETH_P_WAN_PPP: c_int = 0x0007;
2463pub const ETH_P_PPP_MP: c_int = 0x0008;
2464pub const ETH_P_LOCALTALK: c_int = 0x0009;
2465pub const ETH_P_CAN: c_int = 0x000C;
2466pub const ETH_P_CANFD: c_int = 0x000D;
2467pub const ETH_P_PPPTALK: c_int = 0x0010;
2468pub const ETH_P_TR_802_2: c_int = 0x0011;
2469pub const ETH_P_MOBITEX: c_int = 0x0015;
2470pub const ETH_P_CONTROL: c_int = 0x0016;
2471pub const ETH_P_IRDA: c_int = 0x0017;
2472pub const ETH_P_ECONET: c_int = 0x0018;
2473pub const ETH_P_HDLC: c_int = 0x0019;
2474pub const ETH_P_ARCNET: c_int = 0x001A;
2475pub const ETH_P_DSA: c_int = 0x001B;
2476pub const ETH_P_TRAILER: c_int = 0x001C;
2477pub const ETH_P_PHONET: c_int = 0x00F5;
2478pub const ETH_P_IEEE802154: c_int = 0x00F6;
2479pub const ETH_P_CAIF: c_int = 0x00F7;
2480
2481pub const SFD_CLOEXEC: c_int = 0x080000;
2482
2483pub const NCCS: usize = 32;
2484
2485pub const O_TRUNC: c_int = 0x00040000;
2486pub const O_NOATIME: c_int = 0x00002000;
2487pub const O_CLOEXEC: c_int = 0x00000100;
2488pub const O_TMPFILE: c_int = 0x00004000;
2489
2490pub const EBFONT: c_int = 59;
2491pub const ENOSTR: c_int = 60;
2492pub const ENODATA: c_int = 61;
2493pub const ETIME: c_int = 62;
2494pub const ENOSR: c_int = 63;
2495pub const ENONET: c_int = 64;
2496pub const ENOPKG: c_int = 65;
2497pub const EREMOTE: c_int = 66;
2498pub const ENOLINK: c_int = 67;
2499pub const EADV: c_int = 68;
2500pub const ESRMNT: c_int = 69;
2501pub const ECOMM: c_int = 70;
2502pub const EPROTO: c_int = 71;
2503pub const EDOTDOT: c_int = 73;
2504
2505pub const SA_NODEFER: c_int = 0x40000000;
2506pub const SA_RESETHAND: c_int = u32_cast_int(0x80000000);
2507pub const SA_RESTART: c_int = 0x10000000;
2508pub const SA_NOCLDSTOP: c_int = 0x00000001;
2509
2510pub const EPOLL_CLOEXEC: c_int = 0x80000;
2511
2512pub const EFD_CLOEXEC: c_int = 0x80000;
2513
2514pub const BUFSIZ: c_uint = 1024;
2515pub const TMP_MAX: c_uint = 10000;
2516pub const FOPEN_MAX: c_uint = 1000;
2517pub const O_PATH: c_int = 0x00400000;
2518pub const O_EXEC: c_int = O_PATH;
2519pub const O_SEARCH: c_int = O_PATH;
2520pub const O_ACCMODE: c_int = 03 | O_SEARCH;
2521pub const O_NDELAY: c_int = O_NONBLOCK;
2522pub const NI_MAXHOST: crate::socklen_t = 255;
2523pub const PTHREAD_STACK_MIN: size_t = 2048;
2524pub const POSIX_FADV_DONTNEED: c_int = 4;
2525pub const POSIX_FADV_NOREUSE: c_int = 5;
2526
2527pub const POSIX_MADV_DONTNEED: c_int = 4;
2528
2529pub const RLIM_INFINITY: crate::rlim_t = !0;
2530pub const RLIMIT_RTTIME: c_int = 15;
2531#[deprecated(since = "0.2.64", note = "Not stable across OS versions")]
2532pub const RLIMIT_NLIMITS: c_int = 16;
2533#[allow(deprecated)]
2534#[deprecated(since = "0.2.64", note = "Not stable across OS versions")]
2535pub const RLIM_NLIMITS: c_int = RLIMIT_NLIMITS;
2536
2537pub const MAP_ANONYMOUS: c_int = MAP_ANON;
2538
2539pub const SOCK_DCCP: c_int = 6;
2540pub const SOCK_PACKET: c_int = 10;
2541
2542pub const TCP_COOKIE_TRANSACTIONS: c_int = 15;
2543pub const TCP_THIN_LINEAR_TIMEOUTS: c_int = 16;
2544pub const TCP_THIN_DUPACK: c_int = 17;
2545pub const TCP_USER_TIMEOUT: c_int = 18;
2546pub const TCP_REPAIR: c_int = 19;
2547pub const TCP_REPAIR_QUEUE: c_int = 20;
2548pub const TCP_QUEUE_SEQ: c_int = 21;
2549pub const TCP_REPAIR_OPTIONS: c_int = 22;
2550pub const TCP_FASTOPEN: c_int = 23;
2551pub const TCP_TIMESTAMP: c_int = 24;
2552
2553pub const SIGUNUSED: c_int = crate::SIGSYS;
2554
2555pub const __SIZEOF_PTHREAD_CONDATTR_T: usize = 4;
2556pub const __SIZEOF_PTHREAD_MUTEXATTR_T: usize = 4;
2557pub const __SIZEOF_PTHREAD_RWLOCKATTR_T: usize = 8;
2558
2559pub const CPU_SETSIZE: c_int = 128;
2560
2561pub const PTRACE_TRACEME: c_int = 0;
2562pub const PTRACE_PEEKTEXT: c_int = 1;
2563pub const PTRACE_PEEKDATA: c_int = 2;
2564pub const PTRACE_PEEKUSER: c_int = 3;
2565pub const PTRACE_POKETEXT: c_int = 4;
2566pub const PTRACE_POKEDATA: c_int = 5;
2567pub const PTRACE_POKEUSER: c_int = 6;
2568pub const PTRACE_CONT: c_int = 7;
2569pub const PTRACE_KILL: c_int = 8;
2570pub const PTRACE_SINGLESTEP: c_int = 9;
2571pub const PTRACE_GETREGS: c_int = 12;
2572pub const PTRACE_SETREGS: c_int = 13;
2573pub const PTRACE_GETFPREGS: c_int = 14;
2574pub const PTRACE_SETFPREGS: c_int = 15;
2575pub const PTRACE_ATTACH: c_int = 16;
2576pub const PTRACE_DETACH: c_int = 17;
2577pub const PTRACE_GETFPXREGS: c_int = 18;
2578pub const PTRACE_SETFPXREGS: c_int = 19;
2579pub const PTRACE_SYSCALL: c_int = 24;
2580pub const PTRACE_SETOPTIONS: c_int = 0x4200;
2581pub const PTRACE_GETEVENTMSG: c_int = 0x4201;
2582pub const PTRACE_GETSIGINFO: c_int = 0x4202;
2583pub const PTRACE_SETSIGINFO: c_int = 0x4203;
2584pub const PTRACE_GETREGSET: c_int = 0x4204;
2585pub const PTRACE_SETREGSET: c_int = 0x4205;
2586pub const PTRACE_SEIZE: c_int = 0x4206;
2587pub const PTRACE_INTERRUPT: c_int = 0x4207;
2588pub const PTRACE_LISTEN: c_int = 0x4208;
2589pub const PTRACE_PEEKSIGINFO: c_int = 0x4209;
2590
2591pub const EPOLLWAKEUP: c_int = 0x20000000;
2592
2593pub const EFD_NONBLOCK: c_int = crate::O_NONBLOCK;
2594
2595pub const SFD_NONBLOCK: c_int = crate::O_NONBLOCK;
2596
2597pub const TCSANOW: c_int = 0;
2598pub const TCSADRAIN: c_int = 1;
2599pub const TCSAFLUSH: c_int = 2;
2600
2601pub const TIOCINQ: c_int = crate::FIONREAD;
2602
2603pub const RTLD_GLOBAL: c_int = 0x100;
2604pub const RTLD_NOLOAD: c_int = 0x4;
2605
2606pub const MCL_CURRENT: c_int = 0x0001;
2607pub const MCL_FUTURE: c_int = 0x0002;
2608
2609pub const CBAUD: crate::tcflag_t = 0o0010017;
2610pub const TAB1: c_int = 0x00000800;
2611pub const TAB2: c_int = 0x00001000;
2612pub const TAB3: c_int = 0x00001800;
2613pub const CR1: c_int = 0x00000200;
2614pub const CR2: c_int = 0x00000400;
2615pub const CR3: c_int = 0x00000600;
2616pub const FF1: c_int = 0x00008000;
2617pub const BS1: c_int = 0x00002000;
2618pub const VT1: c_int = 0x00004000;
2619pub const VWERASE: usize = 14;
2620pub const VREPRINT: usize = 12;
2621pub const VSUSP: usize = 10;
2622pub const VSTART: usize = 8;
2623pub const VSTOP: usize = 9;
2624pub const VDISCARD: usize = 13;
2625pub const VTIME: usize = 5;
2626pub const IXON: crate::tcflag_t = 0x00000400;
2627pub const IXOFF: crate::tcflag_t = 0x00001000;
2628pub const ONLCR: crate::tcflag_t = 0x4;
2629pub const CSIZE: crate::tcflag_t = 0x00000030;
2630pub const CS6: crate::tcflag_t = 0x00000010;
2631pub const CS7: crate::tcflag_t = 0x00000020;
2632pub const CS8: crate::tcflag_t = 0x00000030;
2633pub const CSTOPB: crate::tcflag_t = 0x00000040;
2634pub const CREAD: crate::tcflag_t = 0x00000080;
2635pub const PARENB: crate::tcflag_t = 0x00000100;
2636pub const PARODD: crate::tcflag_t = 0x00000200;
2637pub const HUPCL: crate::tcflag_t = 0x00000400;
2638pub const CLOCAL: crate::tcflag_t = 0x00000800;
2639pub const ECHOKE: crate::tcflag_t = 0x00000800;
2640pub const ECHOE: crate::tcflag_t = 0x00000010;
2641pub const ECHOK: crate::tcflag_t = 0x00000020;
2642pub const ECHONL: crate::tcflag_t = 0x00000040;
2643pub const ECHOPRT: crate::tcflag_t = 0x00000400;
2644pub const ECHOCTL: crate::tcflag_t = 0x00000200;
2645pub const ISIG: crate::tcflag_t = 0x00000001;
2646pub const ICANON: crate::tcflag_t = 0x00000002;
2647pub const PENDIN: crate::tcflag_t = 0x00004000;
2648pub const NOFLSH: crate::tcflag_t = 0x00000080;
2649pub const CIBAUD: crate::tcflag_t = 0o02003600000;
2650pub const CBAUDEX: crate::tcflag_t = 0o010000;
2651pub const VSWTC: usize = 7;
2652pub const OLCUC: crate::tcflag_t = 0o000002;
2653pub const NLDLY: crate::tcflag_t = 0o000400;
2654pub const CRDLY: crate::tcflag_t = 0o003000;
2655pub const TABDLY: crate::tcflag_t = 0o014000;
2656pub const BSDLY: crate::tcflag_t = 0o020000;
2657pub const FFDLY: crate::tcflag_t = 0o100000;
2658pub const VTDLY: crate::tcflag_t = 0o040000;
2659pub const XTABS: crate::tcflag_t = 0o014000;
2660
2661pub const B0: crate::speed_t = 0o000000;
2662pub const B50: crate::speed_t = 0o000001;
2663pub const B75: crate::speed_t = 0o000002;
2664pub const B110: crate::speed_t = 0o000003;
2665pub const B134: crate::speed_t = 0o000004;
2666pub const B150: crate::speed_t = 0o000005;
2667pub const B200: crate::speed_t = 0o000006;
2668pub const B300: crate::speed_t = 0o000007;
2669pub const B600: crate::speed_t = 0o000010;
2670pub const B1200: crate::speed_t = 0o000011;
2671pub const B1800: crate::speed_t = 0o000012;
2672pub const B2400: crate::speed_t = 0o000013;
2673pub const B4800: crate::speed_t = 0o000014;
2674pub const B9600: crate::speed_t = 0o000015;
2675pub const B19200: crate::speed_t = 0o000016;
2676pub const B38400: crate::speed_t = 0o000017;
2677pub const EXTA: crate::speed_t = B19200;
2678pub const EXTB: crate::speed_t = B38400;
2679pub const B57600: crate::speed_t = 0o010001;
2680pub const B115200: crate::speed_t = 0o010002;
2681pub const B230400: crate::speed_t = 0o010003;
2682pub const B460800: crate::speed_t = 0o010004;
2683pub const B500000: crate::speed_t = 0o010005;
2684pub const B576000: crate::speed_t = 0o010006;
2685pub const B921600: crate::speed_t = 0o010007;
2686pub const B1000000: crate::speed_t = 0o010010;
2687pub const B1152000: crate::speed_t = 0o010011;
2688pub const B1500000: crate::speed_t = 0o010012;
2689pub const B2000000: crate::speed_t = 0o010013;
2690pub const B2500000: crate::speed_t = 0o010014;
2691pub const B3000000: crate::speed_t = 0o010015;
2692pub const B3500000: crate::speed_t = 0o010016;
2693pub const B4000000: crate::speed_t = 0o010017;
2694
2695pub const __SIZEOF_PTHREAD_RWLOCK_T: usize = 56;
2696pub const __SIZEOF_PTHREAD_MUTEX_T: usize = 40;
2697
2698pub const O_ASYNC: c_int = 0x00000400;
2699
2700pub const FIOCLEX: c_int = 0x5451;
2701pub const FIONBIO: c_int = 0x5421;
2702
2703pub const RLIMIT_RSS: c_int = 5;
2704pub const RLIMIT_NOFILE: c_int = 7;
2705pub const RLIMIT_AS: c_int = 9;
2706pub const RLIMIT_NPROC: c_int = 6;
2707pub const RLIMIT_MEMLOCK: c_int = 8;
2708
2709pub const O_APPEND: c_int = 0x00100000;
2710pub const O_CREAT: c_int = 0x00010000;
2711pub const O_EXCL: c_int = 0x00020000;
2712pub const O_NOCTTY: c_int = 0x00000200;
2713pub const O_NONBLOCK: c_int = 0x00000010;
2714pub const O_SYNC: c_int = 0x00000040 | O_DSYNC;
2715pub const O_RSYNC: c_int = O_SYNC;
2716pub const O_DSYNC: c_int = 0x00000020;
2717
2718pub const SOCK_CLOEXEC: c_int = 0o2000000;
2719pub const SOCK_NONBLOCK: c_int = 0o4000;
2720
2721pub const MAP_ANON: c_int = 0x0020;
2722pub const MAP_GROWSDOWN: c_int = 0x0100;
2723pub const MAP_DENYWRITE: c_int = 0x0800;
2724pub const MAP_EXECUTABLE: c_int = 0x01000;
2725pub const MAP_LOCKED: c_int = 0x02000;
2726pub const MAP_NORESERVE: c_int = 0x04000;
2727pub const MAP_POPULATE: c_int = 0x08000;
2728pub const MAP_NONBLOCK: c_int = 0x010000;
2729pub const MAP_STACK: c_int = 0x020000;
2730
2731pub const SOCK_STREAM: c_int = 1;
2732pub const SOCK_DGRAM: c_int = 2;
2733pub const SOCK_SEQPACKET: c_int = 5;
2734
2735pub const SOL_SOCKET: c_int = 1;
2736
2737pub const EDEADLK: c_int = 35;
2738pub const ENAMETOOLONG: c_int = 36;
2739pub const ENOLCK: c_int = 37;
2740pub const ENOSYS: c_int = 38;
2741pub const ENOTEMPTY: c_int = 39;
2742pub const ELOOP: c_int = 40;
2743pub const ENOMSG: c_int = 42;
2744pub const EIDRM: c_int = 43;
2745pub const ECHRNG: c_int = 44;
2746pub const EL2NSYNC: c_int = 45;
2747pub const EL3HLT: c_int = 46;
2748pub const EL3RST: c_int = 47;
2749pub const ELNRNG: c_int = 48;
2750pub const EUNATCH: c_int = 49;
2751pub const ENOCSI: c_int = 50;
2752pub const EL2HLT: c_int = 51;
2753pub const EBADE: c_int = 52;
2754pub const EBADR: c_int = 53;
2755pub const EXFULL: c_int = 54;
2756pub const ENOANO: c_int = 55;
2757pub const EBADRQC: c_int = 56;
2758pub const EBADSLT: c_int = 57;
2759pub const EDEADLOCK: c_int = EDEADLK;
2760pub const EMULTIHOP: c_int = 72;
2761pub const EBADMSG: c_int = 74;
2762pub const EOVERFLOW: c_int = 75;
2763pub const ENOTUNIQ: c_int = 76;
2764pub const EBADFD: c_int = 77;
2765pub const EREMCHG: c_int = 78;
2766pub const ELIBACC: c_int = 79;
2767pub const ELIBBAD: c_int = 80;
2768pub const ELIBSCN: c_int = 81;
2769pub const ELIBMAX: c_int = 82;
2770pub const ELIBEXEC: c_int = 83;
2771pub const EILSEQ: c_int = 84;
2772pub const ERESTART: c_int = 85;
2773pub const ESTRPIPE: c_int = 86;
2774pub const EUSERS: c_int = 87;
2775pub const ENOTSOCK: c_int = 88;
2776pub const EDESTADDRREQ: c_int = 89;
2777pub const EMSGSIZE: c_int = 90;
2778pub const EPROTOTYPE: c_int = 91;
2779pub const ENOPROTOOPT: c_int = 92;
2780pub const EPROTONOSUPPORT: c_int = 93;
2781pub const ESOCKTNOSUPPORT: c_int = 94;
2782pub const EOPNOTSUPP: c_int = 95;
2783pub const ENOTSUP: c_int = EOPNOTSUPP;
2784pub const EPFNOSUPPORT: c_int = 96;
2785pub const EAFNOSUPPORT: c_int = 97;
2786pub const EADDRINUSE: c_int = 98;
2787pub const EADDRNOTAVAIL: c_int = 99;
2788pub const ENETDOWN: c_int = 100;
2789pub const ENETUNREACH: c_int = 101;
2790pub const ENETRESET: c_int = 102;
2791pub const ECONNABORTED: c_int = 103;
2792pub const ECONNRESET: c_int = 104;
2793pub const ENOBUFS: c_int = 105;
2794pub const EISCONN: c_int = 106;
2795pub const ENOTCONN: c_int = 107;
2796pub const ESHUTDOWN: c_int = 108;
2797pub const ETOOMANYREFS: c_int = 109;
2798pub const ETIMEDOUT: c_int = 110;
2799pub const ECONNREFUSED: c_int = 111;
2800pub const EHOSTDOWN: c_int = 112;
2801pub const EHOSTUNREACH: c_int = 113;
2802pub const EALREADY: c_int = 114;
2803pub const EINPROGRESS: c_int = 115;
2804pub const ESTALE: c_int = 116;
2805pub const EUCLEAN: c_int = 117;
2806pub const ENOTNAM: c_int = 118;
2807pub const ENAVAIL: c_int = 119;
2808pub const EISNAM: c_int = 120;
2809pub const EREMOTEIO: c_int = 121;
2810pub const EDQUOT: c_int = 122;
2811pub const ENOMEDIUM: c_int = 123;
2812pub const EMEDIUMTYPE: c_int = 124;
2813pub const ECANCELED: c_int = 125;
2814pub const ENOKEY: c_int = 126;
2815pub const EKEYEXPIRED: c_int = 127;
2816pub const EKEYREVOKED: c_int = 128;
2817pub const EKEYREJECTED: c_int = 129;
2818pub const EOWNERDEAD: c_int = 130;
2819pub const ENOTRECOVERABLE: c_int = 131;
2820pub const ERFKILL: c_int = 132;
2821pub const EHWPOISON: c_int = 133;
2822
2823pub const SO_REUSEADDR: c_int = 2;
2824pub const SO_TYPE: c_int = 3;
2825pub const SO_ERROR: c_int = 4;
2826pub const SO_DONTROUTE: c_int = 5;
2827pub const SO_BROADCAST: c_int = 6;
2828pub const SO_SNDBUF: c_int = 7;
2829pub const SO_RCVBUF: c_int = 8;
2830pub const SO_KEEPALIVE: c_int = 9;
2831pub const SO_OOBINLINE: c_int = 10;
2832pub const SO_NO_CHECK: c_int = 11;
2833pub const SO_PRIORITY: c_int = 12;
2834pub const SO_LINGER: c_int = 13;
2835pub const SO_BSDCOMPAT: c_int = 14;
2836pub const SO_REUSEPORT: c_int = 15;
2837pub const SO_PASSCRED: c_int = 16;
2838pub const SO_PEERCRED: c_int = 17;
2839pub const SO_RCVLOWAT: c_int = 18;
2840pub const SO_SNDLOWAT: c_int = 19;
2841pub const SO_RCVTIMEO: c_int = 20;
2842pub const SO_SNDTIMEO: c_int = 21;
2843pub const SO_BINDTODEVICE: c_int = 25;
2844pub const SO_TIMESTAMP: c_int = 29;
2845pub const SO_ACCEPTCONN: c_int = 30;
2846pub const SO_SNDBUFFORCE: c_int = 32;
2847pub const SO_RCVBUFFORCE: c_int = 33;
2848pub const SO_TIMESTAMPNS: c_int = 35;
2849pub const SO_MARK: c_int = 36;
2850pub const SO_PROTOCOL: c_int = 38;
2851pub const SO_DOMAIN: c_int = 39;
2852pub const SO_RXQ_OVFL: c_int = 40;
2853pub const SO_PEEK_OFF: c_int = 42;
2854pub const SO_BUSY_POLL: c_int = 46;
2855pub const SO_COOKIE: c_int = 57;
2856pub const SO_BINDTOIFINDEX: c_int = 62;
2857pub const SO_FUCHSIA_MARK: c_int = 10000;
2858
2859pub const SA_ONSTACK: c_int = 0x08000000;
2860pub const SA_SIGINFO: c_int = 0x00000004;
2861pub const SA_NOCLDWAIT: c_int = 0x00000002;
2862
2863pub const SIGCHLD: c_int = 17;
2864pub const SIGBUS: c_int = 7;
2865pub const SIGTTIN: c_int = 21;
2866pub const SIGTTOU: c_int = 22;
2867pub const SIGXCPU: c_int = 24;
2868pub const SIGXFSZ: c_int = 25;
2869pub const SIGVTALRM: c_int = 26;
2870pub const SIGPROF: c_int = 27;
2871pub const SIGWINCH: c_int = 28;
2872pub const SIGUSR1: c_int = 10;
2873pub const SIGUSR2: c_int = 12;
2874pub const SIGCONT: c_int = 18;
2875pub const SIGSTOP: c_int = 19;
2876pub const SIGTSTP: c_int = 20;
2877pub const SIGURG: c_int = 23;
2878pub const SIGIO: c_int = 29;
2879pub const SIGSYS: c_int = 31;
2880pub const SIGSTKFLT: c_int = 16;
2881pub const SIGPOLL: c_int = 29;
2882pub const SIGPWR: c_int = 30;
2883pub const SIG_SETMASK: c_int = 2;
2884pub const SIG_BLOCK: c_int = 0x000000;
2885pub const SIG_UNBLOCK: c_int = 0x01;
2886
2887pub const EXTPROC: crate::tcflag_t = 0x00010000;
2888
2889pub const MAP_HUGETLB: c_int = 0x040000;
2890
2891pub const F_GETLK: c_int = 5;
2892pub const F_GETOWN: c_int = 9;
2893pub const F_SETLK: c_int = 6;
2894pub const F_SETLKW: c_int = 7;
2895pub const F_SETOWN: c_int = 8;
2896
2897pub const VEOF: usize = 4;
2898pub const VEOL: usize = 11;
2899pub const VEOL2: usize = 16;
2900pub const VMIN: usize = 6;
2901pub const IEXTEN: crate::tcflag_t = 0x00008000;
2902pub const TOSTOP: crate::tcflag_t = 0x00000100;
2903pub const FLUSHO: crate::tcflag_t = 0x00001000;
2904
2905pub const TCGETS: c_int = 0x5401;
2906pub const TCSETS: c_int = 0x5402;
2907pub const TCSETSW: c_int = 0x5403;
2908pub const TCSETSF: c_int = 0x5404;
2909pub const TCGETA: c_int = 0x5405;
2910pub const TCSETA: c_int = 0x5406;
2911pub const TCSETAW: c_int = 0x5407;
2912pub const TCSETAF: c_int = 0x5408;
2913pub const TCSBRK: c_int = 0x5409;
2914pub const TCXONC: c_int = 0x540A;
2915pub const TCFLSH: c_int = 0x540B;
2916pub const TIOCGSOFTCAR: c_int = 0x5419;
2917pub const TIOCSSOFTCAR: c_int = 0x541A;
2918pub const TIOCLINUX: c_int = 0x541C;
2919pub const TIOCGSERIAL: c_int = 0x541E;
2920pub const TIOCEXCL: c_int = 0x540C;
2921pub const TIOCNXCL: c_int = 0x540D;
2922pub const TIOCSCTTY: c_int = 0x540E;
2923pub const TIOCGPGRP: c_int = 0x540F;
2924pub const TIOCSPGRP: c_int = 0x5410;
2925pub const TIOCOUTQ: c_int = 0x5411;
2926pub const TIOCSTI: c_int = 0x5412;
2927pub const TIOCGWINSZ: c_int = 0x5413;
2928pub const TIOCSWINSZ: c_int = 0x5414;
2929pub const TIOCMGET: c_int = 0x5415;
2930pub const TIOCMBIS: c_int = 0x5416;
2931pub const TIOCMBIC: c_int = 0x5417;
2932pub const TIOCMSET: c_int = 0x5418;
2933pub const FIONREAD: c_int = 0x541B;
2934pub const TIOCCONS: c_int = 0x541D;
2935
2936pub const POLLWRNORM: c_short = 0x100;
2937pub const POLLWRBAND: c_short = 0x200;
2938
2939pub const TIOCM_LE: c_int = 0x001;
2940pub const TIOCM_DTR: c_int = 0x002;
2941pub const TIOCM_RTS: c_int = 0x004;
2942pub const TIOCM_ST: c_int = 0x008;
2943pub const TIOCM_SR: c_int = 0x010;
2944pub const TIOCM_CTS: c_int = 0x020;
2945pub const TIOCM_CAR: c_int = 0x040;
2946pub const TIOCM_RNG: c_int = 0x080;
2947pub const TIOCM_DSR: c_int = 0x100;
2948pub const TIOCM_CD: c_int = TIOCM_CAR;
2949pub const TIOCM_RI: c_int = TIOCM_RNG;
2950
2951pub const O_DIRECTORY: c_int = 0x00080000;
2952pub const O_DIRECT: c_int = 0x00000800;
2953pub const O_LARGEFILE: c_int = 0x00001000;
2954pub const O_NOFOLLOW: c_int = 0x00000080;
2955
2956pub const HUGETLB_FLAG_ENCODE_SHIFT: u32 = 26;
2957pub const MAP_HUGE_SHIFT: u32 = 26;
2958
2959cfg_if! {
2961 if #[cfg(target_pointer_width = "32")] {
2962 const ULONG_SIZE: usize = 32;
2963 } else if #[cfg(target_pointer_width = "64")] {
2964 const ULONG_SIZE: usize = 64;
2965 } else {
2966 }
2968}
2969
2970f! {
2973 pub unsafe fn FD_CLR(fd: c_int, set: *mut fd_set) -> () {
2974 let fd = fd as usize;
2975 let size = size_of_val(&(*set).fds_bits[0]) * 8;
2976 (*set).fds_bits[fd / size] &= !(1 << (fd % size));
2977 return;
2978 }
2979
2980 pub unsafe fn FD_ISSET(fd: c_int, set: *const fd_set) -> bool {
2981 let fd = fd as usize;
2982 let size = size_of_val(&(*set).fds_bits[0]) * 8;
2983 return ((*set).fds_bits[fd / size] & (1 << (fd % size))) != 0;
2984 }
2985
2986 pub unsafe fn FD_SET(fd: c_int, set: *mut fd_set) -> () {
2987 let fd = fd as usize;
2988 let size = size_of_val(&(*set).fds_bits[0]) * 8;
2989 (*set).fds_bits[fd / size] |= 1 << (fd % size);
2990 return;
2991 }
2992
2993 pub unsafe fn FD_ZERO(set: *mut fd_set) -> () {
2994 (*set).fds_bits.fill(0);
2995 }
2996
2997 pub unsafe fn CPU_ZERO(cpuset: &mut cpu_set_t) -> () {
2998 cpuset.bits.fill(0);
2999 }
3000
3001 pub unsafe fn CPU_SET(cpu: usize, cpuset: &mut cpu_set_t) -> () {
3002 let size_in_bits = 8 * size_of_val(&cpuset.bits[0]); let (idx, offset) = (cpu / size_in_bits, cpu % size_in_bits);
3004 cpuset.bits[idx] |= 1 << offset;
3005 ()
3006 }
3007
3008 pub unsafe fn CPU_CLR(cpu: usize, cpuset: &mut cpu_set_t) -> () {
3009 let size_in_bits = 8 * size_of_val(&cpuset.bits[0]); let (idx, offset) = (cpu / size_in_bits, cpu % size_in_bits);
3011 cpuset.bits[idx] &= !(1 << offset);
3012 ()
3013 }
3014
3015 pub unsafe fn CPU_ISSET(cpu: usize, cpuset: &cpu_set_t) -> bool {
3016 let size_in_bits = 8 * size_of_val(&cpuset.bits[0]);
3017 let (idx, offset) = (cpu / size_in_bits, cpu % size_in_bits);
3018 0 != (cpuset.bits[idx] & (1 << offset))
3019 }
3020
3021 pub unsafe fn CPU_EQUAL(set1: &cpu_set_t, set2: &cpu_set_t) -> bool {
3022 set1.bits == set2.bits
3023 }
3024
3025 pub unsafe fn CMSG_DATA(cmsg: *const cmsghdr) -> *mut c_uchar {
3026 cmsg.offset(1) as *mut c_uchar
3027 }
3028
3029 pub unsafe fn CMSG_NXTHDR(mhdr: *const msghdr, cmsg: *const cmsghdr) -> *mut cmsghdr {
3030 if ((*cmsg).cmsg_len as size_t) < size_of::<cmsghdr>() {
3031 ptr::null_mut()
3032 } else if __CMSG_NEXT(cmsg).add(size_of::<cmsghdr>()) >= __MHDR_END(mhdr) {
3033 ptr::null_mut()
3034 } else {
3035 __CMSG_NEXT(cmsg).cast()
3036 }
3037 }
3038
3039 pub unsafe fn CMSG_FIRSTHDR(mhdr: *const msghdr) -> *mut cmsghdr {
3040 if (*mhdr).msg_controllen as size_t >= size_of::<cmsghdr>() {
3041 (*mhdr).msg_control.cast()
3042 } else {
3043 ptr::null_mut()
3044 }
3045 }
3046
3047 pub const unsafe fn CMSG_ALIGN(len: size_t) -> size_t {
3048 (len + size_of::<size_t>() - 1) & !(size_of::<size_t>() - 1)
3049 }
3050
3051 pub const unsafe fn CMSG_SPACE(len: c_uint) -> c_uint {
3052 (CMSG_ALIGN(len as size_t) + CMSG_ALIGN(size_of::<cmsghdr>())) as c_uint
3053 }
3054
3055 pub const unsafe fn CMSG_LEN(len: c_uint) -> c_uint {
3056 (CMSG_ALIGN(size_of::<cmsghdr>()) + len as size_t) as c_uint
3057 }
3058}
3059
3060safe_f! {
3061 pub const safe fn WIFSTOPPED(status: c_int) -> bool {
3062 (status & 0xff) == 0x7f
3063 }
3064
3065 pub const safe fn WSTOPSIG(status: c_int) -> c_int {
3066 (status >> 8) & 0xff
3067 }
3068
3069 pub const safe fn WIFCONTINUED(status: c_int) -> bool {
3070 status == 0xffff
3071 }
3072
3073 pub const safe fn WIFSIGNALED(status: c_int) -> bool {
3074 ((status & 0x7f) + 1) as i8 >= 2
3075 }
3076
3077 pub const safe fn WTERMSIG(status: c_int) -> c_int {
3078 status & 0x7f
3079 }
3080
3081 pub const safe fn WIFEXITED(status: c_int) -> bool {
3082 (status & 0x7f) == 0
3083 }
3084
3085 pub const safe fn WEXITSTATUS(status: c_int) -> c_int {
3086 (status >> 8) & 0xff
3087 }
3088
3089 pub const safe fn WCOREDUMP(status: c_int) -> bool {
3090 (status & 0x80) != 0
3091 }
3092
3093 pub const safe fn QCMD(cmd: c_int, type_: c_int) -> c_int {
3094 (cmd << 8) | (type_ & 0x00ff)
3095 }
3096
3097 pub const safe fn makedev(major: c_uint, minor: c_uint) -> crate::dev_t {
3098 let major = major as crate::dev_t;
3099 let minor = minor as crate::dev_t;
3100 let mut dev = 0;
3101 dev |= (major & 0x00000fff) << 8;
3102 dev |= (major & 0xfffff000) << 32;
3103 dev |= (minor & 0x000000ff) << 0;
3104 dev |= (minor & 0xffffff00) << 12;
3105 dev
3106 }
3107
3108 pub const safe fn major(dev: crate::dev_t) -> c_uint {
3109 let mut major = 0;
3110 major |= (dev & 0x00000000000fff00) >> 8;
3111 major |= (dev & 0xfffff00000000000) >> 32;
3112 major as c_uint
3113 }
3114
3115 pub const safe fn minor(dev: crate::dev_t) -> c_uint {
3116 let mut minor = 0;
3117 minor |= (dev & 0x00000000000000ff) >> 0;
3118 minor |= (dev & 0x00000ffffff00000) >> 12;
3119 minor as c_uint
3120 }
3121}
3122
3123fn __CMSG_LEN(cmsg: *const cmsghdr) -> ssize_t {
3124 ((unsafe { (*cmsg).cmsg_len as size_t } + size_of::<c_long>() - 1) & !(size_of::<c_long>() - 1))
3125 as ssize_t
3126}
3127
3128fn __CMSG_NEXT(cmsg: *const cmsghdr) -> *mut c_uchar {
3129 (unsafe { cmsg.offset(__CMSG_LEN(cmsg)) }) as *mut c_uchar
3130}
3131
3132fn __MHDR_END(mhdr: *const msghdr) -> *mut c_uchar {
3133 unsafe { (*mhdr).msg_control.offset((*mhdr).msg_controllen as isize) }.cast()
3134}
3135
3136#[link(name = "c")]
3139#[link(name = "fdio")]
3140extern "C" {}
3141
3142extern_ty! {
3143 pub type FILE;
3144 pub type fpos_t; }
3146
3147extern "C" {
3148 pub fn isalnum(c: c_int) -> c_int;
3149 pub fn isalpha(c: c_int) -> c_int;
3150 pub fn iscntrl(c: c_int) -> c_int;
3151 pub fn isdigit(c: c_int) -> c_int;
3152 pub fn isgraph(c: c_int) -> c_int;
3153 pub fn islower(c: c_int) -> c_int;
3154 pub fn isprint(c: c_int) -> c_int;
3155 pub fn ispunct(c: c_int) -> c_int;
3156 pub fn isspace(c: c_int) -> c_int;
3157 pub fn isupper(c: c_int) -> c_int;
3158 pub fn isxdigit(c: c_int) -> c_int;
3159 pub fn isblank(c: c_int) -> c_int;
3160 pub fn tolower(c: c_int) -> c_int;
3161 pub fn toupper(c: c_int) -> c_int;
3162 pub fn fopen(filename: *const c_char, mode: *const c_char) -> *mut FILE;
3163 pub fn freopen(filename: *const c_char, mode: *const c_char, file: *mut FILE) -> *mut FILE;
3164 pub fn fflush(file: *mut FILE) -> c_int;
3165 pub fn fclose(file: *mut FILE) -> c_int;
3166 pub fn remove(filename: *const c_char) -> c_int;
3167 pub fn rename(oldname: *const c_char, newname: *const c_char) -> c_int;
3168 pub fn tmpfile() -> *mut FILE;
3169 pub fn setvbuf(stream: *mut FILE, buffer: *mut c_char, mode: c_int, size: size_t) -> c_int;
3170 pub fn setbuf(stream: *mut FILE, buf: *mut c_char);
3171 pub fn getchar() -> c_int;
3172 pub fn putchar(c: c_int) -> c_int;
3173 pub fn fgetc(stream: *mut FILE) -> c_int;
3174 pub fn fgets(buf: *mut c_char, n: c_int, stream: *mut FILE) -> *mut c_char;
3175 pub fn fputc(c: c_int, stream: *mut FILE) -> c_int;
3176 pub fn fputs(s: *const c_char, stream: *mut FILE) -> c_int;
3177 pub fn puts(s: *const c_char) -> c_int;
3178 pub fn ungetc(c: c_int, stream: *mut FILE) -> c_int;
3179 pub fn fread(ptr: *mut c_void, size: size_t, nobj: size_t, stream: *mut FILE) -> size_t;
3180 pub fn fwrite(ptr: *const c_void, size: size_t, nobj: size_t, stream: *mut FILE) -> size_t;
3181 pub fn fseek(stream: *mut FILE, offset: c_long, whence: c_int) -> c_int;
3182 pub fn ftell(stream: *mut FILE) -> c_long;
3183 pub fn rewind(stream: *mut FILE);
3184 pub fn fgetpos(stream: *mut FILE, ptr: *mut fpos_t) -> c_int;
3185 pub fn fsetpos(stream: *mut FILE, ptr: *const fpos_t) -> c_int;
3186 pub fn feof(stream: *mut FILE) -> c_int;
3187 pub fn ferror(stream: *mut FILE) -> c_int;
3188 pub fn perror(s: *const c_char);
3189 pub fn atof(s: *const c_char) -> c_double;
3190 pub fn atoi(s: *const c_char) -> c_int;
3191 pub fn atol(s: *const c_char) -> c_long;
3192 pub fn atoll(s: *const c_char) -> c_longlong;
3193 pub fn strtod(s: *const c_char, endp: *mut *mut c_char) -> c_double;
3194 pub fn strtof(s: *const c_char, endp: *mut *mut c_char) -> c_float;
3195 pub fn strtol(s: *const c_char, endp: *mut *mut c_char, base: c_int) -> c_long;
3196 pub fn strtoll(s: *const c_char, endp: *mut *mut c_char, base: c_int) -> c_longlong;
3197 pub fn strtoul(s: *const c_char, endp: *mut *mut c_char, base: c_int) -> c_ulong;
3198 pub fn strtoull(s: *const c_char, endp: *mut *mut c_char, base: c_int) -> c_ulonglong;
3199 pub fn calloc(nobj: size_t, size: size_t) -> *mut c_void;
3200 pub fn malloc(size: size_t) -> *mut c_void;
3201 pub fn realloc(p: *mut c_void, size: size_t) -> *mut c_void;
3202 pub fn free(p: *mut c_void);
3203 pub fn abort() -> !;
3204 pub fn exit(status: c_int) -> !;
3205 pub fn _exit(status: c_int) -> !;
3206 pub fn atexit(cb: extern "C" fn()) -> c_int;
3207 pub fn system(s: *const c_char) -> c_int;
3208 pub fn getenv(s: *const c_char) -> *mut c_char;
3209
3210 pub fn strcpy(dst: *mut c_char, src: *const c_char) -> *mut c_char;
3211 pub fn strncpy(dst: *mut c_char, src: *const c_char, n: size_t) -> *mut c_char;
3212 pub fn strcat(s: *mut c_char, ct: *const c_char) -> *mut c_char;
3213 pub fn strncat(s: *mut c_char, ct: *const c_char, n: size_t) -> *mut c_char;
3214 pub fn strcmp(cs: *const c_char, ct: *const c_char) -> c_int;
3215 pub fn strncmp(cs: *const c_char, ct: *const c_char, n: size_t) -> c_int;
3216 pub fn strcoll(cs: *const c_char, ct: *const c_char) -> c_int;
3217 pub fn strchr(cs: *const c_char, c: c_int) -> *mut c_char;
3218 pub fn strrchr(cs: *const c_char, c: c_int) -> *mut c_char;
3219 pub fn strspn(cs: *const c_char, ct: *const c_char) -> size_t;
3220 pub fn strcspn(cs: *const c_char, ct: *const c_char) -> size_t;
3221 pub fn strdup(cs: *const c_char) -> *mut c_char;
3222 pub fn strpbrk(cs: *const c_char, ct: *const c_char) -> *mut c_char;
3223 pub fn strstr(cs: *const c_char, ct: *const c_char) -> *mut c_char;
3224 pub fn strlen(cs: *const c_char) -> size_t;
3225 pub fn strnlen(cs: *const c_char, maxlen: size_t) -> size_t;
3226 pub fn strerror(n: c_int) -> *mut c_char;
3227 pub fn strtok(s: *mut c_char, t: *const c_char) -> *mut c_char;
3228 pub fn strxfrm(s: *mut c_char, ct: *const c_char, n: size_t) -> size_t;
3229 pub fn wcslen(buf: *const wchar_t) -> size_t;
3230 pub fn wcstombs(dest: *mut c_char, src: *const wchar_t, n: size_t) -> size_t;
3231
3232 pub fn memchr(cx: *const c_void, c: c_int, n: size_t) -> *mut c_void;
3233 pub fn wmemchr(cx: *const wchar_t, c: wchar_t, n: size_t) -> *mut wchar_t;
3234 pub fn memcmp(cx: *const c_void, ct: *const c_void, n: size_t) -> c_int;
3235 pub fn memcpy(dest: *mut c_void, src: *const c_void, n: size_t) -> *mut c_void;
3236 pub fn memmove(dest: *mut c_void, src: *const c_void, n: size_t) -> *mut c_void;
3237 pub fn memset(dest: *mut c_void, c: c_int, n: size_t) -> *mut c_void;
3238
3239 pub fn abs(i: c_int) -> c_int;
3240 pub fn labs(i: c_long) -> c_long;
3241 pub fn rand() -> c_int;
3242 pub fn srand(seed: c_uint);
3243
3244 pub fn getpwnam(name: *const c_char) -> *mut passwd;
3245 pub fn getpwuid(uid: crate::uid_t) -> *mut passwd;
3246
3247 pub fn fprintf(stream: *mut crate::FILE, format: *const c_char, ...) -> c_int;
3248 pub fn printf(format: *const c_char, ...) -> c_int;
3249 pub fn snprintf(s: *mut c_char, n: size_t, format: *const c_char, ...) -> c_int;
3250 pub fn sprintf(s: *mut c_char, format: *const c_char, ...) -> c_int;
3251 pub fn fscanf(stream: *mut crate::FILE, format: *const c_char, ...) -> c_int;
3252 pub fn scanf(format: *const c_char, ...) -> c_int;
3253 pub fn sscanf(s: *const c_char, format: *const c_char, ...) -> c_int;
3254 pub fn getchar_unlocked() -> c_int;
3255 pub fn putchar_unlocked(c: c_int) -> c_int;
3256
3257 pub fn socket(domain: c_int, ty: c_int, protocol: c_int) -> c_int;
3258 pub fn connect(socket: c_int, address: *const sockaddr, len: socklen_t) -> c_int;
3259 pub fn listen(socket: c_int, backlog: c_int) -> c_int;
3260 pub fn accept(socket: c_int, address: *mut sockaddr, address_len: *mut socklen_t) -> c_int;
3261 pub fn getpeername(socket: c_int, address: *mut sockaddr, address_len: *mut socklen_t)
3262 -> c_int;
3263 pub fn getsockname(socket: c_int, address: *mut sockaddr, address_len: *mut socklen_t)
3264 -> c_int;
3265 pub fn setsockopt(
3266 socket: c_int,
3267 level: c_int,
3268 name: c_int,
3269 value: *const c_void,
3270 option_len: socklen_t,
3271 ) -> c_int;
3272 pub fn socketpair(
3273 domain: c_int,
3274 type_: c_int,
3275 protocol: c_int,
3276 socket_vector: *mut c_int,
3277 ) -> c_int;
3278 pub fn sendto(
3279 socket: c_int,
3280 buf: *const c_void,
3281 len: size_t,
3282 flags: c_int,
3283 addr: *const sockaddr,
3284 addrlen: socklen_t,
3285 ) -> ssize_t;
3286 pub fn shutdown(socket: c_int, how: c_int) -> c_int;
3287
3288 pub fn chmod(path: *const c_char, mode: mode_t) -> c_int;
3289 pub fn fchmod(fd: c_int, mode: mode_t) -> c_int;
3290
3291 pub fn fstat(fildes: c_int, buf: *mut stat) -> c_int;
3292
3293 pub fn mkdir(path: *const c_char, mode: mode_t) -> c_int;
3294
3295 pub fn stat(path: *const c_char, buf: *mut stat) -> c_int;
3296
3297 pub fn pclose(stream: *mut crate::FILE) -> c_int;
3298 pub fn fdopen(fd: c_int, mode: *const c_char) -> *mut crate::FILE;
3299 pub fn fileno(stream: *mut crate::FILE) -> c_int;
3300
3301 pub fn open(path: *const c_char, oflag: c_int, ...) -> c_int;
3302 pub fn creat(path: *const c_char, mode: mode_t) -> c_int;
3303 pub fn fcntl(fd: c_int, cmd: c_int, ...) -> c_int;
3304
3305 pub fn opendir(dirname: *const c_char) -> *mut crate::DIR;
3306 pub fn readdir(dirp: *mut crate::DIR) -> *mut crate::dirent;
3307 pub fn readdir_r(
3308 dirp: *mut crate::DIR,
3309 entry: *mut crate::dirent,
3310 result: *mut *mut crate::dirent,
3311 ) -> c_int;
3312 pub fn closedir(dirp: *mut crate::DIR) -> c_int;
3313 pub fn rewinddir(dirp: *mut crate::DIR);
3314
3315 pub fn openat(dirfd: c_int, pathname: *const c_char, flags: c_int, ...) -> c_int;
3316 pub fn fchmodat(dirfd: c_int, pathname: *const c_char, mode: mode_t, flags: c_int) -> c_int;
3317 pub fn fchown(fd: c_int, owner: crate::uid_t, group: crate::gid_t) -> c_int;
3318 pub fn fchownat(
3319 dirfd: c_int,
3320 pathname: *const c_char,
3321 owner: crate::uid_t,
3322 group: crate::gid_t,
3323 flags: c_int,
3324 ) -> c_int;
3325 pub fn fstatat(dirfd: c_int, pathname: *const c_char, buf: *mut stat, flags: c_int) -> c_int;
3326 pub fn linkat(
3327 olddirfd: c_int,
3328 oldpath: *const c_char,
3329 newdirfd: c_int,
3330 newpath: *const c_char,
3331 flags: c_int,
3332 ) -> c_int;
3333 pub fn mkdirat(dirfd: c_int, pathname: *const c_char, mode: mode_t) -> c_int;
3334 pub fn readlinkat(
3335 dirfd: c_int,
3336 pathname: *const c_char,
3337 buf: *mut c_char,
3338 bufsiz: size_t,
3339 ) -> ssize_t;
3340 pub fn renameat(
3341 olddirfd: c_int,
3342 oldpath: *const c_char,
3343 newdirfd: c_int,
3344 newpath: *const c_char,
3345 ) -> c_int;
3346 pub fn symlinkat(target: *const c_char, newdirfd: c_int, linkpath: *const c_char) -> c_int;
3347 pub fn unlinkat(dirfd: c_int, pathname: *const c_char, flags: c_int) -> c_int;
3348
3349 pub fn access(path: *const c_char, amode: c_int) -> c_int;
3350 pub fn alarm(seconds: c_uint) -> c_uint;
3351 pub fn chdir(dir: *const c_char) -> c_int;
3352 pub fn chown(path: *const c_char, uid: uid_t, gid: gid_t) -> c_int;
3353 pub fn lchown(path: *const c_char, uid: uid_t, gid: gid_t) -> c_int;
3354 pub fn close(fd: c_int) -> c_int;
3355 pub fn dup(fd: c_int) -> c_int;
3356 pub fn dup2(src: c_int, dst: c_int) -> c_int;
3357
3358 pub fn execl(path: *const c_char, arg0: *const c_char, ...) -> c_int;
3359 pub fn execle(path: *const c_char, arg0: *const c_char, ...) -> c_int;
3360 pub fn execlp(file: *const c_char, arg0: *const c_char, ...) -> c_int;
3361
3362 pub fn execv(prog: *const c_char, argv: *const *const c_char) -> c_int;
3364 pub fn execve(
3365 prog: *const c_char,
3366 argv: *const *const c_char,
3367 envp: *const *const c_char,
3368 ) -> c_int;
3369 pub fn execvp(c: *const c_char, argv: *const *const c_char) -> c_int;
3370
3371 pub fn fork() -> pid_t;
3372 pub fn fpathconf(filedes: c_int, name: c_int) -> c_long;
3373 pub fn getcwd(buf: *mut c_char, size: size_t) -> *mut c_char;
3374 pub fn getegid() -> gid_t;
3375 pub fn geteuid() -> uid_t;
3376 pub fn getgid() -> gid_t;
3377 pub fn getgroups(ngroups_max: c_int, groups: *mut gid_t) -> c_int;
3378 pub fn getlogin() -> *mut c_char;
3379 pub fn getopt(argc: c_int, argv: *const *mut c_char, optstr: *const c_char) -> c_int;
3380 pub fn getpgid(pid: pid_t) -> pid_t;
3381 pub fn getpgrp() -> pid_t;
3382 pub fn getpid() -> pid_t;
3383 pub fn getppid() -> pid_t;
3384 pub fn getuid() -> uid_t;
3385 pub fn isatty(fd: c_int) -> c_int;
3386 pub fn link(src: *const c_char, dst: *const c_char) -> c_int;
3387 pub fn lseek(fd: c_int, offset: off_t, whence: c_int) -> off_t;
3388 pub fn pathconf(path: *const c_char, name: c_int) -> c_long;
3389 pub fn pause() -> c_int;
3390 pub fn pipe(fds: *mut c_int) -> c_int;
3391 pub fn posix_memalign(memptr: *mut *mut c_void, align: size_t, size: size_t) -> c_int;
3392 pub fn read(fd: c_int, buf: *mut c_void, count: size_t) -> ssize_t;
3393 pub fn rmdir(path: *const c_char) -> c_int;
3394 pub fn seteuid(uid: uid_t) -> c_int;
3395 pub fn setegid(gid: gid_t) -> c_int;
3396 pub fn setgid(gid: gid_t) -> c_int;
3397 pub fn setpgid(pid: pid_t, pgid: pid_t) -> c_int;
3398 pub fn setsid() -> pid_t;
3399 pub fn setuid(uid: uid_t) -> c_int;
3400 pub fn sleep(secs: c_uint) -> c_uint;
3401 pub fn nanosleep(rqtp: *const timespec, rmtp: *mut timespec) -> c_int;
3402 pub fn tcgetpgrp(fd: c_int) -> pid_t;
3403 pub fn tcsetpgrp(fd: c_int, pgrp: crate::pid_t) -> c_int;
3404 pub fn ttyname(fd: c_int) -> *mut c_char;
3405 pub fn unlink(c: *const c_char) -> c_int;
3406 pub fn wait(status: *mut c_int) -> pid_t;
3407 pub fn waitpid(pid: pid_t, status: *mut c_int, options: c_int) -> pid_t;
3408 pub fn write(fd: c_int, buf: *const c_void, count: size_t) -> ssize_t;
3409 pub fn pread(fd: c_int, buf: *mut c_void, count: size_t, offset: off_t) -> ssize_t;
3410 pub fn pwrite(fd: c_int, buf: *const c_void, count: size_t, offset: off_t) -> ssize_t;
3411 pub fn umask(mask: mode_t) -> mode_t;
3412
3413 pub fn utime(file: *const c_char, buf: *const utimbuf) -> c_int;
3414
3415 pub fn kill(pid: pid_t, sig: c_int) -> c_int;
3416
3417 pub fn mlock(addr: *const c_void, len: size_t) -> c_int;
3418 pub fn munlock(addr: *const c_void, len: size_t) -> c_int;
3419 pub fn mlockall(flags: c_int) -> c_int;
3420 pub fn munlockall() -> c_int;
3421
3422 pub fn mmap(
3423 addr: *mut c_void,
3424 len: size_t,
3425 prot: c_int,
3426 flags: c_int,
3427 fd: c_int,
3428 offset: off_t,
3429 ) -> *mut c_void;
3430 pub fn munmap(addr: *mut c_void, len: size_t) -> c_int;
3431
3432 pub fn if_nametoindex(ifname: *const c_char) -> c_uint;
3433 pub fn if_indextoname(ifindex: c_uint, ifname: *mut c_char) -> *mut c_char;
3434
3435 pub fn lstat(path: *const c_char, buf: *mut stat) -> c_int;
3436
3437 pub fn fsync(fd: c_int) -> c_int;
3438
3439 pub fn setenv(name: *const c_char, val: *const c_char, overwrite: c_int) -> c_int;
3440 pub fn unsetenv(name: *const c_char) -> c_int;
3441
3442 pub fn symlink(path1: *const c_char, path2: *const c_char) -> c_int;
3443
3444 pub fn ftruncate(fd: c_int, length: off_t) -> c_int;
3445
3446 pub fn signal(signum: c_int, handler: sighandler_t) -> sighandler_t;
3447
3448 pub fn realpath(pathname: *const c_char, resolved: *mut c_char) -> *mut c_char;
3449
3450 pub fn flock(fd: c_int, operation: c_int) -> c_int;
3451
3452 pub fn gettimeofday(tp: *mut crate::timeval, tz: *mut c_void) -> c_int;
3453 pub fn times(buf: *mut crate::tms) -> crate::clock_t;
3454
3455 pub fn pthread_self() -> crate::pthread_t;
3456 pub fn pthread_join(native: crate::pthread_t, value: *mut *mut c_void) -> c_int;
3457 pub fn pthread_exit(value: *mut c_void) -> !;
3458 pub fn pthread_attr_init(attr: *mut crate::pthread_attr_t) -> c_int;
3459 pub fn pthread_attr_destroy(attr: *mut crate::pthread_attr_t) -> c_int;
3460 pub fn pthread_attr_getstacksize(
3461 attr: *const crate::pthread_attr_t,
3462 stacksize: *mut size_t,
3463 ) -> c_int;
3464 pub fn pthread_attr_setstacksize(attr: *mut crate::pthread_attr_t, stack_size: size_t)
3465 -> c_int;
3466 pub fn pthread_attr_setdetachstate(attr: *mut crate::pthread_attr_t, state: c_int) -> c_int;
3467 pub fn pthread_detach(thread: crate::pthread_t) -> c_int;
3468 pub fn sched_yield() -> c_int;
3469 pub fn pthread_key_create(
3470 key: *mut pthread_key_t,
3471 dtor: Option<unsafe extern "C" fn(*mut c_void)>,
3472 ) -> c_int;
3473 pub fn pthread_key_delete(key: pthread_key_t) -> c_int;
3474 pub fn pthread_getspecific(key: pthread_key_t) -> *mut c_void;
3475 pub fn pthread_setspecific(key: pthread_key_t, value: *const c_void) -> c_int;
3476 pub fn pthread_mutex_init(
3477 lock: *mut pthread_mutex_t,
3478 attr: *const pthread_mutexattr_t,
3479 ) -> c_int;
3480 pub fn pthread_mutex_destroy(lock: *mut pthread_mutex_t) -> c_int;
3481 pub fn pthread_mutex_lock(lock: *mut pthread_mutex_t) -> c_int;
3482 pub fn pthread_mutex_trylock(lock: *mut pthread_mutex_t) -> c_int;
3483 pub fn pthread_mutex_unlock(lock: *mut pthread_mutex_t) -> c_int;
3484
3485 pub fn pthread_mutexattr_init(attr: *mut pthread_mutexattr_t) -> c_int;
3486 pub fn pthread_mutexattr_destroy(attr: *mut pthread_mutexattr_t) -> c_int;
3487 pub fn pthread_mutexattr_settype(attr: *mut pthread_mutexattr_t, _type: c_int) -> c_int;
3488
3489 pub fn pthread_cond_init(cond: *mut pthread_cond_t, attr: *const pthread_condattr_t) -> c_int;
3490 pub fn pthread_cond_wait(cond: *mut pthread_cond_t, lock: *mut pthread_mutex_t) -> c_int;
3491 pub fn pthread_cond_timedwait(
3492 cond: *mut pthread_cond_t,
3493 lock: *mut pthread_mutex_t,
3494 abstime: *const crate::timespec,
3495 ) -> c_int;
3496 pub fn pthread_cond_signal(cond: *mut pthread_cond_t) -> c_int;
3497 pub fn pthread_cond_broadcast(cond: *mut pthread_cond_t) -> c_int;
3498 pub fn pthread_cond_destroy(cond: *mut pthread_cond_t) -> c_int;
3499 pub fn pthread_condattr_init(attr: *mut pthread_condattr_t) -> c_int;
3500 pub fn pthread_condattr_destroy(attr: *mut pthread_condattr_t) -> c_int;
3501 pub fn pthread_rwlock_init(
3502 lock: *mut pthread_rwlock_t,
3503 attr: *const pthread_rwlockattr_t,
3504 ) -> c_int;
3505 pub fn pthread_rwlock_destroy(lock: *mut pthread_rwlock_t) -> c_int;
3506 pub fn pthread_rwlock_rdlock(lock: *mut pthread_rwlock_t) -> c_int;
3507 pub fn pthread_rwlock_tryrdlock(lock: *mut pthread_rwlock_t) -> c_int;
3508 pub fn pthread_rwlock_wrlock(lock: *mut pthread_rwlock_t) -> c_int;
3509 pub fn pthread_rwlock_trywrlock(lock: *mut pthread_rwlock_t) -> c_int;
3510 pub fn pthread_rwlock_unlock(lock: *mut pthread_rwlock_t) -> c_int;
3511 pub fn pthread_rwlockattr_init(attr: *mut pthread_rwlockattr_t) -> c_int;
3512 pub fn pthread_rwlockattr_destroy(attr: *mut pthread_rwlockattr_t) -> c_int;
3513 pub fn pthread_getname_np(thread: crate::pthread_t, name: *mut c_char, len: size_t) -> c_int;
3514 pub fn pthread_setname_np(thread: crate::pthread_t, name: *const c_char) -> c_int;
3515 pub fn strerror_r(errnum: c_int, buf: *mut c_char, buflen: size_t) -> c_int;
3516
3517 pub fn getsockopt(
3518 sockfd: c_int,
3519 level: c_int,
3520 optname: c_int,
3521 optval: *mut c_void,
3522 optlen: *mut crate::socklen_t,
3523 ) -> c_int;
3524 pub fn raise(signum: c_int) -> c_int;
3525 pub fn sigaction(signum: c_int, act: *const sigaction, oldact: *mut sigaction) -> c_int;
3526
3527 pub fn utimes(filename: *const c_char, times: *const crate::timeval) -> c_int;
3528 pub fn dlopen(filename: *const c_char, flag: c_int) -> *mut c_void;
3529 pub fn dlerror() -> *mut c_char;
3530 pub fn dlsym(handle: *mut c_void, symbol: *const c_char) -> *mut c_void;
3531 pub fn dlclose(handle: *mut c_void) -> c_int;
3532 pub fn dladdr(addr: *const c_void, info: *mut Dl_info) -> c_int;
3533
3534 pub fn getaddrinfo(
3535 node: *const c_char,
3536 service: *const c_char,
3537 hints: *const addrinfo,
3538 res: *mut *mut addrinfo,
3539 ) -> c_int;
3540 pub fn freeaddrinfo(res: *mut addrinfo);
3541 pub fn gai_strerror(errcode: c_int) -> *const c_char;
3542 pub fn res_init() -> c_int;
3543
3544 pub fn gmtime_r(time_p: *const time_t, result: *mut tm) -> *mut tm;
3545 pub fn localtime_r(time_p: *const time_t, result: *mut tm) -> *mut tm;
3546 pub fn mktime(tm: *mut tm) -> time_t;
3547 pub fn time(time: *mut time_t) -> time_t;
3548 pub fn gmtime(time_p: *const time_t) -> *mut tm;
3549 pub fn localtime(time_p: *const time_t) -> *mut tm;
3550
3551 pub fn mknod(pathname: *const c_char, mode: mode_t, dev: crate::dev_t) -> c_int;
3552 pub fn uname(buf: *mut crate::utsname) -> c_int;
3553 pub fn gethostname(name: *mut c_char, len: size_t) -> c_int;
3554 pub fn getservbyname(name: *const c_char, proto: *const c_char) -> *mut servent;
3555 pub fn getprotobyname(name: *const c_char) -> *mut protoent;
3556 pub fn getprotobynumber(proto: c_int) -> *mut protoent;
3557 pub fn usleep(secs: c_uint) -> c_int;
3558 pub fn send(socket: c_int, buf: *const c_void, len: size_t, flags: c_int) -> ssize_t;
3559 pub fn recv(socket: c_int, buf: *mut c_void, len: size_t, flags: c_int) -> ssize_t;
3560 pub fn putenv(string: *mut c_char) -> c_int;
3561 pub fn poll(fds: *mut pollfd, nfds: nfds_t, timeout: c_int) -> c_int;
3562 pub fn select(
3563 nfds: c_int,
3564 readfds: *mut fd_set,
3565 writefds: *mut fd_set,
3566 errorfds: *mut fd_set,
3567 timeout: *mut timeval,
3568 ) -> c_int;
3569 pub fn setlocale(category: c_int, locale: *const c_char) -> *mut c_char;
3570 pub fn localeconv() -> *mut lconv;
3571
3572 pub fn sem_destroy(sem: *mut sem_t) -> c_int;
3573 pub fn sem_wait(sem: *mut sem_t) -> c_int;
3574 pub fn sem_trywait(sem: *mut sem_t) -> c_int;
3575 pub fn sem_post(sem: *mut sem_t) -> c_int;
3576 pub fn sem_init(sem: *mut sem_t, pshared: c_int, value: c_uint) -> c_int;
3577 pub fn statvfs(path: *const c_char, buf: *mut statvfs) -> c_int;
3578 pub fn fstatvfs(fd: c_int, buf: *mut statvfs) -> c_int;
3579
3580 pub fn readlink(path: *const c_char, buf: *mut c_char, bufsz: size_t) -> ssize_t;
3581
3582 pub fn sigemptyset(set: *mut sigset_t) -> c_int;
3583 pub fn sigaddset(set: *mut sigset_t, signum: c_int) -> c_int;
3584 pub fn sigfillset(set: *mut sigset_t) -> c_int;
3585 pub fn sigdelset(set: *mut sigset_t, signum: c_int) -> c_int;
3586 pub fn sigismember(set: *const sigset_t, signum: c_int) -> c_int;
3587
3588 pub fn sigprocmask(how: c_int, set: *const sigset_t, oldset: *mut sigset_t) -> c_int;
3589 pub fn sigpending(set: *mut sigset_t) -> c_int;
3590
3591 pub fn timegm(tm: *mut crate::tm) -> time_t;
3592
3593 pub fn getsid(pid: pid_t) -> pid_t;
3594
3595 pub fn sysconf(name: c_int) -> c_long;
3596
3597 pub fn mkfifo(path: *const c_char, mode: mode_t) -> c_int;
3598
3599 pub fn pselect(
3600 nfds: c_int,
3601 readfds: *mut fd_set,
3602 writefds: *mut fd_set,
3603 errorfds: *mut fd_set,
3604 timeout: *const timespec,
3605 sigmask: *const sigset_t,
3606 ) -> c_int;
3607 pub fn fseeko(stream: *mut crate::FILE, offset: off_t, whence: c_int) -> c_int;
3608 pub fn ftello(stream: *mut crate::FILE) -> off_t;
3609 pub fn tcdrain(fd: c_int) -> c_int;
3610 pub fn cfgetispeed(termios: *const crate::termios) -> crate::speed_t;
3611 pub fn cfgetospeed(termios: *const crate::termios) -> crate::speed_t;
3612 pub fn cfmakeraw(termios: *mut crate::termios);
3613 pub fn cfsetispeed(termios: *mut crate::termios, speed: crate::speed_t) -> c_int;
3614 pub fn cfsetospeed(termios: *mut crate::termios, speed: crate::speed_t) -> c_int;
3615 pub fn cfsetspeed(termios: *mut crate::termios, speed: crate::speed_t) -> c_int;
3616 pub fn tcgetattr(fd: c_int, termios: *mut crate::termios) -> c_int;
3617 pub fn tcsetattr(fd: c_int, optional_actions: c_int, termios: *const crate::termios) -> c_int;
3618 pub fn tcflow(fd: c_int, action: c_int) -> c_int;
3619 pub fn tcflush(fd: c_int, action: c_int) -> c_int;
3620 pub fn tcgetsid(fd: c_int) -> crate::pid_t;
3621 pub fn tcsendbreak(fd: c_int, duration: c_int) -> c_int;
3622 pub fn mkstemp(template: *mut c_char) -> c_int;
3623 pub fn mkdtemp(template: *mut c_char) -> *mut c_char;
3624
3625 pub fn tmpnam(ptr: *mut c_char) -> *mut c_char;
3626
3627 pub fn openlog(ident: *const c_char, logopt: c_int, facility: c_int);
3628 pub fn closelog();
3629 pub fn setlogmask(maskpri: c_int) -> c_int;
3630 pub fn syslog(priority: c_int, message: *const c_char, ...);
3631
3632 pub fn grantpt(fd: c_int) -> c_int;
3633 pub fn posix_openpt(flags: c_int) -> c_int;
3634 pub fn ptsname(fd: c_int) -> *mut c_char;
3635 pub fn unlockpt(fd: c_int) -> c_int;
3636
3637 pub fn fdatasync(fd: c_int) -> c_int;
3638 pub fn clock_getres(clk_id: crate::clockid_t, tp: *mut crate::timespec) -> c_int;
3639 pub fn clock_gettime(clk_id: crate::clockid_t, tp: *mut crate::timespec) -> c_int;
3640 pub fn clock_settime(clk_id: crate::clockid_t, tp: *const crate::timespec) -> c_int;
3641 pub fn dirfd(dirp: *mut crate::DIR) -> c_int;
3642
3643 pub fn pthread_getattr_np(native: crate::pthread_t, attr: *mut crate::pthread_attr_t) -> c_int;
3644 pub fn pthread_attr_getstack(
3645 attr: *const crate::pthread_attr_t,
3646 stackaddr: *mut *mut c_void,
3647 stacksize: *mut size_t,
3648 ) -> c_int;
3649 pub fn memalign(align: size_t, size: size_t) -> *mut c_void;
3650 pub fn setgroups(ngroups: size_t, ptr: *const crate::gid_t) -> c_int;
3651 pub fn pipe2(fds: *mut c_int, flags: c_int) -> c_int;
3652 pub fn statfs(path: *const c_char, buf: *mut statfs) -> c_int;
3653 pub fn fstatfs(fd: c_int, buf: *mut statfs) -> c_int;
3654 pub fn memrchr(cx: *const c_void, c: c_int, n: size_t) -> *mut c_void;
3655
3656 pub fn posix_fadvise(fd: c_int, offset: off_t, len: off_t, advise: c_int) -> c_int;
3657 pub fn futimens(fd: c_int, times: *const crate::timespec) -> c_int;
3658 pub fn utimensat(
3659 dirfd: c_int,
3660 path: *const c_char,
3661 times: *const crate::timespec,
3662 flag: c_int,
3663 ) -> c_int;
3664 pub fn duplocale(base: crate::locale_t) -> crate::locale_t;
3665 pub fn freelocale(loc: crate::locale_t);
3666 pub fn newlocale(mask: c_int, locale: *const c_char, base: crate::locale_t) -> crate::locale_t;
3667 pub fn uselocale(loc: crate::locale_t) -> crate::locale_t;
3668
3669 pub fn fdopendir(fd: c_int) -> *mut crate::DIR;
3670
3671 pub fn mknodat(dirfd: c_int, pathname: *const c_char, mode: mode_t, dev: dev_t) -> c_int;
3672 pub fn pthread_condattr_getclock(
3673 attr: *const pthread_condattr_t,
3674 clock_id: *mut clockid_t,
3675 ) -> c_int;
3676 pub fn pthread_condattr_setclock(
3677 attr: *mut pthread_condattr_t,
3678 clock_id: crate::clockid_t,
3679 ) -> c_int;
3680 pub fn accept4(
3681 fd: c_int,
3682 addr: *mut crate::sockaddr,
3683 len: *mut crate::socklen_t,
3684 flg: c_int,
3685 ) -> c_int;
3686 pub fn ptsname_r(fd: c_int, buf: *mut c_char, buflen: size_t) -> c_int;
3687 pub fn clearenv() -> c_int;
3688 pub fn waitid(
3689 idtype: idtype_t,
3690 id: id_t,
3691 infop: *mut crate::siginfo_t,
3692 options: c_int,
3693 ) -> c_int;
3694 pub fn setreuid(ruid: crate::uid_t, euid: crate::uid_t) -> c_int;
3695 pub fn setregid(rgid: crate::gid_t, egid: crate::gid_t) -> c_int;
3696 pub fn getresuid(
3697 ruid: *mut crate::uid_t,
3698 euid: *mut crate::uid_t,
3699 suid: *mut crate::uid_t,
3700 ) -> c_int;
3701 pub fn getresgid(
3702 rgid: *mut crate::gid_t,
3703 egid: *mut crate::gid_t,
3704 sgid: *mut crate::gid_t,
3705 ) -> c_int;
3706 pub fn acct(filename: *const c_char) -> c_int;
3707 pub fn brk(addr: *mut c_void) -> c_int;
3708 pub fn setresgid(rgid: crate::gid_t, egid: crate::gid_t, sgid: crate::gid_t) -> c_int;
3709 pub fn setresuid(ruid: crate::uid_t, euid: crate::uid_t, suid: crate::uid_t) -> c_int;
3710 pub fn openpty(
3711 amaster: *mut c_int,
3712 aslave: *mut c_int,
3713 name: *mut c_char,
3714 termp: *const termios,
3715 winp: *const crate::winsize,
3716 ) -> c_int;
3717
3718 pub fn execvpe(
3720 file: *const c_char,
3721 argv: *const *const c_char,
3722 envp: *const *const c_char,
3723 ) -> c_int;
3724 pub fn fexecve(fd: c_int, argv: *const *const c_char, envp: *const *const c_char) -> c_int;
3725
3726 pub fn ioctl(fd: c_int, request: c_int, ...) -> c_int;
3727
3728 pub fn lutimes(file: *const c_char, times: *const crate::timeval) -> c_int;
3729
3730 pub fn setpwent();
3731 pub fn endpwent();
3732 pub fn getpwent() -> *mut passwd;
3733
3734 pub fn shm_open(name: *const c_char, oflag: c_int, mode: mode_t) -> c_int;
3735
3736 pub fn shmget(key: crate::key_t, size: size_t, shmflg: c_int) -> c_int;
3738 pub fn shmat(shmid: c_int, shmaddr: *const c_void, shmflg: c_int) -> *mut c_void;
3739 pub fn shmdt(shmaddr: *const c_void) -> c_int;
3740 pub fn shmctl(shmid: c_int, cmd: c_int, buf: *mut crate::shmid_ds) -> c_int;
3741 pub fn ftok(pathname: *const c_char, proj_id: c_int) -> crate::key_t;
3742 pub fn semget(key: crate::key_t, nsems: c_int, semflag: c_int) -> c_int;
3743 pub fn semop(semid: c_int, sops: *mut crate::sembuf, nsops: size_t) -> c_int;
3744 pub fn semctl(semid: c_int, semnum: c_int, cmd: c_int, ...) -> c_int;
3745 pub fn msgctl(msqid: c_int, cmd: c_int, buf: *mut msqid_ds) -> c_int;
3746 pub fn msgget(key: crate::key_t, msgflg: c_int) -> c_int;
3747 pub fn msgrcv(
3748 msqid: c_int,
3749 msgp: *mut c_void,
3750 msgsz: size_t,
3751 msgtyp: c_long,
3752 msgflg: c_int,
3753 ) -> ssize_t;
3754 pub fn msgsnd(msqid: c_int, msgp: *const c_void, msgsz: size_t, msgflg: c_int) -> c_int;
3755
3756 pub fn mprotect(addr: *mut c_void, len: size_t, prot: c_int) -> c_int;
3757 pub fn __errno_location() -> *mut c_int;
3758
3759 pub fn fallocate(fd: c_int, mode: c_int, offset: off_t, len: off_t) -> c_int;
3760 pub fn posix_fallocate(fd: c_int, offset: off_t, len: off_t) -> c_int;
3761 pub fn readahead(fd: c_int, offset: off64_t, count: size_t) -> ssize_t;
3762 pub fn signalfd(fd: c_int, mask: *const crate::sigset_t, flags: c_int) -> c_int;
3763 pub fn timerfd_create(clockid: c_int, flags: c_int) -> c_int;
3764 pub fn timerfd_gettime(fd: c_int, curr_value: *mut itimerspec) -> c_int;
3765 pub fn timerfd_settime(
3766 fd: c_int,
3767 flags: c_int,
3768 new_value: *const itimerspec,
3769 old_value: *mut itimerspec,
3770 ) -> c_int;
3771 pub fn pwritev(fd: c_int, iov: *const crate::iovec, iovcnt: c_int, offset: off_t) -> ssize_t;
3772 pub fn preadv(fd: c_int, iov: *const crate::iovec, iovcnt: c_int, offset: off_t) -> ssize_t;
3773 pub fn quotactl(cmd: c_int, special: *const c_char, id: c_int, data: *mut c_char) -> c_int;
3774 pub fn dup3(oldfd: c_int, newfd: c_int, flags: c_int) -> c_int;
3775 pub fn mkostemp(template: *mut c_char, flags: c_int) -> c_int;
3776 pub fn mkostemps(template: *mut c_char, suffixlen: c_int, flags: c_int) -> c_int;
3777 pub fn sigtimedwait(
3778 set: *const sigset_t,
3779 info: *mut siginfo_t,
3780 timeout: *const crate::timespec,
3781 ) -> c_int;
3782 pub fn sigwaitinfo(set: *const sigset_t, info: *mut siginfo_t) -> c_int;
3783 pub fn nl_langinfo_l(item: crate::nl_item, locale: crate::locale_t) -> *mut c_char;
3784 pub fn getnameinfo(
3785 sa: *const crate::sockaddr,
3786 salen: crate::socklen_t,
3787 host: *mut c_char,
3788 hostlen: crate::socklen_t,
3789 serv: *mut c_char,
3790 servlen: crate::socklen_t,
3791 flags: c_int,
3792 ) -> c_int;
3793 pub fn reboot(how_to: c_int) -> c_int;
3794 pub fn setfsgid(gid: crate::gid_t) -> c_int;
3795 pub fn setfsuid(uid: crate::uid_t) -> c_int;
3796
3797 pub fn mkfifoat(dirfd: c_int, pathname: *const c_char, mode: mode_t) -> c_int;
3799 pub fn if_nameindex() -> *mut if_nameindex;
3800 pub fn if_freenameindex(ptr: *mut if_nameindex);
3801 pub fn sync_file_range(fd: c_int, offset: off64_t, nbytes: off64_t, flags: c_uint) -> c_int;
3802 pub fn getifaddrs(ifap: *mut *mut crate::ifaddrs) -> c_int;
3803 pub fn freeifaddrs(ifa: *mut crate::ifaddrs);
3804
3805 pub fn glob(
3806 pattern: *const c_char,
3807 flags: c_int,
3808 errfunc: Option<extern "C" fn(epath: *const c_char, errno: c_int) -> c_int>,
3809 pglob: *mut crate::glob_t,
3810 ) -> c_int;
3811 pub fn globfree(pglob: *mut crate::glob_t);
3812
3813 pub fn posix_madvise(addr: *mut c_void, len: size_t, advice: c_int) -> c_int;
3814
3815 pub fn shm_unlink(name: *const c_char) -> c_int;
3816
3817 pub fn seekdir(dirp: *mut crate::DIR, loc: c_long);
3818
3819 pub fn telldir(dirp: *mut crate::DIR) -> c_long;
3820 pub fn madvise(addr: *mut c_void, len: size_t, advice: c_int) -> c_int;
3821
3822 pub fn msync(addr: *mut c_void, len: size_t, flags: c_int) -> c_int;
3823
3824 pub fn recvfrom(
3825 socket: c_int,
3826 buf: *mut c_void,
3827 len: size_t,
3828 flags: c_int,
3829 addr: *mut crate::sockaddr,
3830 addrlen: *mut crate::socklen_t,
3831 ) -> ssize_t;
3832 pub fn mkstemps(template: *mut c_char, suffixlen: c_int) -> c_int;
3833 pub fn futimes(fd: c_int, times: *const crate::timeval) -> c_int;
3834 pub fn nl_langinfo(item: crate::nl_item) -> *mut c_char;
3835
3836 pub fn bind(
3837 socket: c_int,
3838 address: *const crate::sockaddr,
3839 address_len: crate::socklen_t,
3840 ) -> c_int;
3841
3842 pub fn writev(fd: c_int, iov: *const crate::iovec, iovcnt: c_int) -> ssize_t;
3843 pub fn readv(fd: c_int, iov: *const crate::iovec, iovcnt: c_int) -> ssize_t;
3844
3845 pub fn sendmsg(fd: c_int, msg: *const crate::msghdr, flags: c_int) -> ssize_t;
3846 pub fn recvmsg(fd: c_int, msg: *mut crate::msghdr, flags: c_int) -> ssize_t;
3847 pub fn getdomainname(name: *mut c_char, len: size_t) -> c_int;
3848 pub fn setdomainname(name: *const c_char, len: size_t) -> c_int;
3849 pub fn vhangup() -> c_int;
3850 pub fn sendmmsg(sockfd: c_int, msgvec: *mut mmsghdr, vlen: c_uint, flags: c_int) -> c_int;
3851 pub fn recvmmsg(
3852 sockfd: c_int,
3853 msgvec: *mut mmsghdr,
3854 vlen: c_uint,
3855 flags: c_int,
3856 timeout: *mut crate::timespec,
3857 ) -> c_int;
3858 pub fn sync();
3859 pub fn syscall(num: c_long, ...) -> c_long;
3860 pub fn sched_getaffinity(
3861 pid: crate::pid_t,
3862 cpusetsize: size_t,
3863 cpuset: *mut cpu_set_t,
3864 ) -> c_int;
3865 pub fn sched_setaffinity(
3866 pid: crate::pid_t,
3867 cpusetsize: size_t,
3868 cpuset: *const cpu_set_t,
3869 ) -> c_int;
3870 pub fn umount(target: *const c_char) -> c_int;
3871 pub fn sched_get_priority_max(policy: c_int) -> c_int;
3872 pub fn tee(fd_in: c_int, fd_out: c_int, len: size_t, flags: c_uint) -> ssize_t;
3873 pub fn settimeofday(tv: *const crate::timeval, tz: *const crate::timezone) -> c_int;
3874 pub fn splice(
3875 fd_in: c_int,
3876 off_in: *mut crate::loff_t,
3877 fd_out: c_int,
3878 off_out: *mut crate::loff_t,
3879 len: size_t,
3880 flags: c_uint,
3881 ) -> ssize_t;
3882 pub fn eventfd(initval: c_uint, flags: c_int) -> c_int;
3883 pub fn sched_rr_get_interval(pid: crate::pid_t, tp: *mut crate::timespec) -> c_int;
3884 pub fn sem_timedwait(sem: *mut sem_t, abstime: *const crate::timespec) -> c_int;
3885 pub fn sem_getvalue(sem: *mut sem_t, sval: *mut c_int) -> c_int;
3886 pub fn sched_setparam(pid: crate::pid_t, param: *const crate::sched_param) -> c_int;
3887 pub fn swapoff(puath: *const c_char) -> c_int;
3888 pub fn vmsplice(fd: c_int, iov: *const crate::iovec, nr_segs: size_t, flags: c_uint)
3889 -> ssize_t;
3890 pub fn mount(
3891 src: *const c_char,
3892 target: *const c_char,
3893 fstype: *const c_char,
3894 flags: c_ulong,
3895 data: *const c_void,
3896 ) -> c_int;
3897 pub fn personality(persona: c_ulong) -> c_int;
3898 pub fn sched_getparam(pid: crate::pid_t, param: *mut crate::sched_param) -> c_int;
3899 pub fn ppoll(
3900 fds: *mut crate::pollfd,
3901 nfds: nfds_t,
3902 timeout: *const crate::timespec,
3903 sigmask: *const sigset_t,
3904 ) -> c_int;
3905 pub fn pthread_mutex_timedlock(
3906 lock: *mut pthread_mutex_t,
3907 abstime: *const crate::timespec,
3908 ) -> c_int;
3909 pub fn clone(
3910 cb: extern "C" fn(*mut c_void) -> c_int,
3911 child_stack: *mut c_void,
3912 flags: c_int,
3913 arg: *mut c_void,
3914 ...
3915 ) -> c_int;
3916 pub fn sched_getscheduler(pid: crate::pid_t) -> c_int;
3917 pub fn clock_nanosleep(
3918 clk_id: crate::clockid_t,
3919 flags: c_int,
3920 rqtp: *const crate::timespec,
3921 rmtp: *mut crate::timespec,
3922 ) -> c_int;
3923 pub fn pthread_attr_getguardsize(
3924 attr: *const crate::pthread_attr_t,
3925 guardsize: *mut size_t,
3926 ) -> c_int;
3927 pub fn pthread_attr_setguardsize(attr: *mut crate::pthread_attr_t, guardsize: size_t) -> c_int;
3928 pub fn sethostname(name: *const c_char, len: size_t) -> c_int;
3929 pub fn sched_get_priority_min(policy: c_int) -> c_int;
3930 pub fn umount2(target: *const c_char, flags: c_int) -> c_int;
3931 pub fn swapon(path: *const c_char, swapflags: c_int) -> c_int;
3932 pub fn sched_setscheduler(
3933 pid: crate::pid_t,
3934 policy: c_int,
3935 param: *const crate::sched_param,
3936 ) -> c_int;
3937 pub fn sigsuspend(mask: *const crate::sigset_t) -> c_int;
3938 pub fn getgrgid_r(
3939 gid: crate::gid_t,
3940 grp: *mut crate::group,
3941 buf: *mut c_char,
3942 buflen: size_t,
3943 result: *mut *mut crate::group,
3944 ) -> c_int;
3945 pub fn sigaltstack(ss: *const stack_t, oss: *mut stack_t) -> c_int;
3946 pub fn sem_close(sem: *mut sem_t) -> c_int;
3947 pub fn getdtablesize() -> c_int;
3948 pub fn getgrnam_r(
3949 name: *const c_char,
3950 grp: *mut crate::group,
3951 buf: *mut c_char,
3952 buflen: size_t,
3953 result: *mut *mut crate::group,
3954 ) -> c_int;
3955 pub fn initgroups(user: *const c_char, group: crate::gid_t) -> c_int;
3956 pub fn pthread_sigmask(how: c_int, set: *const sigset_t, oldset: *mut sigset_t) -> c_int;
3957 pub fn sem_open(name: *const c_char, oflag: c_int, ...) -> *mut sem_t;
3958 pub fn getgrnam(name: *const c_char) -> *mut crate::group;
3959 pub fn pthread_cancel(thread: crate::pthread_t) -> c_int;
3960 pub fn pthread_kill(thread: crate::pthread_t, sig: c_int) -> c_int;
3961 pub fn sem_unlink(name: *const c_char) -> c_int;
3962 pub fn daemon(nochdir: c_int, noclose: c_int) -> c_int;
3963 pub fn getpwnam_r(
3964 name: *const c_char,
3965 pwd: *mut passwd,
3966 buf: *mut c_char,
3967 buflen: size_t,
3968 result: *mut *mut passwd,
3969 ) -> c_int;
3970 pub fn getpwuid_r(
3971 uid: crate::uid_t,
3972 pwd: *mut passwd,
3973 buf: *mut c_char,
3974 buflen: size_t,
3975 result: *mut *mut passwd,
3976 ) -> c_int;
3977 pub fn sigwait(set: *const sigset_t, sig: *mut c_int) -> c_int;
3978 pub fn pthread_atfork(
3979 prepare: Option<unsafe extern "C" fn()>,
3980 parent: Option<unsafe extern "C" fn()>,
3981 child: Option<unsafe extern "C" fn()>,
3982 ) -> c_int;
3983 pub fn getgrgid(gid: crate::gid_t) -> *mut crate::group;
3984
3985 pub fn setgrent();
3986 pub fn endgrent();
3987 pub fn getgrent() -> *mut crate::group;
3988
3989 pub fn getgrouplist(
3990 user: *const c_char,
3991 group: crate::gid_t,
3992 groups: *mut crate::gid_t,
3993 ngroups: *mut c_int,
3994 ) -> c_int;
3995 pub fn popen(command: *const c_char, mode: *const c_char) -> *mut crate::FILE;
3996 pub fn faccessat(dirfd: c_int, pathname: *const c_char, mode: c_int, flags: c_int) -> c_int;
3997 pub fn pthread_create(
3998 native: *mut crate::pthread_t,
3999 attr: *const crate::pthread_attr_t,
4000 f: extern "C" fn(*mut c_void) -> *mut c_void,
4001 value: *mut c_void,
4002 ) -> c_int;
4003 pub fn dl_iterate_phdr(
4004 callback: Option<
4005 unsafe extern "C" fn(
4006 info: *mut crate::dl_phdr_info,
4007 size: size_t,
4008 data: *mut c_void,
4009 ) -> c_int,
4010 >,
4011 data: *mut c_void,
4012 ) -> c_int;
4013}
4014
4015cfg_if! {
4016 if #[cfg(target_arch = "aarch64")] {
4017 mod aarch64;
4018 pub use self::aarch64::*;
4019 } else if #[cfg(any(target_arch = "x86_64"))] {
4020 mod x86_64;
4021 pub use self::x86_64::*;
4022 } else if #[cfg(any(target_arch = "riscv64"))] {
4023 mod riscv64;
4024 pub use self::riscv64::*;
4025 } else {
4026 }
4028}