1 //! Linux-specific definitions for linux-like values
3 use dox
::{mem, Option}
;
5 pub type useconds_t
= u32;
7 pub type socklen_t
= u32;
8 pub type pthread_t
= c_ulong
;
10 pub type ino64_t
= u64;
11 pub type off64_t
= i64;
12 pub type blkcnt64_t
= i64;
13 pub type rlim64_t
= u64;
14 pub type shmatt_t
= ::c_ulong
;
15 pub type mqd_t
= ::c_int
;
16 pub type msgqnum_t
= ::c_ulong
;
17 pub type msglen_t
= ::c_ulong
;
18 pub type nfds_t
= ::c_ulong
;
19 pub type nl_item
= ::c_int
;
20 pub type idtype_t
= ::c_uint
;
21 pub type loff_t
= ::c_longlong
;
23 pub type __u8
= ::c_uchar
;
24 pub type __u16
= ::c_ushort
;
25 pub type __s16
= ::c_short
;
26 pub type __u32
= ::c_uint
;
27 pub type __s32
= ::c_int
;
29 pub enum fpos64_t {}
// TODO: fill this out with a struct
35 pub d_reclen
: ::c_ushort
,
36 pub d_type
: ::c_uchar
,
37 pub d_name
: [::c_char
; 256],
43 pub d_reclen
: ::c_ushort
,
44 pub d_type
: ::c_uchar
,
45 pub d_name
: [::c_char
; 256],
49 pub rlim_cur
: rlim64_t
,
50 pub rlim_max
: rlim64_t
,
54 pub gl_pathc
: ::size_t
,
55 pub gl_pathv
: *mut *mut c_char
,
56 pub gl_offs
: ::size_t
,
57 pub gl_flags
: ::c_int
,
59 __unused1
: *mut ::c_void
,
60 __unused2
: *mut ::c_void
,
61 __unused3
: *mut ::c_void
,
62 __unused4
: *mut ::c_void
,
63 __unused5
: *mut ::c_void
,
67 pub ifa_next
: *mut ifaddrs
,
68 pub ifa_name
: *mut c_char
,
69 pub ifa_flags
: ::c_uint
,
70 pub ifa_addr
: *mut ::sockaddr
,
71 pub ifa_netmask
: *mut ::sockaddr
,
72 pub ifa_ifu
: *mut ::sockaddr
, // FIXME This should be a union
73 pub ifa_data
: *mut ::c_void
76 pub struct pthread_mutex_t
{
77 #[cfg(any(target_arch = "mips", target_arch = "arm",
78 target_arch
= "powerpc"))]
79 __align
: [::c_long
; 0],
80 #[cfg(not(any(target_arch = "mips", target_arch = "arm",
81 target_arch
= "powerpc")))]
82 __align
: [::c_longlong
; 0],
83 size
: [u8; __SIZEOF_PTHREAD_MUTEX_T
],
86 pub struct pthread_rwlock_t
{
87 #[cfg(any(target_arch = "mips", target_arch = "arm",
88 target_arch
= "powerpc"))]
89 __align
: [::c_long
; 0],
90 #[cfg(not(any(target_arch = "mips", target_arch = "arm",
91 target_arch
= "powerpc")))]
92 __align
: [::c_longlong
; 0],
93 size
: [u8; __SIZEOF_PTHREAD_RWLOCK_T
],
96 pub struct pthread_mutexattr_t
{
97 #[cfg(any(target_arch = "x86_64", target_arch = "powerpc64",
98 target_arch
= "mips64", target_arch
= "s390x",
99 target_arch
= "sparc64"))]
100 __align
: [::c_int
; 0],
101 #[cfg(not(any(target_arch = "x86_64", target_arch = "powerpc64",
102 target_arch
= "mips64", target_arch
= "s390x",
103 target_arch
= "sparc64")))]
104 __align
: [::c_long
; 0],
105 size
: [u8; __SIZEOF_PTHREAD_MUTEXATTR_T
],
108 pub struct pthread_rwlockattr_t
{
109 #[cfg(any(target_env = "musl"))]
110 __align
: [::c_int
; 0],
111 #[cfg(not(any(target_env = "musl")))]
112 __align
: [::c_long
; 0],
113 size
: [u8; __SIZEOF_PTHREAD_RWLOCKATTR_T
],
116 pub struct pthread_cond_t
{
117 #[cfg(any(target_env = "musl"))]
118 __align
: [*const ::c_void
; 0],
119 #[cfg(not(any(target_env = "musl")))]
120 __align
: [::c_longlong
; 0],
121 size
: [u8; __SIZEOF_PTHREAD_COND_T
],
124 pub struct pthread_condattr_t
{
125 __align
: [::c_int
; 0],
126 size
: [u8; __SIZEOF_PTHREAD_CONDATTR_T
],
130 pub pw_name
: *mut ::c_char
,
131 pub pw_passwd
: *mut ::c_char
,
134 pub pw_gecos
: *mut ::c_char
,
135 pub pw_dir
: *mut ::c_char
,
136 pub pw_shell
: *mut ::c_char
,
140 pub sp_namp
: *mut ::c_char
,
141 pub sp_pwdp
: *mut ::c_char
,
142 pub sp_lstchg
: ::c_long
,
143 pub sp_min
: ::c_long
,
144 pub sp_max
: ::c_long
,
145 pub sp_warn
: ::c_long
,
146 pub sp_inact
: ::c_long
,
147 pub sp_expire
: ::c_long
,
148 pub sp_flag
: ::c_ulong
,
152 pub f_bsize
: ::c_ulong
,
153 pub f_frsize
: ::c_ulong
,
154 pub f_blocks
: ::fsblkcnt_t
,
155 pub f_bfree
: ::fsblkcnt_t
,
156 pub f_bavail
: ::fsblkcnt_t
,
157 pub f_files
: ::fsfilcnt_t
,
158 pub f_ffree
: ::fsfilcnt_t
,
159 pub f_favail
: ::fsfilcnt_t
,
160 #[cfg(target_endian = "little")]
161 pub f_fsid
: ::c_ulong
,
162 #[cfg(target_pointer_width = "32")]
164 #[cfg(target_endian = "big")]
165 pub f_fsid
: ::c_ulong
,
166 pub f_flag
: ::c_ulong
,
167 pub f_namemax
: ::c_ulong
,
168 __f_spare
: [::c_int
; 6],
172 pub dqb_bhardlimit
: ::uint64_t
,
173 pub dqb_bsoftlimit
: ::uint64_t
,
174 pub dqb_curspace
: ::uint64_t
,
175 pub dqb_ihardlimit
: ::uint64_t
,
176 pub dqb_isoftlimit
: ::uint64_t
,
177 pub dqb_curinodes
: ::uint64_t
,
178 pub dqb_btime
: ::uint64_t
,
179 pub dqb_itime
: ::uint64_t
,
180 pub dqb_valid
: ::uint32_t
,
183 pub struct signalfd_siginfo
{
184 pub ssi_signo
: ::uint32_t
,
185 pub ssi_errno
: ::int32_t
,
186 pub ssi_code
: ::int32_t
,
187 pub ssi_pid
: ::uint32_t
,
188 pub ssi_uid
: ::uint32_t
,
189 pub ssi_fd
: ::int32_t
,
190 pub ssi_tid
: ::uint32_t
,
191 pub ssi_band
: ::uint32_t
,
192 pub ssi_overrun
: ::uint32_t
,
193 pub ssi_trapno
: ::uint32_t
,
194 pub ssi_status
: ::int32_t
,
195 pub ssi_int
: ::int32_t
,
196 pub ssi_ptr
: ::uint64_t
,
197 pub ssi_utime
: ::uint64_t
,
198 pub ssi_stime
: ::uint64_t
,
199 pub ssi_addr
: ::uint64_t
,
200 _pad
: [::uint8_t
; 48],
203 pub struct itimerspec
{
204 pub it_interval
: ::timespec
,
205 pub it_value
: ::timespec
,
213 pub mq_flags
: ::c_long
,
214 pub mq_maxmsg
: ::c_long
,
215 pub mq_msgsize
: ::c_long
,
216 pub mq_curmsgs
: ::c_long
,
220 pub struct cpu_set_t
{
221 #[cfg(target_pointer_width = "32")]
223 #[cfg(target_pointer_width = "64")]
227 pub struct if_nameindex
{
228 pub if_index
: ::c_uint
,
229 pub if_name
: *mut ::c_char
,
234 pub msgpool
: ::c_int
,
241 pub msgseg
: ::c_ushort
,
245 pub msg_hdr
: ::msghdr
,
246 pub msg_len
: ::c_uint
,
250 pub sem_num
: ::c_ushort
,
251 pub sem_op
: ::c_short
,
252 pub sem_flg
: ::c_short
,
255 pub struct input_event
{
262 pub struct input_id
{
263 pub bustype
: ::__u16
,
265 pub product
: ::__u16
,
266 pub version
: ::__u16
,
269 pub struct input_absinfo
{
271 pub minimum
: ::__s32
,
272 pub maximum
: ::__s32
,
275 pub resolution
: ::__s32
,
278 pub struct input_keymap_entry
{
282 pub keycode
: ::__u32
,
283 pub scancode
: [::__u8
; 32],
286 pub struct input_mask
{
288 pub codes_size
: ::__u32
,
289 pub codes_ptr
: ::__u64
,
292 pub struct ff_replay
{
297 pub struct ff_trigger
{
299 pub interval
: ::__u16
,
302 pub struct ff_envelope
{
303 pub attack_length
: ::__u16
,
304 pub attack_level
: ::__u16
,
305 pub fade_length
: ::__u16
,
306 pub fade_level
: ::__u16
,
309 pub struct ff_constant_effect
{
311 pub envelope
: ff_envelope
,
314 pub struct ff_ramp_effect
{
315 pub start_level
: ::__s16
,
316 pub end_level
: ::__s16
,
317 pub envelope
: ff_envelope
,
320 pub struct ff_condition_effect
{
321 pub right_saturation
: ::__u16
,
322 pub left_saturation
: ::__u16
,
324 pub right_coeff
: ::__s16
,
325 pub left_coeff
: ::__s16
,
327 pub deadband
: ::__u16
,
331 pub struct ff_periodic_effect
{
332 pub waveform
: ::__u16
,
334 pub magnitude
: ::__s16
,
338 pub envelope
: ff_envelope
,
340 pub custom_len
: ::__u32
,
341 pub custom_data
: *mut ::__s16
,
344 pub struct ff_rumble_effect
{
345 pub strong_magnitude
: ::__u16
,
346 pub weak_magnitude
: ::__u16
,
349 pub struct ff_effect
{
352 pub direction
: ::__u16
,
353 pub trigger
: ff_trigger
,
354 pub replay
: ff_replay
,
355 // FIXME this is actually a union
356 #[cfg(target_pointer_width = "64")]
358 #[cfg(target_pointer_width = "32")]
363 pub const ABDAY_1
: ::nl_item
= 0x20000;
364 pub const ABDAY_2
: ::nl_item
= 0x20001;
365 pub const ABDAY_3
: ::nl_item
= 0x20002;
366 pub const ABDAY_4
: ::nl_item
= 0x20003;
367 pub const ABDAY_5
: ::nl_item
= 0x20004;
368 pub const ABDAY_6
: ::nl_item
= 0x20005;
369 pub const ABDAY_7
: ::nl_item
= 0x20006;
371 pub const DAY_1
: ::nl_item
= 0x20007;
372 pub const DAY_2
: ::nl_item
= 0x20008;
373 pub const DAY_3
: ::nl_item
= 0x20009;
374 pub const DAY_4
: ::nl_item
= 0x2000A;
375 pub const DAY_5
: ::nl_item
= 0x2000B;
376 pub const DAY_6
: ::nl_item
= 0x2000C;
377 pub const DAY_7
: ::nl_item
= 0x2000D;
379 pub const ABMON_1
: ::nl_item
= 0x2000E;
380 pub const ABMON_2
: ::nl_item
= 0x2000F;
381 pub const ABMON_3
: ::nl_item
= 0x20010;
382 pub const ABMON_4
: ::nl_item
= 0x20011;
383 pub const ABMON_5
: ::nl_item
= 0x20012;
384 pub const ABMON_6
: ::nl_item
= 0x20013;
385 pub const ABMON_7
: ::nl_item
= 0x20014;
386 pub const ABMON_8
: ::nl_item
= 0x20015;
387 pub const ABMON_9
: ::nl_item
= 0x20016;
388 pub const ABMON_10
: ::nl_item
= 0x20017;
389 pub const ABMON_11
: ::nl_item
= 0x20018;
390 pub const ABMON_12
: ::nl_item
= 0x20019;
392 pub const MON_1
: ::nl_item
= 0x2001A;
393 pub const MON_2
: ::nl_item
= 0x2001B;
394 pub const MON_3
: ::nl_item
= 0x2001C;
395 pub const MON_4
: ::nl_item
= 0x2001D;
396 pub const MON_5
: ::nl_item
= 0x2001E;
397 pub const MON_6
: ::nl_item
= 0x2001F;
398 pub const MON_7
: ::nl_item
= 0x20020;
399 pub const MON_8
: ::nl_item
= 0x20021;
400 pub const MON_9
: ::nl_item
= 0x20022;
401 pub const MON_10
: ::nl_item
= 0x20023;
402 pub const MON_11
: ::nl_item
= 0x20024;
403 pub const MON_12
: ::nl_item
= 0x20025;
405 pub const AM_STR
: ::nl_item
= 0x20026;
406 pub const PM_STR
: ::nl_item
= 0x20027;
408 pub const D_T_FMT
: ::nl_item
= 0x20028;
409 pub const D_FMT
: ::nl_item
= 0x20029;
410 pub const T_FMT
: ::nl_item
= 0x2002A;
411 pub const T_FMT_AMPM
: ::nl_item
= 0x2002B;
413 pub const ERA
: ::nl_item
= 0x2002C;
414 pub const ERA_D_FMT
: ::nl_item
= 0x2002E;
415 pub const ALT_DIGITS
: ::nl_item
= 0x2002F;
416 pub const ERA_D_T_FMT
: ::nl_item
= 0x20030;
417 pub const ERA_T_FMT
: ::nl_item
= 0x20031;
419 pub const CODESET
: ::nl_item
= 14;
421 pub const CRNCYSTR
: ::nl_item
= 0x4000F;
423 pub const RUSAGE_THREAD
: ::c_int
= 1;
424 pub const RUSAGE_CHILDREN
: ::c_int
= -1;
426 pub const RADIXCHAR
: ::nl_item
= 0x10000;
427 pub const THOUSEP
: ::nl_item
= 0x10001;
429 pub const YESEXPR
: ::nl_item
= 0x50000;
430 pub const NOEXPR
: ::nl_item
= 0x50001;
431 pub const YESSTR
: ::nl_item
= 0x50002;
432 pub const NOSTR
: ::nl_item
= 0x50003;
434 pub const FILENAME_MAX
: ::c_uint
= 4096;
435 pub const L_tmpnam
: ::c_uint
= 20;
436 pub const _PC_LINK_MAX
: ::c_int
= 0;
437 pub const _PC_MAX_CANON
: ::c_int
= 1;
438 pub const _PC_MAX_INPUT
: ::c_int
= 2;
439 pub const _PC_NAME_MAX
: ::c_int
= 3;
440 pub const _PC_PATH_MAX
: ::c_int
= 4;
441 pub const _PC_PIPE_BUF
: ::c_int
= 5;
442 pub const _PC_CHOWN_RESTRICTED
: ::c_int
= 6;
443 pub const _PC_NO_TRUNC
: ::c_int
= 7;
444 pub const _PC_VDISABLE
: ::c_int
= 8;
445 pub const _PC_SYNC_IO
: ::c_int
= 9;
446 pub const _PC_ASYNC_IO
: ::c_int
= 10;
447 pub const _PC_PRIO_IO
: ::c_int
= 11;
448 pub const _PC_SOCK_MAXBUF
: ::c_int
= 12;
449 pub const _PC_FILESIZEBITS
: ::c_int
= 13;
450 pub const _PC_REC_INCR_XFER_SIZE
: ::c_int
= 14;
451 pub const _PC_REC_MAX_XFER_SIZE
: ::c_int
= 15;
452 pub const _PC_REC_MIN_XFER_SIZE
: ::c_int
= 16;
453 pub const _PC_REC_XFER_ALIGN
: ::c_int
= 17;
454 pub const _PC_ALLOC_SIZE_MIN
: ::c_int
= 18;
455 pub const _PC_SYMLINK_MAX
: ::c_int
= 19;
456 pub const _PC_2_SYMLINKS
: ::c_int
= 20;
458 pub const _SC_ARG_MAX
: ::c_int
= 0;
459 pub const _SC_CHILD_MAX
: ::c_int
= 1;
460 pub const _SC_CLK_TCK
: ::c_int
= 2;
461 pub const _SC_NGROUPS_MAX
: ::c_int
= 3;
462 pub const _SC_OPEN_MAX
: ::c_int
= 4;
463 pub const _SC_STREAM_MAX
: ::c_int
= 5;
464 pub const _SC_TZNAME_MAX
: ::c_int
= 6;
465 pub const _SC_JOB_CONTROL
: ::c_int
= 7;
466 pub const _SC_SAVED_IDS
: ::c_int
= 8;
467 pub const _SC_REALTIME_SIGNALS
: ::c_int
= 9;
468 pub const _SC_PRIORITY_SCHEDULING
: ::c_int
= 10;
469 pub const _SC_TIMERS
: ::c_int
= 11;
470 pub const _SC_ASYNCHRONOUS_IO
: ::c_int
= 12;
471 pub const _SC_PRIORITIZED_IO
: ::c_int
= 13;
472 pub const _SC_SYNCHRONIZED_IO
: ::c_int
= 14;
473 pub const _SC_FSYNC
: ::c_int
= 15;
474 pub const _SC_MAPPED_FILES
: ::c_int
= 16;
475 pub const _SC_MEMLOCK
: ::c_int
= 17;
476 pub const _SC_MEMLOCK_RANGE
: ::c_int
= 18;
477 pub const _SC_MEMORY_PROTECTION
: ::c_int
= 19;
478 pub const _SC_MESSAGE_PASSING
: ::c_int
= 20;
479 pub const _SC_SEMAPHORES
: ::c_int
= 21;
480 pub const _SC_SHARED_MEMORY_OBJECTS
: ::c_int
= 22;
481 pub const _SC_AIO_LISTIO_MAX
: ::c_int
= 23;
482 pub const _SC_AIO_MAX
: ::c_int
= 24;
483 pub const _SC_AIO_PRIO_DELTA_MAX
: ::c_int
= 25;
484 pub const _SC_DELAYTIMER_MAX
: ::c_int
= 26;
485 pub const _SC_MQ_OPEN_MAX
: ::c_int
= 27;
486 pub const _SC_MQ_PRIO_MAX
: ::c_int
= 28;
487 pub const _SC_VERSION
: ::c_int
= 29;
488 pub const _SC_PAGESIZE
: ::c_int
= 30;
489 pub const _SC_PAGE_SIZE
: ::c_int
= _SC_PAGESIZE
;
490 pub const _SC_RTSIG_MAX
: ::c_int
= 31;
491 pub const _SC_SEM_NSEMS_MAX
: ::c_int
= 32;
492 pub const _SC_SEM_VALUE_MAX
: ::c_int
= 33;
493 pub const _SC_SIGQUEUE_MAX
: ::c_int
= 34;
494 pub const _SC_TIMER_MAX
: ::c_int
= 35;
495 pub const _SC_BC_BASE_MAX
: ::c_int
= 36;
496 pub const _SC_BC_DIM_MAX
: ::c_int
= 37;
497 pub const _SC_BC_SCALE_MAX
: ::c_int
= 38;
498 pub const _SC_BC_STRING_MAX
: ::c_int
= 39;
499 pub const _SC_COLL_WEIGHTS_MAX
: ::c_int
= 40;
500 pub const _SC_EXPR_NEST_MAX
: ::c_int
= 42;
501 pub const _SC_LINE_MAX
: ::c_int
= 43;
502 pub const _SC_RE_DUP_MAX
: ::c_int
= 44;
503 pub const _SC_2_VERSION
: ::c_int
= 46;
504 pub const _SC_2_C_BIND
: ::c_int
= 47;
505 pub const _SC_2_C_DEV
: ::c_int
= 48;
506 pub const _SC_2_FORT_DEV
: ::c_int
= 49;
507 pub const _SC_2_FORT_RUN
: ::c_int
= 50;
508 pub const _SC_2_SW_DEV
: ::c_int
= 51;
509 pub const _SC_2_LOCALEDEF
: ::c_int
= 52;
510 pub const _SC_UIO_MAXIOV
: ::c_int
= 60;
511 pub const _SC_IOV_MAX
: ::c_int
= 60;
512 pub const _SC_THREADS
: ::c_int
= 67;
513 pub const _SC_THREAD_SAFE_FUNCTIONS
: ::c_int
= 68;
514 pub const _SC_GETGR_R_SIZE_MAX
: ::c_int
= 69;
515 pub const _SC_GETPW_R_SIZE_MAX
: ::c_int
= 70;
516 pub const _SC_LOGIN_NAME_MAX
: ::c_int
= 71;
517 pub const _SC_TTY_NAME_MAX
: ::c_int
= 72;
518 pub const _SC_THREAD_DESTRUCTOR_ITERATIONS
: ::c_int
= 73;
519 pub const _SC_THREAD_KEYS_MAX
: ::c_int
= 74;
520 pub const _SC_THREAD_STACK_MIN
: ::c_int
= 75;
521 pub const _SC_THREAD_THREADS_MAX
: ::c_int
= 76;
522 pub const _SC_THREAD_ATTR_STACKADDR
: ::c_int
= 77;
523 pub const _SC_THREAD_ATTR_STACKSIZE
: ::c_int
= 78;
524 pub const _SC_THREAD_PRIORITY_SCHEDULING
: ::c_int
= 79;
525 pub const _SC_THREAD_PRIO_INHERIT
: ::c_int
= 80;
526 pub const _SC_THREAD_PRIO_PROTECT
: ::c_int
= 81;
527 pub const _SC_THREAD_PROCESS_SHARED
: ::c_int
= 82;
528 pub const _SC_NPROCESSORS_CONF
: ::c_int
= 83;
529 pub const _SC_NPROCESSORS_ONLN
: ::c_int
= 84;
530 pub const _SC_PHYS_PAGES
: ::c_int
= 85;
531 pub const _SC_AVPHYS_PAGES
: ::c_int
= 86;
532 pub const _SC_ATEXIT_MAX
: ::c_int
= 87;
533 pub const _SC_PASS_MAX
: ::c_int
= 88;
534 pub const _SC_XOPEN_VERSION
: ::c_int
= 89;
535 pub const _SC_XOPEN_XCU_VERSION
: ::c_int
= 90;
536 pub const _SC_XOPEN_UNIX
: ::c_int
= 91;
537 pub const _SC_XOPEN_CRYPT
: ::c_int
= 92;
538 pub const _SC_XOPEN_ENH_I18N
: ::c_int
= 93;
539 pub const _SC_XOPEN_SHM
: ::c_int
= 94;
540 pub const _SC_2_CHAR_TERM
: ::c_int
= 95;
541 pub const _SC_2_UPE
: ::c_int
= 97;
542 pub const _SC_XOPEN_XPG2
: ::c_int
= 98;
543 pub const _SC_XOPEN_XPG3
: ::c_int
= 99;
544 pub const _SC_XOPEN_XPG4
: ::c_int
= 100;
545 pub const _SC_NZERO
: ::c_int
= 109;
546 pub const _SC_XBS5_ILP32_OFF32
: ::c_int
= 125;
547 pub const _SC_XBS5_ILP32_OFFBIG
: ::c_int
= 126;
548 pub const _SC_XBS5_LP64_OFF64
: ::c_int
= 127;
549 pub const _SC_XBS5_LPBIG_OFFBIG
: ::c_int
= 128;
550 pub const _SC_XOPEN_LEGACY
: ::c_int
= 129;
551 pub const _SC_XOPEN_REALTIME
: ::c_int
= 130;
552 pub const _SC_XOPEN_REALTIME_THREADS
: ::c_int
= 131;
553 pub const _SC_ADVISORY_INFO
: ::c_int
= 132;
554 pub const _SC_BARRIERS
: ::c_int
= 133;
555 pub const _SC_CLOCK_SELECTION
: ::c_int
= 137;
556 pub const _SC_CPUTIME
: ::c_int
= 138;
557 pub const _SC_THREAD_CPUTIME
: ::c_int
= 139;
558 pub const _SC_MONOTONIC_CLOCK
: ::c_int
= 149;
559 pub const _SC_READER_WRITER_LOCKS
: ::c_int
= 153;
560 pub const _SC_SPIN_LOCKS
: ::c_int
= 154;
561 pub const _SC_REGEXP
: ::c_int
= 155;
562 pub const _SC_SHELL
: ::c_int
= 157;
563 pub const _SC_SPAWN
: ::c_int
= 159;
564 pub const _SC_SPORADIC_SERVER
: ::c_int
= 160;
565 pub const _SC_THREAD_SPORADIC_SERVER
: ::c_int
= 161;
566 pub const _SC_TIMEOUTS
: ::c_int
= 164;
567 pub const _SC_TYPED_MEMORY_OBJECTS
: ::c_int
= 165;
568 pub const _SC_2_PBS
: ::c_int
= 168;
569 pub const _SC_2_PBS_ACCOUNTING
: ::c_int
= 169;
570 pub const _SC_2_PBS_LOCATE
: ::c_int
= 170;
571 pub const _SC_2_PBS_MESSAGE
: ::c_int
= 171;
572 pub const _SC_2_PBS_TRACK
: ::c_int
= 172;
573 pub const _SC_SYMLOOP_MAX
: ::c_int
= 173;
574 pub const _SC_STREAMS
: ::c_int
= 174;
575 pub const _SC_2_PBS_CHECKPOINT
: ::c_int
= 175;
576 pub const _SC_V6_ILP32_OFF32
: ::c_int
= 176;
577 pub const _SC_V6_ILP32_OFFBIG
: ::c_int
= 177;
578 pub const _SC_V6_LP64_OFF64
: ::c_int
= 178;
579 pub const _SC_V6_LPBIG_OFFBIG
: ::c_int
= 179;
580 pub const _SC_HOST_NAME_MAX
: ::c_int
= 180;
581 pub const _SC_TRACE
: ::c_int
= 181;
582 pub const _SC_TRACE_EVENT_FILTER
: ::c_int
= 182;
583 pub const _SC_TRACE_INHERIT
: ::c_int
= 183;
584 pub const _SC_TRACE_LOG
: ::c_int
= 184;
585 pub const _SC_IPV6
: ::c_int
= 235;
586 pub const _SC_RAW_SOCKETS
: ::c_int
= 236;
587 pub const _SC_V7_ILP32_OFF32
: ::c_int
= 237;
588 pub const _SC_V7_ILP32_OFFBIG
: ::c_int
= 238;
589 pub const _SC_V7_LP64_OFF64
: ::c_int
= 239;
590 pub const _SC_V7_LPBIG_OFFBIG
: ::c_int
= 240;
591 pub const _SC_SS_REPL_MAX
: ::c_int
= 241;
592 pub const _SC_TRACE_EVENT_NAME_MAX
: ::c_int
= 242;
593 pub const _SC_TRACE_NAME_MAX
: ::c_int
= 243;
594 pub const _SC_TRACE_SYS_MAX
: ::c_int
= 244;
595 pub const _SC_TRACE_USER_EVENT_MAX
: ::c_int
= 245;
596 pub const _SC_XOPEN_STREAMS
: ::c_int
= 246;
597 pub const _SC_THREAD_ROBUST_PRIO_INHERIT
: ::c_int
= 247;
598 pub const _SC_THREAD_ROBUST_PRIO_PROTECT
: ::c_int
= 248;
600 pub const RLIM_SAVED_MAX
: ::rlim_t
= RLIM_INFINITY
;
601 pub const RLIM_SAVED_CUR
: ::rlim_t
= RLIM_INFINITY
;
603 pub const GLOB_ERR
: ::c_int
= 1 << 0;
604 pub const GLOB_MARK
: ::c_int
= 1 << 1;
605 pub const GLOB_NOSORT
: ::c_int
= 1 << 2;
606 pub const GLOB_DOOFFS
: ::c_int
= 1 << 3;
607 pub const GLOB_NOCHECK
: ::c_int
= 1 << 4;
608 pub const GLOB_APPEND
: ::c_int
= 1 << 5;
609 pub const GLOB_NOESCAPE
: ::c_int
= 1 << 6;
611 pub const GLOB_NOSPACE
: ::c_int
= 1;
612 pub const GLOB_ABORTED
: ::c_int
= 2;
613 pub const GLOB_NOMATCH
: ::c_int
= 3;
615 pub const POSIX_MADV_NORMAL
: ::c_int
= 0;
616 pub const POSIX_MADV_RANDOM
: ::c_int
= 1;
617 pub const POSIX_MADV_SEQUENTIAL
: ::c_int
= 2;
618 pub const POSIX_MADV_WILLNEED
: ::c_int
= 3;
620 pub const S_IEXEC
: mode_t
= 64;
621 pub const S_IWRITE
: mode_t
= 128;
622 pub const S_IREAD
: mode_t
= 256;
624 pub const F_LOCK
: ::c_int
= 1;
625 pub const F_TEST
: ::c_int
= 3;
626 pub const F_TLOCK
: ::c_int
= 2;
627 pub const F_ULOCK
: ::c_int
= 0;
629 pub const IFF_LOWER_UP
: ::c_int
= 0x10000;
630 pub const IFF_DORMANT
: ::c_int
= 0x20000;
631 pub const IFF_ECHO
: ::c_int
= 0x40000;
633 pub const ST_RDONLY
: ::c_ulong
= 1;
634 pub const ST_NOSUID
: ::c_ulong
= 2;
635 pub const ST_NODEV
: ::c_ulong
= 4;
636 pub const ST_NOEXEC
: ::c_ulong
= 8;
637 pub const ST_SYNCHRONOUS
: ::c_ulong
= 16;
638 pub const ST_MANDLOCK
: ::c_ulong
= 64;
639 pub const ST_WRITE
: ::c_ulong
= 128;
640 pub const ST_APPEND
: ::c_ulong
= 256;
641 pub const ST_IMMUTABLE
: ::c_ulong
= 512;
642 pub const ST_NOATIME
: ::c_ulong
= 1024;
643 pub const ST_NODIRATIME
: ::c_ulong
= 2048;
645 pub const RTLD_NEXT
: *mut ::c_void
= -1i64 as *mut ::c_void
;
646 pub const RTLD_DEFAULT
: *mut ::c_void
= 0i64 as *mut ::c_void
;
647 pub const RTLD_NODELETE
: ::c_int
= 0x1000;
648 pub const RTLD_NOW
: ::c_int
= 0x2;
650 pub const TCP_MD5SIG
: ::c_int
= 14;
652 pub const PTHREAD_MUTEX_INITIALIZER
: pthread_mutex_t
= pthread_mutex_t
{
654 size
: [0; __SIZEOF_PTHREAD_MUTEX_T
],
656 pub const PTHREAD_COND_INITIALIZER
: pthread_cond_t
= pthread_cond_t
{
658 size
: [0; __SIZEOF_PTHREAD_COND_T
],
660 pub const PTHREAD_RWLOCK_INITIALIZER
: pthread_rwlock_t
= pthread_rwlock_t
{
662 size
: [0; __SIZEOF_PTHREAD_RWLOCK_T
],
664 pub const PTHREAD_MUTEX_NORMAL
: ::c_int
= 0;
665 pub const PTHREAD_MUTEX_RECURSIVE
: ::c_int
= 1;
666 pub const PTHREAD_MUTEX_ERRORCHECK
: ::c_int
= 2;
667 pub const PTHREAD_MUTEX_DEFAULT
: ::c_int
= PTHREAD_MUTEX_NORMAL
;
668 pub const PTHREAD_PROCESS_PRIVATE
: ::c_int
= 0;
669 pub const PTHREAD_PROCESS_SHARED
: ::c_int
= 1;
670 pub const __SIZEOF_PTHREAD_COND_T
: usize = 48;
672 pub const SCHED_OTHER
: ::c_int
= 0;
673 pub const SCHED_FIFO
: ::c_int
= 1;
674 pub const SCHED_RR
: ::c_int
= 2;
675 pub const SCHED_BATCH
: ::c_int
= 3;
676 pub const SCHED_IDLE
: ::c_int
= 5;
679 // NOTE: These are in addition to the constants defined in src/unix/mod.rs
681 // IPPROTO_IP defined in src/unix/mod.rs
682 /// Hop-by-hop option header
683 pub const IPPROTO_HOPOPTS
: ::c_int
= 0;
684 // IPPROTO_ICMP defined in src/unix/mod.rs
685 /// group mgmt protocol
686 pub const IPPROTO_IGMP
: ::c_int
= 2;
687 /// for compatibility
688 pub const IPPROTO_IPIP
: ::c_int
= 4;
689 // IPPROTO_TCP defined in src/unix/mod.rs
690 /// exterior gateway protocol
691 pub const IPPROTO_EGP
: ::c_int
= 8;
693 pub const IPPROTO_PUP
: ::c_int
= 12;
694 // IPPROTO_UDP defined in src/unix/mod.rs
696 pub const IPPROTO_IDP
: ::c_int
= 22;
697 /// tp-4 w/ class negotiation
698 pub const IPPROTO_TP
: ::c_int
= 29;
700 pub const IPPROTO_DCCP
: ::c_int
= 33;
701 // IPPROTO_IPV6 defined in src/unix/mod.rs
702 /// IP6 routing header
703 pub const IPPROTO_ROUTING
: ::c_int
= 43;
704 /// IP6 fragmentation header
705 pub const IPPROTO_FRAGMENT
: ::c_int
= 44;
706 /// resource reservation
707 pub const IPPROTO_RSVP
: ::c_int
= 46;
708 /// General Routing Encap.
709 pub const IPPROTO_GRE
: ::c_int
= 47;
710 /// IP6 Encap Sec. Payload
711 pub const IPPROTO_ESP
: ::c_int
= 50;
713 pub const IPPROTO_AH
: ::c_int
= 51;
714 // IPPROTO_ICMPV6 defined in src/unix/mod.rs
715 /// IP6 no next header
716 pub const IPPROTO_NONE
: ::c_int
= 59;
717 /// IP6 destination option
718 pub const IPPROTO_DSTOPTS
: ::c_int
= 60;
719 pub const IPPROTO_MTP
: ::c_int
= 92;
720 pub const IPPROTO_BEETPH
: ::c_int
= 94;
721 /// encapsulation header
722 pub const IPPROTO_ENCAP
: ::c_int
= 98;
723 /// Protocol indep. multicast
724 pub const IPPROTO_PIM
: ::c_int
= 103;
725 /// IP Payload Comp. Protocol
726 pub const IPPROTO_COMP
: ::c_int
= 108;
728 pub const IPPROTO_SCTP
: ::c_int
= 132;
729 pub const IPPROTO_MH
: ::c_int
= 135;
730 pub const IPPROTO_UDPLITE
: ::c_int
= 136;
731 pub const IPPROTO_MPLS
: ::c_int
= 137;
733 pub const IPPROTO_RAW
: ::c_int
= 255;
734 pub const IPPROTO_MAX
: ::c_int
= 256;
736 pub const AF_IB
: ::c_int
= 27;
737 pub const AF_MPLS
: ::c_int
= 28;
738 pub const AF_NFC
: ::c_int
= 39;
739 pub const AF_VSOCK
: ::c_int
= 40;
741 pub const AF_MAX
: ::c_int
= 42;
742 pub const PF_IB
: ::c_int
= AF_IB
;
743 pub const PF_MPLS
: ::c_int
= AF_MPLS
;
744 pub const PF_NFC
: ::c_int
= AF_NFC
;
745 pub const PF_VSOCK
: ::c_int
= AF_VSOCK
;
747 pub const PF_MAX
: ::c_int
= AF_MAX
;
750 pub const IPC_PRIVATE
: ::key_t
= 0;
752 pub const IPC_CREAT
: ::c_int
= 0o1000;
753 pub const IPC_EXCL
: ::c_int
= 0o2000;
754 pub const IPC_NOWAIT
: ::c_int
= 0o4000;
756 pub const IPC_RMID
: ::c_int
= 0;
757 pub const IPC_SET
: ::c_int
= 1;
758 pub const IPC_STAT
: ::c_int
= 2;
759 pub const IPC_INFO
: ::c_int
= 3;
760 pub const MSG_STAT
: ::c_int
= 11;
761 pub const MSG_INFO
: ::c_int
= 12;
763 pub const MSG_NOERROR
: ::c_int
= 0o10000;
764 pub const MSG_EXCEPT
: ::c_int
= 0o20000;
765 pub const MSG_COPY
: ::c_int
= 0o40000;
767 pub const SHM_R
: ::c_int
= 0o400;
768 pub const SHM_W
: ::c_int
= 0o200;
770 pub const SHM_RDONLY
: ::c_int
= 0o10000;
771 pub const SHM_RND
: ::c_int
= 0o20000;
772 pub const SHM_REMAP
: ::c_int
= 0o40000;
773 pub const SHM_EXEC
: ::c_int
= 0o100000;
775 pub const SHM_LOCK
: ::c_int
= 11;
776 pub const SHM_UNLOCK
: ::c_int
= 12;
778 pub const SHM_HUGETLB
: ::c_int
= 0o4000;
779 pub const SHM_NORESERVE
: ::c_int
= 0o10000;
781 pub const EPOLLRDHUP
: ::c_int
= 0x2000;
782 pub const EPOLLEXCLUSIVE
: ::c_int
= 0x10000000;
783 pub const EPOLLONESHOT
: ::c_int
= 0x40000000;
785 pub const QFMT_VFS_OLD
: ::c_int
= 1;
786 pub const QFMT_VFS_V0
: ::c_int
= 2;
787 pub const QFMT_VFS_V1
: ::c_int
= 4;
789 pub const EFD_SEMAPHORE
: ::c_int
= 0x1;
791 pub const LOG_NFACILITIES
: ::c_int
= 24;
793 pub const SEM_FAILED
: *mut ::sem_t
= 0 as *mut sem_t
;
795 pub const RB_AUTOBOOT
: ::c_int
= 0x01234567u32 as i32;
796 pub const RB_HALT_SYSTEM
: ::c_int
= 0xcdef0123u32 as i32;
797 pub const RB_ENABLE_CAD
: ::c_int
= 0x89abcdefu32 as i32;
798 pub const RB_DISABLE_CAD
: ::c_int
= 0x00000000u32 as i32;
799 pub const RB_POWER_OFF
: ::c_int
= 0x4321fedcu32 as i32;
800 pub const RB_SW_SUSPEND
: ::c_int
= 0xd000fce2u32 as i32;
801 pub const RB_KEXEC
: ::c_int
= 0x45584543u32 as i32;
803 pub const AI_PASSIVE
: ::c_int
= 0x0001;
804 pub const AI_CANONNAME
: ::c_int
= 0x0002;
805 pub const AI_NUMERICHOST
: ::c_int
= 0x0004;
806 pub const AI_V4MAPPED
: ::c_int
= 0x0008;
807 pub const AI_ALL
: ::c_int
= 0x0010;
808 pub const AI_ADDRCONFIG
: ::c_int
= 0x0020;
810 pub const AI_NUMERICSERV
: ::c_int
= 0x0400;
812 pub const EAI_BADFLAGS
: ::c_int
= -1;
813 pub const EAI_NONAME
: ::c_int
= -2;
814 pub const EAI_AGAIN
: ::c_int
= -3;
815 pub const EAI_FAIL
: ::c_int
= -4;
816 pub const EAI_FAMILY
: ::c_int
= -6;
817 pub const EAI_SOCKTYPE
: ::c_int
= -7;
818 pub const EAI_SERVICE
: ::c_int
= -8;
819 pub const EAI_MEMORY
: ::c_int
= -10;
820 pub const EAI_OVERFLOW
: ::c_int
= -12;
822 pub const NI_NUMERICHOST
: ::c_int
= 1;
823 pub const NI_NUMERICSERV
: ::c_int
= 2;
824 pub const NI_NOFQDN
: ::c_int
= 4;
825 pub const NI_NAMEREQD
: ::c_int
= 8;
826 pub const NI_DGRAM
: ::c_int
= 16;
828 pub const SYNC_FILE_RANGE_WAIT_BEFORE
: ::c_uint
= 1;
829 pub const SYNC_FILE_RANGE_WRITE
: ::c_uint
= 2;
830 pub const SYNC_FILE_RANGE_WAIT_AFTER
: ::c_uint
= 4;
832 pub const EAI_SYSTEM
: ::c_int
= -11;
834 pub const AIO_CANCELED
: ::c_int
= 0;
835 pub const AIO_NOTCANCELED
: ::c_int
= 1;
836 pub const AIO_ALLDONE
: ::c_int
= 2;
837 pub const LIO_READ
: ::c_int
= 0;
838 pub const LIO_WRITE
: ::c_int
= 1;
839 pub const LIO_NOP
: ::c_int
= 2;
840 pub const LIO_WAIT
: ::c_int
= 0;
841 pub const LIO_NOWAIT
: ::c_int
= 1;
843 pub const MREMAP_MAYMOVE
: ::c_int
= 1;
844 pub const MREMAP_FIXED
: ::c_int
= 2;
846 pub const PR_SET_PDEATHSIG
: ::c_int
= 1;
847 pub const PR_GET_PDEATHSIG
: ::c_int
= 2;
849 pub const PR_GET_DUMPABLE
: ::c_int
= 3;
850 pub const PR_SET_DUMPABLE
: ::c_int
= 4;
852 pub const PR_GET_UNALIGN
: ::c_int
= 5;
853 pub const PR_SET_UNALIGN
: ::c_int
= 6;
854 pub const PR_UNALIGN_NOPRINT
: ::c_int
= 1;
855 pub const PR_UNALIGN_SIGBUS
: ::c_int
= 2;
857 pub const PR_GET_KEEPCAPS
: ::c_int
= 7;
858 pub const PR_SET_KEEPCAPS
: ::c_int
= 8;
860 pub const PR_GET_FPEMU
: ::c_int
= 9;
861 pub const PR_SET_FPEMU
: ::c_int
= 10;
862 pub const PR_FPEMU_NOPRINT
: ::c_int
= 1;
863 pub const PR_FPEMU_SIGFPE
: ::c_int
= 2;
865 pub const PR_GET_FPEXC
: ::c_int
= 11;
866 pub const PR_SET_FPEXC
: ::c_int
= 12;
867 pub const PR_FP_EXC_SW_ENABLE
: ::c_int
= 0x80;
868 pub const PR_FP_EXC_DIV
: ::c_int
= 0x010000;
869 pub const PR_FP_EXC_OVF
: ::c_int
= 0x020000;
870 pub const PR_FP_EXC_UND
: ::c_int
= 0x040000;
871 pub const PR_FP_EXC_RES
: ::c_int
= 0x080000;
872 pub const PR_FP_EXC_INV
: ::c_int
= 0x100000;
873 pub const PR_FP_EXC_DISABLED
: ::c_int
= 0;
874 pub const PR_FP_EXC_NONRECOV
: ::c_int
= 1;
875 pub const PR_FP_EXC_ASYNC
: ::c_int
= 2;
876 pub const PR_FP_EXC_PRECISE
: ::c_int
= 3;
878 pub const PR_GET_TIMING
: ::c_int
= 13;
879 pub const PR_SET_TIMING
: ::c_int
= 14;
880 pub const PR_TIMING_STATISTICAL
: ::c_int
= 0;
881 pub const PR_TIMING_TIMESTAMP
: ::c_int
= 1;
883 pub const PR_SET_NAME
: ::c_int
= 15;
884 pub const PR_GET_NAME
: ::c_int
= 16;
886 pub const PR_GET_ENDIAN
: ::c_int
= 19;
887 pub const PR_SET_ENDIAN
: ::c_int
= 20;
888 pub const PR_ENDIAN_BIG
: ::c_int
= 0;
889 pub const PR_ENDIAN_LITTLE
: ::c_int
= 1;
890 pub const PR_ENDIAN_PPC_LITTLE
: ::c_int
= 2;
892 pub const PR_GET_SECCOMP
: ::c_int
= 21;
893 pub const PR_SET_SECCOMP
: ::c_int
= 22;
895 pub const PR_CAPBSET_READ
: ::c_int
= 23;
896 pub const PR_CAPBSET_DROP
: ::c_int
= 24;
898 pub const PR_GET_TSC
: ::c_int
= 25;
899 pub const PR_SET_TSC
: ::c_int
= 26;
900 pub const PR_TSC_ENABLE
: ::c_int
= 1;
901 pub const PR_TSC_SIGSEGV
: ::c_int
= 2;
903 pub const PR_GET_SECUREBITS
: ::c_int
= 27;
904 pub const PR_SET_SECUREBITS
: ::c_int
= 28;
906 pub const PR_SET_TIMERSLACK
: ::c_int
= 29;
907 pub const PR_GET_TIMERSLACK
: ::c_int
= 30;
909 pub const PR_TASK_PERF_EVENTS_DISABLE
: ::c_int
= 31;
910 pub const PR_TASK_PERF_EVENTS_ENABLE
: ::c_int
= 32;
912 pub const PR_MCE_KILL
: ::c_int
= 33;
913 pub const PR_MCE_KILL_CLEAR
: ::c_int
= 0;
914 pub const PR_MCE_KILL_SET
: ::c_int
= 1;
916 pub const PR_MCE_KILL_LATE
: ::c_int
= 0;
917 pub const PR_MCE_KILL_EARLY
: ::c_int
= 1;
918 pub const PR_MCE_KILL_DEFAULT
: ::c_int
= 2;
920 pub const PR_MCE_KILL_GET
: ::c_int
= 34;
922 pub const PR_SET_MM
: ::c_int
= 35;
923 pub const PR_SET_MM_START_CODE
: ::c_int
= 1;
924 pub const PR_SET_MM_END_CODE
: ::c_int
= 2;
925 pub const PR_SET_MM_START_DATA
: ::c_int
= 3;
926 pub const PR_SET_MM_END_DATA
: ::c_int
= 4;
927 pub const PR_SET_MM_START_STACK
: ::c_int
= 5;
928 pub const PR_SET_MM_START_BRK
: ::c_int
= 6;
929 pub const PR_SET_MM_BRK
: ::c_int
= 7;
930 pub const PR_SET_MM_ARG_START
: ::c_int
= 8;
931 pub const PR_SET_MM_ARG_END
: ::c_int
= 9;
932 pub const PR_SET_MM_ENV_START
: ::c_int
= 10;
933 pub const PR_SET_MM_ENV_END
: ::c_int
= 11;
934 pub const PR_SET_MM_AUXV
: ::c_int
= 12;
935 pub const PR_SET_MM_EXE_FILE
: ::c_int
= 13;
936 pub const PR_SET_MM_MAP
: ::c_int
= 14;
937 pub const PR_SET_MM_MAP_SIZE
: ::c_int
= 15;
939 pub const PR_SET_PTRACER
: ::c_int
= 0x59616d61;
941 pub const PR_SET_CHILD_SUBREAPER
: ::c_int
= 36;
942 pub const PR_GET_CHILD_SUBREAPER
: ::c_int
= 37;
944 pub const PR_SET_NO_NEW_PRIVS
: ::c_int
= 38;
945 pub const PR_GET_NO_NEW_PRIVS
: ::c_int
= 39;
947 pub const PR_GET_TID_ADDRESS
: ::c_int
= 40;
949 pub const PR_SET_THP_DISABLE
: ::c_int
= 41;
950 pub const PR_GET_THP_DISABLE
: ::c_int
= 42;
952 pub const PR_MPX_ENABLE_MANAGEMENT
: ::c_int
= 43;
953 pub const PR_MPX_DISABLE_MANAGEMENT
: ::c_int
= 44;
955 pub const PR_SET_FP_MODE
: ::c_int
= 45;
956 pub const PR_GET_FP_MODE
: ::c_int
= 46;
957 pub const PR_FP_MODE_FR
: ::c_int
= 1 << 0;
958 pub const PR_FP_MODE_FRE
: ::c_int
= 1 << 1;
960 pub const PR_CAP_AMBIENT
: ::c_int
= 47;
961 pub const PR_CAP_AMBIENT_IS_SET
: ::c_int
= 1;
962 pub const PR_CAP_AMBIENT_RAISE
: ::c_int
= 2;
963 pub const PR_CAP_AMBIENT_LOWER
: ::c_int
= 3;
964 pub const PR_CAP_AMBIENT_CLEAR_ALL
: ::c_int
= 4;
966 pub const ITIMER_REAL
: ::c_int
= 0;
967 pub const ITIMER_VIRTUAL
: ::c_int
= 1;
968 pub const ITIMER_PROF
: ::c_int
= 2;
970 pub const TFD_CLOEXEC
: ::c_int
= O_CLOEXEC
;
971 pub const TFD_NONBLOCK
: ::c_int
= O_NONBLOCK
;
972 pub const TFD_TIMER_ABSTIME
: ::c_int
= 1;
974 pub const XATTR_CREATE
: ::c_int
= 0x1;
975 pub const XATTR_REPLACE
: ::c_int
= 0x2;
977 pub const _POSIX_VDISABLE
: ::cc_t
= 0;
979 pub const FALLOC_FL_KEEP_SIZE
: ::c_int
= 0x01;
980 pub const FALLOC_FL_PUNCH_HOLE
: ::c_int
= 0x02;
981 pub const FALLOC_FL_COLLAPSE_RANGE
: ::c_int
= 0x08;
982 pub const FALLOC_FL_ZERO_RANGE
: ::c_int
= 0x10;
983 pub const FALLOC_FL_INSERT_RANGE
: ::c_int
= 0x20;
984 pub const FALLOC_FL_UNSHARE_RANGE
: ::c_int
= 0x40;
986 // On Linux, libc doesn't define this constant, libattr does instead.
987 // We still define it for Linux as it's defined by libc on other platforms,
988 // and it's mentioned in the man pages for getxattr and setxattr.
989 pub const ENOATTR
: ::c_int
= ::ENODATA
;
991 pub const SO_ORIGINAL_DST
: ::c_int
= 80;
992 pub const IUTF8
: ::tcflag_t
= 0x00004000;
993 pub const CMSPAR
: ::tcflag_t
= 0o10000000000;
994 pub const O_TMPFILE
: ::c_int
= 0o20000000 | O_DIRECTORY
;
997 pub fn CPU_ZERO(cpuset
: &mut cpu_set_t
) -> () {
998 for slot
in cpuset
.bits
.iter_mut() {
1003 pub fn CPU_SET(cpu
: usize, cpuset
: &mut cpu_set_t
) -> () {
1004 let size_in_bits
= 8 * mem
::size_of_val(&cpuset
.bits
[0]); // 32, 64 etc
1005 let (idx
, offset
) = (cpu
/ size_in_bits
, cpu
% size_in_bits
);
1006 cpuset
.bits
[idx
] |= 1 << offset
;
1010 pub fn CPU_CLR(cpu
: usize, cpuset
: &mut cpu_set_t
) -> () {
1011 let size_in_bits
= 8 * mem
::size_of_val(&cpuset
.bits
[0]); // 32, 64 etc
1012 let (idx
, offset
) = (cpu
/ size_in_bits
, cpu
% size_in_bits
);
1013 cpuset
.bits
[idx
] &= !(1 << offset
);
1017 pub fn CPU_ISSET(cpu
: usize, cpuset
: &cpu_set_t
) -> bool
{
1018 let size_in_bits
= 8 * mem
::size_of_val(&cpuset
.bits
[0]);
1019 let (idx
, offset
) = (cpu
/ size_in_bits
, cpu
% size_in_bits
);
1020 0 != (cpuset
.bits
[idx
] & (1 << offset
))
1023 pub fn CPU_EQUAL(set1
: &cpu_set_t
, set2
: &cpu_set_t
) -> bool
{
1024 set1
.bits
== set2
.bits
1027 pub fn major(dev
: ::dev_t
) -> ::c_uint
{
1029 major
|= (dev
& 0x00000000000fff00) >> 8;
1030 major
|= (dev
& 0xfffff00000000000) >> 32;
1034 pub fn minor(dev
: ::dev_t
) -> ::c_uint
{
1036 minor
|= (dev
& 0x00000000000000ff) >> 0;
1037 minor
|= (dev
& 0x00000ffffff00000) >> 12;
1041 pub fn makedev(major
: ::c_uint
, minor
: ::c_uint
) -> ::dev_t
{
1042 let major
= major
as ::dev_t
;
1043 let minor
= minor
as ::dev_t
;
1045 dev
|= (major
& 0x00000fff) << 8;
1046 dev
|= (major
& 0xfffff000) << 32;
1047 dev
|= (minor
& 0x000000ff) << 0;
1048 dev
|= (minor
& 0xffffff00) << 12;
1054 pub fn aio_read(aiocbp
: *mut aiocb
) -> ::c_int
;
1055 pub fn aio_write(aiocbp
: *mut aiocb
) -> ::c_int
;
1056 pub fn aio_fsync(op
: ::c_int
, aiocbp
: *mut aiocb
) -> ::c_int
;
1057 pub fn aio_error(aiocbp
: *const aiocb
) -> ::c_int
;
1058 pub fn aio_return(aiocbp
: *mut aiocb
) -> ::ssize_t
;
1059 pub fn aio_suspend(aiocb_list
: *const *const aiocb
, nitems
: ::c_int
,
1060 timeout
: *const ::timespec
) -> ::c_int
;
1061 pub fn aio_cancel(fd
: ::c_int
, aiocbp
: *mut aiocb
) -> ::c_int
;
1062 pub fn lio_listio(mode
: ::c_int
, aiocb_list
: *const *mut aiocb
,
1063 nitems
: ::c_int
, sevp
: *mut ::sigevent
) -> ::c_int
;
1065 pub fn lutimes(file
: *const ::c_char
, times
: *const ::timeval
) -> ::c_int
;
1069 pub fn getpwent() -> *mut passwd
;
1072 pub fn getspent() -> *mut spwd
;
1073 pub fn getspnam(__name
: *const ::c_char
) -> *mut spwd
;
1075 pub fn shm_open(name
: *const c_char
, oflag
: ::c_int
,
1076 mode
: mode_t
) -> ::c_int
;
1079 pub fn shmget(key
: ::key_t
, size
: ::size_t
, shmflg
: ::c_int
) -> ::c_int
;
1080 pub fn shmat(shmid
: ::c_int
,
1081 shmaddr
: *const ::c_void
,
1082 shmflg
: ::c_int
) -> *mut ::c_void
;
1083 pub fn shmdt(shmaddr
: *const ::c_void
) -> ::c_int
;
1084 pub fn shmctl(shmid
: ::c_int
,
1086 buf
: *mut ::shmid_ds
) -> ::c_int
;
1087 pub fn ftok(pathname
: *const ::c_char
, proj_id
: ::c_int
) -> ::key_t
;
1088 pub fn semget(key
: ::key_t
, nsems
: ::c_int
, semflag
: ::c_int
) -> ::c_int
;
1089 pub fn semop(semid
: ::c_int
,
1090 sops
: *mut ::sembuf
, nsops
: ::size_t
) -> ::c_int
;
1091 pub fn semctl(semid
: ::c_int
,
1092 semnum
: ::c_int
, cmd
: ::c_int
, ...) -> ::c_int
;
1093 pub fn msgctl(msqid
: ::c_int
, cmd
: ::c_int
, buf
: *mut msqid_ds
) -> ::c_int
;
1094 pub fn msgget(key
: ::key_t
, msgflg
: ::c_int
) -> ::c_int
;
1095 pub fn msgrcv(msqid
: ::c_int
, msgp
: *mut ::c_void
, msgsz
: ::size_t
,
1096 msgtyp
: ::c_long
, msgflg
: ::c_int
) -> ::ssize_t
;
1097 pub fn msgsnd(msqid
: ::c_int
, msgp
: *const ::c_void
, msgsz
: ::size_t
,
1098 msgflg
: ::c_int
) -> ::c_int
;
1100 pub fn mprotect(addr
: *mut ::c_void
, len
: ::size_t
, prot
: ::c_int
)
1102 pub fn __errno_location() -> *mut ::c_int
;
1104 pub fn fopen64(filename
: *const c_char
,
1105 mode
: *const c_char
) -> *mut ::FILE
;
1106 pub fn freopen64(filename
: *const c_char
, mode
: *const c_char
,
1107 file
: *mut ::FILE
) -> *mut ::FILE
;
1108 pub fn tmpfile64() -> *mut ::FILE
;
1109 pub fn fgetpos64(stream
: *mut ::FILE
, ptr
: *mut fpos64_t
) -> ::c_int
;
1110 pub fn fsetpos64(stream
: *mut ::FILE
, ptr
: *const fpos64_t
) -> ::c_int
;
1111 pub fn fseeko64(stream
: *mut ::FILE
,
1113 whence
: ::c_int
) -> ::c_int
;
1114 pub fn ftello64(stream
: *mut ::FILE
) -> ::off64_t
;
1115 pub fn fallocate(fd
: ::c_int
, mode
: ::c_int
,
1116 offset
: ::off_t
, len
: ::off_t
) -> ::c_int
;
1117 pub fn posix_fallocate(fd
: ::c_int
, offset
: ::off_t
,
1118 len
: ::off_t
) -> ::c_int
;
1119 pub fn readahead(fd
: ::c_int
, offset
: ::off64_t
,
1120 count
: ::size_t
) -> ::ssize_t
;
1121 pub fn getxattr(path
: *const c_char
, name
: *const c_char
,
1122 value
: *mut ::c_void
, size
: ::size_t
) -> ::ssize_t
;
1123 pub fn lgetxattr(path
: *const c_char
, name
: *const c_char
,
1124 value
: *mut ::c_void
, size
: ::size_t
) -> ::ssize_t
;
1125 pub fn fgetxattr(filedes
: ::c_int
, name
: *const c_char
,
1126 value
: *mut ::c_void
, size
: ::size_t
) -> ::ssize_t
;
1127 pub fn setxattr(path
: *const c_char
, name
: *const c_char
,
1128 value
: *const ::c_void
, size
: ::size_t
,
1129 flags
: ::c_int
) -> ::c_int
;
1130 pub fn lsetxattr(path
: *const c_char
, name
: *const c_char
,
1131 value
: *const ::c_void
, size
: ::size_t
,
1132 flags
: ::c_int
) -> ::c_int
;
1133 pub fn fsetxattr(filedes
: ::c_int
, name
: *const c_char
,
1134 value
: *const ::c_void
, size
: ::size_t
,
1135 flags
: ::c_int
) -> ::c_int
;
1136 pub fn listxattr(path
: *const c_char
, list
: *mut c_char
,
1137 size
: ::size_t
) -> ::ssize_t
;
1138 pub fn llistxattr(path
: *const c_char
, list
: *mut c_char
,
1139 size
: ::size_t
) -> ::ssize_t
;
1140 pub fn flistxattr(filedes
: ::c_int
, list
: *mut c_char
,
1141 size
: ::size_t
) -> ::ssize_t
;
1142 pub fn removexattr(path
: *const c_char
, name
: *const c_char
) -> ::c_int
;
1143 pub fn lremovexattr(path
: *const c_char
, name
: *const c_char
) -> ::c_int
;
1144 pub fn fremovexattr(filedes
: ::c_int
, name
: *const c_char
) -> ::c_int
;
1145 pub fn signalfd(fd
: ::c_int
,
1146 mask
: *const ::sigset_t
,
1147 flags
: ::c_int
) -> ::c_int
;
1148 pub fn timerfd_create(clockid
: ::c_int
, flags
: ::c_int
) -> ::c_int
;
1149 pub fn timerfd_gettime(fd
: ::c_int
,
1150 curr_value
: *mut itimerspec
) -> ::c_int
;
1151 pub fn timerfd_settime(fd
: ::c_int
,
1153 new_value
: *const itimerspec
,
1154 old_value
: *mut itimerspec
) -> ::c_int
;
1155 pub fn pwritev(fd
: ::c_int
,
1156 iov
: *const ::iovec
,
1158 offset
: ::off_t
) -> ::ssize_t
;
1159 pub fn preadv(fd
: ::c_int
,
1160 iov
: *const ::iovec
,
1162 offset
: ::off_t
) -> ::ssize_t
;
1163 pub fn quotactl(cmd
: ::c_int
,
1164 special
: *const ::c_char
,
1166 data
: *mut ::c_char
) -> ::c_int
;
1167 pub fn mq_open(name
: *const ::c_char
, oflag
: ::c_int
, ...) -> ::mqd_t
;
1168 pub fn mq_close(mqd
: ::mqd_t
) -> ::c_int
;
1169 pub fn mq_unlink(name
: *const ::c_char
) -> ::c_int
;
1170 pub fn mq_receive(mqd
: ::mqd_t
,
1171 msg_ptr
: *mut ::c_char
,
1173 msq_prio
: *mut ::c_uint
) -> ::ssize_t
;
1174 pub fn mq_send(mqd
: ::mqd_t
,
1175 msg_ptr
: *const ::c_char
,
1177 msq_prio
: ::c_uint
) -> ::c_int
;
1178 pub fn mq_getattr(mqd
: ::mqd_t
, attr
: *mut ::mq_attr
) -> ::c_int
;
1179 pub fn mq_setattr(mqd
: ::mqd_t
,
1180 newattr
: *const ::mq_attr
,
1181 oldattr
: *mut ::mq_attr
) -> ::c_int
;
1182 pub fn epoll_pwait(epfd
: ::c_int
,
1183 events
: *mut ::epoll_event
,
1186 sigmask
: *const ::sigset_t
) -> ::c_int
;
1187 pub fn dup3(oldfd
: ::c_int
, newfd
: ::c_int
, flags
: ::c_int
) -> ::c_int
;
1188 pub fn mkostemp(template
: *mut ::c_char
, flags
: ::c_int
) -> ::c_int
;
1189 pub fn mkostemps(template
: *mut ::c_char
,
1191 flags
: ::c_int
) -> ::c_int
;
1192 pub fn sigtimedwait(set
: *const sigset_t
,
1193 info
: *mut siginfo_t
,
1194 timeout
: *const ::timespec
) -> ::c_int
;
1195 pub fn sigwaitinfo(set
: *const sigset_t
,
1196 info
: *mut siginfo_t
) -> ::c_int
;
1197 pub fn nl_langinfo_l(item
: ::nl_item
, locale
: ::locale_t
) -> *mut ::c_char
;
1198 pub fn getnameinfo(sa
: *const ::sockaddr
,
1200 host
: *mut ::c_char
,
1201 hostlen
: ::socklen_t
,
1202 serv
: *mut ::c_char
,
1203 sevlen
: ::socklen_t
,
1204 flags
: ::c_int
) -> ::c_int
;
1205 pub fn pthread_setschedprio(native
: ::pthread_t
,
1206 priority
: ::c_int
) -> ::c_int
;
1207 pub fn prlimit(pid
: ::pid_t
, resource
: ::c_int
, new_limit
: *const ::rlimit
,
1208 old_limit
: *mut ::rlimit
) -> ::c_int
;
1209 pub fn prlimit64(pid
: ::pid_t
,
1211 new_limit
: *const ::rlimit64
,
1212 old_limit
: *mut ::rlimit64
) -> ::c_int
;
1213 pub fn getloadavg(loadavg
: *mut ::c_double
, nelem
: ::c_int
) -> ::c_int
;
1214 pub fn process_vm_readv(pid
: ::pid_t
,
1215 local_iov
: *const ::iovec
,
1217 remote_iov
: *const ::iovec
,
1219 flags
: ::c_ulong
) -> isize;
1220 pub fn process_vm_writev(pid
: ::pid_t
,
1221 local_iov
: *const ::iovec
,
1223 remote_iov
: *const ::iovec
,
1225 flags
: ::c_ulong
) -> isize;
1226 pub fn reboot(how_to
: ::c_int
) -> ::c_int
;
1227 pub fn setfsgid(gid
: ::gid_t
) -> ::c_int
;
1228 pub fn setfsuid(uid
: ::uid_t
) -> ::c_int
;
1230 // Not available now on Android
1231 pub fn mkfifoat(dirfd
: ::c_int
, pathname
: *const ::c_char
,
1232 mode
: ::mode_t
) -> ::c_int
;
1233 pub fn if_nameindex() -> *mut if_nameindex
;
1234 pub fn if_freenameindex(ptr
: *mut if_nameindex
);
1235 pub fn sync_file_range(fd
: ::c_int
, offset
: ::off64_t
,
1236 nbytes
: ::off64_t
, flags
: ::c_uint
) -> ::c_int
;
1237 pub fn getifaddrs(ifap
: *mut *mut ::ifaddrs
) -> ::c_int
;
1238 pub fn freeifaddrs(ifa
: *mut ::ifaddrs
);
1240 pub fn mremap(addr
: *mut ::c_void
,
1244 ...) -> *mut ::c_void
;
1246 pub fn glob(pattern
: *const c_char
,
1248 errfunc
: Option
<extern fn(epath
: *const c_char
,
1249 errno
: ::c_int
) -> ::c_int
>,
1250 pglob
: *mut ::glob_t
) -> ::c_int
;
1251 pub fn globfree(pglob
: *mut ::glob_t
);
1253 pub fn posix_madvise(addr
: *mut ::c_void
, len
: ::size_t
, advice
: ::c_int
)
1256 pub fn shm_unlink(name
: *const ::c_char
) -> ::c_int
;
1258 pub fn seekdir(dirp
: *mut ::DIR
, loc
: ::c_long
);
1260 pub fn telldir(dirp
: *mut ::DIR
) -> ::c_long
;
1261 pub fn madvise(addr
: *mut ::c_void
, len
: ::size_t
, advice
: ::c_int
)
1264 pub fn msync(addr
: *mut ::c_void
, len
: ::size_t
, flags
: ::c_int
) -> ::c_int
;
1266 pub fn recvfrom(socket
: ::c_int
, buf
: *mut ::c_void
, len
: ::size_t
,
1267 flags
: ::c_int
, addr
: *mut ::sockaddr
,
1268 addrlen
: *mut ::socklen_t
) -> ::ssize_t
;
1269 pub fn mkstemps(template
: *mut ::c_char
, suffixlen
: ::c_int
) -> ::c_int
;
1270 pub fn futimes(fd
: ::c_int
, times
: *const ::timeval
) -> ::c_int
;
1271 pub fn nl_langinfo(item
: ::nl_item
) -> *mut ::c_char
;
1273 pub fn bind(socket
: ::c_int
, address
: *const ::sockaddr
,
1274 address_len
: ::socklen_t
) -> ::c_int
;
1276 pub fn writev(fd
: ::c_int
,
1277 iov
: *const ::iovec
,
1278 iovcnt
: ::c_int
) -> ::ssize_t
;
1279 pub fn readv(fd
: ::c_int
,
1280 iov
: *const ::iovec
,
1281 iovcnt
: ::c_int
) -> ::ssize_t
;
1283 pub fn sendmsg(fd
: ::c_int
,
1284 msg
: *const ::msghdr
,
1285 flags
: ::c_int
) -> ::ssize_t
;
1286 pub fn recvmsg(fd
: ::c_int
, msg
: *mut ::msghdr
, flags
: ::c_int
)
1288 pub fn getdomainname(name
: *mut ::c_char
, len
: ::size_t
) -> ::c_int
;
1289 pub fn setdomainname(name
: *const ::c_char
, len
: ::size_t
) -> ::c_int
;
1290 pub fn vhangup() -> ::c_int
;
1291 pub fn sendmmsg(sockfd
: ::c_int
, msgvec
: *mut mmsghdr
, vlen
: ::c_uint
,
1292 flags
: ::c_int
) -> ::c_int
;
1293 pub fn recvmmsg(sockfd
: ::c_int
, msgvec
: *mut mmsghdr
, vlen
: ::c_uint
,
1294 flags
: ::c_int
, timeout
: *mut ::timespec
) -> ::c_int
;
1296 pub fn syscall(num
: ::c_long
, ...) -> ::c_long
;
1297 pub fn sched_getaffinity(pid
: ::pid_t
,
1298 cpusetsize
: ::size_t
,
1299 cpuset
: *mut cpu_set_t
) -> ::c_int
;
1300 pub fn sched_setaffinity(pid
: ::pid_t
,
1301 cpusetsize
: ::size_t
,
1302 cpuset
: *const cpu_set_t
) -> ::c_int
;
1303 pub fn epoll_create(size
: ::c_int
) -> ::c_int
;
1304 pub fn epoll_create1(flags
: ::c_int
) -> ::c_int
;
1305 pub fn epoll_wait(epfd
: ::c_int
,
1306 events
: *mut ::epoll_event
,
1308 timeout
: ::c_int
) -> ::c_int
;
1309 pub fn epoll_ctl(epfd
: ::c_int
,
1312 event
: *mut ::epoll_event
) -> ::c_int
;
1313 pub fn pthread_getschedparam(native
: ::pthread_t
,
1314 policy
: *mut ::c_int
,
1315 param
: *mut ::sched_param
) -> ::c_int
;
1316 pub fn unshare(flags
: ::c_int
) -> ::c_int
;
1317 pub fn umount(target
: *const ::c_char
) -> ::c_int
;
1318 pub fn sched_get_priority_max(policy
: ::c_int
) -> ::c_int
;
1319 pub fn tee(fd_in
: ::c_int
,
1322 flags
: ::c_uint
) -> ::ssize_t
;
1323 pub fn settimeofday(tv
: *const ::timeval
, tz
: *const ::timezone
) -> ::c_int
;
1324 pub fn splice(fd_in
: ::c_int
,
1325 off_in
: *mut ::loff_t
,
1327 off_out
: *mut ::loff_t
,
1329 flags
: ::c_uint
) -> ::ssize_t
;
1330 pub fn eventfd(init
: ::c_uint
, flags
: ::c_int
) -> ::c_int
;
1331 pub fn sched_rr_get_interval(pid
: ::pid_t
, tp
: *mut ::timespec
) -> ::c_int
;
1332 pub fn sem_timedwait(sem
: *mut sem_t
,
1333 abstime
: *const ::timespec
) -> ::c_int
;
1334 pub fn sched_setparam(pid
: ::pid_t
, param
: *const ::sched_param
) -> ::c_int
;
1335 pub fn setns(fd
: ::c_int
, nstype
: ::c_int
) -> ::c_int
;
1336 pub fn swapoff(puath
: *const ::c_char
) -> ::c_int
;
1337 pub fn vmsplice(fd
: ::c_int
,
1338 iov
: *const ::iovec
,
1340 flags
: ::c_uint
) -> ::ssize_t
;
1341 pub fn mount(src
: *const ::c_char
,
1342 target
: *const ::c_char
,
1343 fstype
: *const ::c_char
,
1345 data
: *const ::c_void
) -> ::c_int
;
1346 pub fn personality(persona
: ::c_ulong
) -> ::c_int
;
1347 pub fn prctl(option
: ::c_int
, ...) -> ::c_int
;
1348 pub fn sched_getparam(pid
: ::pid_t
, param
: *mut ::sched_param
) -> ::c_int
;
1349 pub fn ppoll(fds
: *mut ::pollfd
,
1351 timeout
: *const ::timespec
,
1352 sigmask
: *const sigset_t
) -> ::c_int
;
1353 pub fn pthread_mutex_timedlock(lock
: *mut pthread_mutex_t
,
1354 abstime
: *const ::timespec
) -> ::c_int
;
1355 pub fn clone(cb
: extern fn(*mut ::c_void
) -> ::c_int
,
1356 child_stack
: *mut ::c_void
,
1358 arg
: *mut ::c_void
, ...) -> ::c_int
;
1359 pub fn sched_getscheduler(pid
: ::pid_t
) -> ::c_int
;
1360 pub fn clock_nanosleep(clk_id
: ::clockid_t
,
1362 rqtp
: *const ::timespec
,
1363 rmtp
: *mut ::timespec
) -> ::c_int
;
1364 pub fn pthread_attr_getguardsize(attr
: *const ::pthread_attr_t
,
1365 guardsize
: *mut ::size_t
) -> ::c_int
;
1366 pub fn sethostname(name
: *const ::c_char
, len
: ::size_t
) -> ::c_int
;
1367 pub fn sched_get_priority_min(policy
: ::c_int
) -> ::c_int
;
1368 pub fn pthread_condattr_getpshared(attr
: *const pthread_condattr_t
,
1369 pshared
: *mut ::c_int
) -> ::c_int
;
1370 pub fn sysinfo(info
: *mut ::sysinfo
) -> ::c_int
;
1371 pub fn umount2(target
: *const ::c_char
, flags
: ::c_int
) -> ::c_int
;
1372 pub fn pthread_setschedparam(native
: ::pthread_t
,
1374 param
: *const ::sched_param
) -> ::c_int
;
1375 pub fn swapon(path
: *const ::c_char
, swapflags
: ::c_int
) -> ::c_int
;
1376 pub fn sched_setscheduler(pid
: ::pid_t
,
1378 param
: *const ::sched_param
) -> ::c_int
;
1379 pub fn sendfile(out_fd
: ::c_int
,
1382 count
: ::size_t
) -> ::ssize_t
;
1383 pub fn sigsuspend(mask
: *const ::sigset_t
) -> ::c_int
;
1384 #[cfg_attr(target_os = "solaris", link_name = "__posix_getgrgid_r")]
1385 pub fn getgrgid_r(uid
: ::uid_t
,
1389 result
: *mut *mut ::group
) -> ::c_int
;
1390 #[cfg_attr(all(target_os = "macos", target_arch = "x86"),
1391 link_name
= "sigaltstack$UNIX2003")]
1392 #[cfg_attr(target_os = "netbsd", link_name = "__sigaltstack14")]
1393 pub fn sigaltstack(ss
: *const stack_t
,
1394 oss
: *mut stack_t
) -> ::c_int
;
1395 pub fn sem_close(sem
: *mut sem_t
) -> ::c_int
;
1396 pub fn getdtablesize() -> ::c_int
;
1397 #[cfg_attr(target_os = "solaris", link_name = "__posix_getgrnam_r")]
1398 pub fn getgrnam_r(name
: *const ::c_char
,
1402 result
: *mut *mut ::group
) -> ::c_int
;
1403 pub fn initgroups(user
: *const ::c_char
, group
: ::gid_t
) -> ::c_int
;
1404 #[cfg_attr(all(target_os = "macos", target_arch = "x86"),
1405 link_name
= "pthread_sigmask$UNIX2003")]
1406 pub fn pthread_sigmask(how
: ::c_int
, set
: *const sigset_t
,
1407 oldset
: *mut sigset_t
) -> ::c_int
;
1408 pub fn sem_open(name
: *const ::c_char
, oflag
: ::c_int
, ...) -> *mut sem_t
;
1409 pub fn getgrnam(name
: *const ::c_char
) -> *mut ::group
;
1410 pub fn pthread_kill(thread
: ::pthread_t
, sig
: ::c_int
) -> ::c_int
;
1411 pub fn sem_unlink(name
: *const ::c_char
) -> ::c_int
;
1412 pub fn daemon(nochdir
: ::c_int
, noclose
: ::c_int
) -> ::c_int
;
1413 #[cfg_attr(target_os = "netbsd", link_name = "__getpwnam_r50")]
1414 #[cfg_attr(target_os = "solaris", link_name = "__posix_getpwnam_r")]
1415 pub fn getpwnam_r(name
: *const ::c_char
,
1419 result
: *mut *mut passwd
) -> ::c_int
;
1420 #[cfg_attr(target_os = "netbsd", link_name = "__getpwuid_r50")]
1421 #[cfg_attr(target_os = "solaris", link_name = "__posix_getpwuid_r")]
1422 pub fn getpwuid_r(uid
: ::uid_t
,
1426 result
: *mut *mut passwd
) -> ::c_int
;
1427 #[cfg_attr(all(target_os = "macos", target_arch ="x86"),
1428 link_name
= "sigwait$UNIX2003")]
1429 #[cfg_attr(target_os = "solaris", link_name = "__posix_sigwait")]
1430 pub fn sigwait(set
: *const sigset_t
,
1431 sig
: *mut ::c_int
) -> ::c_int
;
1432 pub fn pthread_atfork(prepare
: Option
<unsafe extern fn()>,
1433 parent
: Option
<unsafe extern fn()>,
1434 child
: Option
<unsafe extern fn()>) -> ::c_int
;
1435 pub fn getgrgid(gid
: ::gid_t
) -> *mut ::group
;
1436 pub fn getgrouplist(user
: *const ::c_char
,
1438 groups
: *mut ::gid_t
,
1439 ngroups
: *mut ::c_int
) -> ::c_int
;
1440 pub fn pthread_mutexattr_getpshared(attr
: *const pthread_mutexattr_t
,
1441 pshared
: *mut ::c_int
) -> ::c_int
;
1442 #[cfg_attr(all(target_os = "macos", target_arch = "x86"),
1443 link_name
= "popen$UNIX2003")]
1444 pub fn popen(command
: *const c_char
,
1445 mode
: *const c_char
) -> *mut ::FILE
;
1446 pub fn faccessat(dirfd
: ::c_int
, pathname
: *const ::c_char
,
1447 mode
: ::c_int
, flags
: ::c_int
) -> ::c_int
;
1448 pub fn pthread_create(native
: *mut ::pthread_t
,
1449 attr
: *const ::pthread_attr_t
,
1450 f
: extern fn(*mut ::c_void
) -> *mut ::c_void
,
1451 value
: *mut ::c_void
) -> ::c_int
;
1455 if #[cfg(any(target_env = "musl", target_os = "fuchsia"))] {
1457 pub use self::musl
::*;
1458 } else if #[cfg(any(target_arch = "mips",
1459 target_arch
= "mips64"))] {
1461 pub use self::mips
::*;
1462 } else if #[cfg(any(target_arch = "s390x"))] {
1464 pub use self::s390x
::*;
1467 pub use self::other
::*;