@@ -21,26 +21,26 @@ pub use self::arch::{blkcnt_t, blksize_t, dev_t, ino_t, mode_t, nlink_t, off_t,
21
21
22
22
#[ cfg( any( target_arch = "arm" , target_arch = "x86" ) ) ]
23
23
mod arch {
24
- use crate :: os:: raw:: { c_longlong, c_uchar, c_uint, c_ulong, c_ulonglong} ;
24
+ use crate :: os:: raw:: { c_long , c_longlong, c_uchar, c_uint, c_ulong, c_ulonglong} ;
25
25
use crate :: os:: unix:: raw:: { gid_t, uid_t} ;
26
26
27
27
#[ stable( feature = "raw_ext" , since = "1.1.0" ) ]
28
- pub type dev_t = u64 ;
28
+ pub type dev_t = u32 ;
29
29
#[ stable( feature = "raw_ext" , since = "1.1.0" ) ]
30
- pub type mode_t = u32 ;
30
+ pub type mode_t = c_uint ;
31
31
32
32
#[ stable( feature = "raw_ext" , since = "1.1.0" ) ]
33
- pub type blkcnt_t = u64 ;
33
+ pub type blkcnt_t = c_ulong ;
34
34
#[ stable( feature = "raw_ext" , since = "1.1.0" ) ]
35
- pub type blksize_t = u64 ;
35
+ pub type blksize_t = c_ulong ;
36
36
#[ stable( feature = "raw_ext" , since = "1.1.0" ) ]
37
- pub type ino_t = u64 ;
37
+ pub type ino_t = c_ulong ;
38
38
#[ stable( feature = "raw_ext" , since = "1.1.0" ) ]
39
- pub type nlink_t = u64 ;
39
+ pub type nlink_t = u32 ;
40
40
#[ stable( feature = "raw_ext" , since = "1.1.0" ) ]
41
- pub type off_t = u64 ;
41
+ pub type off_t = i32 ;
42
42
#[ stable( feature = "raw_ext" , since = "1.1.0" ) ]
43
- pub type time_t = i64 ;
43
+ pub type time_t = c_long ;
44
44
45
45
#[ repr( C ) ]
46
46
#[ derive( Clone ) ]
@@ -70,45 +70,47 @@ mod arch {
70
70
pub st_blksize : u32 ,
71
71
#[ stable( feature = "raw_ext" , since = "1.1.0" ) ]
72
72
pub st_blocks : c_ulonglong ,
73
+
73
74
#[ stable( feature = "raw_ext" , since = "1.1.0" ) ]
74
- pub st_atime : c_ulong ,
75
+ pub st_atime : time_t ,
75
76
#[ stable( feature = "raw_ext" , since = "1.1.0" ) ]
76
- pub st_atime_nsec : c_ulong ,
77
+ pub st_atime_nsec : c_long ,
77
78
#[ stable( feature = "raw_ext" , since = "1.1.0" ) ]
78
- pub st_mtime : c_ulong ,
79
+ pub st_mtime : time_t ,
79
80
#[ stable( feature = "raw_ext" , since = "1.1.0" ) ]
80
- pub st_mtime_nsec : c_ulong ,
81
+ pub st_mtime_nsec : c_long ,
81
82
#[ stable( feature = "raw_ext" , since = "1.1.0" ) ]
82
- pub st_ctime : c_ulong ,
83
+ pub st_ctime : time_t ,
83
84
#[ stable( feature = "raw_ext" , since = "1.1.0" ) ]
84
- pub st_ctime_nsec : c_ulong ,
85
+ pub st_ctime_nsec : c_long ,
86
+
85
87
#[ stable( feature = "raw_ext" , since = "1.1.0" ) ]
86
88
pub st_ino : c_ulonglong ,
87
89
}
88
90
}
89
91
90
92
#[ cfg( target_arch = "aarch64" ) ]
91
93
mod arch {
92
- use crate :: os:: raw:: { c_uchar, c_ulong} ;
94
+ use crate :: os:: raw:: { c_int , c_long , c_uchar, c_uint , c_ulong} ;
93
95
use crate :: os:: unix:: raw:: { gid_t, uid_t} ;
94
96
95
97
#[ stable( feature = "raw_ext" , since = "1.1.0" ) ]
96
98
pub type dev_t = u64 ;
97
99
#[ stable( feature = "raw_ext" , since = "1.1.0" ) ]
98
- pub type mode_t = u32 ;
100
+ pub type mode_t = c_uint ;
99
101
100
102
#[ stable( feature = "raw_ext" , since = "1.1.0" ) ]
101
- pub type blkcnt_t = u64 ;
103
+ pub type blkcnt_t = c_ulong ;
102
104
#[ stable( feature = "raw_ext" , since = "1.1.0" ) ]
103
- pub type blksize_t = u64 ;
105
+ pub type blksize_t = c_ulong ;
104
106
#[ stable( feature = "raw_ext" , since = "1.1.0" ) ]
105
- pub type ino_t = u64 ;
107
+ pub type ino_t = c_ulong ;
106
108
#[ stable( feature = "raw_ext" , since = "1.1.0" ) ]
107
- pub type nlink_t = u64 ;
109
+ pub type nlink_t = u32 ;
108
110
#[ stable( feature = "raw_ext" , since = "1.1.0" ) ]
109
- pub type off_t = u64 ;
111
+ pub type off_t = i64 ;
110
112
#[ stable( feature = "raw_ext" , since = "1.1.0" ) ]
111
- pub type time_t = i64 ;
113
+ pub type time_t = c_long ;
112
114
113
115
#[ repr( C ) ]
114
116
#[ derive( Clone ) ]
@@ -117,9 +119,7 @@ mod arch {
117
119
#[ stable( feature = "raw_ext" , since = "1.1.0" ) ]
118
120
pub st_dev : dev_t ,
119
121
#[ stable( feature = "raw_ext" , since = "1.1.0" ) ]
120
- pub __pad0 : [ c_uchar ; 4 ] ,
121
- #[ stable( feature = "raw_ext" , since = "1.1.0" ) ]
122
- pub __st_ino : ino_t ,
122
+ pub st_ino : ino_t ,
123
123
#[ stable( feature = "raw_ext" , since = "1.1.0" ) ]
124
124
pub st_mode : mode_t ,
125
125
#[ stable( feature = "raw_ext" , since = "1.1.0" ) ]
@@ -131,27 +131,33 @@ mod arch {
131
131
#[ stable( feature = "raw_ext" , since = "1.1.0" ) ]
132
132
pub st_rdev : dev_t ,
133
133
#[ stable( feature = "raw_ext" , since = "1.1.0" ) ]
134
- pub __pad3 : [ c_uchar ; 4 ] ,
134
+ pub __pad1 : c_ulong ,
135
135
#[ stable( feature = "raw_ext" , since = "1.1.0" ) ]
136
136
pub st_size : off_t ,
137
137
#[ stable( feature = "raw_ext" , since = "1.1.0" ) ]
138
- pub st_blksize : blksize_t ,
138
+ pub st_blksize : c_int ,
139
+ #[ stable( feature = "raw_ext" , since = "1.1.0" ) ]
140
+ pub __pad2 : c_int ,
139
141
#[ stable( feature = "raw_ext" , since = "1.1.0" ) ]
140
- pub st_blocks : blkcnt_t ,
142
+ pub st_blocks : c_long ,
143
+
141
144
#[ stable( feature = "raw_ext" , since = "1.1.0" ) ]
142
145
pub st_atime : time_t ,
143
146
#[ stable( feature = "raw_ext" , since = "1.1.0" ) ]
144
- pub st_atime_nsec : c_ulong ,
147
+ pub st_atime_nsec : c_long ,
145
148
#[ stable( feature = "raw_ext" , since = "1.1.0" ) ]
146
149
pub st_mtime : time_t ,
147
150
#[ stable( feature = "raw_ext" , since = "1.1.0" ) ]
148
- pub st_mtime_nsec : c_ulong ,
151
+ pub st_mtime_nsec : c_long ,
149
152
#[ stable( feature = "raw_ext" , since = "1.1.0" ) ]
150
153
pub st_ctime : time_t ,
151
154
#[ stable( feature = "raw_ext" , since = "1.1.0" ) ]
152
- pub st_ctime_nsec : c_ulong ,
155
+ pub st_ctime_nsec : c_long ,
156
+
153
157
#[ stable( feature = "raw_ext" , since = "1.1.0" ) ]
154
- pub st_ino : ino_t ,
158
+ pub __unused4 : c_uint ,
159
+ #[ stable( feature = "raw_ext" , since = "1.1.0" ) ]
160
+ pub __unused5 : c_uint ,
155
161
}
156
162
}
157
163
@@ -163,20 +169,20 @@ mod arch {
163
169
#[ stable( feature = "raw_ext" , since = "1.1.0" ) ]
164
170
pub type dev_t = u64 ;
165
171
#[ stable( feature = "raw_ext" , since = "1.1.0" ) ]
166
- pub type mode_t = u32 ;
172
+ pub type mode_t = c_uint ;
167
173
168
174
#[ stable( feature = "raw_ext" , since = "1.1.0" ) ]
169
- pub type blkcnt_t = u64 ;
175
+ pub type blkcnt_t = c_ulong ;
170
176
#[ stable( feature = "raw_ext" , since = "1.1.0" ) ]
171
- pub type blksize_t = u64 ;
177
+ pub type blksize_t = c_ulong ;
172
178
#[ stable( feature = "raw_ext" , since = "1.1.0" ) ]
173
- pub type ino_t = u64 ;
179
+ pub type ino_t = c_ulong ;
174
180
#[ stable( feature = "raw_ext" , since = "1.1.0" ) ]
175
181
pub type nlink_t = u32 ;
176
182
#[ stable( feature = "raw_ext" , since = "1.1.0" ) ]
177
- pub type off_t = u64 ;
183
+ pub type off_t = i64 ;
178
184
#[ stable( feature = "raw_ext" , since = "1.1.0" ) ]
179
- pub type time_t = i64 ;
185
+ pub type time_t = c_long ;
180
186
181
187
#[ repr( C ) ]
182
188
#[ derive( Clone ) ]
@@ -195,25 +201,30 @@ mod arch {
195
201
#[ stable( feature = "raw_ext" , since = "1.1.0" ) ]
196
202
pub st_gid : gid_t ,
197
203
#[ stable( feature = "raw_ext" , since = "1.1.0" ) ]
204
+ pub __pad0 : c_uint ,
205
+ #[ stable( feature = "raw_ext" , since = "1.1.0" ) ]
198
206
pub st_rdev : dev_t ,
199
207
#[ stable( feature = "raw_ext" , since = "1.1.0" ) ]
200
- pub st_size : i64 ,
208
+ pub st_size : off_t ,
201
209
#[ stable( feature = "raw_ext" , since = "1.1.0" ) ]
202
210
pub st_blksize : c_long ,
203
211
#[ stable( feature = "raw_ext" , since = "1.1.0" ) ]
204
212
pub st_blocks : c_long ,
213
+
214
+ #[ stable( feature = "raw_ext" , since = "1.1.0" ) ]
215
+ pub st_atime : time_t ,
205
216
#[ stable( feature = "raw_ext" , since = "1.1.0" ) ]
206
- pub st_atime : c_ulong ,
217
+ pub st_atime_nsec : c_long ,
207
218
#[ stable( feature = "raw_ext" , since = "1.1.0" ) ]
208
- pub st_atime_nsec : c_ulong ,
219
+ pub st_mtime : time_t ,
209
220
#[ stable( feature = "raw_ext" , since = "1.1.0" ) ]
210
- pub st_mtime : c_ulong ,
221
+ pub st_mtime_nsec : c_long ,
211
222
#[ stable( feature = "raw_ext" , since = "1.1.0" ) ]
212
- pub st_mtime_nsec : c_ulong ,
223
+ pub st_ctime : time_t ,
213
224
#[ stable( feature = "raw_ext" , since = "1.1.0" ) ]
214
- pub st_ctime : c_ulong ,
225
+ pub st_ctime_nsec : c_long ,
226
+
215
227
#[ stable( feature = "raw_ext" , since = "1.1.0" ) ]
216
- pub st_ctime_nsec : c_ulong ,
217
- __unused : [ c_long ; 3 ] ,
228
+ pub __pad3 : [ c_long ; 3 ] ,
218
229
}
219
230
}
0 commit comments