File tree Expand file tree Collapse file tree 2 files changed +27
-25
lines changed
src/unix/linux_like/linux/gnu/b32 Expand file tree Collapse file tree 2 files changed +27
-25
lines changed Original file line number Diff line number Diff line change @@ -5,22 +5,39 @@ use pthread_mutex_t;
5
5
pub type c_long = i32 ;
6
6
pub type c_ulong = u32 ;
7
7
pub type clock_t = i32 ;
8
- pub type time_t = i32 ;
9
- pub type suseconds_t = i32 ;
10
- pub type ino_t = u32 ;
11
- pub type off_t = i32 ;
12
- pub type blkcnt_t = i32 ;
13
-
14
- pub type fsblkcnt_t = :: c_ulong ;
15
- pub type fsfilcnt_t = :: c_ulong ;
16
- pub type rlim_t = c_ulong ;
8
+
17
9
pub type shmatt_t = :: c_ulong ;
18
10
pub type msgqnum_t = :: c_ulong ;
19
11
pub type msglen_t = :: c_ulong ;
20
- pub type blksize_t = i32 ;
21
12
pub type nlink_t = u32 ;
22
13
pub type __u64 = :: c_ulonglong ;
23
14
pub type __fsword_t = i32 ;
15
+ pub type fsblkcnt64_t = u64 ;
16
+ pub type fsfilcnt64_t = u64 ;
17
+
18
+ cfg_if ! {
19
+ if #[ cfg( target_arch = "riscv32" ) ] {
20
+ pub type time_t = i64 ;
21
+ pub type suseconds_t = i64 ;
22
+ pub type ino_t = u64 ;
23
+ pub type off_t = i64 ;
24
+ pub type blkcnt_t = i64 ;
25
+ pub type fsblkcnt_t = u64 ;
26
+ pub type fsfilcnt_t = u64 ;
27
+ pub type rlim_t = u64 ;
28
+ pub type blksize_t = i64 ;
29
+ } else {
30
+ pub type time_t = i32 ;
31
+ pub type suseconds_t = i32 ;
32
+ pub type ino_t = u32 ;
33
+ pub type off_t = i32 ;
34
+ pub type blkcnt_t = i32 ;
35
+ pub type fsblkcnt_t = :: c_ulong;
36
+ pub type fsfilcnt_t = :: c_ulong;
37
+ pub type rlim_t = c_ulong;
38
+ pub type blksize_t = i32 ;
39
+ }
40
+ }
24
41
25
42
s ! {
26
43
pub struct stat {
Original file line number Diff line number Diff line change 1
1
//! RISC-V-specific definitions for 32-bit linux-like values
2
2
3
3
pub type c_char = u8 ;
4
- pub type c_ulong = u32 ;
5
4
pub type wchar_t = :: c_int ;
6
5
7
- pub type nlink_t = :: c_uint ;
8
- pub type fsblkcnt64_t = u64 ;
9
- pub type fsfilcnt64_t = u64 ;
10
- pub type suseconds_t = i64 ;
11
- pub type time_t = i64 ;
12
- pub type fsfilcnt_t = u64 ;
13
- pub type fsblkcnt_t = u64 ;
14
- pub type blksize_t = i64 ;
15
- pub type blkcnt_t = i64 ;
16
- pub type rlim_t = u64 ;
17
- pub type off_t = i64 ;
18
- pub type ino_t = u64 ;
19
- pub type __u64 = :: c_ulonglong ;
20
-
21
6
s ! {
22
7
pub struct pthread_attr_t {
23
8
__size: [ :: c_ulong; 7 ] ,
You can’t perform that action at this time.
0 commit comments