|
12 | 12 |
|
13 | 13 | #![stable(feature = "raw_ext", since = "1.1.0")]
|
14 | 14 |
|
| 15 | +#[stable(feature = "raw_ext", since = "1.1.0")] pub type time_t = i32; |
| 16 | +#[stable(feature = "raw_ext", since = "1.1.0")] pub type off_t = i32; |
15 | 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 ino_t = u32; |
| 19 | +#[stable(feature = "raw_ext", since = "1.1.0")] pub type pid_t = i32; |
| 20 | +#[stable(feature = "raw_ext", since = "1.1.0")] pub type uid_t = u32; |
| 21 | +#[stable(feature = "raw_ext", since = "1.1.0")] pub type gid_t = u32; |
16 | 22 | #[stable(feature = "raw_ext", since = "1.1.0")] pub type mode_t = u32;
|
17 |
| - |
18 |
| -pub use self::arch::{off_t, ino_t, nlink_t, blksize_t, blkcnt_t, stat, time_t}; |
19 |
| - |
20 |
| -#[cfg(any(target_arch = "x86", |
21 |
| - target_arch = "le32", |
22 |
| - target_arch = "powerpc", |
23 |
| - target_arch = "arm"))] |
24 |
| -mod arch { |
25 |
| - use super::{dev_t, mode_t}; |
26 |
| - use os::raw::{c_long, c_short}; |
27 |
| - use os::unix::raw::{gid_t, uid_t}; |
28 |
| - |
29 |
| - #[stable(feature = "raw_ext", since = "1.1.0")] pub type blkcnt_t = i32; |
30 |
| - #[stable(feature = "raw_ext", since = "1.1.0")] pub type blksize_t = i32; |
31 |
| - #[stable(feature = "raw_ext", since = "1.1.0")] pub type ino_t = u32; |
32 |
| - #[stable(feature = "raw_ext", since = "1.1.0")] pub type nlink_t = u32; |
33 |
| - #[stable(feature = "raw_ext", since = "1.1.0")] pub type off_t = i32; |
34 |
| - #[stable(feature = "raw_ext", since = "1.1.0")] pub type time_t = i32; |
35 |
| - |
36 |
| - #[repr(C)] |
37 |
| - #[derive(Clone)] |
38 |
| - #[stable(feature = "raw_ext", since = "1.1.0")] |
39 |
| - pub struct stat { |
40 |
| - #[stable(feature = "raw_ext", since = "1.1.0")] |
41 |
| - pub st_dev: dev_t, |
42 |
| - #[stable(feature = "raw_ext", since = "1.1.0")] |
43 |
| - pub __pad1: c_short, |
44 |
| - #[stable(feature = "raw_ext", since = "1.1.0")] |
45 |
| - pub st_ino: ino_t, |
46 |
| - #[stable(feature = "raw_ext", since = "1.1.0")] |
47 |
| - pub st_mode: mode_t, |
48 |
| - #[stable(feature = "raw_ext", since = "1.1.0")] |
49 |
| - pub st_nlink: nlink_t, |
50 |
| - #[stable(feature = "raw_ext", since = "1.1.0")] |
51 |
| - pub st_uid: uid_t, |
52 |
| - #[stable(feature = "raw_ext", since = "1.1.0")] |
53 |
| - pub st_gid: gid_t, |
54 |
| - #[stable(feature = "raw_ext", since = "1.1.0")] |
55 |
| - pub st_rdev: dev_t, |
56 |
| - #[stable(feature = "raw_ext", since = "1.1.0")] |
57 |
| - pub __pad2: c_short, |
58 |
| - #[stable(feature = "raw_ext", since = "1.1.0")] |
59 |
| - pub st_size: off_t, |
60 |
| - #[stable(feature = "raw_ext", since = "1.1.0")] |
61 |
| - pub st_blksize: blksize_t, |
62 |
| - #[stable(feature = "raw_ext", since = "1.1.0")] |
63 |
| - pub st_blocks: blkcnt_t, |
64 |
| - #[stable(feature = "raw_ext", since = "1.1.0")] |
65 |
| - pub st_atime: time_t, |
66 |
| - #[stable(feature = "raw_ext", since = "1.1.0")] |
67 |
| - pub st_atime_nsec: c_long, |
68 |
| - #[stable(feature = "raw_ext", since = "1.1.0")] |
69 |
| - pub st_mtime: time_t, |
70 |
| - #[stable(feature = "raw_ext", since = "1.1.0")] |
71 |
| - pub st_mtime_nsec: c_long, |
72 |
| - #[stable(feature = "raw_ext", since = "1.1.0")] |
73 |
| - pub st_ctime: time_t, |
74 |
| - #[stable(feature = "raw_ext", since = "1.1.0")] |
75 |
| - pub st_ctime_nsec: c_long, |
76 |
| - #[stable(feature = "raw_ext", since = "1.1.0")] |
77 |
| - pub __unused4: c_long, |
78 |
| - #[stable(feature = "raw_ext", since = "1.1.0")] |
79 |
| - pub __unused5: c_long, |
80 |
| - } |
81 |
| -} |
82 |
| - |
83 |
| -#[cfg(any(target_arch = "mips", |
84 |
| - target_arch = "mipsel"))] |
85 |
| -mod arch { |
86 |
| - use super::{dev_t, mode_t}; |
87 |
| - use os::raw::c_long; |
88 |
| - use os::unix::raw::{gid_t, uid_t}; |
89 |
| - |
90 |
| - #[stable(feature = "raw_ext", since = "1.1.0")] pub type blkcnt_t = i32; |
91 |
| - #[stable(feature = "raw_ext", since = "1.1.0")] pub type blksize_t = i32; |
92 |
| - #[stable(feature = "raw_ext", since = "1.1.0")] pub type ino_t = u32; |
93 |
| - #[stable(feature = "raw_ext", since = "1.1.0")] pub type nlink_t = u32; |
94 |
| - #[stable(feature = "raw_ext", since = "1.1.0")] pub type off_t = i32; |
95 |
| - #[stable(feature = "raw_ext", since = "1.1.0")] pub type time_t = i32; |
96 |
| - |
97 |
| - #[repr(C)] |
98 |
| - #[derive(Clone)] |
99 |
| - #[stable(feature = "raw_ext", since = "1.1.0")] |
100 |
| - pub struct stat { |
101 |
| - #[stable(feature = "raw_ext", since = "1.1.0")] |
102 |
| - pub st_dev: c_ulong, |
103 |
| - #[stable(feature = "raw_ext", since = "1.1.0")] |
104 |
| - pub st_pad1: [c_long; 3], |
105 |
| - #[stable(feature = "raw_ext", since = "1.1.0")] |
106 |
| - pub st_ino: ino_t, |
107 |
| - #[stable(feature = "raw_ext", since = "1.1.0")] |
108 |
| - pub st_mode: mode_t, |
109 |
| - #[stable(feature = "raw_ext", since = "1.1.0")] |
110 |
| - pub st_nlink: nlink_t, |
111 |
| - #[stable(feature = "raw_ext", since = "1.1.0")] |
112 |
| - pub st_uid: uid_t, |
113 |
| - #[stable(feature = "raw_ext", since = "1.1.0")] |
114 |
| - pub st_gid: gid_t, |
115 |
| - #[stable(feature = "raw_ext", since = "1.1.0")] |
116 |
| - pub st_rdev: c_ulong, |
117 |
| - #[stable(feature = "raw_ext", since = "1.1.0")] |
118 |
| - pub st_pad2: [c_long; 2], |
119 |
| - #[stable(feature = "raw_ext", since = "1.1.0")] |
120 |
| - pub st_size: off_t, |
121 |
| - #[stable(feature = "raw_ext", since = "1.1.0")] |
122 |
| - pub st_pad3: c_long, |
123 |
| - #[stable(feature = "raw_ext", since = "1.1.0")] |
124 |
| - pub st_atime: time_t, |
125 |
| - #[stable(feature = "raw_ext", since = "1.1.0")] |
126 |
| - pub st_atime_nsec: c_long, |
127 |
| - #[stable(feature = "raw_ext", since = "1.1.0")] |
128 |
| - pub st_mtime: time_t, |
129 |
| - #[stable(feature = "raw_ext", since = "1.1.0")] |
130 |
| - pub st_mtime_nsec: c_long, |
131 |
| - #[stable(feature = "raw_ext", since = "1.1.0")] |
132 |
| - pub st_ctime: time_t, |
133 |
| - #[stable(feature = "raw_ext", since = "1.1.0")] |
134 |
| - pub st_ctime_nsec: c_long, |
135 |
| - #[stable(feature = "raw_ext", since = "1.1.0")] |
136 |
| - pub st_blksize: blksize_t, |
137 |
| - #[stable(feature = "raw_ext", since = "1.1.0")] |
138 |
| - pub st_blocks: blkcnt_t, |
139 |
| - #[stable(feature = "raw_ext", since = "1.1.0")] |
140 |
| - pub st_pad5: [c_long; 14], |
141 |
| - } |
142 |
| -} |
143 |
| - |
144 |
| -#[cfg(target_arch = "aarch64")] |
145 |
| -mod arch { |
146 |
| - use super::{dev_t, mode_t}; |
147 |
| - use os::raw::{c_long, c_int}; |
148 |
| - use os::unix::raw::{gid_t, uid_t}; |
149 |
| - |
150 |
| - #[stable(feature = "raw_ext", since = "1.1.0")] pub type blkcnt_t = i64; |
151 |
| - #[stable(feature = "raw_ext", since = "1.1.0")] pub type blksize_t = i32; |
152 |
| - #[stable(feature = "raw_ext", since = "1.1.0")] pub type ino_t = u64; |
153 |
| - #[stable(feature = "raw_ext", since = "1.1.0")] pub type nlink_t = u32; |
154 |
| - #[stable(feature = "raw_ext", since = "1.1.0")] pub type off_t = i64; |
155 |
| - #[stable(feature = "raw_ext", since = "1.1.0")] pub type time_t = i64; |
156 |
| - |
157 |
| - #[repr(C)] |
158 |
| - #[derive(Clone)] |
159 |
| - #[stable(feature = "raw_ext", since = "1.1.0")] |
160 |
| - pub struct stat { |
161 |
| - #[stable(feature = "raw_ext", since = "1.1.0")] |
162 |
| - pub st_dev: dev_t, |
163 |
| - #[stable(feature = "raw_ext", since = "1.1.0")] |
164 |
| - pub st_ino: ino_t, |
165 |
| - #[stable(feature = "raw_ext", since = "1.1.0")] |
166 |
| - pub st_mode: mode_t, |
167 |
| - #[stable(feature = "raw_ext", since = "1.1.0")] |
168 |
| - pub st_nlink: nlink_t, |
169 |
| - #[stable(feature = "raw_ext", since = "1.1.0")] |
170 |
| - pub st_uid: uid_t, |
171 |
| - #[stable(feature = "raw_ext", since = "1.1.0")] |
172 |
| - pub st_gid: gid_t, |
173 |
| - #[stable(feature = "raw_ext", since = "1.1.0")] |
174 |
| - pub st_rdev: dev_t, |
175 |
| - #[stable(feature = "raw_ext", since = "1.1.0")] |
176 |
| - pub __pad1: dev_t, |
177 |
| - #[stable(feature = "raw_ext", since = "1.1.0")] |
178 |
| - pub st_size: off_t, |
179 |
| - #[stable(feature = "raw_ext", since = "1.1.0")] |
180 |
| - pub st_blksize: blksize_t, |
181 |
| - #[stable(feature = "raw_ext", since = "1.1.0")] |
182 |
| - pub __pad2: c_int, |
183 |
| - #[stable(feature = "raw_ext", since = "1.1.0")] |
184 |
| - pub st_blocks: blkcnt_t, |
185 |
| - #[stable(feature = "raw_ext", since = "1.1.0")] |
186 |
| - pub st_atime: time_t, |
187 |
| - #[stable(feature = "raw_ext", since = "1.1.0")] |
188 |
| - pub st_atime_nsec: c_long, |
189 |
| - #[stable(feature = "raw_ext", since = "1.1.0")] |
190 |
| - pub st_mtime: time_t, |
191 |
| - #[stable(feature = "raw_ext", since = "1.1.0")] |
192 |
| - pub st_mtime_nsec: c_long, |
193 |
| - #[stable(feature = "raw_ext", since = "1.1.0")] |
194 |
| - pub st_ctime: time_t, |
195 |
| - #[stable(feature = "raw_ext", since = "1.1.0")] |
196 |
| - pub st_ctime_nsec: c_long, |
197 |
| - #[stable(feature = "raw_ext", since = "1.1.0")] |
198 |
| - pub __unused: [c_int; 2], |
199 |
| - } |
200 |
| -} |
201 |
| - |
202 |
| -#[cfg(target_arch = "x86_64")] |
203 |
| -mod arch { |
204 |
| - use super::{dev_t, mode_t}; |
205 |
| - use os::raw::{c_long, c_int}; |
206 |
| - use os::unix::raw::{gid_t, uid_t}; |
207 |
| - |
208 |
| - #[stable(feature = "raw_ext", since = "1.1.0")] pub type blkcnt_t = i64; |
209 |
| - #[stable(feature = "raw_ext", since = "1.1.0")] pub type blksize_t = i64; |
210 |
| - #[stable(feature = "raw_ext", since = "1.1.0")] pub type ino_t = u64; |
211 |
| - #[stable(feature = "raw_ext", since = "1.1.0")] pub type nlink_t = u64; |
212 |
| - #[stable(feature = "raw_ext", since = "1.1.0")] pub type off_t = i64; |
213 |
| - #[stable(feature = "raw_ext", since = "1.1.0")] pub type time_t = i64; |
214 |
| - |
215 |
| - #[repr(C)] |
216 |
| - #[derive(Clone)] |
217 |
| - #[stable(feature = "raw_ext", since = "1.1.0")] |
218 |
| - pub struct stat { |
219 |
| - #[stable(feature = "raw_ext", since = "1.1.0")] |
220 |
| - pub st_dev: dev_t, |
221 |
| - #[stable(feature = "raw_ext", since = "1.1.0")] |
222 |
| - pub st_ino: ino_t, |
223 |
| - #[stable(feature = "raw_ext", since = "1.1.0")] |
224 |
| - pub st_nlink: nlink_t, |
225 |
| - #[stable(feature = "raw_ext", since = "1.1.0")] |
226 |
| - pub st_mode: mode_t, |
227 |
| - #[stable(feature = "raw_ext", since = "1.1.0")] |
228 |
| - pub st_uid: uid_t, |
229 |
| - #[stable(feature = "raw_ext", since = "1.1.0")] |
230 |
| - pub st_gid: gid_t, |
231 |
| - #[stable(feature = "raw_ext", since = "1.1.0")] |
232 |
| - pub __pad0: c_int, |
233 |
| - #[stable(feature = "raw_ext", since = "1.1.0")] |
234 |
| - pub st_rdev: dev_t, |
235 |
| - #[stable(feature = "raw_ext", since = "1.1.0")] |
236 |
| - pub st_size: off_t, |
237 |
| - #[stable(feature = "raw_ext", since = "1.1.0")] |
238 |
| - pub st_blksize: blksize_t, |
239 |
| - #[stable(feature = "raw_ext", since = "1.1.0")] |
240 |
| - pub st_blocks: blkcnt_t, |
241 |
| - #[stable(feature = "raw_ext", since = "1.1.0")] |
242 |
| - pub st_atime: time_t, |
243 |
| - #[stable(feature = "raw_ext", since = "1.1.0")] |
244 |
| - pub st_atime_nsec: c_long, |
245 |
| - #[stable(feature = "raw_ext", since = "1.1.0")] |
246 |
| - pub st_mtime: time_t, |
247 |
| - #[stable(feature = "raw_ext", since = "1.1.0")] |
248 |
| - pub st_mtime_nsec: c_long, |
249 |
| - #[stable(feature = "raw_ext", since = "1.1.0")] |
250 |
| - pub st_ctime: time_t, |
251 |
| - #[stable(feature = "raw_ext", since = "1.1.0")] |
252 |
| - pub st_ctime_nsec: c_long, |
253 |
| - #[stable(feature = "raw_ext", since = "1.1.0")] |
254 |
| - pub __unused: [c_long; 3], |
255 |
| - } |
| 23 | +#[stable(feature = "raw_ext", since = "1.1.0")] pub type nlink_t = u32; |
| 24 | +#[stable(feature = "raw_ext", since = "1.1.0")] pub type blksize_t = i32; |
| 25 | +#[stable(feature = "raw_ext", since = "1.1.0")] pub type blkcnt_t = i32; |
| 26 | + |
| 27 | +#[repr(C)] |
| 28 | +#[derive(Copy, Clone)] |
| 29 | +#[stable(feature = "raw_ext", since = "1.1.0")] |
| 30 | +pub struct stat { |
| 31 | + #[stable(feature = "raw_ext", since = "1.1.0")] pub st_dev: dev_t, |
| 32 | + #[stable(feature = "raw_ext", since = "1.1.0")] pub st_ino: ino_t, |
| 33 | + #[stable(feature = "raw_ext", since = "1.1.0")] pub st_mode: mode_t, |
| 34 | + #[stable(feature = "raw_ext", since = "1.1.0")] pub st_nlink: nlink_t, |
| 35 | + #[stable(feature = "raw_ext", since = "1.1.0")] pub st_uid: uid_t, |
| 36 | + #[stable(feature = "raw_ext", since = "1.1.0")] pub st_gid: gid_t, |
| 37 | + #[stable(feature = "raw_ext", since = "1.1.0")] pub st_rdev: dev_t, |
| 38 | + #[stable(feature = "raw_ext", since = "1.1.0")] pub st_size: off_t, |
| 39 | + #[stable(feature = "raw_ext", since = "1.1.0")] pub st_blksize: blksize_t, |
| 40 | + #[stable(feature = "raw_ext", since = "1.1.0")] pub st_blocks: blkcnt_t, |
| 41 | + #[stable(feature = "raw_ext", since = "1.1.0")] pub st_atime: time_t, |
| 42 | + #[stable(feature = "raw_ext", since = "1.1.0")] pub st_atime_nsec: i64, |
| 43 | + #[stable(feature = "raw_ext", since = "1.1.0")] pub st_mtime: time_t, |
| 44 | + #[stable(feature = "raw_ext", since = "1.1.0")] pub st_mtime_nsec: i64, |
| 45 | + #[stable(feature = "raw_ext", since = "1.1.0")] pub st_ctime: time_t, |
| 46 | + #[stable(feature = "raw_ext", since = "1.1.0")] pub st_ctime_nsec: i64, |
256 | 47 | }
|
0 commit comments