1 pub type blkcnt_t
= i64;
2 pub type blksize_t
= i64;
5 pub type c_ulong
= u64;
6 pub type fsblkcnt_t
= ::c_ulong
;
7 pub type fsfilcnt_t
= ::c_ulong
;
9 pub type nlink_t
= u64;
11 pub type rlim_t
= ::c_ulong
;
12 pub type suseconds_t
= i64;
13 pub type time_t
= i64;
14 pub type wchar_t
= i32;
18 pub st_dev
: ::c_ulong
,
19 st_pad1
: [::c_long
; 2],
21 pub st_mode
: ::mode_t
,
22 pub st_nlink
: ::nlink_t
,
25 pub st_rdev
: ::c_ulong
,
26 st_pad2
: [::c_ulong
; 1],
29 pub st_atime
: ::time_t
,
30 pub st_atime_nsec
: ::c_long
,
31 pub st_mtime
: ::time_t
,
32 pub st_mtime_nsec
: ::c_long
,
33 pub st_ctime
: ::time_t
,
34 pub st_ctime_nsec
: ::c_long
,
35 pub st_blksize
: ::blksize_t
,
37 pub st_blocks
: ::blkcnt_t
,
38 st_pad5
: [::c_long
; 7],
42 pub st_dev
: ::c_ulong
,
43 st_pad1
: [::c_long
; 2],
44 pub st_ino
: ::ino64_t
,
45 pub st_mode
: ::mode_t
,
46 pub st_nlink
: ::nlink_t
,
49 pub st_rdev
: ::c_ulong
,
50 st_pad2
: [::c_long
; 2],
51 pub st_size
: ::off64_t
,
52 pub st_atime
: ::time_t
,
53 pub st_atime_nsec
: ::c_long
,
54 pub st_mtime
: ::time_t
,
55 pub st_mtime_nsec
: ::c_long
,
56 pub st_ctime
: ::time_t
,
57 pub st_ctime_nsec
: ::c_long
,
58 pub st_blksize
: ::blksize_t
,
60 pub st_blocks
: ::blkcnt64_t
,
61 st_pad5
: [::c_long
; 7],
64 pub struct pthread_attr_t
{
65 __size
: [::c_ulong
; 7]
68 pub struct sigaction
{
69 pub sa_flags
: ::c_int
,
70 pub sa_sigaction
: ::sighandler_t
,
71 pub sa_mask
: sigset_t
,
72 _restorer
: *mut ::c_void
,
76 pub ss_sp
: *mut ::c_void
,
77 pub ss_size
: ::size_t
,
78 pub ss_flags
: ::c_int
,
82 __size
: [::c_ulong
; 16],
85 pub struct siginfo_t
{
86 pub si_signo
: ::c_int
,
88 pub si_errno
: ::c_int
,
90 _pad2
: [::c_long
; 14],
100 pub __seq
: ::c_ushort
,
102 __unused1
: ::c_ulong
,
106 pub struct shmid_ds
{
107 pub shm_perm
: ::ipc_perm
,
108 pub shm_segsz
: ::size_t
,
109 pub shm_atime
: ::time_t
,
110 pub shm_dtime
: ::time_t
,
111 pub shm_ctime
: ::time_t
,
112 pub shm_cpid
: ::pid_t
,
113 pub shm_lpid
: ::pid_t
,
114 pub shm_nattch
: ::shmatt_t
,
115 __unused4
: ::c_ulong
,
119 pub struct msqid_ds
{
120 pub msg_perm
: ::ipc_perm
,
121 pub msg_stime
: ::time_t
,
122 pub msg_rtime
: ::time_t
,
123 pub msg_ctime
: ::time_t
,
124 __msg_cbytes
: ::c_ulong
,
125 pub msg_qnum
: ::msgqnum_t
,
126 pub msg_qbytes
: ::msglen_t
,
127 pub msg_lspid
: ::pid_t
,
128 pub msg_lrpid
: ::pid_t
,
129 __glibc_reserved4
: ::c_ulong
,
130 __glibc_reserved5
: ::c_ulong
,
134 pub f_type
: ::c_long
,
135 pub f_bsize
: ::c_long
,
136 pub f_frsize
: ::c_long
,
137 pub f_blocks
: ::fsblkcnt_t
,
138 pub f_bfree
: ::fsblkcnt_t
,
139 pub f_files
: ::fsblkcnt_t
,
140 pub f_ffree
: ::fsblkcnt_t
,
141 pub f_bavail
: ::fsblkcnt_t
,
142 pub f_fsid
: ::fsid_t
,
144 pub f_namelen
: ::c_long
,
145 f_spare
: [::c_long
; 6],
149 pub msg_name
: *mut ::c_void
,
150 pub msg_namelen
: ::socklen_t
,
151 pub msg_iov
: *mut ::iovec
,
152 pub msg_iovlen
: ::size_t
,
153 pub msg_control
: *mut ::c_void
,
154 pub msg_controllen
: ::size_t
,
155 pub msg_flags
: ::c_int
,
159 pub cmsg_len
: ::size_t
,
160 pub cmsg_level
: ::c_int
,
161 pub cmsg_type
: ::c_int
,
165 pub c_iflag
: ::tcflag_t
,
166 pub c_oflag
: ::tcflag_t
,
167 pub c_cflag
: ::tcflag_t
,
168 pub c_lflag
: ::tcflag_t
,
170 pub c_cc
: [::cc_t
; ::NCCS
],
174 pub uptime
: ::c_long
,
175 pub loads
: [::c_ulong
; 3],
176 pub totalram
: ::c_ulong
,
177 pub freeram
: ::c_ulong
,
178 pub sharedram
: ::c_ulong
,
179 pub bufferram
: ::c_ulong
,
180 pub totalswap
: ::c_ulong
,
181 pub freeswap
: ::c_ulong
,
182 pub procs
: ::c_ushort
,
184 pub totalhigh
: ::c_ulong
,
185 pub freehigh
: ::c_ulong
,
186 pub mem_unit
: ::c_uint
,
187 pub _f
: [::c_char
; 0],
190 // FIXME this is actually a union
192 __size
: [::c_char
; 32],
193 __align
: [::c_long
; 0],
197 pub const __SIZEOF_PTHREAD_CONDATTR_T
: usize = 4;
198 pub const __SIZEOF_PTHREAD_MUTEXATTR_T
: usize = 4;
199 pub const __SIZEOF_PTHREAD_MUTEX_T
: usize = 40;
200 pub const __SIZEOF_PTHREAD_RWLOCK_T
: usize = 56;
202 pub const RLIM_INFINITY
: ::rlim_t
= 0xffff_ffff_ffff_ffff;
204 pub const SYS_gettid
: ::c_long
= 5178; // Valid for n64
206 #[link(name = "util")]
208 pub fn ioctl(fd
: ::c_int
, request
: ::c_ulong
, ...) -> ::c_int
;