|
18 | 18 | definitions")] |
19 | 19 | #![allow(deprecated)] |
20 | 20 |
|
21 | | -#[stable(feature = "raw_ext", since = "1.1.0")] pub type off_t = u64; |
| 21 | +use os::raw::c_long; |
| 22 | + |
| 23 | +#[stable(feature = "raw_ext", since = "1.1.0")] pub type blkcnt_t = u64; |
| 24 | +#[stable(feature = "raw_ext", since = "1.1.0")] pub type blksize_t = u64; |
22 | 25 | #[stable(feature = "raw_ext", since = "1.1.0")] pub type dev_t = u64; |
| 26 | +#[stable(feature = "raw_ext", since = "1.1.0")] pub type fflags_t = u32; |
23 | 27 | #[stable(feature = "raw_ext", since = "1.1.0")] pub type ino_t = u64; |
24 | 28 | #[stable(feature = "raw_ext", since = "1.1.0")] pub type mode_t = u32; |
25 | 29 | #[stable(feature = "raw_ext", since = "1.1.0")] pub type nlink_t = u64; |
26 | | -#[stable(feature = "raw_ext", since = "1.1.0")] pub type blksize_t = u64; |
27 | | -#[stable(feature = "raw_ext", since = "1.1.0")] pub type blkcnt_t = u64; |
28 | | -#[stable(feature = "raw_ext", since = "1.1.0")] pub type fflags_t = u32; |
| 30 | +#[stable(feature = "raw_ext", since = "1.1.0")] pub type off_t = u64; |
| 31 | +#[stable(feature = "raw_ext", since = "1.1.0")] pub type time_t = i64; |
29 | 32 |
|
30 | 33 | #[unstable(feature = "pthread_t", issue = "29791")] pub type pthread_t = usize; |
31 | 34 |
|
32 | | -#[doc(inline)] |
| 35 | +#[repr(C)] |
| 36 | +#[derive(Clone)] |
33 | 37 | #[stable(feature = "raw_ext", since = "1.1.0")] |
34 | | -pub use self::arch::{stat, time_t}; |
35 | | - |
36 | | -#[cfg(target_arch = "x86")] |
37 | | -mod arch { |
38 | | - use super::{off_t, dev_t, ino_t, mode_t, nlink_t, blksize_t, blkcnt_t, fflags_t}; |
39 | | - use os::raw::c_long; |
40 | | - use os::unix::raw::{uid_t, gid_t}; |
41 | | - |
42 | | - #[stable(feature = "raw_ext", since = "1.1.0")] pub type time_t = i64; |
43 | | - |
44 | | - #[repr(C)] |
45 | | - #[derive(Clone)] |
46 | | - #[stable(feature = "raw_ext", since = "1.1.0")] |
47 | | - pub struct stat { |
48 | | - #[stable(feature = "raw_ext", since = "1.1.0")] |
49 | | - pub st_dev: dev_t, |
50 | | - #[stable(feature = "raw_ext", since = "1.1.0")] |
51 | | - pub st_ino: ino_t, |
52 | | - #[stable(feature = "raw_ext", since = "1.1.0")] |
53 | | - pub st_mode: mode_t, |
54 | | - #[stable(feature = "raw_ext", since = "1.1.0")] |
55 | | - pub st_nlink: nlink_t, |
56 | | - #[stable(feature = "raw_ext", since = "1.1.0")] |
57 | | - pub st_uid: uid_t, |
58 | | - #[stable(feature = "raw_ext", since = "1.1.0")] |
59 | | - pub st_gid: gid_t, |
60 | | - #[stable(feature = "raw_ext", since = "1.1.0")] |
61 | | - pub st_rdev: dev_t, |
62 | | - #[stable(feature = "raw_ext", since = "1.1.0")] |
63 | | - pub st_atime: time_t, |
64 | | - #[stable(feature = "raw_ext", since = "1.1.0")] |
65 | | - pub st_atime_nsec: c_long, |
66 | | - #[stable(feature = "raw_ext", since = "1.1.0")] |
67 | | - pub st_mtime: time_t, |
68 | | - #[stable(feature = "raw_ext", since = "1.1.0")] |
69 | | - pub st_mtime_nsec: c_long, |
70 | | - #[stable(feature = "raw_ext", since = "1.1.0")] |
71 | | - pub st_ctime: time_t, |
72 | | - #[stable(feature = "raw_ext", since = "1.1.0")] |
73 | | - pub st_ctime_nsec: c_long, |
74 | | - #[stable(feature = "raw_ext", since = "1.1.0")] |
75 | | - pub st_size: off_t, |
76 | | - #[stable(feature = "raw_ext", since = "1.1.0")] |
77 | | - pub st_blocks: blkcnt_t, |
78 | | - #[stable(feature = "raw_ext", since = "1.1.0")] |
79 | | - pub st_blksize: blksize_t, |
80 | | - #[stable(feature = "raw_ext", since = "1.1.0")] |
81 | | - pub st_flags: fflags_t, |
82 | | - #[stable(feature = "raw_ext", since = "1.1.0")] |
83 | | - pub st_gen: u32, |
84 | | - #[stable(feature = "raw_ext", since = "1.1.0")] |
85 | | - pub st_lspare: i32, |
86 | | - #[stable(feature = "raw_ext", since = "1.1.0")] |
87 | | - pub st_birthtime: time_t, |
88 | | - #[stable(feature = "raw_ext", since = "1.1.0")] |
89 | | - pub st_birthtime_nsec: c_long, |
90 | | - #[stable(feature = "raw_ext", since = "1.1.0")] |
91 | | - pub __unused: [u8; 8], |
92 | | - } |
93 | | -} |
94 | | - |
95 | | -#[cfg(target_arch = "x86_64")] |
96 | | -mod arch { |
97 | | - use super::{off_t, dev_t, ino_t, mode_t, nlink_t, blksize_t, blkcnt_t, fflags_t}; |
98 | | - use os::raw::c_long; |
99 | | - use os::unix::raw::{uid_t, gid_t}; |
100 | | - |
101 | | - #[stable(feature = "raw_ext", since = "1.1.0")] pub type time_t = i64; |
102 | | - |
103 | | - #[repr(C)] |
104 | | - #[derive(Clone)] |
105 | | - #[stable(feature = "raw_ext", since = "1.1.0")] |
106 | | - pub struct stat { |
107 | | - #[stable(feature = "raw_ext", since = "1.1.0")] |
108 | | - pub st_dev: u32, |
109 | | - #[stable(feature = "raw_ext", since = "1.1.0")] |
110 | | - pub st_ino: u32, |
111 | | - #[stable(feature = "raw_ext", since = "1.1.0")] |
112 | | - pub st_mode: u16, |
113 | | - #[stable(feature = "raw_ext", since = "1.1.0")] |
114 | | - pub st_nlink: u16, |
115 | | - #[stable(feature = "raw_ext", since = "1.1.0")] |
116 | | - pub st_uid: u32, |
117 | | - #[stable(feature = "raw_ext", since = "1.1.0")] |
118 | | - pub st_gid: u32, |
119 | | - #[stable(feature = "raw_ext", since = "1.1.0")] |
120 | | - pub st_rdev: u32, |
121 | | - #[stable(feature = "raw_ext", since = "1.1.0")] |
122 | | - pub st_atime: i64, |
123 | | - #[stable(feature = "raw_ext", since = "1.1.0")] |
124 | | - pub st_atime_nsec: i64, |
125 | | - #[stable(feature = "raw_ext", since = "1.1.0")] |
126 | | - pub st_mtime: i64, |
127 | | - #[stable(feature = "raw_ext", since = "1.1.0")] |
128 | | - pub st_mtime_nsec: i64, |
129 | | - #[stable(feature = "raw_ext", since = "1.1.0")] |
130 | | - pub st_ctime: i64, |
131 | | - #[stable(feature = "raw_ext", since = "1.1.0")] |
132 | | - pub st_ctime_nsec: i64, |
133 | | - #[stable(feature = "raw_ext", since = "1.1.0")] |
134 | | - pub st_size: i64, |
135 | | - #[stable(feature = "raw_ext", since = "1.1.0")] |
136 | | - pub st_blocks: i64, |
137 | | - #[stable(feature = "raw_ext", since = "1.1.0")] |
138 | | - pub st_blksize: u32, |
139 | | - #[stable(feature = "raw_ext", since = "1.1.0")] |
140 | | - pub st_flags: u32, |
141 | | - #[stable(feature = "raw_ext", since = "1.1.0")] |
142 | | - pub st_gen: u32, |
143 | | - #[stable(feature = "raw_ext", since = "1.1.0")] |
144 | | - pub st_lspare: i32, |
145 | | - #[stable(feature = "raw_ext", since = "1.1.0")] |
146 | | - pub st_birthtime: i64, |
147 | | - #[stable(feature = "raw_ext", since = "1.1.0")] |
148 | | - pub st_birthtime_nsec: i64, |
149 | | - } |
| 38 | +pub struct stat { |
| 39 | + #[stable(feature = "raw_ext", since = "1.1.0")] |
| 40 | + pub st_dev: u32, |
| 41 | + #[stable(feature = "raw_ext", since = "1.1.0")] |
| 42 | + pub st_ino: u32, |
| 43 | + #[stable(feature = "raw_ext", since = "1.1.0")] |
| 44 | + pub st_mode: u16, |
| 45 | + #[stable(feature = "raw_ext", since = "1.1.0")] |
| 46 | + pub st_nlink: u16, |
| 47 | + #[stable(feature = "raw_ext", since = "1.1.0")] |
| 48 | + pub st_uid: u32, |
| 49 | + #[stable(feature = "raw_ext", since = "1.1.0")] |
| 50 | + pub st_gid: u32, |
| 51 | + #[stable(feature = "raw_ext", since = "1.1.0")] |
| 52 | + pub st_rdev: u32, |
| 53 | + #[stable(feature = "raw_ext", since = "1.1.0")] |
| 54 | + pub st_atime: c_long, |
| 55 | + #[stable(feature = "raw_ext", since = "1.1.0")] |
| 56 | + pub st_atime_nsec: c_long, |
| 57 | + #[stable(feature = "raw_ext", since = "1.1.0")] |
| 58 | + pub st_mtime: c_long, |
| 59 | + #[stable(feature = "raw_ext", since = "1.1.0")] |
| 60 | + pub st_mtime_nsec: c_long, |
| 61 | + #[stable(feature = "raw_ext", since = "1.1.0")] |
| 62 | + pub st_ctime: c_long, |
| 63 | + #[stable(feature = "raw_ext", since = "1.1.0")] |
| 64 | + pub st_ctime_nsec: c_long, |
| 65 | + #[stable(feature = "raw_ext", since = "1.1.0")] |
| 66 | + pub st_size: i64, |
| 67 | + #[stable(feature = "raw_ext", since = "1.1.0")] |
| 68 | + pub st_blocks: i64, |
| 69 | + #[stable(feature = "raw_ext", since = "1.1.0")] |
| 70 | + pub st_blksize: u32, |
| 71 | + #[stable(feature = "raw_ext", since = "1.1.0")] |
| 72 | + pub st_flags: u32, |
| 73 | + #[stable(feature = "raw_ext", since = "1.1.0")] |
| 74 | + pub st_gen: u32, |
| 75 | + #[stable(feature = "raw_ext", since = "1.1.0")] |
| 76 | + pub st_lspare: i32, |
| 77 | + #[stable(feature = "raw_ext", since = "1.1.0")] |
| 78 | + pub st_birthtime: c_long, |
| 79 | + #[stable(feature = "raw_ext", since = "1.1.0")] |
| 80 | + pub st_birthtime_nsec: c_long, |
| 81 | + #[cfg(target_arch = "x86")] |
| 82 | + #[stable(feature = "raw_ext", since = "1.1.0")] |
| 83 | + pub __unused: [u8; 8], |
150 | 84 | } |
151 | | - |
0 commit comments