1 //! Linux-specific raw type definitions.
3 #![stable(feature = "raw_ext", since = "1.1.0")]
6 reason = "these type aliases are no longer supported by \
7 the standard library, the `libc` crate on \
8 crates.io should be used instead for the correct \
12 #![allow(missing_debug_implementations)]
14 use crate::os::raw::c_ulong;
16 #[stable(feature = "raw_ext", since = "1.1.0")]
18 #[stable(feature = "raw_ext", since = "1.1.0")]
19 pub type mode_t = u32;
21 #[stable(feature = "pthread_t", since = "1.8.0")]
22 pub type pthread_t = c_ulong;
25 #[stable(feature = "raw_ext", since = "1.1.0")]
26 pub use self::arch::{blkcnt_t, blksize_t, ino_t, nlink_t, off_t, stat, time_t};
31 target_arch = "powerpc",
32 target_arch = "sparc",
34 target_arch = "asmjs",
35 target_arch = "wasm32"
38 use crate::os::raw::{c_long, c_short, c_uint};
40 #[stable(feature = "raw_ext", since = "1.1.0")]
41 pub type blkcnt_t = u64;
42 #[stable(feature = "raw_ext", since = "1.1.0")]
43 pub type blksize_t = u64;
44 #[stable(feature = "raw_ext", since = "1.1.0")]
46 #[stable(feature = "raw_ext", since = "1.1.0")]
47 pub type nlink_t = u64;
48 #[stable(feature = "raw_ext", since = "1.1.0")]
50 #[stable(feature = "raw_ext", since = "1.1.0")]
51 pub type time_t = i64;
55 #[stable(feature = "raw_ext", since = "1.1.0")]
57 #[stable(feature = "raw_ext", since = "1.1.0")]
59 #[stable(feature = "raw_ext", since = "1.1.0")]
61 #[stable(feature = "raw_ext", since = "1.1.0")]
63 #[stable(feature = "raw_ext", since = "1.1.0")]
65 #[stable(feature = "raw_ext", since = "1.1.0")]
67 #[stable(feature = "raw_ext", since = "1.1.0")]
69 #[stable(feature = "raw_ext", since = "1.1.0")]
71 #[stable(feature = "raw_ext", since = "1.1.0")]
73 #[stable(feature = "raw_ext", since = "1.1.0")]
75 #[stable(feature = "raw_ext", since = "1.1.0")]
77 #[stable(feature = "raw_ext", since = "1.1.0")]
79 #[stable(feature = "raw_ext", since = "1.1.0")]
81 #[stable(feature = "raw_ext", since = "1.1.0")]
83 #[stable(feature = "raw_ext", since = "1.1.0")]
84 pub st_atime_nsec: c_long,
85 #[stable(feature = "raw_ext", since = "1.1.0")]
87 #[stable(feature = "raw_ext", since = "1.1.0")]
88 pub st_mtime_nsec: c_long,
89 #[stable(feature = "raw_ext", since = "1.1.0")]
91 #[stable(feature = "raw_ext", since = "1.1.0")]
92 pub st_ctime_nsec: c_long,
93 #[stable(feature = "raw_ext", since = "1.1.0")]
98 #[cfg(target_arch = "mips")]
100 use crate::os::raw::{c_long, c_ulong};
102 #[cfg(target_env = "musl")]
103 #[stable(feature = "raw_ext", since = "1.1.0")]
104 pub type blkcnt_t = i64;
105 #[cfg(not(target_env = "musl"))]
106 #[stable(feature = "raw_ext", since = "1.1.0")]
107 pub type blkcnt_t = u64;
108 #[stable(feature = "raw_ext", since = "1.1.0")]
109 pub type blksize_t = u64;
110 #[cfg(target_env = "musl")]
111 #[stable(feature = "raw_ext", since = "1.1.0")]
112 pub type ino_t = u64;
113 #[cfg(not(target_env = "musl"))]
114 #[stable(feature = "raw_ext", since = "1.1.0")]
115 pub type ino_t = u64;
116 #[stable(feature = "raw_ext", since = "1.1.0")]
117 pub type nlink_t = u64;
118 #[cfg(target_env = "musl")]
119 #[stable(feature = "raw_ext", since = "1.1.0")]
120 pub type off_t = u64;
121 #[cfg(not(target_env = "musl"))]
122 #[stable(feature = "raw_ext", since = "1.1.0")]
123 pub type off_t = u64;
124 #[stable(feature = "raw_ext", since = "1.1.0")]
125 pub type time_t = i64;
129 #[stable(feature = "raw_ext", since = "1.1.0")]
131 #[stable(feature = "raw_ext", since = "1.1.0")]
133 #[stable(feature = "raw_ext", since = "1.1.0")]
134 pub st_pad1: [c_long; 3],
135 #[stable(feature = "raw_ext", since = "1.1.0")]
137 #[stable(feature = "raw_ext", since = "1.1.0")]
139 #[stable(feature = "raw_ext", since = "1.1.0")]
141 #[stable(feature = "raw_ext", since = "1.1.0")]
143 #[stable(feature = "raw_ext", since = "1.1.0")]
145 #[stable(feature = "raw_ext", since = "1.1.0")]
146 pub st_rdev: c_ulong,
147 #[stable(feature = "raw_ext", since = "1.1.0")]
148 pub st_pad2: [c_long; 2],
149 #[stable(feature = "raw_ext", since = "1.1.0")]
151 #[stable(feature = "raw_ext", since = "1.1.0")]
153 #[stable(feature = "raw_ext", since = "1.1.0")]
154 pub st_atime_nsec: c_long,
155 #[stable(feature = "raw_ext", since = "1.1.0")]
157 #[stable(feature = "raw_ext", since = "1.1.0")]
158 pub st_mtime_nsec: c_long,
159 #[stable(feature = "raw_ext", since = "1.1.0")]
161 #[stable(feature = "raw_ext", since = "1.1.0")]
162 pub st_ctime_nsec: c_long,
163 #[stable(feature = "raw_ext", since = "1.1.0")]
165 #[stable(feature = "raw_ext", since = "1.1.0")]
167 #[stable(feature = "raw_ext", since = "1.1.0")]
168 pub st_pad5: [c_long; 14],
172 #[cfg(target_arch = "hexagon")]
174 use crate::os::raw::{c_int, c_long, c_uint};
176 #[stable(feature = "raw_ext", since = "1.1.0")]
177 pub type blkcnt_t = i64;
178 #[stable(feature = "raw_ext", since = "1.1.0")]
179 pub type blksize_t = c_long;
180 #[stable(feature = "raw_ext", since = "1.1.0")]
181 pub type ino_t = u64;
182 #[stable(feature = "raw_ext", since = "1.1.0")]
183 pub type nlink_t = c_uint;
184 #[stable(feature = "raw_ext", since = "1.1.0")]
185 pub type off_t = i64;
186 #[stable(feature = "raw_ext", since = "1.1.0")]
187 pub type time_t = i64;
191 #[stable(feature = "raw_ext", since = "1.1.0")]
193 #[stable(feature = "raw_ext", since = "1.1.0")]
195 #[stable(feature = "raw_ext", since = "1.1.0")]
197 #[stable(feature = "raw_ext", since = "1.1.0")]
199 #[stable(feature = "raw_ext", since = "1.1.0")]
201 #[stable(feature = "raw_ext", since = "1.1.0")]
203 #[stable(feature = "raw_ext", since = "1.1.0")]
205 #[stable(feature = "raw_ext", since = "1.1.0")]
207 #[stable(feature = "raw_ext", since = "1.1.0")]
209 #[stable(feature = "raw_ext", since = "1.1.0")]
211 #[stable(feature = "raw_ext", since = "1.1.0")]
213 #[stable(feature = "raw_ext", since = "1.1.0")]
215 #[stable(feature = "raw_ext", since = "1.1.0")]
217 #[stable(feature = "raw_ext", since = "1.1.0")]
219 #[stable(feature = "raw_ext", since = "1.1.0")]
220 pub st_atime_nsec: c_long,
221 #[stable(feature = "raw_ext", since = "1.1.0")]
223 #[stable(feature = "raw_ext", since = "1.1.0")]
224 pub st_mtime_nsec: c_long,
225 #[stable(feature = "raw_ext", since = "1.1.0")]
227 #[stable(feature = "raw_ext", since = "1.1.0")]
228 pub st_ctime_nsec: c_long,
229 #[stable(feature = "raw_ext", since = "1.1.0")]
230 pub __pad3: [c_int; 2],
235 target_arch = "mips64",
236 target_arch = "s390x",
237 target_arch = "sparc64",
238 target_arch = "riscv64",
239 target_arch = "riscv32"
242 pub use libc::{blkcnt_t, blksize_t, ino_t, nlink_t, off_t, stat, time_t};
245 #[cfg(target_arch = "aarch64")]
247 use crate::os::raw::{c_int, c_long};
249 #[stable(feature = "raw_ext", since = "1.1.0")]
250 pub type blkcnt_t = i64;
251 #[stable(feature = "raw_ext", since = "1.1.0")]
252 pub type blksize_t = i32;
253 #[stable(feature = "raw_ext", since = "1.1.0")]
254 pub type ino_t = u64;
255 #[stable(feature = "raw_ext", since = "1.1.0")]
256 pub type nlink_t = u32;
257 #[stable(feature = "raw_ext", since = "1.1.0")]
258 pub type off_t = i64;
259 #[stable(feature = "raw_ext", since = "1.1.0")]
260 pub type time_t = c_long;
264 #[stable(feature = "raw_ext", since = "1.1.0")]
266 #[stable(feature = "raw_ext", since = "1.1.0")]
268 #[stable(feature = "raw_ext", since = "1.1.0")]
270 #[stable(feature = "raw_ext", since = "1.1.0")]
272 #[stable(feature = "raw_ext", since = "1.1.0")]
274 #[stable(feature = "raw_ext", since = "1.1.0")]
276 #[stable(feature = "raw_ext", since = "1.1.0")]
278 #[stable(feature = "raw_ext", since = "1.1.0")]
280 #[stable(feature = "raw_ext", since = "1.1.0")]
282 #[stable(feature = "raw_ext", since = "1.1.0")]
284 #[stable(feature = "raw_ext", since = "1.1.0")]
286 #[stable(feature = "raw_ext", since = "1.1.0")]
288 #[stable(feature = "raw_ext", since = "1.1.0")]
290 #[stable(feature = "raw_ext", since = "1.1.0")]
291 pub st_atime: time_t,
292 #[stable(feature = "raw_ext", since = "1.1.0")]
293 pub st_atime_nsec: c_long,
294 #[stable(feature = "raw_ext", since = "1.1.0")]
295 pub st_mtime: time_t,
296 #[stable(feature = "raw_ext", since = "1.1.0")]
297 pub st_mtime_nsec: c_long,
298 #[stable(feature = "raw_ext", since = "1.1.0")]
299 pub st_ctime: time_t,
300 #[stable(feature = "raw_ext", since = "1.1.0")]
301 pub st_ctime_nsec: c_long,
302 #[stable(feature = "raw_ext", since = "1.1.0")]
303 pub __unused: [c_int; 2],
307 #[cfg(any(target_arch = "x86_64", target_arch = "powerpc64"))]
309 use crate::os::raw::{c_int, c_long};
311 #[stable(feature = "raw_ext", since = "1.1.0")]
312 pub type blkcnt_t = u64;
313 #[stable(feature = "raw_ext", since = "1.1.0")]
314 pub type blksize_t = u64;
315 #[stable(feature = "raw_ext", since = "1.1.0")]
316 pub type ino_t = u64;
317 #[stable(feature = "raw_ext", since = "1.1.0")]
318 pub type nlink_t = u64;
319 #[stable(feature = "raw_ext", since = "1.1.0")]
320 pub type off_t = u64;
321 #[stable(feature = "raw_ext", since = "1.1.0")]
322 pub type time_t = i64;
326 #[stable(feature = "raw_ext", since = "1.1.0")]
328 #[stable(feature = "raw_ext", since = "1.1.0")]
330 #[stable(feature = "raw_ext", since = "1.1.0")]
332 #[stable(feature = "raw_ext", since = "1.1.0")]
334 #[stable(feature = "raw_ext", since = "1.1.0")]
336 #[stable(feature = "raw_ext", since = "1.1.0")]
338 #[stable(feature = "raw_ext", since = "1.1.0")]
340 #[stable(feature = "raw_ext", since = "1.1.0")]
342 #[stable(feature = "raw_ext", since = "1.1.0")]
344 #[stable(feature = "raw_ext", since = "1.1.0")]
346 #[stable(feature = "raw_ext", since = "1.1.0")]
348 #[stable(feature = "raw_ext", since = "1.1.0")]
350 #[stable(feature = "raw_ext", since = "1.1.0")]
352 #[stable(feature = "raw_ext", since = "1.1.0")]
353 pub st_atime_nsec: c_long,
354 #[stable(feature = "raw_ext", since = "1.1.0")]
356 #[stable(feature = "raw_ext", since = "1.1.0")]
357 pub st_mtime_nsec: c_long,
358 #[stable(feature = "raw_ext", since = "1.1.0")]
360 #[stable(feature = "raw_ext", since = "1.1.0")]
361 pub st_ctime_nsec: c_long,
362 #[stable(feature = "raw_ext", since = "1.1.0")]
363 pub __unused: [c_long; 3],