1 // Copyright 2015 The Rust Project Developers. See the COPYRIGHT
2 // file at the top-level directory of this distribution and at
3 // http://rust-lang.org/COPYRIGHT.
5 // Licensed under the Apache License, Version 2.0 <LICENSE-APACHE or
6 // http://www.apache.org/licenses/LICENSE-2.0> or the MIT license
7 // <LICENSE-MIT or http://opensource.org/licenses/MIT>, at your
8 // option. This file may not be copied, modified, or distributed
9 // except according to those terms.
11 //! Linux-specific raw type definitions
13 #![stable(feature = "raw_ext", since = "1.1.0")]
17 #[stable(feature = "raw_ext", since = "1.1.0")] pub type dev_t = u64;
18 #[stable(feature = "raw_ext", since = "1.1.0")] pub type mode_t = u32;
20 #[unstable(feature = "pthread_t", issue = "29791")] pub type pthread_t = c_ulong;
23 #[stable(feature = "raw_ext", since = "1.1.0")]
24 pub use self::arch::{off_t, ino_t, nlink_t, blksize_t, blkcnt_t, stat, time_t};
26 #[cfg(any(target_arch = "x86",
28 target_arch = "powerpc",
29 target_arch = "arm"))]
31 use super::{dev_t, mode_t};
32 use os::raw::{c_long, c_short};
33 use os::unix::raw::{gid_t, uid_t};
35 #[stable(feature = "raw_ext", since = "1.1.0")] pub type blkcnt_t = i32;
36 #[stable(feature = "raw_ext", since = "1.1.0")] pub type blksize_t = i32;
37 #[stable(feature = "raw_ext", since = "1.1.0")] pub type ino_t = u32;
38 #[stable(feature = "raw_ext", since = "1.1.0")] pub type nlink_t = u32;
39 #[stable(feature = "raw_ext", since = "1.1.0")] pub type off_t = i32;
40 #[stable(feature = "raw_ext", since = "1.1.0")] pub type time_t = i32;
44 #[stable(feature = "raw_ext", since = "1.1.0")]
46 #[stable(feature = "raw_ext", since = "1.1.0")]
48 #[stable(feature = "raw_ext", since = "1.1.0")]
50 #[stable(feature = "raw_ext", since = "1.1.0")]
52 #[stable(feature = "raw_ext", since = "1.1.0")]
54 #[stable(feature = "raw_ext", since = "1.1.0")]
55 pub st_nlink: nlink_t,
56 #[stable(feature = "raw_ext", since = "1.1.0")]
58 #[stable(feature = "raw_ext", since = "1.1.0")]
60 #[stable(feature = "raw_ext", since = "1.1.0")]
62 #[stable(feature = "raw_ext", since = "1.1.0")]
64 #[stable(feature = "raw_ext", since = "1.1.0")]
66 #[stable(feature = "raw_ext", since = "1.1.0")]
67 pub st_blksize: blksize_t,
68 #[stable(feature = "raw_ext", since = "1.1.0")]
69 pub st_blocks: blkcnt_t,
70 #[stable(feature = "raw_ext", since = "1.1.0")]
72 #[stable(feature = "raw_ext", since = "1.1.0")]
73 pub st_atime_nsec: c_long,
74 #[stable(feature = "raw_ext", since = "1.1.0")]
76 #[stable(feature = "raw_ext", since = "1.1.0")]
77 pub st_mtime_nsec: c_long,
78 #[stable(feature = "raw_ext", since = "1.1.0")]
80 #[stable(feature = "raw_ext", since = "1.1.0")]
81 pub st_ctime_nsec: c_long,
82 #[stable(feature = "raw_ext", since = "1.1.0")]
83 pub __unused4: c_long,
84 #[stable(feature = "raw_ext", since = "1.1.0")]
85 pub __unused5: c_long,
89 #[cfg(any(target_arch = "mips",
90 target_arch = "mipsel"))]
93 use os::raw::{c_long, c_ulong};
94 use os::unix::raw::{gid_t, uid_t};
96 #[stable(feature = "raw_ext", since = "1.1.0")] pub type blkcnt_t = i32;
97 #[stable(feature = "raw_ext", since = "1.1.0")] pub type blksize_t = i32;
98 #[stable(feature = "raw_ext", since = "1.1.0")] pub type ino_t = u32;
99 #[stable(feature = "raw_ext", since = "1.1.0")] pub type nlink_t = u32;
100 #[stable(feature = "raw_ext", since = "1.1.0")] pub type off_t = i32;
101 #[stable(feature = "raw_ext", since = "1.1.0")] pub type time_t = i32;
105 #[stable(feature = "raw_ext", since = "1.1.0")]
107 #[stable(feature = "raw_ext", since = "1.1.0")]
109 #[stable(feature = "raw_ext", since = "1.1.0")]
110 pub st_pad1: [c_long; 3],
111 #[stable(feature = "raw_ext", since = "1.1.0")]
113 #[stable(feature = "raw_ext", since = "1.1.0")]
115 #[stable(feature = "raw_ext", since = "1.1.0")]
116 pub st_nlink: nlink_t,
117 #[stable(feature = "raw_ext", since = "1.1.0")]
119 #[stable(feature = "raw_ext", since = "1.1.0")]
121 #[stable(feature = "raw_ext", since = "1.1.0")]
122 pub st_rdev: c_ulong,
123 #[stable(feature = "raw_ext", since = "1.1.0")]
124 pub st_pad2: [c_long; 2],
125 #[stable(feature = "raw_ext", since = "1.1.0")]
127 #[stable(feature = "raw_ext", since = "1.1.0")]
129 #[stable(feature = "raw_ext", since = "1.1.0")]
130 pub st_atime: time_t,
131 #[stable(feature = "raw_ext", since = "1.1.0")]
132 pub st_atime_nsec: c_long,
133 #[stable(feature = "raw_ext", since = "1.1.0")]
134 pub st_mtime: time_t,
135 #[stable(feature = "raw_ext", since = "1.1.0")]
136 pub st_mtime_nsec: c_long,
137 #[stable(feature = "raw_ext", since = "1.1.0")]
138 pub st_ctime: time_t,
139 #[stable(feature = "raw_ext", since = "1.1.0")]
140 pub st_ctime_nsec: c_long,
141 #[stable(feature = "raw_ext", since = "1.1.0")]
142 pub st_blksize: blksize_t,
143 #[stable(feature = "raw_ext", since = "1.1.0")]
144 pub st_blocks: blkcnt_t,
145 #[stable(feature = "raw_ext", since = "1.1.0")]
146 pub st_pad5: [c_long; 14],
150 #[cfg(target_arch = "aarch64")]
152 use super::{dev_t, mode_t};
153 use os::raw::{c_long, c_int};
154 use os::unix::raw::{gid_t, uid_t};
156 #[stable(feature = "raw_ext", since = "1.1.0")] pub type blkcnt_t = i64;
157 #[stable(feature = "raw_ext", since = "1.1.0")] pub type blksize_t = i32;
158 #[stable(feature = "raw_ext", since = "1.1.0")] pub type ino_t = u64;
159 #[stable(feature = "raw_ext", since = "1.1.0")] pub type nlink_t = u32;
160 #[stable(feature = "raw_ext", since = "1.1.0")] pub type off_t = i64;
161 #[stable(feature = "raw_ext", since = "1.1.0")] pub type time_t = i64;
165 #[stable(feature = "raw_ext", since = "1.1.0")]
167 #[stable(feature = "raw_ext", since = "1.1.0")]
169 #[stable(feature = "raw_ext", since = "1.1.0")]
171 #[stable(feature = "raw_ext", since = "1.1.0")]
173 #[stable(feature = "raw_ext", since = "1.1.0")]
174 pub st_nlink: nlink_t,
175 #[stable(feature = "raw_ext", since = "1.1.0")]
177 #[stable(feature = "raw_ext", since = "1.1.0")]
179 #[stable(feature = "raw_ext", since = "1.1.0")]
181 #[stable(feature = "raw_ext", since = "1.1.0")]
183 #[stable(feature = "raw_ext", since = "1.1.0")]
185 #[stable(feature = "raw_ext", since = "1.1.0")]
186 pub st_blksize: blksize_t,
187 #[stable(feature = "raw_ext", since = "1.1.0")]
189 #[stable(feature = "raw_ext", since = "1.1.0")]
190 pub st_blocks: blkcnt_t,
191 #[stable(feature = "raw_ext", since = "1.1.0")]
192 pub st_atime: time_t,
193 #[stable(feature = "raw_ext", since = "1.1.0")]
194 pub st_atime_nsec: c_long,
195 #[stable(feature = "raw_ext", since = "1.1.0")]
196 pub st_mtime: time_t,
197 #[stable(feature = "raw_ext", since = "1.1.0")]
198 pub st_mtime_nsec: c_long,
199 #[stable(feature = "raw_ext", since = "1.1.0")]
200 pub st_ctime: time_t,
201 #[stable(feature = "raw_ext", since = "1.1.0")]
202 pub st_ctime_nsec: c_long,
203 #[stable(feature = "raw_ext", since = "1.1.0")]
204 pub __unused: [c_int; 2],
208 #[cfg(target_arch = "x86_64")]
210 use super::{dev_t, mode_t};
211 use os::raw::{c_long, c_int};
212 use os::unix::raw::{gid_t, uid_t};
214 #[stable(feature = "raw_ext", since = "1.1.0")] pub type blkcnt_t = i64;
215 #[stable(feature = "raw_ext", since = "1.1.0")] pub type blksize_t = i64;
216 #[stable(feature = "raw_ext", since = "1.1.0")] pub type ino_t = u64;
217 #[stable(feature = "raw_ext", since = "1.1.0")] pub type nlink_t = u64;
218 #[stable(feature = "raw_ext", since = "1.1.0")] pub type off_t = i64;
219 #[stable(feature = "raw_ext", since = "1.1.0")] pub type time_t = i64;
223 #[stable(feature = "raw_ext", since = "1.1.0")]
225 #[stable(feature = "raw_ext", since = "1.1.0")]
227 #[stable(feature = "raw_ext", since = "1.1.0")]
229 #[stable(feature = "raw_ext", since = "1.1.0")]
230 pub st_nlink: nlink_t,
231 #[stable(feature = "raw_ext", since = "1.1.0")]
233 #[stable(feature = "raw_ext", since = "1.1.0")]
235 #[stable(feature = "raw_ext", since = "1.1.0")]
237 #[stable(feature = "raw_ext", since = "1.1.0")]
239 #[stable(feature = "raw_ext", since = "1.1.0")]
241 #[stable(feature = "raw_ext", since = "1.1.0")]
243 #[stable(feature = "raw_ext", since = "1.1.0")]
244 pub st_blksize: blksize_t,
245 #[stable(feature = "raw_ext", since = "1.1.0")]
246 pub st_blocks: blkcnt_t,
247 #[stable(feature = "raw_ext", since = "1.1.0")]
248 pub st_atime: time_t,
249 #[stable(feature = "raw_ext", since = "1.1.0")]
250 pub st_atime_nsec: c_long,
251 #[stable(feature = "raw_ext", since = "1.1.0")]
252 pub st_mtime: time_t,
253 #[stable(feature = "raw_ext", since = "1.1.0")]
254 pub st_mtime_nsec: c_long,
255 #[stable(feature = "raw_ext", since = "1.1.0")]
256 pub st_ctime: time_t,
257 #[stable(feature = "raw_ext", since = "1.1.0")]
258 pub st_ctime_nsec: c_long,
259 #[stable(feature = "raw_ext", since = "1.1.0")]
260 pub __unused: [c_long; 3],