1 use dox
::{mem, Option}
;
5 pub type c_ulong
= u64;
7 pub type clockid_t
= ::c_int
;
8 pub type blkcnt_t
= ::c_long
;
9 pub type clock_t
= ::c_long
;
10 pub type daddr_t
= ::c_long
;
11 pub type dev_t
= ::c_ulong
;
12 pub type fsblkcnt_t
= ::c_ulong
;
13 pub type fsfilcnt_t
= ::c_ulong
;
14 pub type ino_t
= ::c_ulong
;
15 pub type key_t
= ::c_int
;
16 pub type major_t
= ::c_uint
;
17 pub type minor_t
= ::c_uint
;
18 pub type mode_t
= ::c_uint
;
19 pub type nlink_t
= ::c_uint
;
20 pub type rlim_t
= ::c_ulong
;
21 pub type speed_t
= ::c_uint
;
22 pub type tcflag_t
= ::c_uint
;
23 pub type time_t
= ::c_long
;
24 pub type wchar_t
= ::c_int
;
25 pub type nfds_t
= ::c_ulong
;
27 pub type suseconds_t
= ::c_long
;
28 pub type off_t
= ::c_long
;
29 pub type useconds_t
= ::c_uint
;
30 pub type socklen_t
= ::c_uint
;
31 pub type sa_family_t
= u16;
32 pub type pthread_t
= ::c_uint
;
33 pub type pthread_key_t
= ::c_uint
;
34 pub type blksize_t
= ::c_int
;
35 pub type nl_item
= ::c_int
;
36 pub type id_t
= ::c_int
;
37 pub type idtype_t
= ::c_uint
;
43 pub sa_family
: sa_family_t
,
44 pub sa_data
: [::c_char
; 14],
47 pub struct sockaddr_in
{
48 pub sin_family
: sa_family_t
,
49 pub sin_port
: ::in_port_t
,
50 pub sin_addr
: ::in_addr
,
51 pub sin_zero
: [::c_char
; 8]
54 pub struct sockaddr_in6
{
55 pub sin6_family
: sa_family_t
,
56 pub sin6_port
: ::in_port_t
,
57 pub sin6_flowinfo
: u32,
58 pub sin6_addr
: ::in6_addr
,
59 pub sin6_scope_id
: u32,
60 pub __sin6_src_id
: u32
63 pub struct sockaddr_un
{
64 pub sun_family
: sa_family_t
,
65 pub sun_path
: [c_char
; 108]
69 pub pw_name
: *mut ::c_char
,
70 pub pw_passwd
: *mut ::c_char
,
73 pub pw_age
: *mut ::c_char
,
74 pub pw_comment
: *mut ::c_char
,
75 pub pw_gecos
: *mut ::c_char
,
76 pub pw_dir
: *mut ::c_char
,
77 pub pw_shell
: *mut ::c_char
81 pub ifa_next
: *mut ifaddrs
,
82 pub ifa_name
: *mut ::c_char
,
83 pub ifa_flags
: ::c_ulong
,
84 pub ifa_addr
: *mut ::sockaddr
,
85 pub ifa_netmask
: *mut ::sockaddr
,
86 pub ifa_dstaddr
: *mut ::sockaddr
,
87 pub ifa_data
: *mut ::c_void
103 pub sysname
: [::c_char
; 257],
104 pub nodename
: [::c_char
; 257],
105 pub release
: [::c_char
; 257],
106 pub version
: [::c_char
; 257],
107 pub machine
: [::c_char
; 257],
111 pub msg_name
: *mut ::c_void
,
112 pub msg_namelen
: ::socklen_t
,
113 pub msg_iov
: *mut ::iovec
,
114 pub msg_iovlen
: ::c_int
,
115 pub msg_control
: *mut ::c_void
,
116 pub msg_controllen
: ::socklen_t
,
117 pub msg_flags
: ::c_int
,
121 pub cmsg_len
: ::socklen_t
,
122 pub cmsg_level
: ::c_int
,
123 pub cmsg_type
: ::c_int
,
127 #[cfg(target_pointer_width = "64")]
128 fds_bits
: [i64; FD_SETSIZE
/ 64],
129 #[cfg(target_pointer_width = "32")]
130 fds_bits
: [i32; FD_SETSIZE
/ 32],
133 pub struct pthread_attr_t
{
134 __pthread_attrp
: *mut ::c_void
137 pub struct pthread_mutex_t
{
138 __pthread_mutex_flag1
: u16,
139 __pthread_mutex_flag2
: u8,
140 __pthread_mutex_ceiling
: u8,
141 __pthread_mutex_type
: u16,
142 __pthread_mutex_magic
: u16,
143 __pthread_mutex_lock
: u64,
144 __pthread_mutex_data
: u64
147 pub struct pthread_mutexattr_t
{
148 __pthread_mutexattrp
: *mut ::c_void
151 pub struct pthread_cond_t
{
152 __pthread_cond_flag
: [u8; 4],
153 __pthread_cond_type
: u16,
154 __pthread_cond_magic
: u16,
155 __pthread_cond_data
: u64
158 pub struct pthread_condattr_t
{
159 __pthread_condattrp
: *mut ::c_void
,
162 pub struct pthread_rwlock_t
{
163 __pthread_rwlock_readers
: i32,
164 __pthread_rwlock_type
: u16,
165 __pthread_rwlock_magic
: u16,
166 __pthread_rwlock_mutex
: ::pthread_mutex_t
,
167 __pthread_rwlock_readercv
: ::pthread_cond_t
,
168 __pthread_rwlock_writercv
: ::pthread_cond_t
171 pub struct pthread_rwlockattr_t
{
172 __pthread_rwlockattrp
: *mut ::c_void
,
179 pub d_name
: [::c_char
; 3]
183 pub gl_pathc
: ::size_t
,
184 pub gl_pathv
: *mut *mut ::c_char
,
185 pub gl_offs
: ::size_t
,
186 __unused1
: *mut ::c_void
,
190 __unused5
: *mut ::c_void
,
191 __unused6
: *mut ::c_void
,
192 __unused7
: *mut ::c_void
,
193 __unused8
: *mut ::c_void
,
194 __unused9
: *mut ::c_void
,
195 __unused10
: *mut ::c_void
,
198 pub struct sockaddr_storage
{
199 pub ss_family
: ::sa_family_t
,
202 __ss_pad2
: [u8; 240],
205 pub struct addrinfo
{
206 pub ai_flags
: ::c_int
,
207 pub ai_family
: ::c_int
,
208 pub ai_socktype
: ::c_int
,
209 pub ai_protocol
: ::c_int
,
210 #[cfg(target_arch = "sparc64")]
211 __sparcv9_pad
: ::c_int
,
212 pub ai_addrlen
: ::socklen_t
,
213 pub ai_canonname
: *mut ::c_char
,
214 pub ai_addr
: *mut ::sockaddr
,
215 pub ai_next
: *mut addrinfo
,
218 pub struct sigset_t
{
222 pub struct siginfo_t
{
223 pub si_signo
: ::c_int
,
224 pub si_code
: ::c_int
,
225 pub si_errno
: ::c_int
,
227 pub si_addr
: *mut ::c_void
,
231 pub struct sigaction
{
232 pub sa_flags
: ::c_int
,
233 pub sa_sigaction
: ::sighandler_t
,
234 pub sa_mask
: sigset_t
,
238 pub ss_sp
: *mut ::c_void
,
239 pub ss_size
: ::size_t
,
240 pub ss_flags
: ::c_int
,
244 pub f_bsize
: ::c_ulong
,
245 pub f_frsize
: ::c_ulong
,
246 pub f_blocks
: ::fsblkcnt_t
,
247 pub f_bfree
: ::fsblkcnt_t
,
248 pub f_bavail
: ::fsblkcnt_t
,
249 pub f_files
: ::fsfilcnt_t
,
250 pub f_ffree
: ::fsfilcnt_t
,
251 pub f_favail
: ::fsfilcnt_t
,
252 pub f_fsid
: ::c_ulong
,
253 pub f_basetype
: [::c_char
; 16],
254 pub f_flag
: ::c_ulong
,
255 pub f_namemax
: ::c_ulong
,
256 pub f_fstr
: [::c_char
; 32]
259 pub struct sched_param
{
260 pub sched_priority
: ::c_int
,
261 sched_pad
: [::c_int
; 8]
265 pub dli_fname
: *const ::c_char
,
266 pub dli_fbase
: *mut ::c_void
,
267 pub dli_sname
: *const ::c_char
,
268 pub dli_saddr
: *mut ::c_void
,
274 pub st_mode
: ::mode_t
,
275 pub st_nlink
: ::nlink_t
,
278 pub st_rdev
: ::dev_t
,
279 pub st_size
: ::off_t
,
280 pub st_atime
: ::time_t
,
281 pub st_atime_nsec
: ::c_long
,
282 pub st_mtime
: ::time_t
,
283 pub st_mtime_nsec
: ::c_long
,
284 pub st_ctime
: ::time_t
,
285 pub st_ctime_nsec
: ::c_long
,
286 pub st_blksize
: ::blksize_t
,
287 pub st_blocks
: ::blkcnt_t
,
288 __unused
: [::c_char
; 16]
292 pub c_iflag
: ::tcflag_t
,
293 pub c_oflag
: ::tcflag_t
,
294 pub c_cflag
: ::tcflag_t
,
295 pub c_lflag
: ::tcflag_t
,
296 pub c_cc
: [::cc_t
; ::NCCS
]
300 pub decimal_point
: *mut ::c_char
,
301 pub thousands_sep
: *mut ::c_char
,
302 pub grouping
: *mut ::c_char
,
303 pub int_curr_symbol
: *mut ::c_char
,
304 pub currency_symbol
: *mut ::c_char
,
305 pub mon_decimal_point
: *mut ::c_char
,
306 pub mon_thousands_sep
: *mut ::c_char
,
307 pub mon_grouping
: *mut ::c_char
,
308 pub positive_sign
: *mut ::c_char
,
309 pub negative_sign
: *mut ::c_char
,
310 pub int_frac_digits
: ::c_char
,
311 pub frac_digits
: ::c_char
,
312 pub p_cs_precedes
: ::c_char
,
313 pub p_sep_by_space
: ::c_char
,
314 pub n_cs_precedes
: ::c_char
,
315 pub n_sep_by_space
: ::c_char
,
316 pub p_sign_posn
: ::c_char
,
317 pub n_sign_posn
: ::c_char
,
318 pub int_p_cs_precedes
: ::c_char
,
319 pub int_p_sep_by_space
: ::c_char
,
320 pub int_n_cs_precedes
: ::c_char
,
321 pub int_n_sep_by_space
: ::c_char
,
322 pub int_p_sign_posn
: ::c_char
,
323 pub int_n_sign_posn
: ::c_char
,
330 pub sem_pad1
: [u64; 3],
331 pub sem_pad2
: [u64; 2]
335 pub l_type
: ::c_short
,
336 pub l_whence
: ::c_short
,
337 pub l_start
: ::off_t
,
339 pub l_sysid
: ::c_int
,
341 pub l_pad
: [::c_long
; 4]
344 pub struct if_nameindex
{
345 pub if_index
: ::c_uint
,
346 pub if_name
: *mut ::c_char
,
349 pub struct port_event
{
350 pub portev_events
: ::c_int
,
351 pub portev_source
: ::c_ushort
,
352 pub portev_pad
: ::c_ushort
,
353 pub portev_object
: ::uintptr_t
,
354 pub portev_user
: *mut ::c_void
,
357 #[cfg_attr(any(target_arch = "x86", target_arch = "x86_64"), repr(packed))]
358 pub struct epoll_event
{
359 pub events
: ::uint32_t
,
364 pub const LC_CTYPE
: ::c_int
= 0;
365 pub const LC_NUMERIC
: ::c_int
= 1;
366 pub const LC_TIME
: ::c_int
= 2;
367 pub const LC_COLLATE
: ::c_int
= 3;
368 pub const LC_MONETARY
: ::c_int
= 4;
369 pub const LC_MESSAGES
: ::c_int
= 5;
370 pub const LC_ALL
: ::c_int
= 6;
371 pub const LC_CTYPE_MASK
: ::c_int
= (1 << LC_CTYPE
);
372 pub const LC_NUMERIC_MASK
: ::c_int
= (1 << LC_NUMERIC
);
373 pub const LC_TIME_MASK
: ::c_int
= (1 << LC_TIME
);
374 pub const LC_COLLATE_MASK
: ::c_int
= (1 << LC_COLLATE
);
375 pub const LC_MONETARY_MASK
: ::c_int
= (1 << LC_MONETARY
);
376 pub const LC_MESSAGES_MASK
: ::c_int
= (1 << LC_MESSAGES
);
377 pub const LC_ALL_MASK
: ::c_int
= LC_CTYPE_MASK
384 pub const DAY_1
: ::nl_item
= 1;
385 pub const DAY_2
: ::nl_item
= 2;
386 pub const DAY_3
: ::nl_item
= 3;
387 pub const DAY_4
: ::nl_item
= 4;
388 pub const DAY_5
: ::nl_item
= 5;
389 pub const DAY_6
: ::nl_item
= 6;
390 pub const DAY_7
: ::nl_item
= 7;
392 pub const ABDAY_1
: ::nl_item
= 8;
393 pub const ABDAY_2
: ::nl_item
= 9;
394 pub const ABDAY_3
: ::nl_item
= 10;
395 pub const ABDAY_4
: ::nl_item
= 11;
396 pub const ABDAY_5
: ::nl_item
= 12;
397 pub const ABDAY_6
: ::nl_item
= 13;
398 pub const ABDAY_7
: ::nl_item
= 14;
400 pub const MON_1
: ::nl_item
= 15;
401 pub const MON_2
: ::nl_item
= 16;
402 pub const MON_3
: ::nl_item
= 17;
403 pub const MON_4
: ::nl_item
= 18;
404 pub const MON_5
: ::nl_item
= 19;
405 pub const MON_6
: ::nl_item
= 20;
406 pub const MON_7
: ::nl_item
= 21;
407 pub const MON_8
: ::nl_item
= 22;
408 pub const MON_9
: ::nl_item
= 23;
409 pub const MON_10
: ::nl_item
= 24;
410 pub const MON_11
: ::nl_item
= 25;
411 pub const MON_12
: ::nl_item
= 26;
413 pub const ABMON_1
: ::nl_item
= 27;
414 pub const ABMON_2
: ::nl_item
= 28;
415 pub const ABMON_3
: ::nl_item
= 29;
416 pub const ABMON_4
: ::nl_item
= 30;
417 pub const ABMON_5
: ::nl_item
= 31;
418 pub const ABMON_6
: ::nl_item
= 32;
419 pub const ABMON_7
: ::nl_item
= 33;
420 pub const ABMON_8
: ::nl_item
= 34;
421 pub const ABMON_9
: ::nl_item
= 35;
422 pub const ABMON_10
: ::nl_item
= 36;
423 pub const ABMON_11
: ::nl_item
= 37;
424 pub const ABMON_12
: ::nl_item
= 38;
426 pub const RADIXCHAR
: ::nl_item
= 39;
427 pub const THOUSEP
: ::nl_item
= 40;
428 pub const YESSTR
: ::nl_item
= 41;
429 pub const NOSTR
: ::nl_item
= 42;
430 pub const CRNCYSTR
: ::nl_item
= 43;
432 pub const D_T_FMT
: ::nl_item
= 44;
433 pub const D_FMT
: ::nl_item
= 45;
434 pub const T_FMT
: ::nl_item
= 46;
435 pub const AM_STR
: ::nl_item
= 47;
436 pub const PM_STR
: ::nl_item
= 48;
438 pub const CODESET
: ::nl_item
= 49;
439 pub const T_FMT_AMPM
: ::nl_item
= 50;
440 pub const ERA
: ::nl_item
= 51;
441 pub const ERA_D_FMT
: ::nl_item
= 52;
442 pub const ERA_D_T_FMT
: ::nl_item
= 53;
443 pub const ERA_T_FMT
: ::nl_item
= 54;
444 pub const ALT_DIGITS
: ::nl_item
= 55;
445 pub const YESEXPR
: ::nl_item
= 56;
446 pub const NOEXPR
: ::nl_item
= 57;
447 pub const _DATE_FMT
: ::nl_item
= 58;
448 pub const MAXSTRMSG
: ::nl_item
= 58;
450 pub const PATH_MAX
: ::c_int
= 1024;
452 pub const SA_ONSTACK
: ::c_int
= 0x00000001;
453 pub const SA_RESETHAND
: ::c_int
= 0x00000002;
454 pub const SA_RESTART
: ::c_int
= 0x00000004;
455 pub const SA_SIGINFO
: ::c_int
= 0x00000008;
456 pub const SA_NODEFER
: ::c_int
= 0x00000010;
457 pub const SA_NOCLDWAIT
: ::c_int
= 0x00010000;
458 pub const SA_NOCLDSTOP
: ::c_int
= 0x00020000;
460 pub const SS_ONSTACK
: ::c_int
= 1;
461 pub const SS_DISABLE
: ::c_int
= 2;
463 pub const FIOCLEX
: ::c_int
= 0x20006601;
464 pub const FIONCLEX
: ::c_int
= 0x20006602;
465 pub const FIONREAD
: ::c_int
= 0x4004667f;
466 pub const FIONBIO
: ::c_int
= 0x8004667e;
467 pub const FIOASYNC
: ::c_int
= 0x8004667d;
468 pub const FIOSETOWN
: ::c_int
= 0x8004667c;
469 pub const FIOGETOWN
: ::c_int
= 0x4004667b;
471 pub const SIGCHLD
: ::c_int
= 18;
472 pub const SIGBUS
: ::c_int
= 10;
473 pub const SIGINFO
: ::c_int
= 41;
474 pub const SIG_BLOCK
: ::c_int
= 1;
475 pub const SIG_UNBLOCK
: ::c_int
= 2;
476 pub const SIG_SETMASK
: ::c_int
= 3;
478 pub const IPV6_UNICAST_HOPS
: ::c_int
= 0x5;
479 pub const IPV6_MULTICAST_IF
: ::c_int
= 0x6;
480 pub const IPV6_MULTICAST_HOPS
: ::c_int
= 0x7;
481 pub const IPV6_MULTICAST_LOOP
: ::c_int
= 0x8;
482 pub const IPV6_V6ONLY
: ::c_int
= 0x27;
485 if #[cfg(target_pointer_width = "64")] {
486 pub const FD_SETSIZE
: usize = 65536;
488 pub const FD_SETSIZE
: usize = 1024;
492 pub const ST_RDONLY
: ::c_ulong
= 1;
493 pub const ST_NOSUID
: ::c_ulong
= 2;
495 pub const NI_MAXHOST
: ::socklen_t
= 1025;
497 pub const EXIT_FAILURE
: ::c_int
= 1;
498 pub const EXIT_SUCCESS
: ::c_int
= 0;
499 pub const RAND_MAX
: ::c_int
= 32767;
500 pub const EOF
: ::c_int
= -1;
501 pub const SEEK_SET
: ::c_int
= 0;
502 pub const SEEK_CUR
: ::c_int
= 1;
503 pub const SEEK_END
: ::c_int
= 2;
504 pub const _IOFBF
: ::c_int
= 0;
505 pub const _IONBF
: ::c_int
= 4;
506 pub const _IOLBF
: ::c_int
= 64;
507 pub const BUFSIZ
: ::c_uint
= 1024;
508 pub const FOPEN_MAX
: ::c_uint
= 20;
509 pub const FILENAME_MAX
: ::c_uint
= 1024;
510 pub const L_tmpnam
: ::c_uint
= 25;
511 pub const TMP_MAX
: ::c_uint
= 17576;
513 pub const O_RDONLY
: ::c_int
= 0;
514 pub const O_WRONLY
: ::c_int
= 1;
515 pub const O_RDWR
: ::c_int
= 2;
516 pub const O_SEARCH
: ::c_int
= 0x200000;
517 pub const O_EXEC
: ::c_int
= 0x400000;
518 pub const O_APPEND
: ::c_int
= 8;
519 pub const O_CREAT
: ::c_int
= 256;
520 pub const O_EXCL
: ::c_int
= 1024;
521 pub const O_NOCTTY
: ::c_int
= 2048;
522 pub const O_TRUNC
: ::c_int
= 512;
523 pub const O_CLOEXEC
: ::c_int
= 0x800000;
524 pub const O_ACCMODE
: ::c_int
= 0x600003;
525 pub const S_IFIFO
: mode_t
= 4096;
526 pub const S_IFCHR
: mode_t
= 8192;
527 pub const S_IFBLK
: mode_t
= 24576;
528 pub const S_IFDIR
: mode_t
= 16384;
529 pub const S_IFREG
: mode_t
= 32768;
530 pub const S_IFLNK
: mode_t
= 40960;
531 pub const S_IFSOCK
: mode_t
= 49152;
532 pub const S_IFMT
: mode_t
= 61440;
533 pub const S_IEXEC
: mode_t
= 64;
534 pub const S_IWRITE
: mode_t
= 128;
535 pub const S_IREAD
: mode_t
= 256;
536 pub const S_IRWXU
: mode_t
= 448;
537 pub const S_IXUSR
: mode_t
= 64;
538 pub const S_IWUSR
: mode_t
= 128;
539 pub const S_IRUSR
: mode_t
= 256;
540 pub const S_IRWXG
: mode_t
= 56;
541 pub const S_IXGRP
: mode_t
= 8;
542 pub const S_IWGRP
: mode_t
= 16;
543 pub const S_IRGRP
: mode_t
= 32;
544 pub const S_IRWXO
: mode_t
= 7;
545 pub const S_IXOTH
: mode_t
= 1;
546 pub const S_IWOTH
: mode_t
= 2;
547 pub const S_IROTH
: mode_t
= 4;
548 pub const F_OK
: ::c_int
= 0;
549 pub const R_OK
: ::c_int
= 4;
550 pub const W_OK
: ::c_int
= 2;
551 pub const X_OK
: ::c_int
= 1;
552 pub const STDIN_FILENO
: ::c_int
= 0;
553 pub const STDOUT_FILENO
: ::c_int
= 1;
554 pub const STDERR_FILENO
: ::c_int
= 2;
555 pub const F_LOCK
: ::c_int
= 1;
556 pub const F_TEST
: ::c_int
= 3;
557 pub const F_TLOCK
: ::c_int
= 2;
558 pub const F_ULOCK
: ::c_int
= 0;
559 pub const F_DUPFD_CLOEXEC
: ::c_int
= 37;
560 pub const F_SETLK
: ::c_int
= 6;
561 pub const F_SETLKW
: ::c_int
= 7;
562 pub const F_GETLK
: ::c_int
= 14;
563 pub const SIGHUP
: ::c_int
= 1;
564 pub const SIGINT
: ::c_int
= 2;
565 pub const SIGQUIT
: ::c_int
= 3;
566 pub const SIGILL
: ::c_int
= 4;
567 pub const SIGABRT
: ::c_int
= 6;
568 pub const SIGEMT
: ::c_int
= 7;
569 pub const SIGFPE
: ::c_int
= 8;
570 pub const SIGKILL
: ::c_int
= 9;
571 pub const SIGSEGV
: ::c_int
= 11;
572 pub const SIGSYS
: ::c_int
= 12;
573 pub const SIGPIPE
: ::c_int
= 13;
574 pub const SIGALRM
: ::c_int
= 14;
575 pub const SIGTERM
: ::c_int
= 15;
576 pub const SIGUSR1
: ::c_int
= 16;
577 pub const SIGUSR2
: ::c_int
= 17;
578 pub const SIGPWR
: ::c_int
= 19;
579 pub const SIGWINCH
: ::c_int
= 20;
580 pub const SIGURG
: ::c_int
= 21;
581 pub const SIGPOLL
: ::c_int
= 22;
582 pub const SIGIO
: ::c_int
= SIGPOLL
;
583 pub const SIGSTOP
: ::c_int
= 23;
584 pub const SIGTSTP
: ::c_int
= 24;
585 pub const SIGCONT
: ::c_int
= 25;
586 pub const SIGTTIN
: ::c_int
= 26;
587 pub const SIGTTOU
: ::c_int
= 27;
588 pub const SIGVTALRM
: ::c_int
= 28;
589 pub const SIGPROF
: ::c_int
= 29;
590 pub const SIGXCPU
: ::c_int
= 30;
591 pub const SIGXFSZ
: ::c_int
= 31;
593 pub const WNOHANG
: ::c_int
= 0x40;
594 pub const WUNTRACED
: ::c_int
= 0x04;
596 pub const WEXITED
: ::c_int
= 0x01;
597 pub const WTRAPPED
: ::c_int
= 0x02;
598 pub const WSTOPPED
: ::c_int
= WUNTRACED
;
599 pub const WCONTINUED
: ::c_int
= 0x08;
600 pub const WNOWAIT
: ::c_int
= 0x80;
602 pub const AT_FDCWD
: ::c_int
= 0xffd19553;
603 pub const AT_SYMLINK_NOFOLLOW
: ::c_int
= 0x1000;
605 // Solaris defines a great many more of these; we only expose the
606 // standardized ones.
607 pub const P_PID
: idtype_t
= 0;
608 pub const P_PGID
: idtype_t
= 2;
609 pub const P_ALL
: idtype_t
= 7;
611 pub const PROT_NONE
: ::c_int
= 0;
612 pub const PROT_READ
: ::c_int
= 1;
613 pub const PROT_WRITE
: ::c_int
= 2;
614 pub const PROT_EXEC
: ::c_int
= 4;
616 pub const MAP_SHARED
: ::c_int
= 0x0001;
617 pub const MAP_PRIVATE
: ::c_int
= 0x0002;
618 pub const MAP_FIXED
: ::c_int
= 0x0010;
619 pub const MAP_NORESERVE
: ::c_int
= 0x40;
620 pub const MAP_ANON
: ::c_int
= 0x0100;
621 pub const MAP_RENAME
: ::c_int
= 0x20;
622 pub const MAP_ALIGN
: ::c_int
= 0x200;
623 pub const MAP_TEXT
: ::c_int
= 0x400;
624 pub const MAP_INITDATA
: ::c_int
= 0x800;
625 pub const MAP_FAILED
: *mut ::c_void
= !0 as *mut ::c_void
;
627 pub const MCL_CURRENT
: ::c_int
= 0x0001;
628 pub const MCL_FUTURE
: ::c_int
= 0x0002;
630 pub const MS_SYNC
: ::c_int
= 0x0004;
631 pub const MS_ASYNC
: ::c_int
= 0x0001;
632 pub const MS_INVALIDATE
: ::c_int
= 0x0002;
633 pub const MS_INVALCURPROC
: ::c_int
= 0x0008;
635 pub const EPERM
: ::c_int
= 1;
636 pub const ENOENT
: ::c_int
= 2;
637 pub const ESRCH
: ::c_int
= 3;
638 pub const EINTR
: ::c_int
= 4;
639 pub const EIO
: ::c_int
= 5;
640 pub const ENXIO
: ::c_int
= 6;
641 pub const E2BIG
: ::c_int
= 7;
642 pub const ENOEXEC
: ::c_int
= 8;
643 pub const EBADF
: ::c_int
= 9;
644 pub const ECHILD
: ::c_int
= 10;
645 pub const EAGAIN
: ::c_int
= 11;
646 pub const ENOMEM
: ::c_int
= 12;
647 pub const EACCES
: ::c_int
= 13;
648 pub const EFAULT
: ::c_int
= 14;
649 pub const ENOTBLK
: ::c_int
= 15;
650 pub const EBUSY
: ::c_int
= 16;
651 pub const EEXIST
: ::c_int
= 17;
652 pub const EXDEV
: ::c_int
= 18;
653 pub const ENODEV
: ::c_int
= 19;
654 pub const ENOTDIR
: ::c_int
= 20;
655 pub const EISDIR
: ::c_int
= 21;
656 pub const EINVAL
: ::c_int
= 22;
657 pub const ENFILE
: ::c_int
= 23;
658 pub const EMFILE
: ::c_int
= 24;
659 pub const ENOTTY
: ::c_int
= 25;
660 pub const ETXTBSY
: ::c_int
= 26;
661 pub const EFBIG
: ::c_int
= 27;
662 pub const ENOSPC
: ::c_int
= 28;
663 pub const ESPIPE
: ::c_int
= 29;
664 pub const EROFS
: ::c_int
= 30;
665 pub const EMLINK
: ::c_int
= 31;
666 pub const EPIPE
: ::c_int
= 32;
667 pub const EDOM
: ::c_int
= 33;
668 pub const ERANGE
: ::c_int
= 34;
669 pub const ENOMSG
: ::c_int
= 35;
670 pub const EIDRM
: ::c_int
= 36;
671 pub const ECHRNG
: ::c_int
= 37;
672 pub const EL2NSYNC
: ::c_int
= 38;
673 pub const EL3HLT
: ::c_int
= 39;
674 pub const EL3RST
: ::c_int
= 40;
675 pub const ELNRNG
: ::c_int
= 41;
676 pub const EUNATCH
: ::c_int
= 42;
677 pub const ENOCSI
: ::c_int
= 43;
678 pub const EL2HLT
: ::c_int
= 44;
679 pub const EDEADLK
: ::c_int
= 45;
680 pub const ENOLCK
: ::c_int
= 46;
681 pub const ECANCELED
: ::c_int
= 47;
682 pub const ENOTSUP
: ::c_int
= 48;
683 pub const EDQUOT
: ::c_int
= 49;
684 pub const EBADE
: ::c_int
= 50;
685 pub const EBADR
: ::c_int
= 51;
686 pub const EXFULL
: ::c_int
= 52;
687 pub const ENOANO
: ::c_int
= 53;
688 pub const EBADRQC
: ::c_int
= 54;
689 pub const EBADSLT
: ::c_int
= 55;
690 pub const EDEADLOCK
: ::c_int
= 56;
691 pub const EBFONT
: ::c_int
= 57;
692 pub const EOWNERDEAD
: ::c_int
= 58;
693 pub const ENOTRECOVERABLE
: ::c_int
= 59;
694 pub const ENOSTR
: ::c_int
= 60;
695 pub const ENODATA
: ::c_int
= 61;
696 pub const ETIME
: ::c_int
= 62;
697 pub const ENOSR
: ::c_int
= 63;
698 pub const ENONET
: ::c_int
= 64;
699 pub const ENOPKG
: ::c_int
= 65;
700 pub const EREMOTE
: ::c_int
= 66;
701 pub const ENOLINK
: ::c_int
= 67;
702 pub const EADV
: ::c_int
= 68;
703 pub const ESRMNT
: ::c_int
= 69;
704 pub const ECOMM
: ::c_int
= 70;
705 pub const EPROTO
: ::c_int
= 71;
706 pub const ELOCKUNMAPPED
: ::c_int
= 72;
707 pub const ENOTACTIVE
: ::c_int
= 73;
708 pub const EMULTIHOP
: ::c_int
= 74;
709 pub const EADI
: ::c_int
= 75;
710 pub const EBADMSG
: ::c_int
= 77;
711 pub const ENAMETOOLONG
: ::c_int
= 78;
712 pub const EOVERFLOW
: ::c_int
= 79;
713 pub const ENOTUNIQ
: ::c_int
= 80;
714 pub const EBADFD
: ::c_int
= 81;
715 pub const EREMCHG
: ::c_int
= 82;
716 pub const ELIBACC
: ::c_int
= 83;
717 pub const ELIBBAD
: ::c_int
= 84;
718 pub const ELIBSCN
: ::c_int
= 85;
719 pub const ELIBMAX
: ::c_int
= 86;
720 pub const ELIBEXEC
: ::c_int
= 87;
721 pub const EILSEQ
: ::c_int
= 88;
722 pub const ENOSYS
: ::c_int
= 89;
723 pub const ELOOP
: ::c_int
= 90;
724 pub const ERESTART
: ::c_int
= 91;
725 pub const ESTRPIPE
: ::c_int
= 92;
726 pub const ENOTEMPTY
: ::c_int
= 93;
727 pub const EUSERS
: ::c_int
= 94;
728 pub const ENOTSOCK
: ::c_int
= 95;
729 pub const EDESTADDRREQ
: ::c_int
= 96;
730 pub const EMSGSIZE
: ::c_int
= 97;
731 pub const EPROTOTYPE
: ::c_int
= 98;
732 pub const ENOPROTOOPT
: ::c_int
= 99;
733 pub const EPROTONOSUPPORT
: ::c_int
= 120;
734 pub const ESOCKTNOSUPPORT
: ::c_int
= 121;
735 pub const EOPNOTSUPP
: ::c_int
= 122;
736 pub const EPFNOSUPPORT
: ::c_int
= 123;
737 pub const EAFNOSUPPORT
: ::c_int
= 124;
738 pub const EADDRINUSE
: ::c_int
= 125;
739 pub const EADDRNOTAVAIL
: ::c_int
= 126;
740 pub const ENETDOWN
: ::c_int
= 127;
741 pub const ENETUNREACH
: ::c_int
= 128;
742 pub const ENETRESET
: ::c_int
= 129;
743 pub const ECONNABORTED
: ::c_int
= 130;
744 pub const ECONNRESET
: ::c_int
= 131;
745 pub const ENOBUFS
: ::c_int
= 132;
746 pub const EISCONN
: ::c_int
= 133;
747 pub const ENOTCONN
: ::c_int
= 134;
748 pub const ESHUTDOWN
: ::c_int
= 143;
749 pub const ETOOMANYREFS
: ::c_int
= 144;
750 pub const ETIMEDOUT
: ::c_int
= 145;
751 pub const ECONNREFUSED
: ::c_int
= 146;
752 pub const EHOSTDOWN
: ::c_int
= 147;
753 pub const EHOSTUNREACH
: ::c_int
= 148;
754 pub const EWOULDBLOCK
: ::c_int
= EAGAIN
;
755 pub const EALREADY
: ::c_int
= 149;
756 pub const EINPROGRESS
: ::c_int
= 150;
758 pub const EAI_AGAIN
: ::c_int
= 2;
759 pub const EAI_BADFLAGS
: ::c_int
= 3;
760 pub const EAI_FAIL
: ::c_int
= 4;
761 pub const EAI_FAMILY
: ::c_int
= 5;
762 pub const EAI_MEMORY
: ::c_int
= 6;
763 pub const EAI_NODATA
: ::c_int
= 7;
764 pub const EAI_NONAME
: ::c_int
= 8;
765 pub const EAI_SERVICE
: ::c_int
= 9;
766 pub const EAI_SOCKTYPE
: ::c_int
= 10;
767 pub const EAI_SYSTEM
: ::c_int
= 11;
768 pub const EAI_OVERFLOW
: ::c_int
= 12;
770 pub const F_DUPFD
: ::c_int
= 0;
771 pub const F_GETFD
: ::c_int
= 1;
772 pub const F_SETFD
: ::c_int
= 2;
773 pub const F_GETFL
: ::c_int
= 3;
774 pub const F_SETFL
: ::c_int
= 4;
776 pub const SIGTRAP
: ::c_int
= 5;
778 pub const GLOB_APPEND
: ::c_int
= 32;
779 pub const GLOB_DOOFFS
: ::c_int
= 16;
780 pub const GLOB_ERR
: ::c_int
= 1;
781 pub const GLOB_MARK
: ::c_int
= 2;
782 pub const GLOB_NOCHECK
: ::c_int
= 8;
783 pub const GLOB_NOSORT
: ::c_int
= 4;
784 pub const GLOB_NOESCAPE
: ::c_int
= 64;
786 pub const GLOB_NOSPACE
: ::c_int
= -2;
787 pub const GLOB_ABORTED
: ::c_int
= -1;
788 pub const GLOB_NOMATCH
: ::c_int
= -3;
790 pub const POLLIN
: ::c_short
= 0x1;
791 pub const POLLPRI
: ::c_short
= 0x2;
792 pub const POLLOUT
: ::c_short
= 0x4;
793 pub const POLLERR
: ::c_short
= 0x8;
794 pub const POLLHUP
: ::c_short
= 0x10;
795 pub const POLLNVAL
: ::c_short
= 0x20;
797 pub const POSIX_MADV_NORMAL
: ::c_int
= 0;
798 pub const POSIX_MADV_RANDOM
: ::c_int
= 1;
799 pub const POSIX_MADV_SEQUENTIAL
: ::c_int
= 2;
800 pub const POSIX_MADV_WILLNEED
: ::c_int
= 3;
801 pub const POSIX_MADV_DONTNEED
: ::c_int
= 4;
803 pub const PTHREAD_CREATE_JOINABLE
: ::c_int
= 0;
804 pub const PTHREAD_CREATE_DETACHED
: ::c_int
= 0x40;
805 pub const PTHREAD_PROCESS_SHARED
: ::c_int
= 1;
806 pub const PTHREAD_PROCESS_PRIVATE
: ::c_ushort
= 0;
807 pub const PTHREAD_STACK_MIN
: ::size_t
= 4096;
809 pub const SIGSTKSZ
: ::size_t
= 8192;
811 // https://illumos.org/man/3c/clock_gettime
812 // https://github.com/illumos/illumos-gate/
813 // blob/HEAD/usr/src/lib/libc/amd64/sys/__clock_gettime.s
814 // clock_gettime(3c) doesn't seem to accept anything other than CLOCK_REALTIME
815 // or __CLOCK_REALTIME0
817 // https://github.com/illumos/illumos-gate/
818 // blob/HEAD/usr/src/uts/common/sys/time_impl.h
819 // Confusing! CLOCK_HIGHRES==CLOCK_MONOTONIC==4
820 // __CLOCK_REALTIME0==0 is an obsoleted version of CLOCK_REALTIME==3
821 pub const CLOCK_REALTIME
: ::clockid_t
= 3;
822 pub const CLOCK_MONOTONIC
: ::clockid_t
= 4;
823 pub const TIMER_RELTIME
: ::c_int
= 0;
824 pub const TIMER_ABSTIME
: ::c_int
= 1;
826 pub const RLIMIT_CPU
: ::c_int
= 0;
827 pub const RLIMIT_FSIZE
: ::c_int
= 1;
828 pub const RLIMIT_DATA
: ::c_int
= 2;
829 pub const RLIMIT_STACK
: ::c_int
= 3;
830 pub const RLIMIT_CORE
: ::c_int
= 4;
831 pub const RLIMIT_NOFILE
: ::c_int
= 5;
832 pub const RLIMIT_VMEM
: ::c_int
= 6;
833 pub const RLIMIT_AS
: ::c_int
= RLIMIT_VMEM
;
835 pub const RLIM_NLIMITS
: rlim_t
= 7;
836 pub const RLIM_INFINITY
: rlim_t
= 0x7fffffff;
838 pub const RUSAGE_SELF
: ::c_int
= 0;
839 pub const RUSAGE_CHILDREN
: ::c_int
= -1;
841 pub const MADV_NORMAL
: ::c_int
= 0;
842 pub const MADV_RANDOM
: ::c_int
= 1;
843 pub const MADV_SEQUENTIAL
: ::c_int
= 2;
844 pub const MADV_WILLNEED
: ::c_int
= 3;
845 pub const MADV_DONTNEED
: ::c_int
= 4;
846 pub const MADV_FREE
: ::c_int
= 5;
848 pub const AF_INET
: ::c_int
= 2;
849 pub const AF_INET6
: ::c_int
= 26;
850 pub const AF_UNIX
: ::c_int
= 1;
851 pub const SOCK_DGRAM
: ::c_int
= 1;
852 pub const SOCK_STREAM
: ::c_int
= 2;
853 pub const SOCK_RAW
: ::c_int
= 4;
854 pub const SOCK_RDM
: ::c_int
= 5;
855 pub const SOCK_SEQPACKET
: ::c_int
= 6;
856 pub const IP_MULTICAST_IF
: ::c_int
= 16;
857 pub const IP_MULTICAST_TTL
: ::c_int
= 17;
858 pub const IP_MULTICAST_LOOP
: ::c_int
= 18;
859 pub const IP_TTL
: ::c_int
= 4;
860 pub const IP_HDRINCL
: ::c_int
= 2;
861 pub const IP_ADD_MEMBERSHIP
: ::c_int
= 19;
862 pub const IP_DROP_MEMBERSHIP
: ::c_int
= 20;
863 pub const IPV6_JOIN_GROUP
: ::c_int
= 9;
864 pub const IPV6_LEAVE_GROUP
: ::c_int
= 10;
866 pub const TCP_NODELAY
: ::c_int
= 1;
867 pub const TCP_KEEPIDLE
: ::c_int
= 34;
868 pub const SOL_SOCKET
: ::c_int
= 0xffff;
869 pub const SO_DEBUG
: ::c_int
= 0x01;
870 pub const SO_ACCEPTCONN
: ::c_int
= 0x0002;
871 pub const SO_REUSEADDR
: ::c_int
= 0x0004;
872 pub const SO_KEEPALIVE
: ::c_int
= 0x0008;
873 pub const SO_DONTROUTE
: ::c_int
= 0x0010;
874 pub const SO_BROADCAST
: ::c_int
= 0x0020;
875 pub const SO_USELOOPBACK
: ::c_int
= 0x0040;
876 pub const SO_LINGER
: ::c_int
= 0x0080;
877 pub const SO_OOBINLINE
: ::c_int
= 0x0100;
878 pub const SO_SNDBUF
: ::c_int
= 0x1001;
879 pub const SO_RCVBUF
: ::c_int
= 0x1002;
880 pub const SO_SNDLOWAT
: ::c_int
= 0x1003;
881 pub const SO_RCVLOWAT
: ::c_int
= 0x1004;
882 pub const SO_SNDTIMEO
: ::c_int
= 0x1005;
883 pub const SO_RCVTIMEO
: ::c_int
= 0x1006;
884 pub const SO_ERROR
: ::c_int
= 0x1007;
885 pub const SO_TYPE
: ::c_int
= 0x1008;
887 pub const MSG_PEEK
: ::c_int
= 0x2;
889 // https://docs.oracle.com/cd/E23824_01/html/821-1475/if-7p.html
890 pub const IFF_UP
: ::c_int
= 0x0000000001; // Address is up
891 pub const IFF_BROADCAST
: ::c_int
= 0x0000000002; // Broadcast address valid
892 pub const IFF_DEBUG
: ::c_int
= 0x0000000004; // Turn on debugging
893 pub const IFF_LOOPBACK
: ::c_int
= 0x0000000008; // Loopback net
894 pub const IFF_POINTOPOINT
: ::c_int
= 0x0000000010; // Interface is p-to-p
895 pub const IFF_NOTRAILERS
: ::c_int
= 0x0000000020; // Avoid use of trailers
896 pub const IFF_RUNNING
: ::c_int
= 0x0000000040; // Resources allocated
897 pub const IFF_NOARP
: ::c_int
= 0x0000000080; // No address res. protocol
898 pub const IFF_PROMISC
: ::c_int
= 0x0000000100; // Receive all packets
899 pub const IFF_ALLMULTI
: ::c_int
= 0x0000000200; // Receive all multicast pkts
900 pub const IFF_INTELLIGENT
: ::c_int
= 0x0000000400; // Protocol code on board
901 pub const IFF_MULTICAST
: ::c_int
= 0x0000000800; // Supports multicast
902 // Multicast using broadcst. add.
903 pub const IFF_MULTI_BCAST
: ::c_int
= 0x0000001000;
904 pub const IFF_UNNUMBERED
: ::c_int
= 0x0000002000; // Non-unique address
905 pub const IFF_DHCPRUNNING
: ::c_int
= 0x0000004000; // DHCP controls interface
906 pub const IFF_PRIVATE
: ::c_int
= 0x0000008000; // Do not advertise
907 pub const IFF_NOXMIT
: ::c_int
= 0x0000010000; // Do not transmit pkts
908 // No address - just on-link subnet
909 pub const IFF_NOLOCAL
: ::c_int
= 0x0000020000;
910 pub const IFF_DEPRECATED
: ::c_int
= 0x0000040000; // Address is deprecated
911 pub const IFF_ADDRCONF
: ::c_int
= 0x0000080000; // Addr. from stateless addrconf
912 pub const IFF_ROUTER
: ::c_int
= 0x0000100000; // Router on interface
913 pub const IFF_NONUD
: ::c_int
= 0x0000200000; // No NUD on interface
914 pub const IFF_ANYCAST
: ::c_int
= 0x0000400000; // Anycast address
915 pub const IFF_NORTEXCH
: ::c_int
= 0x0000800000; // Don't xchange rout. info
916 pub const IFF_IPV4
: ::c_int
= 0x0001000000; // IPv4 interface
917 pub const IFF_IPV6
: ::c_int
= 0x0002000000; // IPv6 interface
918 pub const IFF_NOFAILOVER
: ::c_int
= 0x0008000000; // in.mpathd test address
919 pub const IFF_FAILED
: ::c_int
= 0x0010000000; // Interface has failed
920 pub const IFF_STANDBY
: ::c_int
= 0x0020000000; // Interface is a hot-spare
921 pub const IFF_INACTIVE
: ::c_int
= 0x0040000000; // Functioning but not used
922 pub const IFF_OFFLINE
: ::c_int
= 0x0080000000; // Interface is offline
923 // If CoS marking is supported
924 pub const IFF_COS_ENABLED
: ::c_longlong
= 0x0200000000;
925 pub const IFF_PREFERRED
: ::c_longlong
= 0x0400000000; // Prefer as source addr.
926 pub const IFF_TEMPORARY
: ::c_longlong
= 0x0800000000; // RFC3041
927 pub const IFF_FIXEDMTU
: ::c_longlong
= 0x1000000000; // MTU set with SIOCSLIFMTU
928 pub const IFF_VIRTUAL
: ::c_longlong
= 0x2000000000; // Cannot send/receive pkts
929 pub const IFF_DUPLICATE
: ::c_longlong
= 0x4000000000; // Local address in use
930 pub const IFF_IPMP
: ::c_longlong
= 0x8000000000; // IPMP IP interface
932 pub const SHUT_RD
: ::c_int
= 0;
933 pub const SHUT_WR
: ::c_int
= 1;
934 pub const SHUT_RDWR
: ::c_int
= 2;
936 pub const LOCK_SH
: ::c_int
= 1;
937 pub const LOCK_EX
: ::c_int
= 2;
938 pub const LOCK_NB
: ::c_int
= 4;
939 pub const LOCK_UN
: ::c_int
= 8;
941 pub const F_RDLCK
: ::c_short
= 1;
942 pub const F_WRLCK
: ::c_short
= 2;
943 pub const F_UNLCK
: ::c_short
= 3;
945 pub const O_SYNC
: ::c_int
= 16;
946 pub const O_NONBLOCK
: ::c_int
= 128;
948 pub const IPPROTO_RAW
: ::c_int
= 255;
950 pub const _PC_LINK_MAX
: ::c_int
= 1;
951 pub const _PC_MAX_CANON
: ::c_int
= 2;
952 pub const _PC_MAX_INPUT
: ::c_int
= 3;
953 pub const _PC_NAME_MAX
: ::c_int
= 4;
954 pub const _PC_PATH_MAX
: ::c_int
= 5;
955 pub const _PC_PIPE_BUF
: ::c_int
= 6;
956 pub const _PC_NO_TRUNC
: ::c_int
= 7;
957 pub const _PC_VDISABLE
: ::c_int
= 8;
958 pub const _PC_CHOWN_RESTRICTED
: ::c_int
= 9;
959 pub const _PC_ASYNC_IO
: ::c_int
= 10;
960 pub const _PC_PRIO_IO
: ::c_int
= 11;
961 pub const _PC_SYNC_IO
: ::c_int
= 12;
962 pub const _PC_ALLOC_SIZE_MIN
: ::c_int
= 13;
963 pub const _PC_REC_INCR_XFER_SIZE
: ::c_int
= 14;
964 pub const _PC_REC_MAX_XFER_SIZE
: ::c_int
= 15;
965 pub const _PC_REC_MIN_XFER_SIZE
: ::c_int
= 16;
966 pub const _PC_REC_XFER_ALIGN
: ::c_int
= 17;
967 pub const _PC_SYMLINK_MAX
: ::c_int
= 18;
968 pub const _PC_2_SYMLINKS
: ::c_int
= 19;
969 pub const _PC_ACL_ENABLED
: ::c_int
= 20;
970 pub const _PC_MIN_HOLE_SIZE
: ::c_int
= 21;
971 pub const _PC_CASE_BEHAVIOR
: ::c_int
= 22;
972 pub const _PC_SATTR_ENABLED
: ::c_int
= 23;
973 pub const _PC_SATTR_EXISTS
: ::c_int
= 24;
974 pub const _PC_ACCESS_FILTERING
: ::c_int
= 25;
975 pub const _PC_TIMESTAMP_RESOLUTION
: ::c_int
= 26;
976 pub const _PC_FILESIZEBITS
: ::c_int
= 67;
977 pub const _PC_XATTR_ENABLED
: ::c_int
= 100;
978 pub const _PC_LAST
: ::c_int
= 101;
979 pub const _PC_XATTR_EXISTS
: ::c_int
= 101;
981 pub const _SC_ARG_MAX
: ::c_int
= 1;
982 pub const _SC_CHILD_MAX
: ::c_int
= 2;
983 pub const _SC_CLK_TCK
: ::c_int
= 3;
984 pub const _SC_NGROUPS_MAX
: ::c_int
= 4;
985 pub const _SC_OPEN_MAX
: ::c_int
= 5;
986 pub const _SC_JOB_CONTROL
: ::c_int
= 6;
987 pub const _SC_SAVED_IDS
: ::c_int
= 7;
988 pub const _SC_VERSION
: ::c_int
= 8;
989 pub const _SC_PASS_MAX
: ::c_int
= 9;
990 pub const _SC_LOGNAME_MAX
: ::c_int
= 10;
991 pub const _SC_PAGESIZE
: ::c_int
= 11;
992 pub const _SC_PAGE_SIZE
: ::c_int
= _SC_PAGESIZE
;
993 pub const _SC_XOPEN_VERSION
: ::c_int
= 12;
994 pub const _SC_NPROCESSORS_CONF
: ::c_int
= 14;
995 pub const _SC_NPROCESSORS_ONLN
: ::c_int
= 15;
996 pub const _SC_STREAM_MAX
: ::c_int
= 16;
997 pub const _SC_TZNAME_MAX
: ::c_int
= 17;
998 pub const _SC_AIO_LISTIO_MAX
: ::c_int
= 18;
999 pub const _SC_AIO_MAX
: ::c_int
= 19;
1000 pub const _SC_AIO_PRIO_DELTA_MAX
: ::c_int
= 20;
1001 pub const _SC_ASYNCHRONOUS_IO
: ::c_int
= 21;
1002 pub const _SC_DELAYTIMER_MAX
: ::c_int
= 22;
1003 pub const _SC_FSYNC
: ::c_int
= 23;
1004 pub const _SC_MAPPED_FILES
: ::c_int
= 24;
1005 pub const _SC_MEMLOCK
: ::c_int
= 25;
1006 pub const _SC_MEMLOCK_RANGE
: ::c_int
= 26;
1007 pub const _SC_MEMORY_PROTECTION
: ::c_int
= 27;
1008 pub const _SC_MESSAGE_PASSING
: ::c_int
= 28;
1009 pub const _SC_MQ_OPEN_MAX
: ::c_int
= 29;
1010 pub const _SC_MQ_PRIO_MAX
: ::c_int
= 30;
1011 pub const _SC_PRIORITIZED_IO
: ::c_int
= 31;
1012 pub const _SC_PRIORITY_SCHEDULING
: ::c_int
= 32;
1013 pub const _SC_REALTIME_SIGNALS
: ::c_int
= 33;
1014 pub const _SC_RTSIG_MAX
: ::c_int
= 34;
1015 pub const _SC_SEMAPHORES
: ::c_int
= 35;
1016 pub const _SC_SEM_NSEMS_MAX
: ::c_int
= 36;
1017 pub const _SC_SEM_VALUE_MAX
: ::c_int
= 37;
1018 pub const _SC_SHARED_MEMORY_OBJECTS
: ::c_int
= 38;
1019 pub const _SC_SIGQUEUE_MAX
: ::c_int
= 39;
1020 pub const _SC_SIGRT_MIN
: ::c_int
= 40;
1021 pub const _SC_SIGRT_MAX
: ::c_int
= 41;
1022 pub const _SC_SYNCHRONIZED_IO
: ::c_int
= 42;
1023 pub const _SC_TIMERS
: ::c_int
= 43;
1024 pub const _SC_TIMER_MAX
: ::c_int
= 44;
1025 pub const _SC_2_C_BIND
: ::c_int
= 45;
1026 pub const _SC_2_C_DEV
: ::c_int
= 46;
1027 pub const _SC_2_C_VERSION
: ::c_int
= 47;
1028 pub const _SC_2_FORT_DEV
: ::c_int
= 48;
1029 pub const _SC_2_FORT_RUN
: ::c_int
= 49;
1030 pub const _SC_2_LOCALEDEF
: ::c_int
= 50;
1031 pub const _SC_2_SW_DEV
: ::c_int
= 51;
1032 pub const _SC_2_UPE
: ::c_int
= 52;
1033 pub const _SC_2_VERSION
: ::c_int
= 53;
1034 pub const _SC_BC_BASE_MAX
: ::c_int
= 54;
1035 pub const _SC_BC_DIM_MAX
: ::c_int
= 55;
1036 pub const _SC_BC_SCALE_MAX
: ::c_int
= 56;
1037 pub const _SC_BC_STRING_MAX
: ::c_int
= 57;
1038 pub const _SC_COLL_WEIGHTS_MAX
: ::c_int
= 58;
1039 pub const _SC_EXPR_NEST_MAX
: ::c_int
= 59;
1040 pub const _SC_LINE_MAX
: ::c_int
= 60;
1041 pub const _SC_RE_DUP_MAX
: ::c_int
= 61;
1042 pub const _SC_XOPEN_CRYPT
: ::c_int
= 62;
1043 pub const _SC_XOPEN_ENH_I18N
: ::c_int
= 63;
1044 pub const _SC_XOPEN_SHM
: ::c_int
= 64;
1045 pub const _SC_2_CHAR_TERM
: ::c_int
= 66;
1046 pub const _SC_XOPEN_XCU_VERSION
: ::c_int
= 67;
1047 pub const _SC_ATEXIT_MAX
: ::c_int
= 76;
1048 pub const _SC_IOV_MAX
: ::c_int
= 77;
1049 pub const _SC_XOPEN_UNIX
: ::c_int
= 78;
1050 pub const _SC_T_IOV_MAX
: ::c_int
= 79;
1051 pub const _SC_PHYS_PAGES
: ::c_int
= 500;
1052 pub const _SC_AVPHYS_PAGES
: ::c_int
= 501;
1053 pub const _SC_COHER_BLKSZ
: ::c_int
= 503;
1054 pub const _SC_SPLIT_CACHE
: ::c_int
= 504;
1055 pub const _SC_ICACHE_SZ
: ::c_int
= 505;
1056 pub const _SC_DCACHE_SZ
: ::c_int
= 506;
1057 pub const _SC_ICACHE_LINESZ
: ::c_int
= 507;
1058 pub const _SC_DCACHE_LINESZ
: ::c_int
= 508;
1059 pub const _SC_ICACHE_BLKSZ
: ::c_int
= 509;
1060 pub const _SC_DCACHE_BLKSZ
: ::c_int
= 510;
1061 pub const _SC_DCACHE_TBLKSZ
: ::c_int
= 511;
1062 pub const _SC_ICACHE_ASSOC
: ::c_int
= 512;
1063 pub const _SC_DCACHE_ASSOC
: ::c_int
= 513;
1064 pub const _SC_MAXPID
: ::c_int
= 514;
1065 pub const _SC_STACK_PROT
: ::c_int
= 515;
1066 pub const _SC_NPROCESSORS_MAX
: ::c_int
= 516;
1067 pub const _SC_CPUID_MAX
: ::c_int
= 517;
1068 pub const _SC_EPHID_MAX
: ::c_int
= 518;
1069 pub const _SC_THREAD_DESTRUCTOR_ITERATIONS
: ::c_int
= 568;
1070 pub const _SC_GETGR_R_SIZE_MAX
: ::c_int
= 569;
1071 pub const _SC_GETPW_R_SIZE_MAX
: ::c_int
= 570;
1072 pub const _SC_LOGIN_NAME_MAX
: ::c_int
= 571;
1073 pub const _SC_THREAD_KEYS_MAX
: ::c_int
= 572;
1074 pub const _SC_THREAD_STACK_MIN
: ::c_int
= 573;
1075 pub const _SC_THREAD_THREADS_MAX
: ::c_int
= 574;
1076 pub const _SC_TTY_NAME_MAX
: ::c_int
= 575;
1077 pub const _SC_THREADS
: ::c_int
= 576;
1078 pub const _SC_THREAD_ATTR_STACKADDR
: ::c_int
= 577;
1079 pub const _SC_THREAD_ATTR_STACKSIZE
: ::c_int
= 578;
1080 pub const _SC_THREAD_PRIORITY_SCHEDULING
: ::c_int
= 579;
1081 pub const _SC_THREAD_PRIO_INHERIT
: ::c_int
= 580;
1082 pub const _SC_THREAD_PRIO_PROTECT
: ::c_int
= 581;
1083 pub const _SC_THREAD_PROCESS_SHARED
: ::c_int
= 582;
1084 pub const _SC_THREAD_SAFE_FUNCTIONS
: ::c_int
= 583;
1085 pub const _SC_XOPEN_LEGACY
: ::c_int
= 717;
1086 pub const _SC_XOPEN_REALTIME
: ::c_int
= 718;
1087 pub const _SC_XOPEN_REALTIME_THREADS
: ::c_int
= 719;
1088 pub const _SC_XBS5_ILP32_OFF32
: ::c_int
= 720;
1089 pub const _SC_XBS5_ILP32_OFFBIG
: ::c_int
= 721;
1090 pub const _SC_XBS5_LP64_OFF64
: ::c_int
= 722;
1091 pub const _SC_XBS5_LPBIG_OFFBIG
: ::c_int
= 723;
1092 pub const _SC_2_PBS
: ::c_int
= 724;
1093 pub const _SC_2_PBS_ACCOUNTING
: ::c_int
= 725;
1094 pub const _SC_2_PBS_CHECKPOINT
: ::c_int
= 726;
1095 pub const _SC_2_PBS_LOCATE
: ::c_int
= 728;
1096 pub const _SC_2_PBS_MESSAGE
: ::c_int
= 729;
1097 pub const _SC_2_PBS_TRACK
: ::c_int
= 730;
1098 pub const _SC_ADVISORY_INFO
: ::c_int
= 731;
1099 pub const _SC_BARRIERS
: ::c_int
= 732;
1100 pub const _SC_CLOCK_SELECTION
: ::c_int
= 733;
1101 pub const _SC_CPUTIME
: ::c_int
= 734;
1102 pub const _SC_HOST_NAME_MAX
: ::c_int
= 735;
1103 pub const _SC_MONOTONIC_CLOCK
: ::c_int
= 736;
1104 pub const _SC_READER_WRITER_LOCKS
: ::c_int
= 737;
1105 pub const _SC_REGEXP
: ::c_int
= 738;
1106 pub const _SC_SHELL
: ::c_int
= 739;
1107 pub const _SC_SPAWN
: ::c_int
= 740;
1108 pub const _SC_SPIN_LOCKS
: ::c_int
= 741;
1109 pub const _SC_SPORADIC_SERVER
: ::c_int
= 742;
1110 pub const _SC_SS_REPL_MAX
: ::c_int
= 743;
1111 pub const _SC_SYMLOOP_MAX
: ::c_int
= 744;
1112 pub const _SC_THREAD_CPUTIME
: ::c_int
= 745;
1113 pub const _SC_THREAD_SPORADIC_SERVER
: ::c_int
= 746;
1114 pub const _SC_TIMEOUTS
: ::c_int
= 747;
1115 pub const _SC_TRACE
: ::c_int
= 748;
1116 pub const _SC_TRACE_EVENT_FILTER
: ::c_int
= 749;
1117 pub const _SC_TRACE_EVENT_NAME_MAX
: ::c_int
= 750;
1118 pub const _SC_TRACE_INHERIT
: ::c_int
= 751;
1119 pub const _SC_TRACE_LOG
: ::c_int
= 752;
1120 pub const _SC_TRACE_NAME_MAX
: ::c_int
= 753;
1121 pub const _SC_TRACE_SYS_MAX
: ::c_int
= 754;
1122 pub const _SC_TRACE_USER_EVENT_MAX
: ::c_int
= 755;
1123 pub const _SC_TYPED_MEMORY_OBJECTS
: ::c_int
= 756;
1124 pub const _SC_V6_ILP32_OFF32
: ::c_int
= 757;
1125 pub const _SC_V6_ILP32_OFFBIG
: ::c_int
= 758;
1126 pub const _SC_V6_LP64_OFF64
: ::c_int
= 759;
1127 pub const _SC_V6_LPBIG_OFFBIG
: ::c_int
= 760;
1128 pub const _SC_XOPEN_STREAMS
: ::c_int
= 761;
1129 pub const _SC_IPV6
: ::c_int
= 762;
1130 pub const _SC_RAW_SOCKETS
: ::c_int
= 763;
1132 pub const _MUTEX_MAGIC
: u16 = 0x4d58; // MX
1133 pub const _COND_MAGIC
: u16 = 0x4356; // CV
1134 pub const _RWL_MAGIC
: u16 = 0x5257; // RW
1136 pub const NCCS
: usize = 19;
1138 pub const LOG_CRON
: ::c_int
= 15 << 3;
1140 pub const SYS_epoll_create
: ::c_long
= 213;
1141 pub const SYS_epoll_create1
: ::c_long
= 291;
1143 pub const PTHREAD_MUTEX_INITIALIZER
: pthread_mutex_t
= pthread_mutex_t
{
1144 __pthread_mutex_flag1
: 0,
1145 __pthread_mutex_flag2
: 0,
1146 __pthread_mutex_ceiling
: 0,
1147 __pthread_mutex_type
: PTHREAD_PROCESS_PRIVATE
,
1148 __pthread_mutex_magic
: _MUTEX_MAGIC
,
1149 __pthread_mutex_lock
: 0,
1150 __pthread_mutex_data
: 0
1152 pub const PTHREAD_COND_INITIALIZER
: pthread_cond_t
= pthread_cond_t
{
1153 __pthread_cond_flag
: [0; 4],
1154 __pthread_cond_type
: PTHREAD_PROCESS_PRIVATE
,
1155 __pthread_cond_magic
: _COND_MAGIC
,
1156 __pthread_cond_data
: 0
1158 pub const PTHREAD_RWLOCK_INITIALIZER
: pthread_rwlock_t
= pthread_rwlock_t
{
1159 __pthread_rwlock_readers
: 0,
1160 __pthread_rwlock_type
: PTHREAD_PROCESS_PRIVATE
,
1161 __pthread_rwlock_magic
: _RWL_MAGIC
,
1162 __pthread_rwlock_mutex
: PTHREAD_MUTEX_INITIALIZER
,
1163 __pthread_rwlock_readercv
: PTHREAD_COND_INITIALIZER
,
1164 __pthread_rwlock_writercv
: PTHREAD_COND_INITIALIZER
1166 pub const PTHREAD_MUTEX_NORMAL
: ::c_int
= 0;
1167 pub const PTHREAD_MUTEX_ERRORCHECK
: ::c_int
= 2;
1168 pub const PTHREAD_MUTEX_RECURSIVE
: ::c_int
= 4;
1169 pub const PTHREAD_MUTEX_DEFAULT
: ::c_int
= PTHREAD_MUTEX_NORMAL
;
1171 pub const RTLD_NEXT
: *mut ::c_void
= -1isize
as *mut ::c_void
;
1172 pub const RTLD_DEFAULT
: *mut ::c_void
= -2isize
as *mut ::c_void
;
1173 pub const RTLD_SELF
: *mut ::c_void
= -3isize
as *mut ::c_void
;
1174 pub const RTLD_PROBE
: *mut ::c_void
= -4isize
as *mut ::c_void
;
1176 pub const RTLD_LAZY
: ::c_int
= 0x1;
1177 pub const RTLD_NOW
: ::c_int
= 0x2;
1178 pub const RTLD_NOLOAD
: ::c_int
= 0x4;
1179 pub const RTLD_GLOBAL
: ::c_int
= 0x100;
1180 pub const RTLD_LOCAL
: ::c_int
= 0x0;
1181 pub const RTLD_PARENT
: ::c_int
= 0x200;
1182 pub const RTLD_GROUP
: ::c_int
= 0x400;
1183 pub const RTLD_WORLD
: ::c_int
= 0x800;
1184 pub const RTLD_NODELETE
: ::c_int
= 0x1000;
1185 pub const RTLD_FIRST
: ::c_int
= 0x2000;
1186 pub const RTLD_CONFGEN
: ::c_int
= 0x10000;
1188 pub const PORT_SOURCE_AIO
: ::c_int
= 1;
1189 pub const PORT_SOURCE_TIMER
: ::c_int
= 2;
1190 pub const PORT_SOURCE_USER
: ::c_int
= 3;
1191 pub const PORT_SOURCE_FD
: ::c_int
= 4;
1192 pub const PORT_SOURCE_ALERT
: ::c_int
= 5;
1193 pub const PORT_SOURCE_MQ
: ::c_int
= 6;
1194 pub const PORT_SOURCE_FILE
: ::c_int
= 7;
1195 pub const PORT_SOURCE_POSTWAIT
: ::c_int
= 8;
1196 pub const PORT_SOURCE_SIGNAL
: ::c_int
= 9;
1198 pub const TIOCGWINSZ
: ::c_int
= 0x5468;
1199 pub const TIOCSWINSZ
: ::c_int
= 0x5467;
1201 pub const EPOLLIN
: ::c_int
= 0x1;
1202 pub const EPOLLPRI
: ::c_int
= 0x2;
1203 pub const EPOLLOUT
: ::c_int
= 0x4;
1204 pub const EPOLLRDNORM
: ::c_int
= 0x40;
1205 pub const EPOLLRDBAND
: ::c_int
= 0x80;
1206 pub const EPOLLWRNORM
: ::c_int
= 0x100;
1207 pub const EPOLLWRBAND
: ::c_int
= 0x200;
1208 pub const EPOLLMSG
: ::c_int
= 0x400;
1209 pub const EPOLLERR
: ::c_int
= 0x8;
1210 pub const EPOLLHUP
: ::c_int
= 0x10;
1211 pub const EPOLLET
: ::c_int
= 0x80000000;
1212 pub const EPOLLRDHUP
: ::c_int
= 0x2000;
1213 pub const EPOLLEXCLUSIVE
: ::c_int
= 0x10000000;
1214 pub const EPOLLONESHOT
: ::c_int
= 0x40000000;
1215 pub const EPOLL_CLOEXEC
: ::c_int
= 0x80000;
1216 pub const EPOLL_CTL_ADD
: ::c_int
= 1;
1217 pub const EPOLL_CTL_MOD
: ::c_int
= 3;
1218 pub const EPOLL_CTL_DEL
: ::c_int
= 2;
1221 pub fn FD_CLR(fd
: ::c_int
, set
: *mut fd_set
) -> () {
1222 let bits
= mem
::size_of_val(&(*set
).fds_bits
[0]) * 8;
1223 let fd
= fd
as usize;
1224 (*set
).fds_bits
[fd
/ bits
] &= !(1 << (fd
% bits
));
1228 pub fn FD_ISSET(fd
: ::c_int
, set
: *mut fd_set
) -> bool
{
1229 let bits
= mem
::size_of_val(&(*set
).fds_bits
[0]) * 8;
1230 let fd
= fd
as usize;
1231 return ((*set
).fds_bits
[fd
/ bits
] & (1 << (fd
% bits
))) != 0
1234 pub fn FD_SET(fd
: ::c_int
, set
: *mut fd_set
) -> () {
1235 let bits
= mem
::size_of_val(&(*set
).fds_bits
[0]) * 8;
1236 let fd
= fd
as usize;
1237 (*set
).fds_bits
[fd
/ bits
] |= 1 << (fd
% bits
);
1241 pub fn FD_ZERO(set
: *mut fd_set
) -> () {
1242 for slot
in (*set
).fds_bits
.iter_mut() {
1247 pub fn WIFEXITED(status
: ::c_int
) -> bool
{
1248 (status
& 0xFF) == 0
1251 pub fn WEXITSTATUS(status
: ::c_int
) -> ::c_int
{
1252 (status
>> 8) & 0xFF
1255 pub fn WTERMSIG(status
: ::c_int
) -> ::c_int
{
1261 pub fn getifaddrs(ifap
: *mut *mut ::ifaddrs
) -> ::c_int
;
1262 pub fn freeifaddrs(ifa
: *mut ::ifaddrs
);
1264 pub fn stack_getbounds(sp
: *mut ::stack_t
) -> ::c_int
;
1265 pub fn mincore(addr
: *const ::c_void
, len
: ::size_t
,
1266 vec
: *mut c_char
) -> ::c_int
;
1267 pub fn setgroups(ngroups
: ::c_int
,
1268 ptr
: *const ::gid_t
) -> ::c_int
;
1269 pub fn ioctl(fildes
: ::c_int
, request
: ::c_int
, ...) -> ::c_int
;
1270 pub fn mprotect(addr
: *const ::c_void
, len
: ::size_t
, prot
: ::c_int
)
1272 pub fn ___errno() -> *mut ::c_int
;
1273 pub fn clock_getres(clk_id
: ::clockid_t
, tp
: *mut ::timespec
) -> ::c_int
;
1274 pub fn clock_gettime(clk_id
: ::clockid_t
, tp
: *mut ::timespec
) -> ::c_int
;
1275 pub fn clock_nanosleep(clk_id
: ::clockid_t
,
1277 rqtp
: *const ::timespec
,
1278 rmtp
: *mut ::timespec
) -> ::c_int
;
1279 pub fn clock_settime(clk_id
: ::clockid_t
, tp
: *const ::timespec
) -> ::c_int
;
1280 pub fn getnameinfo(sa
: *const ::sockaddr
,
1282 host
: *mut ::c_char
,
1283 hostlen
: ::socklen_t
,
1284 serv
: *mut ::c_char
,
1285 sevlen
: ::socklen_t
,
1286 flags
: ::c_int
) -> ::c_int
;
1289 pub fn getpwent() -> *mut passwd
;
1290 pub fn fdatasync(fd
: ::c_int
) -> ::c_int
;
1291 pub fn nl_langinfo_l(item
: ::nl_item
, locale
: ::locale_t
) -> *mut ::c_char
;
1292 pub fn duplocale(base
: ::locale_t
) -> ::locale_t
;
1293 pub fn freelocale(loc
: ::locale_t
);
1294 pub fn newlocale(mask
: ::c_int
,
1295 locale
: *const ::c_char
,
1296 base
: ::locale_t
) -> ::locale_t
;
1297 pub fn uselocale(loc
: ::locale_t
) -> ::locale_t
;
1298 pub fn getprogname() -> *const ::c_char
;
1299 pub fn setprogname(name
: *const ::c_char
);
1300 pub fn getloadavg(loadavg
: *mut ::c_double
, nelem
: ::c_int
) -> ::c_int
;
1301 pub fn getpriority(which
: ::c_int
, who
: ::c_int
) -> ::c_int
;
1302 pub fn setpriority(which
: ::c_int
, who
: ::c_int
, prio
: ::c_int
) -> ::c_int
;
1304 pub fn mknodat(dirfd
: ::c_int
, pathname
: *const ::c_char
,
1305 mode
: ::mode_t
, dev
: dev_t
) -> ::c_int
;
1306 pub fn mkfifoat(dirfd
: ::c_int
, pathname
: *const ::c_char
,
1307 mode
: ::mode_t
) -> ::c_int
;
1308 pub fn sethostname(name
: *mut ::c_char
, len
: ::c_int
) -> ::c_int
;
1309 pub fn if_nameindex() -> *mut if_nameindex
;
1310 pub fn if_freenameindex(ptr
: *mut if_nameindex
);
1311 pub fn pthread_create(native
: *mut ::pthread_t
,
1312 attr
: *const ::pthread_attr_t
,
1313 f
: extern fn(*mut ::c_void
) -> *mut ::c_void
,
1314 value
: *mut ::c_void
) -> ::c_int
;
1315 pub fn pthread_condattr_getclock(attr
: *const pthread_condattr_t
,
1316 clock_id
: *mut clockid_t
) -> ::c_int
;
1317 pub fn pthread_condattr_setclock(attr
: *mut pthread_condattr_t
,
1318 clock_id
: ::clockid_t
) -> ::c_int
;
1319 pub fn sem_timedwait(sem
: *mut sem_t
,
1320 abstime
: *const ::timespec
) -> ::c_int
;
1321 pub fn sem_getvalue(sem
: *mut sem_t
,
1322 sval
: *mut ::c_int
) -> ::c_int
;
1323 pub fn pthread_mutex_timedlock(lock
: *mut pthread_mutex_t
,
1324 abstime
: *const ::timespec
) -> ::c_int
;
1325 pub fn waitid(idtype
: idtype_t
, id
: id_t
, infop
: *mut ::siginfo_t
,
1326 options
: ::c_int
) -> ::c_int
;
1328 pub fn glob(pattern
: *const ::c_char
,
1330 errfunc
: Option
<extern fn(epath
: *const ::c_char
,
1331 errno
: ::c_int
) -> ::c_int
>,
1332 pglob
: *mut ::glob_t
) -> ::c_int
;
1334 pub fn globfree(pglob
: *mut ::glob_t
);
1336 pub fn posix_madvise(addr
: *mut ::c_void
, len
: ::size_t
, advice
: ::c_int
)
1339 pub fn shm_unlink(name
: *const ::c_char
) -> ::c_int
;
1341 pub fn seekdir(dirp
: *mut ::DIR
, loc
: ::c_long
);
1343 pub fn telldir(dirp
: *mut ::DIR
) -> ::c_long
;
1344 pub fn madvise(addr
: *mut ::c_void
, len
: ::size_t
, advice
: ::c_int
)
1347 pub fn msync(addr
: *mut ::c_void
, len
: ::size_t
, flags
: ::c_int
) -> ::c_int
;
1349 pub fn memalign(align
: ::size_t
, size
: ::size_t
) -> *mut ::c_void
;
1351 pub fn recvfrom(socket
: ::c_int
, buf
: *mut ::c_void
, len
: ::size_t
,
1352 flags
: ::c_int
, addr
: *mut ::sockaddr
,
1353 addrlen
: *mut ::socklen_t
) -> ::ssize_t
;
1354 pub fn mkstemps(template
: *mut ::c_char
, suffixlen
: ::c_int
) -> ::c_int
;
1355 pub fn futimesat(fd
: ::c_int
, path
: *const ::c_char
,
1356 times
: *const ::timeval
) -> ::c_int
;
1357 pub fn utimensat(dirfd
: ::c_int
, path
: *const ::c_char
,
1358 times
: *const ::timespec
, flag
: ::c_int
) -> ::c_int
;
1359 pub fn nl_langinfo(item
: ::nl_item
) -> *mut ::c_char
;
1361 pub fn bind(socket
: ::c_int
, address
: *const ::sockaddr
,
1362 address_len
: ::socklen_t
) -> ::c_int
;
1364 pub fn writev(fd
: ::c_int
,
1365 iov
: *const ::iovec
,
1366 iovcnt
: ::c_int
) -> ::ssize_t
;
1367 pub fn readv(fd
: ::c_int
,
1368 iov
: *const ::iovec
,
1369 iovcnt
: ::c_int
) -> ::ssize_t
;
1371 pub fn sendmsg(fd
: ::c_int
,
1372 msg
: *const ::msghdr
,
1373 flags
: ::c_int
) -> ::ssize_t
;
1374 pub fn recvmsg(fd
: ::c_int
, msg
: *mut ::msghdr
, flags
: ::c_int
)
1377 pub fn port_create() -> ::c_int
;
1378 pub fn port_associate(port
: ::c_int
, source
: ::c_int
, object
: ::uintptr_t
,
1379 events
: ::c_int
, user
: *mut ::c_void
) -> ::c_int
;
1380 pub fn port_dissociate(port
: ::c_int
, source
: ::c_int
, object
: ::uintptr_t
)
1382 pub fn port_get(port
: ::c_int
, pe
: *mut port_event
,
1383 timeout
: *mut ::timespec
) -> ::c_int
;
1384 pub fn port_getn(port
: ::c_int
, pe_list
: *mut port_event
, max
: ::c_uint
,
1385 nget
: *mut ::c_uint
, timeout
: *mut ::timespec
)
1387 pub fn fexecve(fd
: ::c_int
, argv
: *const *const ::c_char
,
1388 envp
: *const *const ::c_char
)
1390 #[cfg_attr(target_os = "solaris", link_name = "__posix_getgrgid_r")]
1391 pub fn getgrgid_r(uid
: ::uid_t
,
1395 result
: *mut *mut ::group
) -> ::c_int
;
1396 pub fn sigaltstack(ss
: *const stack_t
,
1397 oss
: *mut stack_t
) -> ::c_int
;
1398 pub fn sem_close(sem
: *mut sem_t
) -> ::c_int
;
1399 pub fn getdtablesize() -> ::c_int
;
1401 pub fn epoll_pwait(epfd
: ::c_int
,
1402 events
: *mut ::epoll_event
,
1405 sigmask
: *const ::sigset_t
) -> ::c_int
;
1406 pub fn epoll_create(size
: ::c_int
) -> ::c_int
;
1407 pub fn epoll_create1(flags
: ::c_int
) -> ::c_int
;
1408 pub fn epoll_wait(epfd
: ::c_int
,
1409 events
: *mut ::epoll_event
,
1411 timeout
: ::c_int
) -> ::c_int
;
1412 pub fn epoll_ctl(epfd
: ::c_int
,
1415 event
: *mut ::epoll_event
) -> ::c_int
;
1417 #[cfg_attr(target_os = "solaris", link_name = "__posix_getgrnam_r")]
1418 pub fn getgrnam_r(name
: *const ::c_char
,
1422 result
: *mut *mut ::group
) -> ::c_int
;
1423 pub fn pthread_sigmask(how
: ::c_int
, set
: *const sigset_t
,
1424 oldset
: *mut sigset_t
) -> ::c_int
;
1425 pub fn sem_open(name
: *const ::c_char
, oflag
: ::c_int
, ...) -> *mut sem_t
;
1426 pub fn getgrnam(name
: *const ::c_char
) -> *mut ::group
;
1427 pub fn pthread_kill(thread
: ::pthread_t
, sig
: ::c_int
) -> ::c_int
;
1428 pub fn sem_unlink(name
: *const ::c_char
) -> ::c_int
;
1429 pub fn daemon(nochdir
: ::c_int
, noclose
: ::c_int
) -> ::c_int
;
1430 #[cfg_attr(target_os = "solaris", link_name = "__posix_getpwnam_r")]
1431 pub fn getpwnam_r(name
: *const ::c_char
,
1435 result
: *mut *mut passwd
) -> ::c_int
;
1436 #[cfg_attr(target_os = "solaris", link_name = "__posix_getpwuid_r")]
1437 pub fn getpwuid_r(uid
: ::uid_t
,
1441 result
: *mut *mut passwd
) -> ::c_int
;
1442 #[cfg_attr(target_os = "solaris", link_name = "__posix_getpwent_r")]
1443 pub fn getpwent_r(pwd
: *mut passwd
,
1446 result
: *mut *mut passwd
) -> ::c_int
;
1447 #[cfg_attr(target_os = "solaris", link_name = "__posix_getgrent_r")]
1448 pub fn getgrent_r(grp
: *mut ::group
,
1451 result
: *mut *mut ::group
) -> ::c_int
;
1452 #[cfg_attr(target_os = "solaris", link_name = "__posix_sigwait")]
1453 pub fn sigwait(set
: *const sigset_t
,
1454 sig
: *mut ::c_int
) -> ::c_int
;
1455 pub fn pthread_atfork(prepare
: Option
<unsafe extern fn()>,
1456 parent
: Option
<unsafe extern fn()>,
1457 child
: Option
<unsafe extern fn()>) -> ::c_int
;
1458 pub fn getgrgid(gid
: ::gid_t
) -> *mut ::group
;
1459 pub fn popen(command
: *const c_char
,
1460 mode
: *const c_char
) -> *mut ::FILE
;