1 //! Linux-specific raw type definitions.
3 #![stable(feature = "raw_ext", since = "1.1.0")]
6 note
= "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 \
13 use crate::os
::raw
::c_ulong
;
15 #[stable(feature = "raw_ext", since = "1.1.0")]
17 #[stable(feature = "raw_ext", since = "1.1.0")]
18 pub type mode_t
= u32;
20 #[stable(feature = "pthread_t", since = "1.8.0")]
21 pub type pthread_t
= c_ulong
;
24 #[stable(feature = "raw_ext", since = "1.1.0")]
25 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 #[stable(feature = "raw_ext", since = "1.1.0")]
243 pub use libc
::{blkcnt_t, blksize_t, ino_t, nlink_t, off_t, stat, time_t}
;
246 #[cfg(target_arch = "aarch64")]
248 use crate::os
::raw
::{c_int, c_long}
;
250 #[stable(feature = "raw_ext", since = "1.1.0")]
251 pub type blkcnt_t
= i64;
252 #[stable(feature = "raw_ext", since = "1.1.0")]
253 pub type blksize_t
= i32;
254 #[stable(feature = "raw_ext", since = "1.1.0")]
255 pub type ino_t
= u64;
256 #[stable(feature = "raw_ext", since = "1.1.0")]
257 pub type nlink_t
= u32;
258 #[stable(feature = "raw_ext", since = "1.1.0")]
259 pub type off_t
= i64;
260 #[stable(feature = "raw_ext", since = "1.1.0")]
261 pub type time_t
= c_long
;
265 #[stable(feature = "raw_ext", since = "1.1.0")]
267 #[stable(feature = "raw_ext", since = "1.1.0")]
269 #[stable(feature = "raw_ext", since = "1.1.0")]
271 #[stable(feature = "raw_ext", since = "1.1.0")]
273 #[stable(feature = "raw_ext", since = "1.1.0")]
275 #[stable(feature = "raw_ext", since = "1.1.0")]
277 #[stable(feature = "raw_ext", since = "1.1.0")]
279 #[stable(feature = "raw_ext", since = "1.1.0")]
281 #[stable(feature = "raw_ext", since = "1.1.0")]
283 #[stable(feature = "raw_ext", since = "1.1.0")]
285 #[stable(feature = "raw_ext", since = "1.1.0")]
287 #[stable(feature = "raw_ext", since = "1.1.0")]
289 #[stable(feature = "raw_ext", since = "1.1.0")]
291 #[stable(feature = "raw_ext", since = "1.1.0")]
292 pub st_atime
: time_t
,
293 #[stable(feature = "raw_ext", since = "1.1.0")]
294 pub st_atime_nsec
: c_long
,
295 #[stable(feature = "raw_ext", since = "1.1.0")]
296 pub st_mtime
: time_t
,
297 #[stable(feature = "raw_ext", since = "1.1.0")]
298 pub st_mtime_nsec
: c_long
,
299 #[stable(feature = "raw_ext", since = "1.1.0")]
300 pub st_ctime
: time_t
,
301 #[stable(feature = "raw_ext", since = "1.1.0")]
302 pub st_ctime_nsec
: c_long
,
303 #[stable(feature = "raw_ext", since = "1.1.0")]
304 pub __unused
: [c_int
; 2],
308 #[cfg(any(target_arch = "x86_64", target_arch = "powerpc64"))]
310 use crate::os
::raw
::{c_int, c_long}
;
312 #[stable(feature = "raw_ext", since = "1.1.0")]
313 pub type blkcnt_t
= u64;
314 #[stable(feature = "raw_ext", since = "1.1.0")]
315 pub type blksize_t
= u64;
316 #[stable(feature = "raw_ext", since = "1.1.0")]
317 pub type ino_t
= u64;
318 #[stable(feature = "raw_ext", since = "1.1.0")]
319 pub type nlink_t
= u64;
320 #[stable(feature = "raw_ext", since = "1.1.0")]
321 pub type off_t
= u64;
322 #[stable(feature = "raw_ext", since = "1.1.0")]
323 pub type time_t
= i64;
327 #[stable(feature = "raw_ext", since = "1.1.0")]
329 #[stable(feature = "raw_ext", since = "1.1.0")]
331 #[stable(feature = "raw_ext", since = "1.1.0")]
333 #[stable(feature = "raw_ext", since = "1.1.0")]
335 #[stable(feature = "raw_ext", since = "1.1.0")]
337 #[stable(feature = "raw_ext", since = "1.1.0")]
339 #[stable(feature = "raw_ext", since = "1.1.0")]
341 #[stable(feature = "raw_ext", since = "1.1.0")]
343 #[stable(feature = "raw_ext", since = "1.1.0")]
345 #[stable(feature = "raw_ext", since = "1.1.0")]
347 #[stable(feature = "raw_ext", since = "1.1.0")]
349 #[stable(feature = "raw_ext", since = "1.1.0")]
351 #[stable(feature = "raw_ext", since = "1.1.0")]
353 #[stable(feature = "raw_ext", since = "1.1.0")]
354 pub st_atime_nsec
: c_long
,
355 #[stable(feature = "raw_ext", since = "1.1.0")]
357 #[stable(feature = "raw_ext", since = "1.1.0")]
358 pub st_mtime_nsec
: c_long
,
359 #[stable(feature = "raw_ext", since = "1.1.0")]
361 #[stable(feature = "raw_ext", since = "1.1.0")]
362 pub st_ctime_nsec
: c_long
,
363 #[stable(feature = "raw_ext", since = "1.1.0")]
364 pub __unused
: [c_long
; 3],