1 pub type clock_t
= c_long
;
2 pub type time_t
= c_long
;
3 pub type suseconds_t
= c_long
;
6 pub type blkcnt_t
= i64;
8 pub type blksize_t
= c_long
;
9 pub type fsblkcnt_t
= ::c_ulonglong
;
10 pub type fsfilcnt_t
= ::c_ulonglong
;
11 pub type rlim_t
= ::c_ulonglong
;
14 pub struct sigaction
{
15 pub sa_sigaction
: ::sighandler_t
,
16 pub sa_mask
: ::sigset_t
,
17 pub sa_flags
: ::c_int
,
18 _restorer
: *mut ::c_void
,
21 pub struct siginfo_t
{
22 pub si_signo
: ::c_int
,
23 pub si_errno
: ::c_int
,
25 pub _pad
: [::c_int
; 29],
30 pub __ipc_perm_key
: ::key_t
,
42 pub c_iflag
: ::tcflag_t
,
43 pub c_oflag
: ::tcflag_t
,
44 pub c_cflag
: ::tcflag_t
,
45 pub c_lflag
: ::tcflag_t
,
47 pub c_cc
: [::cc_t
; ::NCCS
],
48 pub __c_ispeed
: ::speed_t
,
49 pub __c_ospeed
: ::speed_t
,
53 pub l_type
: ::c_short
,
54 pub l_whence
: ::c_short
,
61 pub const BUFSIZ
: ::c_uint
= 1024;
62 pub const TMP_MAX
: ::c_uint
= 10000;
63 pub const FOPEN_MAX
: ::c_uint
= 1000;
64 pub const POSIX_MADV_DONTNEED
: ::c_int
= 0;
65 pub const O_ACCMODE
: ::c_int
= 0o10000003;
66 pub const O_NDELAY
: ::c_int
= O_NONBLOCK
;
67 pub const RUSAGE_CHILDREN
: ::c_int
= 1;
68 pub const NI_MAXHOST
: ::socklen_t
= 255;
69 pub const PTHREAD_STACK_MIN
: ::size_t
= 2048;
71 pub const RLIM_INFINITY
: ::rlim_t
= !0;
72 pub const RLIMIT_RTTIME
: ::c_int
= 15;
73 pub const RLIMIT_NLIMITS
: ::c_int
= 16;
75 pub const MAP_ANONYMOUS
: ::c_int
= MAP_ANON
;
77 pub const TCP_COOKIE_TRANSACTIONS
: ::c_int
= 15;
78 pub const TCP_THIN_LINEAR_TIMEOUTS
: ::c_int
= 16;
79 pub const TCP_THIN_DUPACK
: ::c_int
= 17;
80 pub const TCP_USER_TIMEOUT
: ::c_int
= 18;
81 pub const TCP_REPAIR
: ::c_int
= 19;
82 pub const TCP_REPAIR_QUEUE
: ::c_int
= 20;
83 pub const TCP_QUEUE_SEQ
: ::c_int
= 21;
84 pub const TCP_REPAIR_OPTIONS
: ::c_int
= 22;
85 pub const TCP_FASTOPEN
: ::c_int
= 23;
86 pub const TCP_TIMESTAMP
: ::c_int
= 24;
88 pub const SIGUNUSED
: ::c_int
= ::SIGSYS
;
90 pub const FALLOC_FL_KEEP_SIZE
: ::c_int
= 0x01;
91 pub const FALLOC_FL_PUNCH_HOLE
: ::c_int
= 0x02;
93 pub const __SIZEOF_PTHREAD_MUTEXATTR_T
: usize = 4;
95 pub const CPU_SETSIZE
: ::c_int
= 128;
97 pub const QFMT_VFS_V1
: ::c_int
= 4;
99 pub const PTRACE_TRACEME
: ::c_int
= 0;
100 pub const PTRACE_PEEKTEXT
: ::c_int
= 1;
101 pub const PTRACE_PEEKDATA
: ::c_int
= 2;
102 pub const PTRACE_PEEKUSER
: ::c_int
= 3;
103 pub const PTRACE_POKETEXT
: ::c_int
= 4;
104 pub const PTRACE_POKEDATA
: ::c_int
= 5;
105 pub const PTRACE_POKEUSER
: ::c_int
= 6;
106 pub const PTRACE_CONT
: ::c_int
= 7;
107 pub const PTRACE_KILL
: ::c_int
= 8;
108 pub const PTRACE_SINGLESTEP
: ::c_int
= 9;
109 pub const PTRACE_ATTACH
: ::c_int
= 16;
110 pub const PTRACE_DETACH
: ::c_int
= 17;
111 pub const PTRACE_SYSCALL
: ::c_int
= 24;
112 pub const PTRACE_SETOPTIONS
: ::c_int
= 0x4200;
113 pub const PTRACE_GETEVENTMSG
: ::c_int
= 0x4201;
114 pub const PTRACE_GETSIGINFO
: ::c_int
= 0x4202;
115 pub const PTRACE_SETSIGINFO
: ::c_int
= 0x4203;
116 pub const PTRACE_GETREGSET
: ::c_int
= 0x4204;
117 pub const PTRACE_SETREGSET
: ::c_int
= 0x4205;
118 pub const PTRACE_SEIZE
: ::c_int
= 0x4206;
119 pub const PTRACE_INTERRUPT
: ::c_int
= 0x4207;
120 pub const PTRACE_LISTEN
: ::c_int
= 0x4208;
121 pub const PTRACE_PEEKSIGINFO
: ::c_int
= 0x4209;
123 pub const MADV_DODUMP
: ::c_int
= 17;
124 pub const MADV_DONTDUMP
: ::c_int
= 16;
126 pub const EPOLLWAKEUP
: ::c_int
= 0x20000000;
128 pub const MADV_HUGEPAGE
: ::c_int
= 14;
129 pub const MADV_NOHUGEPAGE
: ::c_int
= 15;
131 pub const PTRACE_GETFPREGS
: ::c_uint
= 14;
132 pub const PTRACE_SETFPREGS
: ::c_uint
= 15;
133 pub const PTRACE_GETFPXREGS
: ::c_uint
= 18;
134 pub const PTRACE_SETFPXREGS
: ::c_uint
= 19;
135 pub const PTRACE_GETREGS
: ::c_uint
= 12;
136 pub const PTRACE_SETREGS
: ::c_uint
= 13;
138 pub const EFD_NONBLOCK
: ::c_int
= ::O_NONBLOCK
;
140 pub const SFD_NONBLOCK
: ::c_int
= ::O_NONBLOCK
;
142 pub const TCSANOW
: ::c_int
= 0;
143 pub const TCSADRAIN
: ::c_int
= 1;
144 pub const TCSAFLUSH
: ::c_int
= 2;
146 pub const TIOCINQ
: ::c_ulong
= ::FIONREAD
;
148 pub const RTLD_GLOBAL
: ::c_int
= 0x100;
149 pub const RTLD_NOLOAD
: ::c_int
= 0x4;
151 // TODO(#247) Temporarily musl-specific (available since musl 0.9.12 / Linux
152 // kernel 3.10). See also notbsd/mod.rs
153 pub const CLOCK_SGI_CYCLE
: ::clockid_t
= 10;
154 pub const CLOCK_TAI
: ::clockid_t
= 11;
157 pub fn getnameinfo(sa
: *const ::sockaddr
,
160 hostlen
: ::socklen_t
,
163 flags
: ::c_int
) -> ::c_int
;
164 pub fn ioctl(fd
: ::c_int
, request
: ::c_int
, ...) -> ::c_int
;
165 pub fn eventfd(init
: ::c_uint
, flags
: ::c_int
) -> ::c_int
;
166 pub fn ptrace(request
: ::c_int
, ...) -> ::c_long
;
170 if #[cfg(any(target_arch = "x86_64"))] {
172 pub use self::b64
::*;
173 } else if #[cfg(any(target_arch = "x86",
174 target_arch
= "mips",
176 target_arch
= "asmjs"))] {
178 pub use self::b32
::*;