@@ -1142,18 +1142,16 @@ pub mod types {
1142
1142
pub mod os {
1143
1143
pub mod common {
1144
1144
pub mod posix01 {
1145
- use types:: os:: arch:: c95:: { c_short, time_t, suseconds_t,
1146
- c_long} ;
1145
+ use types:: os:: arch:: c95:: { c_short, time_t, c_long} ;
1147
1146
use types:: os:: arch:: extra:: { int64, time64_t} ;
1148
1147
use types:: os:: arch:: posix88:: { dev_t, ino_t} ;
1149
- use types:: os:: arch:: posix88:: mode_t;
1150
1148
1151
1149
// pub Note: this is the struct called stat64 in win32. Not stat,
1152
1150
// nor stati64.
1153
1151
pub struct stat {
1154
1152
pub st_dev : dev_t ,
1155
1153
pub st_ino : ino_t ,
1156
- pub st_mode : mode_t ,
1154
+ pub st_mode : u16 ,
1157
1155
pub st_nlink : c_short ,
1158
1156
pub st_uid : c_short ,
1159
1157
pub st_gid : c_short ,
@@ -1171,8 +1169,8 @@ pub mod types {
1171
1169
}
1172
1170
1173
1171
pub struct timeval {
1174
- pub tv_sec : time_t ,
1175
- pub tv_usec : suseconds_t ,
1172
+ pub tv_sec : c_long ,
1173
+ pub tv_usec : c_long ,
1176
1174
}
1177
1175
1178
1176
pub struct timespec {
@@ -1186,7 +1184,7 @@ pub mod types {
1186
1184
pub mod bsd44 {
1187
1185
use types:: os:: arch:: c95:: { c_char, c_int, c_uint, size_t} ;
1188
1186
1189
- pub type SOCKET = c_uint ;
1187
+ pub type SOCKET = uint ;
1190
1188
pub type socklen_t = c_int ;
1191
1189
pub type sa_family_t = u16 ;
1192
1190
pub type in_port_t = u16 ;
@@ -1197,6 +1195,7 @@ pub mod types {
1197
1195
}
1198
1196
pub struct sockaddr_storage {
1199
1197
pub ss_family : sa_family_t ,
1198
+ pub __ss_pad1 : [ u8 , ..6 ] ,
1200
1199
pub __ss_align : i64 ,
1201
1200
pub __ss_pad2 : [ u8 , ..112 ] ,
1202
1201
}
@@ -1293,12 +1292,9 @@ pub mod types {
1293
1292
pub mod posix88 {
1294
1293
pub type off_t = i32 ;
1295
1294
pub type dev_t = u32 ;
1296
- pub type ino_t = i16 ;
1295
+ pub type ino_t = u16 ;
1297
1296
1298
- #[ cfg( target_arch = "x86" ) ]
1299
- pub type pid_t = i32 ;
1300
- #[ cfg( target_arch = "x86_64" ) ]
1301
- pub type pid_t = i64 ;
1297
+ pub type pid_t = u32 ;
1302
1298
1303
1299
pub type useconds_t = u32 ;
1304
1300
pub type mode_t = u16 ;
@@ -1415,7 +1411,7 @@ pub mod types {
1415
1411
pub dwPageSize : DWORD ,
1416
1412
pub lpMinimumApplicationAddress : LPVOID ,
1417
1413
pub lpMaximumApplicationAddress : LPVOID ,
1418
- pub dwActiveProcessorMask : DWORD ,
1414
+ pub dwActiveProcessorMask : uint ,
1419
1415
pub dwNumberOfProcessors : DWORD ,
1420
1416
pub dwProcessorType : DWORD ,
1421
1417
pub dwAllocationGranularity : DWORD ,
@@ -1950,7 +1946,7 @@ pub mod consts {
1950
1946
}
1951
1947
pub mod extra {
1952
1948
use types:: os:: arch:: c95:: c_int;
1953
- use types:: os:: arch:: extra:: { WORD , DWORD , BOOL } ;
1949
+ use types:: os:: arch:: extra:: { WORD , DWORD , BOOL , HANDLE } ;
1954
1950
1955
1951
pub static TRUE : BOOL = 1 ;
1956
1952
pub static FALSE : BOOL = 0 ;
@@ -1979,7 +1975,7 @@ pub mod consts {
1979
1975
pub static ERROR_IO_PENDING : c_int = 997 ;
1980
1976
pub static ERROR_FILE_INVALID : c_int = 1006 ;
1981
1977
pub static ERROR_NOT_FOUND : c_int = 1168 ;
1982
- pub static INVALID_HANDLE_VALUE : c_int = -1 ;
1978
+ pub static INVALID_HANDLE_VALUE : HANDLE = -1 as HANDLE ;
1983
1979
1984
1980
pub static DELETE : DWORD = 0x00010000 ;
1985
1981
pub static READ_CONTROL : DWORD = 0x00020000 ;
0 commit comments