Skip to content

Commit ecb8b29

Browse files
danielframptonmyl7
authored andcommitted
Update stat structures and redirect all stat functions.
1 parent cc72dff commit ecb8b29

File tree

12 files changed

+101
-282
lines changed

12 files changed

+101
-282
lines changed

src/unix/linux_like/linux/musl/b32/arm/mod.rs

Lines changed: 10 additions & 22 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,6 @@
11
pub type c_char = u8;
22
pub type wchar_t = u32;
3+
pub type stat64 = ::stat;
34

45
s! {
56
pub struct stat {
@@ -15,35 +16,22 @@ s! {
1516
pub st_size: ::off_t,
1617
pub st_blksize: ::blksize_t,
1718
pub st_blocks: ::blkcnt_t,
18-
pub st_atime: ::time_t,
19-
pub st_atime_nsec: ::c_long,
20-
pub st_mtime: ::time_t,
21-
pub st_mtime_nsec: ::c_long,
22-
pub st_ctime: ::time_t,
23-
pub st_ctime_nsec: ::c_long,
19+
__st_atime32: ::c_long,
20+
__st_atime32_nsec: ::c_long,
21+
__st_mtime32: ::c_long,
22+
__st_mtime32_nsec: ::c_long,
23+
__st_ctime32: ::c_long,
24+
__st_ctime32_nsec: ::c_long,
2425
pub st_ino: ::ino_t,
25-
}
26-
27-
pub struct stat64 {
28-
pub st_dev: ::dev_t,
29-
__st_dev_padding: ::c_int,
30-
__st_ino_truncated: ::c_long,
31-
pub st_mode: ::mode_t,
32-
pub st_nlink: ::nlink_t,
33-
pub st_uid: ::uid_t,
34-
pub st_gid: ::gid_t,
35-
pub st_rdev: ::dev_t,
36-
__st_rdev_padding: ::c_int,
37-
pub st_size: ::off_t,
38-
pub st_blksize: ::blksize_t,
39-
pub st_blocks: ::blkcnt_t,
4026
pub st_atime: ::time_t,
4127
pub st_atime_nsec: ::c_long,
28+
__st_atime_nsec_padding: ::c_long,
4229
pub st_mtime: ::time_t,
4330
pub st_mtime_nsec: ::c_long,
31+
__st_mtime_nsec_padding: ::c_long,
4432
pub st_ctime: ::time_t,
4533
pub st_ctime_nsec: ::c_long,
46-
pub st_ino: ::ino_t,
34+
__st_ctime_nsec_padding: ::c_long,
4735
}
4836

4937
pub struct stack_t {

src/unix/linux_like/linux/musl/b32/mips/mod.rs

Lines changed: 11 additions & 24 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,6 @@
11
pub type c_char = i8;
22
pub type wchar_t = ::c_int;
3+
pub type stat64 = ::stat;
34

45
s! {
56
pub struct stat {
@@ -13,39 +14,25 @@ s! {
1314
pub st_rdev: ::dev_t,
1415
__st_padding2: [::c_long; 2],
1516
pub st_size: ::off_t,
16-
pub st_atime: ::time_t,
17-
pub st_atime_nsec: ::c_long,
18-
pub st_mtime: ::time_t,
19-
pub st_mtime_nsec: ::c_long,
20-
pub st_ctime: ::time_t,
21-
pub st_ctime_nsec: ::c_long,
17+
__st_atime32: ::c_long,
18+
__st_atime32_nsec: ::c_long,
19+
__st_mtime32: ::c_long,
20+
__st_mtime32_nsec: ::c_long,
21+
__st_ctime32: ::c_long,
22+
__st_ctime32_nsec: ::c_long,
2223
pub st_blksize: ::blksize_t,
2324
__st_padding3: ::c_long,
2425
pub st_blocks: ::blkcnt_t,
25-
__st_padding4: [::c_long; 14],
26-
}
27-
28-
pub struct stat64 {
29-
pub st_dev: ::dev_t,
30-
__st_padding1: [::c_long; 2],
31-
pub st_ino: ::ino64_t,
32-
pub st_mode: ::mode_t,
33-
pub st_nlink: ::nlink_t,
34-
pub st_uid: ::uid_t,
35-
pub st_gid: ::gid_t,
36-
pub st_rdev: ::dev_t,
37-
__st_padding2: [::c_long; 2],
38-
pub st_size: ::off_t,
3926
pub st_atime: ::time_t,
4027
pub st_atime_nsec: ::c_long,
28+
__st_atime_nsec_padding: ::c_long,
4129
pub st_mtime: ::time_t,
4230
pub st_mtime_nsec: ::c_long,
31+
__st_mtime_nsec_padding: ::c_long,
4332
pub st_ctime: ::time_t,
4433
pub st_ctime_nsec: ::c_long,
45-
pub st_blksize: ::blksize_t,
46-
__st_padding3: ::c_long,
47-
pub st_blocks: ::blkcnt64_t,
48-
__st_padding4: [::c_long; 14],
34+
__st_ctime_nsec_padding: ::c_long,
35+
__st_padding4: [::c_long; 2],
4936
}
5037

5138
pub struct stack_t {

src/unix/linux_like/linux/musl/b32/powerpc.rs

Lines changed: 10 additions & 21 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,6 @@
11
pub type c_char = u8;
22
pub type wchar_t = i32;
3+
pub type stat64 = ::stat;
34

45
s! {
56
pub struct stat {
@@ -14,34 +15,22 @@ s! {
1415
pub st_size: ::off_t,
1516
pub st_blksize: ::blksize_t,
1617
pub st_blocks: ::blkcnt_t,
17-
pub st_atime: ::time_t,
18-
pub st_atime_nsec: ::c_long,
19-
pub st_mtime: ::time_t,
20-
pub st_mtime_nsec: ::c_long,
21-
pub st_ctime: ::time_t,
22-
pub st_ctime_nsec: ::c_long,
18+
__st_atime32: ::c_long,
19+
__st_atime32_nsec: ::c_long,
20+
__st_mtime32: ::c_long,
21+
__st_mtime32_nsec: ::c_long,
22+
__st_ctime32: ::c_long,
23+
__st_ctime32_nsec: ::c_long,
2324
__unused: [::c_long; 2],
24-
}
25-
26-
pub struct stat64 {
27-
pub st_dev: ::dev_t,
28-
pub st_ino: ::ino_t,
29-
pub st_mode: ::mode_t,
30-
pub st_nlink: ::nlink_t,
31-
pub st_uid: ::uid_t,
32-
pub st_gid: ::gid_t,
33-
pub st_rdev: ::dev_t,
34-
__st_rdev_padding: ::c_short,
35-
pub st_size: ::off_t,
36-
pub st_blksize: ::blksize_t,
37-
pub st_blocks: ::blkcnt_t,
3825
pub st_atime: ::time_t,
3926
pub st_atime_nsec: ::c_long,
27+
__st_atime_nsec_padding: ::c_long,
4028
pub st_mtime: ::time_t,
4129
pub st_mtime_nsec: ::c_long,
30+
__st_mtime_nsec_padding: ::c_long,
4231
pub st_ctime: ::time_t,
4332
pub st_ctime_nsec: ::c_long,
44-
__unused: [::c_long; 2],
33+
__st_ctime_nsec_padding: ::c_long,
4534
}
4635

4736
pub struct stack_t {

src/unix/linux_like/linux/musl/b32/riscv32/mod.rs

Lines changed: 1 addition & 22 deletions
Original file line numberDiff line numberDiff line change
@@ -2,6 +2,7 @@
22
33
pub type c_char = u8;
44
pub type wchar_t = ::c_int;
5+
pub type stat64 = ::stat;
56

67
s! {
78
pub struct pthread_attr_t {
@@ -30,28 +31,6 @@ s! {
3031
__unused: [::c_int; 2usize],
3132
}
3233

33-
pub struct stat64 {
34-
pub st_dev: ::dev_t,
35-
pub st_ino: ::ino64_t,
36-
pub st_mode: ::mode_t,
37-
pub st_nlink: ::nlink_t,
38-
pub st_uid: ::uid_t,
39-
pub st_gid: ::gid_t,
40-
pub st_rdev: ::dev_t,
41-
pub __pad1: ::dev_t,
42-
pub st_size: ::off64_t,
43-
pub st_blksize: ::blksize_t,
44-
pub __pad2: ::c_int,
45-
pub st_blocks: ::blkcnt64_t,
46-
pub st_atime: ::time_t,
47-
pub st_atime_nsec: ::c_long,
48-
pub st_mtime: ::time_t,
49-
pub st_mtime_nsec: ::c_long,
50-
pub st_ctime: ::time_t,
51-
pub st_ctime_nsec: ::c_long,
52-
__unused: [::c_int; 2],
53-
}
54-
5534
pub struct statfs {
5635
pub f_type: ::c_long,
5736
pub f_bsize: ::c_long,

src/unix/linux_like/linux/musl/b32/x86/mod.rs

Lines changed: 10 additions & 22 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,6 @@
11
pub type c_char = i8;
22
pub type wchar_t = i32;
3+
pub type stat64 = ::stat;
34

45
s! {
56
pub struct stat {
@@ -15,35 +16,22 @@ s! {
1516
pub st_size: ::off_t,
1617
pub st_blksize: ::blksize_t,
1718
pub st_blocks: ::blkcnt_t,
18-
pub st_atime: ::time_t,
19-
pub st_atime_nsec: ::c_long,
20-
pub st_mtime: ::time_t,
21-
pub st_mtime_nsec: ::c_long,
22-
pub st_ctime: ::time_t,
23-
pub st_ctime_nsec: ::c_long,
19+
__st_atime32: ::c_long,
20+
__st_atime32_nsec: ::c_long,
21+
__st_mtime32: ::c_long,
22+
__st_mtime32_nsec: ::c_long,
23+
__st_ctime32: ::c_long,
24+
__st_ctime32_nsec: ::c_long,
2425
pub st_ino: ::ino_t,
25-
}
26-
27-
pub struct stat64 {
28-
pub st_dev: ::dev_t,
29-
__st_dev_padding: ::c_int,
30-
__st_ino_truncated: ::c_long,
31-
pub st_mode: ::mode_t,
32-
pub st_nlink: ::nlink_t,
33-
pub st_uid: ::uid_t,
34-
pub st_gid: ::gid_t,
35-
pub st_rdev: ::dev_t,
36-
__st_rdev_padding: ::c_int,
37-
pub st_size: ::off_t,
38-
pub st_blksize: ::blksize_t,
39-
pub st_blocks: ::blkcnt_t,
4026
pub st_atime: ::time_t,
4127
pub st_atime_nsec: ::c_long,
28+
__st_atime_nsec_padding: ::c_long,
4229
pub st_mtime: ::time_t,
4330
pub st_mtime_nsec: ::c_long,
31+
__st_mtime_nsec_padding: ::c_long,
4432
pub st_ctime: ::time_t,
4533
pub st_ctime_nsec: ::c_long,
46-
pub st_ino: ::ino_t,
34+
__st_ctime_nsec_padding: ::c_long,
4735
}
4836

4937
pub struct stack_t {

src/unix/linux_like/linux/musl/b64/aarch64/mod.rs

Lines changed: 1 addition & 22 deletions
Original file line numberDiff line numberDiff line change
@@ -4,6 +4,7 @@ pub type __s64 = ::c_longlong;
44
pub type wchar_t = u32;
55
pub type nlink_t = u32;
66
pub type blksize_t = ::c_int;
7+
pub type stat64 = ::stat;
78

89
s! {
910
pub struct stat {
@@ -28,28 +29,6 @@ s! {
2829
__unused: [::c_uint; 2],
2930
}
3031

31-
pub struct stat64 {
32-
pub st_dev: ::dev_t,
33-
pub st_ino: ::ino_t,
34-
pub st_mode: ::mode_t,
35-
pub st_nlink: ::nlink_t,
36-
pub st_uid: ::uid_t,
37-
pub st_gid: ::gid_t,
38-
pub st_rdev: ::dev_t,
39-
__pad0: ::c_ulong,
40-
pub st_size: ::off_t,
41-
pub st_blksize: ::blksize_t,
42-
__pad1: ::c_int,
43-
pub st_blocks: ::blkcnt_t,
44-
pub st_atime: ::time_t,
45-
pub st_atime_nsec: ::c_long,
46-
pub st_mtime: ::time_t,
47-
pub st_mtime_nsec: ::c_long,
48-
pub st_ctime: ::time_t,
49-
pub st_ctime_nsec: ::c_long,
50-
__unused: [::c_uint; 2],
51-
}
52-
5332
pub struct user_regs_struct {
5433
pub regs: [::c_ulonglong; 31],
5534
pub sp: ::c_ulonglong,

src/unix/linux_like/linux/musl/b64/mips64.rs

Lines changed: 1 addition & 24 deletions
Original file line numberDiff line numberDiff line change
@@ -4,6 +4,7 @@ pub type __u64 = ::c_ulong;
44
pub type __s64 = ::c_long;
55
pub type nlink_t = u64;
66
pub type blksize_t = i64;
7+
pub type stat64 = ::stat;
78

89
s! {
910
pub struct stat {
@@ -30,30 +31,6 @@ s! {
3031
__pad5: [::c_int; 14],
3132
}
3233

33-
pub struct stat64 {
34-
pub st_dev: ::dev_t,
35-
__pad1: [::c_int; 3],
36-
pub st_ino: ::ino_t,
37-
pub st_mode: ::mode_t,
38-
pub st_nlink: ::nlink_t,
39-
pub st_uid: ::uid_t,
40-
pub st_gid: ::gid_t,
41-
pub st_rdev: ::dev_t,
42-
__pad2: [::c_uint; 2],
43-
pub st_size: ::off_t,
44-
__pad3: ::c_int,
45-
pub st_atime: ::time_t,
46-
pub st_atime_nsec: ::c_long,
47-
pub st_mtime: ::time_t,
48-
pub st_mtime_nsec: ::c_long,
49-
pub st_ctime: ::time_t,
50-
pub st_ctime_nsec: ::c_long,
51-
pub st_blksize: ::blksize_t,
52-
__pad4: ::c_uint,
53-
pub st_blocks: ::blkcnt_t,
54-
__pad5: [::c_int; 14],
55-
}
56-
5734
pub struct statfs {
5835
pub f_type: ::c_ulong,
5936
pub f_bsize: ::c_ulong,

src/unix/linux_like/linux/musl/b64/powerpc64.rs

Lines changed: 1 addition & 21 deletions
Original file line numberDiff line numberDiff line change
@@ -4,6 +4,7 @@ pub type __u64 = ::c_ulong;
44
pub type __s64 = ::c_long;
55
pub type nlink_t = u64;
66
pub type blksize_t = ::c_long;
7+
pub type stat64 = ::stat;
78

89
s! {
910
pub struct stat {
@@ -27,27 +28,6 @@ s! {
2728
__unused: [::c_long; 3],
2829
}
2930

30-
pub struct stat64 {
31-
pub st_dev: ::dev_t,
32-
pub st_ino: ::ino64_t,
33-
pub st_nlink: ::nlink_t,
34-
pub st_mode: ::mode_t,
35-
pub st_uid: ::uid_t,
36-
pub st_gid: ::gid_t,
37-
__pad0: ::c_int,
38-
pub st_rdev: ::dev_t,
39-
pub st_size: ::off_t,
40-
pub st_blksize: ::blksize_t,
41-
pub st_blocks: ::blkcnt64_t,
42-
pub st_atime: ::time_t,
43-
pub st_atime_nsec: ::c_long,
44-
pub st_mtime: ::time_t,
45-
pub st_mtime_nsec: ::c_long,
46-
pub st_ctime: ::time_t,
47-
pub st_ctime_nsec: ::c_long,
48-
__reserved: [::c_long; 3],
49-
}
50-
5131
pub struct ipc_perm {
5232
pub __ipc_perm_key: ::key_t,
5333
pub uid: ::uid_t,

src/unix/linux_like/linux/musl/b64/riscv64/mod.rs

Lines changed: 1 addition & 22 deletions
Original file line numberDiff line numberDiff line change
@@ -9,6 +9,7 @@ pub type fsblkcnt64_t = ::c_ulong;
99
pub type fsfilcnt64_t = ::c_ulong;
1010
pub type __u64 = ::c_ulonglong;
1111
pub type __s64 = ::c_longlong;
12+
pub type stat64 = ::stat;
1213

1314
s! {
1415
pub struct pthread_attr_t {
@@ -37,28 +38,6 @@ s! {
3738
__unused: [::c_int; 2usize],
3839
}
3940

40-
pub struct stat64 {
41-
pub st_dev: ::dev_t,
42-
pub st_ino: ::ino64_t,
43-
pub st_mode: ::mode_t,
44-
pub st_nlink: ::nlink_t,
45-
pub st_uid: ::uid_t,
46-
pub st_gid: ::gid_t,
47-
pub st_rdev: ::dev_t,
48-
pub __pad1: ::dev_t,
49-
pub st_size: ::off64_t,
50-
pub st_blksize: ::blksize_t,
51-
pub __pad2: ::c_int,
52-
pub st_blocks: ::blkcnt_t,
53-
pub st_atime: ::time_t,
54-
pub st_atime_nsec: ::c_long,
55-
pub st_mtime: ::time_t,
56-
pub st_mtime_nsec: ::c_long,
57-
pub st_ctime: ::time_t,
58-
pub st_ctime_nsec: ::c_long,
59-
__unused: [::c_int; 2],
60-
}
61-
6241
pub struct statfs {
6342
pub f_type: ::c_long,
6443
pub f_bsize: ::c_long,

0 commit comments

Comments
 (0)