]> git.lizzy.rs Git - rust.git/blob - library/std/src/os/fuchsia/raw.rs
Test drop_tracking_mir before querying generator.
[rust.git] / library / std / src / os / fuchsia / raw.rs
1 //! Fuchsia-specific raw type definitions
2
3 #![stable(feature = "raw_ext", since = "1.1.0")]
4 #![deprecated(
5     since = "1.8.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 \
9             definitions"
10 )]
11 #![allow(deprecated)]
12
13 use crate::os::raw::c_ulong;
14
15 #[stable(feature = "raw_ext", since = "1.1.0")]
16 pub type dev_t = u64;
17 #[stable(feature = "raw_ext", since = "1.1.0")]
18 pub type mode_t = u32;
19
20 #[stable(feature = "pthread_t", since = "1.8.0")]
21 pub type pthread_t = c_ulong;
22
23 #[doc(inline)]
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};
26
27 #[cfg(any(
28     target_arch = "x86",
29     target_arch = "le32",
30     target_arch = "powerpc",
31     target_arch = "arm"
32 ))]
33 mod arch {
34     use crate::os::raw::{c_long, c_short, c_uint};
35
36     #[stable(feature = "raw_ext", since = "1.1.0")]
37     pub type blkcnt_t = u64;
38     #[stable(feature = "raw_ext", since = "1.1.0")]
39     pub type blksize_t = u64;
40     #[stable(feature = "raw_ext", since = "1.1.0")]
41     pub type ino_t = u64;
42     #[stable(feature = "raw_ext", since = "1.1.0")]
43     pub type nlink_t = u64;
44     #[stable(feature = "raw_ext", since = "1.1.0")]
45     pub type off_t = u64;
46     #[stable(feature = "raw_ext", since = "1.1.0")]
47     pub type time_t = i64;
48
49     #[repr(C)]
50     #[derive(Clone)]
51     #[stable(feature = "raw_ext", since = "1.1.0")]
52     pub struct stat {
53         #[stable(feature = "raw_ext", since = "1.1.0")]
54         pub st_dev: u64,
55         #[stable(feature = "raw_ext", since = "1.1.0")]
56         pub __pad1: c_short,
57         #[stable(feature = "raw_ext", since = "1.1.0")]
58         pub __st_ino: u32,
59         #[stable(feature = "raw_ext", since = "1.1.0")]
60         pub st_mode: u32,
61         #[stable(feature = "raw_ext", since = "1.1.0")]
62         pub st_nlink: u32,
63         #[stable(feature = "raw_ext", since = "1.1.0")]
64         pub st_uid: u32,
65         #[stable(feature = "raw_ext", since = "1.1.0")]
66         pub st_gid: u32,
67         #[stable(feature = "raw_ext", since = "1.1.0")]
68         pub st_rdev: u64,
69         #[stable(feature = "raw_ext", since = "1.1.0")]
70         pub __pad2: c_uint,
71         #[stable(feature = "raw_ext", since = "1.1.0")]
72         pub st_size: i64,
73         #[stable(feature = "raw_ext", since = "1.1.0")]
74         pub st_blksize: i32,
75         #[stable(feature = "raw_ext", since = "1.1.0")]
76         pub st_blocks: i64,
77         #[stable(feature = "raw_ext", since = "1.1.0")]
78         pub st_atime: i32,
79         #[stable(feature = "raw_ext", since = "1.1.0")]
80         pub st_atime_nsec: c_long,
81         #[stable(feature = "raw_ext", since = "1.1.0")]
82         pub st_mtime: i32,
83         #[stable(feature = "raw_ext", since = "1.1.0")]
84         pub st_mtime_nsec: c_long,
85         #[stable(feature = "raw_ext", since = "1.1.0")]
86         pub st_ctime: i32,
87         #[stable(feature = "raw_ext", since = "1.1.0")]
88         pub st_ctime_nsec: c_long,
89         #[stable(feature = "raw_ext", since = "1.1.0")]
90         pub st_ino: u64,
91     }
92 }
93
94 #[cfg(target_arch = "mips")]
95 mod arch {
96     use crate::os::raw::{c_long, c_ulong};
97
98     #[cfg(target_env = "musl")]
99     #[stable(feature = "raw_ext", since = "1.1.0")]
100     pub type blkcnt_t = i64;
101     #[cfg(not(target_env = "musl"))]
102     #[stable(feature = "raw_ext", since = "1.1.0")]
103     pub type blkcnt_t = u64;
104     #[stable(feature = "raw_ext", since = "1.1.0")]
105     pub type blksize_t = u64;
106     #[cfg(target_env = "musl")]
107     #[stable(feature = "raw_ext", since = "1.1.0")]
108     pub type ino_t = u64;
109     #[cfg(not(target_env = "musl"))]
110     #[stable(feature = "raw_ext", since = "1.1.0")]
111     pub type ino_t = u64;
112     #[stable(feature = "raw_ext", since = "1.1.0")]
113     pub type nlink_t = u64;
114     #[cfg(target_env = "musl")]
115     #[stable(feature = "raw_ext", since = "1.1.0")]
116     pub type off_t = u64;
117     #[cfg(not(target_env = "musl"))]
118     #[stable(feature = "raw_ext", since = "1.1.0")]
119     pub type off_t = u64;
120     #[stable(feature = "raw_ext", since = "1.1.0")]
121     pub type time_t = i64;
122
123     #[repr(C)]
124     #[derive(Clone)]
125     #[stable(feature = "raw_ext", since = "1.1.0")]
126     pub struct stat {
127         #[stable(feature = "raw_ext", since = "1.1.0")]
128         pub st_dev: c_ulong,
129         #[stable(feature = "raw_ext", since = "1.1.0")]
130         pub st_pad1: [c_long; 3],
131         #[stable(feature = "raw_ext", since = "1.1.0")]
132         pub st_ino: u64,
133         #[stable(feature = "raw_ext", since = "1.1.0")]
134         pub st_mode: u32,
135         #[stable(feature = "raw_ext", since = "1.1.0")]
136         pub st_nlink: u32,
137         #[stable(feature = "raw_ext", since = "1.1.0")]
138         pub st_uid: u32,
139         #[stable(feature = "raw_ext", since = "1.1.0")]
140         pub st_gid: u32,
141         #[stable(feature = "raw_ext", since = "1.1.0")]
142         pub st_rdev: c_ulong,
143         #[stable(feature = "raw_ext", since = "1.1.0")]
144         pub st_pad2: [c_long; 2],
145         #[stable(feature = "raw_ext", since = "1.1.0")]
146         pub st_size: i64,
147         #[stable(feature = "raw_ext", since = "1.1.0")]
148         pub st_atime: i32,
149         #[stable(feature = "raw_ext", since = "1.1.0")]
150         pub st_atime_nsec: c_long,
151         #[stable(feature = "raw_ext", since = "1.1.0")]
152         pub st_mtime: i32,
153         #[stable(feature = "raw_ext", since = "1.1.0")]
154         pub st_mtime_nsec: c_long,
155         #[stable(feature = "raw_ext", since = "1.1.0")]
156         pub st_ctime: i32,
157         #[stable(feature = "raw_ext", since = "1.1.0")]
158         pub st_ctime_nsec: c_long,
159         #[stable(feature = "raw_ext", since = "1.1.0")]
160         pub st_blksize: i32,
161         #[stable(feature = "raw_ext", since = "1.1.0")]
162         pub st_blocks: i64,
163         #[stable(feature = "raw_ext", since = "1.1.0")]
164         pub st_pad5: [c_long; 14],
165     }
166 }
167
168 #[cfg(target_arch = "mips64")]
169 mod arch {
170     pub use libc::{blkcnt_t, blksize_t, ino_t, nlink_t, off_t, stat, time_t};
171 }
172
173 #[cfg(target_arch = "aarch64")]
174 mod arch {
175     use crate::os::raw::{c_int, c_long};
176
177     #[stable(feature = "raw_ext", since = "1.1.0")]
178     pub type blkcnt_t = u64;
179     #[stable(feature = "raw_ext", since = "1.1.0")]
180     pub type blksize_t = u64;
181     #[stable(feature = "raw_ext", since = "1.1.0")]
182     pub type ino_t = u64;
183     #[stable(feature = "raw_ext", since = "1.1.0")]
184     pub type nlink_t = u64;
185     #[stable(feature = "raw_ext", since = "1.1.0")]
186     pub type off_t = u64;
187     #[stable(feature = "raw_ext", since = "1.1.0")]
188     pub type time_t = i64;
189
190     #[repr(C)]
191     #[derive(Clone)]
192     #[stable(feature = "raw_ext", since = "1.1.0")]
193     pub struct stat {
194         #[stable(feature = "raw_ext", since = "1.1.0")]
195         pub st_dev: u64,
196         #[stable(feature = "raw_ext", since = "1.1.0")]
197         pub st_ino: u64,
198         #[stable(feature = "raw_ext", since = "1.1.0")]
199         pub st_mode: u32,
200         #[stable(feature = "raw_ext", since = "1.1.0")]
201         pub st_nlink: u32,
202         #[stable(feature = "raw_ext", since = "1.1.0")]
203         pub st_uid: u32,
204         #[stable(feature = "raw_ext", since = "1.1.0")]
205         pub st_gid: u32,
206         #[stable(feature = "raw_ext", since = "1.1.0")]
207         pub st_rdev: u64,
208         #[stable(feature = "raw_ext", since = "1.1.0")]
209         pub __pad1: u64,
210         #[stable(feature = "raw_ext", since = "1.1.0")]
211         pub st_size: i64,
212         #[stable(feature = "raw_ext", since = "1.1.0")]
213         pub st_blksize: i32,
214         #[stable(feature = "raw_ext", since = "1.1.0")]
215         pub __pad2: c_int,
216         #[stable(feature = "raw_ext", since = "1.1.0")]
217         pub st_blocks: i64,
218         #[stable(feature = "raw_ext", since = "1.1.0")]
219         pub st_atime: i64,
220         #[stable(feature = "raw_ext", since = "1.1.0")]
221         pub st_atime_nsec: c_long,
222         #[stable(feature = "raw_ext", since = "1.1.0")]
223         pub st_mtime: i64,
224         #[stable(feature = "raw_ext", since = "1.1.0")]
225         pub st_mtime_nsec: c_long,
226         #[stable(feature = "raw_ext", since = "1.1.0")]
227         pub st_ctime: i64,
228         #[stable(feature = "raw_ext", since = "1.1.0")]
229         pub st_ctime_nsec: c_long,
230         #[stable(feature = "raw_ext", since = "1.1.0")]
231         pub __unused: [c_int; 2],
232     }
233 }
234
235 #[cfg(target_arch = "x86_64")]
236 mod arch {
237     use crate::os::raw::{c_int, c_long};
238
239     #[stable(feature = "raw_ext", since = "1.1.0")]
240     pub type blkcnt_t = u64;
241     #[stable(feature = "raw_ext", since = "1.1.0")]
242     pub type blksize_t = u64;
243     #[stable(feature = "raw_ext", since = "1.1.0")]
244     pub type ino_t = u64;
245     #[stable(feature = "raw_ext", since = "1.1.0")]
246     pub type nlink_t = u64;
247     #[stable(feature = "raw_ext", since = "1.1.0")]
248     pub type off_t = u64;
249     #[stable(feature = "raw_ext", since = "1.1.0")]
250     pub type time_t = i64;
251
252     #[repr(C)]
253     #[derive(Clone)]
254     #[stable(feature = "raw_ext", since = "1.1.0")]
255     pub struct stat {
256         #[stable(feature = "raw_ext", since = "1.1.0")]
257         pub st_dev: u64,
258         #[stable(feature = "raw_ext", since = "1.1.0")]
259         pub st_ino: u64,
260         #[stable(feature = "raw_ext", since = "1.1.0")]
261         pub st_nlink: u64,
262         #[stable(feature = "raw_ext", since = "1.1.0")]
263         pub st_mode: u32,
264         #[stable(feature = "raw_ext", since = "1.1.0")]
265         pub st_uid: u32,
266         #[stable(feature = "raw_ext", since = "1.1.0")]
267         pub st_gid: u32,
268         #[stable(feature = "raw_ext", since = "1.1.0")]
269         pub __pad0: c_int,
270         #[stable(feature = "raw_ext", since = "1.1.0")]
271         pub st_rdev: u64,
272         #[stable(feature = "raw_ext", since = "1.1.0")]
273         pub st_size: i64,
274         #[stable(feature = "raw_ext", since = "1.1.0")]
275         pub st_blksize: i64,
276         #[stable(feature = "raw_ext", since = "1.1.0")]
277         pub st_blocks: i64,
278         #[stable(feature = "raw_ext", since = "1.1.0")]
279         pub st_atime: i64,
280         #[stable(feature = "raw_ext", since = "1.1.0")]
281         pub st_atime_nsec: c_long,
282         #[stable(feature = "raw_ext", since = "1.1.0")]
283         pub st_mtime: i64,
284         #[stable(feature = "raw_ext", since = "1.1.0")]
285         pub st_mtime_nsec: c_long,
286         #[stable(feature = "raw_ext", since = "1.1.0")]
287         pub st_ctime: i64,
288         #[stable(feature = "raw_ext", since = "1.1.0")]
289         pub st_ctime_nsec: c_long,
290         #[stable(feature = "raw_ext", since = "1.1.0")]
291         pub __unused: [c_long; 3],
292     }
293 }