@@ -268,14 +268,17 @@ pub mod types {
268
268
pub type ssize_t = i32 ;
269
269
}
270
270
pub mod posix01 {
271
- use libc:: types:: os:: arch:: c95:: { c_short, c_long, time_t} ;
271
+ use libc:: types:: os:: arch:: c95:: { c_short, c_long, c_ulong , time_t} ;
272
272
use libc:: types:: os:: arch:: posix88:: { dev_t, gid_t, ino_t} ;
273
273
use libc:: types:: os:: arch:: posix88:: { mode_t, off_t} ;
274
274
use libc:: types:: os:: arch:: posix88:: { uid_t} ;
275
275
276
276
pub type nlink_t = u32 ;
277
277
pub type blksize_t = i32 ;
278
278
pub type blkcnt_t = i32 ;
279
+
280
+ #[ cfg( target_arch = "x86" ) ]
281
+ #[ cfg( target_arch = "arm" ) ]
279
282
pub struct stat {
280
283
st_dev : dev_t ,
281
284
__pad1 : c_short ,
@@ -298,6 +301,30 @@ pub mod types {
298
301
__unused4 : c_long ,
299
302
__unused5 : c_long ,
300
303
}
304
+
305
+ #[ cfg( target_arch = "mips" ) ]
306
+ pub struct stat {
307
+ st_dev : c_ulong ,
308
+ st_pad1 : [ c_long , ..3 ] ,
309
+ st_ino : ino_t ,
310
+ st_mode : mode_t ,
311
+ st_nlink : nlink_t ,
312
+ st_uid : uid_t ,
313
+ st_gid : gid_t ,
314
+ st_rdev : c_ulong ,
315
+ st_pad2 : [ c_long , ..2 ] ,
316
+ st_size : off_t ,
317
+ st_pad3 : c_long ,
318
+ st_atime : time_t ,
319
+ st_atime_nsec : c_long ,
320
+ st_mtime : time_t ,
321
+ st_mtime_nsec : c_long ,
322
+ st_ctime : time_t ,
323
+ st_ctime_nsec : c_long ,
324
+ st_blksize : blksize_t ,
325
+ st_blocks : blkcnt_t ,
326
+ st_pad5 : [ c_long , ..14 ] ,
327
+ }
301
328
}
302
329
pub mod posix08 { }
303
330
pub mod bsd44 { }
@@ -963,6 +990,9 @@ pub mod consts {
963
990
}
964
991
pub mod c99 {
965
992
}
993
+ #[ cfg( target_arch = "x86" ) ]
994
+ #[ cfg( target_arch = "x86_64" ) ]
995
+ #[ cfg( target_arch = "arm" ) ]
966
996
pub mod posix88 {
967
997
pub static O_RDONLY : int = 0 ;
968
998
pub static O_WRONLY : int = 1 ;
@@ -1007,6 +1037,51 @@ pub mod consts {
1007
1037
pub static SIGALRM : int = 14 ;
1008
1038
pub static SIGTERM : int = 15 ;
1009
1039
}
1040
+ #[ cfg( target_arch = "mips" ) ]
1041
+ pub mod posix88 {
1042
+ pub static O_RDONLY : int = 0 ;
1043
+ pub static O_WRONLY : int = 1 ;
1044
+ pub static O_RDWR : int = 2 ;
1045
+ pub static O_APPEND : int = 8 ;
1046
+ pub static O_CREAT : int = 256 ;
1047
+ pub static O_EXCL : int = 1024 ;
1048
+ pub static O_TRUNC : int = 512 ;
1049
+ pub static S_IFIFO : int = 4096 ;
1050
+ pub static S_IFCHR : int = 8192 ;
1051
+ pub static S_IFBLK : int = 24576 ;
1052
+ pub static S_IFDIR : int = 16384 ;
1053
+ pub static S_IFREG : int = 32768 ;
1054
+ pub static S_IFMT : int = 61440 ;
1055
+ pub static S_IEXEC : int = 64 ;
1056
+ pub static S_IWRITE : int = 128 ;
1057
+ pub static S_IREAD : int = 256 ;
1058
+ pub static S_IRWXU : int = 448 ;
1059
+ pub static S_IXUSR : int = 64 ;
1060
+ pub static S_IWUSR : int = 128 ;
1061
+ pub static S_IRUSR : int = 256 ;
1062
+ pub static F_OK : int = 0 ;
1063
+ pub static R_OK : int = 4 ;
1064
+ pub static W_OK : int = 2 ;
1065
+ pub static X_OK : int = 1 ;
1066
+ pub static STDIN_FILENO : int = 0 ;
1067
+ pub static STDOUT_FILENO : int = 1 ;
1068
+ pub static STDERR_FILENO : int = 2 ;
1069
+ pub static F_LOCK : int = 1 ;
1070
+ pub static F_TEST : int = 3 ;
1071
+ pub static F_TLOCK : int = 2 ;
1072
+ pub static F_ULOCK : int = 0 ;
1073
+ pub static SIGHUP : int = 1 ;
1074
+ pub static SIGINT : int = 2 ;
1075
+ pub static SIGQUIT : int = 3 ;
1076
+ pub static SIGILL : int = 4 ;
1077
+ pub static SIGABRT : int = 6 ;
1078
+ pub static SIGFPE : int = 8 ;
1079
+ pub static SIGKILL : int = 9 ;
1080
+ pub static SIGSEGV : int = 11 ;
1081
+ pub static SIGPIPE : int = 13 ;
1082
+ pub static SIGALRM : int = 14 ;
1083
+ pub static SIGTERM : int = 15 ;
1084
+ }
1010
1085
pub mod posix01 {
1011
1086
pub static SIGTRAP : int = 5 ;
1012
1087
@@ -1026,11 +1101,20 @@ pub mod consts {
1026
1101
}
1027
1102
pub mod bsd44 {
1028
1103
}
1104
+ #[ cfg( target_arch = "x86" ) ]
1105
+ #[ cfg( target_arch = "x86_64" ) ]
1106
+ #[ cfg( target_arch = "arm" ) ]
1029
1107
pub mod extra {
1030
1108
pub static O_RSYNC : int = 1052672 ;
1031
1109
pub static O_DSYNC : int = 4096 ;
1032
1110
pub static O_SYNC : int = 1052672 ;
1033
1111
}
1112
+ #[ cfg( target_arch = "mips" ) ]
1113
+ pub mod extra {
1114
+ pub static O_RSYNC : int = 16400 ;
1115
+ pub static O_DSYNC : int = 16 ;
1116
+ pub static O_SYNC : int = 16400 ;
1117
+ }
1034
1118
}
1035
1119
1036
1120
#[ cfg( target_os = "freebsd" ) ]
0 commit comments