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 //! Nacl-specific raw type definitions
13 #![stable(feature = "raw_ext", since = "1.1.0")]
15 #[stable(feature = "raw_ext", since = "1.1.0")] pub type dev_t = u64;
16 #[stable(feature = "raw_ext", since = "1.1.0")] pub type mode_t = u32;
18 pub use self::arch
::{off_t, ino_t, nlink_t, blksize_t, blkcnt_t, stat, time_t}
;
20 #[cfg(any(target_arch = "x86",
22 target_arch
= "powerpc",
23 target_arch
= "arm"))]
25 use super::{dev_t, mode_t}
;
26 use os
::raw
::{c_long, c_short}
;
27 use os
::unix
::raw
::{gid_t, uid_t}
;
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;
37 #[stable(feature = "raw_ext", since = "1.1.0")]
39 #[stable(feature = "raw_ext", since = "1.1.0")]
41 #[stable(feature = "raw_ext", since = "1.1.0")]
43 #[stable(feature = "raw_ext", since = "1.1.0")]
45 #[stable(feature = "raw_ext", since = "1.1.0")]
47 #[stable(feature = "raw_ext", since = "1.1.0")]
48 pub st_nlink
: nlink_t
,
49 #[stable(feature = "raw_ext", since = "1.1.0")]
51 #[stable(feature = "raw_ext", since = "1.1.0")]
53 #[stable(feature = "raw_ext", since = "1.1.0")]
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")]
60 pub st_blksize
: blksize_t
,
61 #[stable(feature = "raw_ext", since = "1.1.0")]
62 pub st_blocks
: blkcnt_t
,
63 #[stable(feature = "raw_ext", since = "1.1.0")]
65 #[stable(feature = "raw_ext", since = "1.1.0")]
66 pub st_atime_nsec
: c_long
,
67 #[stable(feature = "raw_ext", since = "1.1.0")]
69 #[stable(feature = "raw_ext", since = "1.1.0")]
70 pub st_mtime_nsec
: c_long
,
71 #[stable(feature = "raw_ext", since = "1.1.0")]
73 #[stable(feature = "raw_ext", since = "1.1.0")]
74 pub st_ctime_nsec
: c_long
,
75 #[stable(feature = "raw_ext", since = "1.1.0")]
76 pub __unused4
: c_long
,
77 #[stable(feature = "raw_ext", since = "1.1.0")]
78 pub __unused5
: c_long
,
82 #[cfg(any(target_arch = "mips",
83 target_arch
= "mipsel"))]
85 use super::{dev_t, mode_t}
;
87 use os
::unix
::raw
::{gid_t, uid_t}
;
89 #[stable(feature = "raw_ext", since = "1.1.0")] pub type blkcnt_t = i32;
90 #[stable(feature = "raw_ext", since = "1.1.0")] pub type blksize_t = i32;
91 #[stable(feature = "raw_ext", since = "1.1.0")] pub type ino_t = u32;
92 #[stable(feature = "raw_ext", since = "1.1.0")] pub type nlink_t = u32;
93 #[stable(feature = "raw_ext", since = "1.1.0")] pub type off_t = i32;
94 #[stable(feature = "raw_ext", since = "1.1.0")] pub type time_t = i32;
97 #[stable(feature = "raw_ext", since = "1.1.0")]
99 #[stable(feature = "raw_ext", since = "1.1.0")]
101 #[stable(feature = "raw_ext", since = "1.1.0")]
102 pub st_pad1
: [c_long
; 3],
103 #[stable(feature = "raw_ext", since = "1.1.0")]
105 #[stable(feature = "raw_ext", since = "1.1.0")]
107 #[stable(feature = "raw_ext", since = "1.1.0")]
108 pub st_nlink
: nlink_t
,
109 #[stable(feature = "raw_ext", since = "1.1.0")]
111 #[stable(feature = "raw_ext", since = "1.1.0")]
113 #[stable(feature = "raw_ext", since = "1.1.0")]
114 pub st_rdev
: c_ulong
,
115 #[stable(feature = "raw_ext", since = "1.1.0")]
116 pub st_pad2
: [c_long
; 2],
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_atime
: time_t
,
123 #[stable(feature = "raw_ext", since = "1.1.0")]
124 pub st_atime_nsec
: c_long
,
125 #[stable(feature = "raw_ext", since = "1.1.0")]
126 pub st_mtime
: time_t
,
127 #[stable(feature = "raw_ext", since = "1.1.0")]
128 pub st_mtime_nsec
: c_long
,
129 #[stable(feature = "raw_ext", since = "1.1.0")]
130 pub st_ctime
: time_t
,
131 #[stable(feature = "raw_ext", since = "1.1.0")]
132 pub st_ctime_nsec
: c_long
,
133 #[stable(feature = "raw_ext", since = "1.1.0")]
134 pub st_blksize
: blksize_t
,
135 #[stable(feature = "raw_ext", since = "1.1.0")]
136 pub st_blocks
: blkcnt_t
,
137 #[stable(feature = "raw_ext", since = "1.1.0")]
138 pub st_pad5
: [c_long
; 14],
142 #[cfg(target_arch = "aarch64")]
144 use super::{dev_t, mode_t}
;
145 use os
::raw
::{c_long, c_int}
;
146 use os
::unix
::raw
::{gid_t, uid_t}
;
148 #[stable(feature = "raw_ext", since = "1.1.0")] pub type blkcnt_t = i64;
149 #[stable(feature = "raw_ext", since = "1.1.0")] pub type blksize_t = i32;
150 #[stable(feature = "raw_ext", since = "1.1.0")] pub type ino_t = u64;
151 #[stable(feature = "raw_ext", since = "1.1.0")] pub type nlink_t = u32;
152 #[stable(feature = "raw_ext", since = "1.1.0")] pub type off_t = i64;
153 #[stable(feature = "raw_ext", since = "1.1.0")] pub type time_t = i64;
156 #[stable(feature = "raw_ext", since = "1.1.0")]
158 #[stable(feature = "raw_ext", since = "1.1.0")]
160 #[stable(feature = "raw_ext", since = "1.1.0")]
162 #[stable(feature = "raw_ext", since = "1.1.0")]
164 #[stable(feature = "raw_ext", since = "1.1.0")]
165 pub st_nlink
: nlink_t
,
166 #[stable(feature = "raw_ext", since = "1.1.0")]
168 #[stable(feature = "raw_ext", since = "1.1.0")]
170 #[stable(feature = "raw_ext", since = "1.1.0")]
172 #[stable(feature = "raw_ext", since = "1.1.0")]
174 #[stable(feature = "raw_ext", since = "1.1.0")]
176 #[stable(feature = "raw_ext", since = "1.1.0")]
177 pub st_blksize
: blksize_t
,
178 #[stable(feature = "raw_ext", since = "1.1.0")]
180 #[stable(feature = "raw_ext", since = "1.1.0")]
181 pub st_blocks
: blkcnt_t
,
182 #[stable(feature = "raw_ext", since = "1.1.0")]
183 pub st_atime
: time_t
,
184 #[stable(feature = "raw_ext", since = "1.1.0")]
185 pub st_atime_nsec
: c_long
,
186 #[stable(feature = "raw_ext", since = "1.1.0")]
187 pub st_mtime
: time_t
,
188 #[stable(feature = "raw_ext", since = "1.1.0")]
189 pub st_mtime_nsec
: c_long
,
190 #[stable(feature = "raw_ext", since = "1.1.0")]
191 pub st_ctime
: time_t
,
192 #[stable(feature = "raw_ext", since = "1.1.0")]
193 pub st_ctime_nsec
: c_long
,
194 #[stable(feature = "raw_ext", since = "1.1.0")]
195 pub __unused
: [c_int
; 2],
199 #[cfg(target_arch = "x86_64")]
201 use super::{dev_t, mode_t}
;
202 use os
::raw
::{c_long, c_int}
;
203 use os
::unix
::raw
::{gid_t, uid_t}
;
205 #[stable(feature = "raw_ext", since = "1.1.0")] pub type blkcnt_t = i64;
206 #[stable(feature = "raw_ext", since = "1.1.0")] pub type blksize_t = i64;
207 #[stable(feature = "raw_ext", since = "1.1.0")] pub type ino_t = u64;
208 #[stable(feature = "raw_ext", since = "1.1.0")] pub type nlink_t = u64;
209 #[stable(feature = "raw_ext", since = "1.1.0")] pub type off_t = i64;
210 #[stable(feature = "raw_ext", since = "1.1.0")] pub type time_t = i64;
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_nlink
: nlink_t
,
221 #[stable(feature = "raw_ext", since = "1.1.0")]
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")]
231 #[stable(feature = "raw_ext", since = "1.1.0")]
233 #[stable(feature = "raw_ext", since = "1.1.0")]
234 pub st_blksize
: blksize_t
,
235 #[stable(feature = "raw_ext", since = "1.1.0")]
236 pub st_blocks
: blkcnt_t
,
237 #[stable(feature = "raw_ext", since = "1.1.0")]
238 pub st_atime
: time_t
,
239 #[stable(feature = "raw_ext", since = "1.1.0")]
240 pub st_atime_nsec
: c_long
,
241 #[stable(feature = "raw_ext", since = "1.1.0")]
242 pub st_mtime
: time_t
,
243 #[stable(feature = "raw_ext", since = "1.1.0")]
244 pub st_mtime_nsec
: c_long
,
245 #[stable(feature = "raw_ext", since = "1.1.0")]
246 pub st_ctime
: time_t
,
247 #[stable(feature = "raw_ext", since = "1.1.0")]
248 pub st_ctime_nsec
: c_long
,
249 #[stable(feature = "raw_ext", since = "1.1.0")]
250 pub __unused
: [c_long
; 3],