]> git.proxmox.com Git - rustc.git/blob - src/vendor/libc/src/unix/notbsd/linux/mips/mips64.rs
New upstream version 1.17.0+dfsg1
[rustc.git] / src / vendor / libc / src / unix / notbsd / linux / mips / mips64.rs
1 pub type blkcnt_t = i64;
2 pub type blksize_t = i64;
3 pub type c_char = i8;
4 pub type c_long = i64;
5 pub type c_ulong = u64;
6 pub type fsblkcnt_t = ::c_ulong;
7 pub type fsfilcnt_t = ::c_ulong;
8 pub type ino_t = u64;
9 pub type nlink_t = u64;
10 pub type off_t = i64;
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;
15
16 s! {
17 pub struct aiocb {
18 pub aio_fildes: ::c_int,
19 pub aio_lio_opcode: ::c_int,
20 pub aio_reqprio: ::c_int,
21 pub aio_buf: *mut ::c_void,
22 pub aio_nbytes: ::size_t,
23 pub aio_sigevent: ::sigevent,
24 __next_prio: *mut aiocb,
25 __abs_prio: ::c_int,
26 __policy: ::c_int,
27 __error_code: ::c_int,
28 __return_value: ::ssize_t,
29 pub aio_offset: off_t,
30 __glibc_reserved: [::c_char; 32]
31 }
32
33 pub struct stat {
34 pub st_dev: ::c_ulong,
35 st_pad1: [::c_long; 2],
36 pub st_ino: ::ino_t,
37 pub st_mode: ::mode_t,
38 pub st_nlink: ::nlink_t,
39 pub st_uid: ::uid_t,
40 pub st_gid: ::gid_t,
41 pub st_rdev: ::c_ulong,
42 st_pad2: [::c_ulong; 1],
43 pub st_size: ::off_t,
44 st_pad3: ::c_long,
45 pub st_atime: ::time_t,
46 pub st_atime_nsec: ::c_long,
47 pub st_mtime: ::time_t,
48 pub st_mtime_nsec: ::c_long,
49 pub st_ctime: ::time_t,
50 pub st_ctime_nsec: ::c_long,
51 pub st_blksize: ::blksize_t,
52 st_pad4: ::c_long,
53 pub st_blocks: ::blkcnt_t,
54 st_pad5: [::c_long; 7],
55 }
56
57 pub struct stat64 {
58 pub st_dev: ::c_ulong,
59 st_pad1: [::c_long; 2],
60 pub st_ino: ::ino64_t,
61 pub st_mode: ::mode_t,
62 pub st_nlink: ::nlink_t,
63 pub st_uid: ::uid_t,
64 pub st_gid: ::gid_t,
65 pub st_rdev: ::c_ulong,
66 st_pad2: [::c_long; 2],
67 pub st_size: ::off64_t,
68 pub st_atime: ::time_t,
69 pub st_atime_nsec: ::c_long,
70 pub st_mtime: ::time_t,
71 pub st_mtime_nsec: ::c_long,
72 pub st_ctime: ::time_t,
73 pub st_ctime_nsec: ::c_long,
74 pub st_blksize: ::blksize_t,
75 st_pad3: ::c_long,
76 pub st_blocks: ::blkcnt64_t,
77 st_pad5: [::c_long; 7],
78 }
79
80 pub struct pthread_attr_t {
81 __size: [::c_ulong; 7]
82 }
83
84 pub struct sigaction {
85 pub sa_flags: ::c_int,
86 pub sa_sigaction: ::sighandler_t,
87 pub sa_mask: sigset_t,
88 _restorer: *mut ::c_void,
89 }
90
91 pub struct stack_t {
92 pub ss_sp: *mut ::c_void,
93 pub ss_size: ::size_t,
94 pub ss_flags: ::c_int,
95 }
96
97 pub struct sigset_t {
98 __size: [::c_ulong; 16],
99 }
100
101 pub struct siginfo_t {
102 pub si_signo: ::c_int,
103 pub si_code: ::c_int,
104 pub si_errno: ::c_int,
105 _pad: ::c_int,
106 _pad2: [::c_long; 14],
107 }
108
109 pub struct ipc_perm {
110 pub __key: ::key_t,
111 pub uid: ::uid_t,
112 pub gid: ::gid_t,
113 pub cuid: ::uid_t,
114 pub cgid: ::gid_t,
115 pub mode: ::c_uint,
116 pub __seq: ::c_ushort,
117 __pad1: ::c_ushort,
118 __unused1: ::c_ulong,
119 __unused2: ::c_ulong
120 }
121
122 pub struct shmid_ds {
123 pub shm_perm: ::ipc_perm,
124 pub shm_segsz: ::size_t,
125 pub shm_atime: ::time_t,
126 pub shm_dtime: ::time_t,
127 pub shm_ctime: ::time_t,
128 pub shm_cpid: ::pid_t,
129 pub shm_lpid: ::pid_t,
130 pub shm_nattch: ::shmatt_t,
131 __unused4: ::c_ulong,
132 __unused5: ::c_ulong
133 }
134
135 pub struct msqid_ds {
136 pub msg_perm: ::ipc_perm,
137 pub msg_stime: ::time_t,
138 pub msg_rtime: ::time_t,
139 pub msg_ctime: ::time_t,
140 __msg_cbytes: ::c_ulong,
141 pub msg_qnum: ::msgqnum_t,
142 pub msg_qbytes: ::msglen_t,
143 pub msg_lspid: ::pid_t,
144 pub msg_lrpid: ::pid_t,
145 __glibc_reserved4: ::c_ulong,
146 __glibc_reserved5: ::c_ulong,
147 }
148
149 pub struct statfs {
150 pub f_type: ::c_long,
151 pub f_bsize: ::c_long,
152 pub f_frsize: ::c_long,
153 pub f_blocks: ::fsblkcnt_t,
154 pub f_bfree: ::fsblkcnt_t,
155 pub f_files: ::fsblkcnt_t,
156 pub f_ffree: ::fsblkcnt_t,
157 pub f_bavail: ::fsblkcnt_t,
158 pub f_fsid: ::fsid_t,
159
160 pub f_namelen: ::c_long,
161 f_spare: [::c_long; 6],
162 }
163
164 pub struct msghdr {
165 pub msg_name: *mut ::c_void,
166 pub msg_namelen: ::socklen_t,
167 pub msg_iov: *mut ::iovec,
168 pub msg_iovlen: ::size_t,
169 pub msg_control: *mut ::c_void,
170 pub msg_controllen: ::size_t,
171 pub msg_flags: ::c_int,
172 }
173
174 pub struct cmsghdr {
175 pub cmsg_len: ::size_t,
176 pub cmsg_level: ::c_int,
177 pub cmsg_type: ::c_int,
178 }
179
180 pub struct termios {
181 pub c_iflag: ::tcflag_t,
182 pub c_oflag: ::tcflag_t,
183 pub c_cflag: ::tcflag_t,
184 pub c_lflag: ::tcflag_t,
185 pub c_line: ::cc_t,
186 pub c_cc: [::cc_t; ::NCCS],
187 }
188
189 pub struct sysinfo {
190 pub uptime: ::c_long,
191 pub loads: [::c_ulong; 3],
192 pub totalram: ::c_ulong,
193 pub freeram: ::c_ulong,
194 pub sharedram: ::c_ulong,
195 pub bufferram: ::c_ulong,
196 pub totalswap: ::c_ulong,
197 pub freeswap: ::c_ulong,
198 pub procs: ::c_ushort,
199 pub pad: ::c_ushort,
200 pub totalhigh: ::c_ulong,
201 pub freehigh: ::c_ulong,
202 pub mem_unit: ::c_uint,
203 pub _f: [::c_char; 0],
204 }
205
206 // FIXME this is actually a union
207 pub struct sem_t {
208 __size: [::c_char; 32],
209 __align: [::c_long; 0],
210 }
211 }
212
213 pub const __SIZEOF_PTHREAD_CONDATTR_T: usize = 4;
214 pub const __SIZEOF_PTHREAD_MUTEXATTR_T: usize = 4;
215 pub const __SIZEOF_PTHREAD_MUTEX_T: usize = 40;
216 pub const __SIZEOF_PTHREAD_RWLOCK_T: usize = 56;
217
218 pub const RLIM_INFINITY: ::rlim_t = 0xffff_ffff_ffff_ffff;
219
220 pub const SYS_gettid: ::c_long = 5178; // Valid for n64
221
222 #[link(name = "util")]
223 extern {
224 pub fn ioctl(fd: ::c_int, request: ::c_ulong, ...) -> ::c_int;
225 }