1 pub type clock_t
= ::c_uint
;
2 pub type suseconds_t
= ::c_int
;
4 pub type blksize_t
= ::int32_t
;
5 pub type fsblkcnt_t
= ::uint64_t
;
6 pub type fsfilcnt_t
= ::uint64_t
;
10 pub d_fileno
: ::ino_t
,
14 pub d_name
: [::c_char
; 512],
18 pub gl_pathc
: ::size_t
,
20 pub gl_offs
: ::size_t
,
22 pub gl_pathv
: *mut *mut ::c_char
,
24 __unused3
: *mut ::c_void
,
26 __unused4
: *mut ::c_void
,
27 __unused5
: *mut ::c_void
,
28 __unused6
: *mut ::c_void
,
29 __unused7
: *mut ::c_void
,
30 __unused8
: *mut ::c_void
,
39 pub st_mode
: ::mode_t
,
41 pub st_nlink
: ::nlink_t
,
45 pub st_atime
: ::time_t
,
46 pub st_atimensec
: ::c_long
,
47 pub st_mtime
: ::time_t
,
48 pub st_mtimensec
: ::c_long
,
49 pub st_ctime
: ::time_t
,
50 pub st_ctimensec
: ::c_long
,
51 pub st_birthtime
: ::time_t
,
52 pub st_birthtimensec
: ::c_long
,
54 pub st_blocks
: ::blkcnt_t
,
55 pub st_blksize
: ::blksize_t
,
56 pub st_flags
: ::uint32_t
,
57 pub st_gen
: ::uint32_t
,
58 pub st_spare
: [::uint32_t
; 2],
62 pub f_flag
: ::c_ulong
,
63 pub f_bsize
: ::c_ulong
,
64 pub f_frsize
: ::c_ulong
,
65 pub f_iosize
: ::c_ulong
,
67 pub f_blocks
: ::fsblkcnt_t
,
68 pub f_bfree
: ::fsblkcnt_t
,
69 pub f_bavail
: ::fsblkcnt_t
,
70 pub f_bresvd
: ::fsblkcnt_t
,
72 pub f_files
: ::fsfilcnt_t
,
73 pub f_ffree
: ::fsfilcnt_t
,
74 pub f_favail
: ::fsfilcnt_t
,
75 pub f_fresvd
: ::fsfilcnt_t
,
77 pub f_syncreads
: ::uint64_t
,
78 pub f_syncwrites
: ::uint64_t
,
80 pub f_asyncreads
: ::uint64_t
,
81 pub f_asyncwrites
: ::uint64_t
,
83 pub f_fsidx
: ::fsid_t
,
84 pub f_fsid
: ::c_ulong
,
85 pub f_namemax
: ::c_ulong
,
88 pub f_spare
: [::uint32_t
; 4],
90 pub f_fstypename
: [::c_char
; 32],
91 pub f_mntonname
: [::c_char
; 1024],
92 pub f_mntfromname
: [::c_char
; 1024],
96 pub ai_flags
: ::c_int
,
97 pub ai_family
: ::c_int
,
98 pub ai_socktype
: ::c_int
,
99 pub ai_protocol
: ::c_int
,
100 pub ai_addrlen
: ::socklen_t
,
101 pub ai_canonname
: *mut ::c_char
,
102 pub ai_addr
: *mut ::sockaddr
,
103 pub ai_next
: *mut ::addrinfo
,
106 pub struct sockaddr_storage
{
108 pub ss_family
: ::sa_family_t
,
111 __ss_pad3
: [u8; 112],
114 pub struct siginfo_t
{
115 pub si_signo
: ::c_int
,
116 pub si_code
: ::c_int
,
117 pub si_errno
: ::c_int
,
119 pub si_addr
: *mut ::c_void
,
123 pub struct pthread_attr_t
{
126 pta_private
: *mut ::c_void
,
129 pub struct pthread_mutex_t
{
131 ptm_errorcheck
: ::c_uchar
,
133 ptm_interlock
: ::c_uchar
,
135 ptm_owner
: ::pthread_t
,
136 ptm_waiters
: *mut u8,
137 ptm_recursed
: ::c_uint
,
138 ptm_spare2
: *mut ::c_void
,
141 pub struct pthread_mutexattr_t
{
142 ptma_magic
: ::c_uint
,
143 ptma_private
: *mut ::c_void
,
146 pub struct pthread_cond_t
{
149 ptc_waiters_first
: *mut u8,
150 ptc_waiters_last
: *mut u8,
151 ptc_mutex
: *mut ::pthread_mutex_t
,
152 ptc_private
: *mut ::c_void
,
155 pub struct pthread_rwlock_t
{
157 ptr_interlock
: ::c_uchar
,
158 ptr_rblocked_first
: *mut u8,
159 ptr_rblocked_last
: *mut u8,
160 ptr_wblocked_first
: *mut u8,
161 ptr_wblocked_last
: *mut u8,
162 ptr_nreaders
: ::c_uint
,
163 ptr_owner
: ::pthread_t
,
164 ptr_private
: *mut ::c_void
,
168 pub ident
: ::uintptr_t
,
169 pub filter
: ::uint32_t
,
170 pub flags
: ::uint32_t
,
171 pub fflags
: ::uint32_t
,
173 pub udata
: ::intptr_t
,
177 pub dqb_bhardlimit
: ::uint32_t
,
178 pub dqb_bsoftlimit
: ::uint32_t
,
179 pub dqb_curblocks
: ::uint32_t
,
180 pub dqb_ihardlimit
: ::uint32_t
,
181 pub dqb_isoftlimit
: ::uint32_t
,
182 pub dqb_curinodes
: ::uint32_t
,
183 pub dqb_btime
: ::int32_t
,
184 pub dqb_itime
: ::int32_t
,
188 pub dli_fname
: *const ::c_char
,
189 pub dli_fbase
: *mut ::c_void
,
190 pub dli_sname
: *const ::c_char
,
191 pub dli_saddr
: *const ::c_void
,
195 pub decimal_point
: *mut ::c_char
,
196 pub thousands_sep
: *mut ::c_char
,
197 pub grouping
: *mut ::c_char
,
198 pub int_curr_symbol
: *mut ::c_char
,
199 pub currency_symbol
: *mut ::c_char
,
200 pub mon_decimal_point
: *mut ::c_char
,
201 pub mon_thousands_sep
: *mut ::c_char
,
202 pub mon_grouping
: *mut ::c_char
,
203 pub positive_sign
: *mut ::c_char
,
204 pub negative_sign
: *mut ::c_char
,
205 pub int_frac_digits
: ::c_char
,
206 pub frac_digits
: ::c_char
,
207 pub p_cs_precedes
: ::c_char
,
208 pub p_sep_by_space
: ::c_char
,
209 pub n_cs_precedes
: ::c_char
,
210 pub n_sep_by_space
: ::c_char
,
211 pub p_sign_posn
: ::c_char
,
212 pub n_sign_posn
: ::c_char
,
213 pub int_p_cs_precedes
: ::c_char
,
214 pub int_n_cs_precedes
: ::c_char
,
215 pub int_p_sep_by_space
: ::c_char
,
216 pub int_n_sep_by_space
: ::c_char
,
217 pub int_p_sign_posn
: ::c_char
,
218 pub int_n_sign_posn
: ::c_char
,
222 pub const O_CLOEXEC
: ::c_int
= 0x400000;
223 pub const O_ALT_IO
: ::c_int
= 0x40000;
224 pub const O_NOSIGPIPE
: ::c_int
= 0x1000000;
225 pub const O_SEARCH
: ::c_int
= 0x800000;
226 pub const O_EXLOCK
: ::c_int
= 0x20;
227 pub const O_SHLOCK
: ::c_int
= 0x10;
228 pub const O_DIRECTORY
: ::c_int
= 0x200000;
230 pub const MS_SYNC
: ::c_int
= 0x4;
231 pub const MS_INVALIDATE
: ::c_int
= 0x2;
233 pub const RLIM_NLIMITS
: ::c_int
= 12;
235 pub const ENOATTR
: ::c_int
= 93;
236 pub const EILSEQ
: ::c_int
= 85;
237 pub const EOVERFLOW
: ::c_int
= 84;
238 pub const ECANCELED
: ::c_int
= 87;
239 pub const EIDRM
: ::c_int
= 82;
240 pub const ENOMSG
: ::c_int
= 83;
241 pub const ENOTSUP
: ::c_int
= 86;
242 pub const ELAST
: ::c_int
= 96;
244 pub const F_DUPFD_CLOEXEC
: ::c_int
= 12;
245 pub const F_CLOSEM
: ::c_int
= 10;
246 pub const F_GETNOSIGPIPE
: ::c_int
= 13;
247 pub const F_SETNOSIGPIPE
: ::c_int
= 14;
248 pub const F_MAXFD
: ::c_int
= 11;
250 pub const IPV6_JOIN_GROUP
: ::c_int
= 12;
251 pub const IPV6_LEAVE_GROUP
: ::c_int
= 13;
253 pub const SO_SNDTIMEO
: ::c_int
= 0x100b;
254 pub const SO_RCVTIMEO
: ::c_int
= 0x100c;
256 pub const KERN_PROC
: ::c_int
= 14;
257 pub const O_DSYNC
: ::c_int
= 0x10000;
259 pub const MAP_RENAME
: ::c_int
= 0x20;
260 pub const MAP_NORESERVE
: ::c_int
= 0x40;
261 pub const MAP_HASSEMAPHORE
: ::c_int
= 0x200;
262 pub const MAP_WIRED
: ::c_int
= 0x800;
264 pub const _SC_IOV_MAX
: ::c_int
= 32;
265 pub const _SC_GETGR_R_SIZE_MAX
: ::c_int
= 47;
266 pub const _SC_GETPW_R_SIZE_MAX
: ::c_int
= 48;
267 pub const _SC_LOGIN_NAME_MAX
: ::c_int
= 37;
268 pub const _SC_MQ_PRIO_MAX
: ::c_int
= 55;
269 pub const _SC_NPROCESSORS_ONLN
: ::c_int
= 1002;
270 pub const _SC_THREADS
: ::c_int
= 41;
271 pub const _SC_THREAD_ATTR_STACKADDR
: ::c_int
= 61;
272 pub const _SC_THREAD_ATTR_STACKSIZE
: ::c_int
= 62;
273 pub const _SC_THREAD_DESTRUCTOR_ITERATIONS
: ::c_int
= 57;
274 pub const _SC_THREAD_KEYS_MAX
: ::c_int
= 58;
275 pub const _SC_THREAD_PRIO_INHERIT
: ::c_int
= 64;
276 pub const _SC_THREAD_PRIO_PROTECT
: ::c_int
= 65;
277 pub const _SC_THREAD_PRIORITY_SCHEDULING
: ::c_int
= 63;
278 pub const _SC_THREAD_PROCESS_SHARED
: ::c_int
= 66;
279 pub const _SC_THREAD_SAFE_FUNCTIONS
: ::c_int
= 67;
280 pub const _SC_THREAD_STACK_MIN
: ::c_int
= 59;
281 pub const _SC_THREAD_THREADS_MAX
: ::c_int
= 60;
282 pub const _SC_TTY_NAME_MAX
: ::c_int
= 68;
283 pub const _SC_ATEXIT_MAX
: ::c_int
= 40;
284 pub const _SC_CLK_TCK
: ::c_int
= 39;
285 pub const _SC_AIO_LISTIO_MAX
: ::c_int
= 51;
286 pub const _SC_AIO_MAX
: ::c_int
= 52;
287 pub const _SC_ASYNCHRONOUS_IO
: ::c_int
= 50;
288 pub const _SC_MAPPED_FILES
: ::c_int
= 33;
289 pub const _SC_MEMLOCK
: ::c_int
= 34;
290 pub const _SC_MEMLOCK_RANGE
: ::c_int
= 35;
291 pub const _SC_MEMORY_PROTECTION
: ::c_int
= 36;
292 pub const _SC_MESSAGE_PASSING
: ::c_int
= 53;
293 pub const _SC_MQ_OPEN_MAX
: ::c_int
= 54;
294 pub const _SC_PRIORITY_SCHEDULING
: ::c_int
= 56;
295 pub const _SC_SEMAPHORES
: ::c_int
= 42;
296 pub const _SC_SHARED_MEMORY_OBJECTS
: ::c_int
= 87;
297 pub const _SC_SYNCHRONIZED_IO
: ::c_int
= 31;
298 pub const _SC_TIMERS
: ::c_int
= 44;
300 pub const FD_SETSIZE
: usize = 0x100;
302 pub const ST_NOSUID
: ::c_ulong
= 8;
304 pub const PTHREAD_MUTEX_INITIALIZER
: pthread_mutex_t
= pthread_mutex_t
{
305 ptm_magic
: 0x33330003,
308 ptm_waiters
: 0 as *mut _
,
313 ptm_spare2
: 0 as *mut _
,
315 pub const PTHREAD_COND_INITIALIZER
: pthread_cond_t
= pthread_cond_t
{
316 ptc_magic
: 0x55550005,
318 ptc_waiters_first
: 0 as *mut _
,
319 ptc_waiters_last
: 0 as *mut _
,
320 ptc_mutex
: 0 as *mut _
,
321 ptc_private
: 0 as *mut _
,
323 pub const PTHREAD_RWLOCK_INITIALIZER
: pthread_rwlock_t
= pthread_rwlock_t
{
324 ptr_magic
: 0x99990009,
326 ptr_rblocked_first
: 0 as *mut _
,
327 ptr_rblocked_last
: 0 as *mut _
,
328 ptr_wblocked_first
: 0 as *mut _
,
329 ptr_wblocked_last
: 0 as *mut _
,
332 ptr_private
: 0 as *mut _
,
334 pub const PTHREAD_MUTEX_RECURSIVE
: ::c_int
= 2;
335 pub const KERN_PROC_ARGS
: ::c_int
= 48;
337 pub const EVFILT_AIO
: ::int16_t
= 2;
338 pub const EVFILT_PROC
: ::int16_t
= 4;
339 pub const EVFILT_READ
: ::int16_t
= 0;
340 pub const EVFILT_SIGNAL
: ::int16_t
= 5;
341 pub const EVFILT_SYSCOUNT
: ::int16_t
= 7;
342 pub const EVFILT_TIMER
: ::int16_t
= 6;
343 pub const EVFILT_VNODE
: ::int16_t
= 3;
344 pub const EVFILT_WRITE
: ::int16_t
= 1;
346 pub const NOTE_PCTRLMASK
: ::uint32_t
= 0xf0000000;
348 pub const CRTSCTS
: ::tcflag_t
= 0x00010000;
350 pub const TMP_MAX
: ::c_uint
= 308915776;
352 pub const NI_MAXHOST
: ::socklen_t
= 1025;
354 pub const RTLD_NOLOAD
: ::c_int
= 0x2000;
355 pub const RTLD_LOCAL
: ::c_int
= 0x200;
358 pub fn getnameinfo(sa
: *const ::sockaddr
,
361 hostlen
: ::socklen_t
,
364 flags
: ::c_int
) -> ::c_int
;
365 pub fn mprotect(addr
: *mut ::c_void
, len
: ::size_t
, prot
: ::c_int
)
367 pub fn sysctl(name
: *const ::c_int
,
370 oldlenp
: *mut ::size_t
,
371 newp
: *const ::c_void
,
374 pub fn sysctlbyname(name
: *const ::c_char
,
376 oldlenp
: *mut ::size_t
,
377 newp
: *const ::c_void
,
380 #[link_name = "__kevent50"]
381 pub fn kevent(kq
: ::c_int
,
382 changelist
: *const ::kevent
,
384 eventlist
: *mut ::kevent
,
386 timeout
: *const ::timespec
) -> ::c_int
;
387 #[link_name = "__mount50"]
388 pub fn mount(src
: *const ::c_char
,
389 target
: *const ::c_char
,
392 size
: ::size_t
) -> ::c_int
;
393 pub fn ptrace(requeset
: ::c_int
,
396 data
: ::c_int
) -> ::c_int
;
397 pub fn sethostname(name
: *const ::c_char
, len
: ::size_t
) -> ::c_int
;
398 pub fn pthread_setname_np(t
: ::pthread_t
,
399 name
: *const ::c_char
,
400 arg
: *mut ::c_void
) -> ::c_int
;
401 pub fn pthread_getattr_np(native
: ::pthread_t
,
402 attr
: *mut ::pthread_attr_t
) -> ::c_int
;
403 pub fn pthread_attr_getguardsize(attr
: *const ::pthread_attr_t
,
404 guardsize
: *mut ::size_t
) -> ::c_int
;
405 pub fn pthread_attr_getstack(attr
: *const ::pthread_attr_t
,
406 stackaddr
: *mut *mut ::c_void
,
407 stacksize
: *mut ::size_t
) -> ::c_int
;
408 #[link_name = "__sigtimedwait50"]
409 pub fn sigtimedwait(set
: *const sigset_t
,
410 info
: *mut siginfo_t
,
411 timeout
: *const ::timespec
) -> ::c_int
;
412 pub fn sigwaitinfo(set
: *const sigset_t
,
413 info
: *mut siginfo_t
) -> ::c_int
;