Skip to content

File tree

3 files changed

+43
-5
lines changed

3 files changed

+43
-5
lines changed

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

Lines changed: 23 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -5,8 +5,12 @@ pub type wchar_t = i32;
55

66
s! {
77
pub struct stat {
8+
#[cfg(not(gnu_time_bits64))]
89
pub st_dev: c_ulong,
10+
#[cfg(gnu_time_bits64)]
11+
pub st_dev: crate::dev_t,
912

13+
#[cfg(not(gnu_time_bits64))]
1014
st_pad1: [c_long; 3],
1115

1216
pub st_ino: crate::ino_t,
@@ -16,29 +20,46 @@ s! {
1620
pub st_uid: crate::uid_t,
1721
pub st_gid: crate::gid_t,
1822

23+
#[cfg(not(gnu_time_bits64))]
1924
pub st_rdev: c_ulong,
25+
#[cfg(gnu_time_bits64)]
26+
pub st_rdev: crate::dev_t,
2027

2128
#[cfg(not(gnu_file_offset_bits64))]
2229
st_pad2: [c_long; 2],
23-
#[cfg(gnu_file_offset_bits64)]
30+
#[cfg(all(not(gnu_time_bits64), gnu_file_offset_bits64))]
2431
st_pad2: [c_long; 3],
2532

2633
pub st_size: off_t,
2734

2835
#[cfg(not(gnu_file_offset_bits64))]
2936
st_pad3: c_long,
3037

38+
#[cfg(gnu_time_bits64)]
39+
pub st_blksize: crate::blksize_t,
40+
#[cfg(gnu_time_bits64)]
41+
pub st_blocks: crate::blkcnt_t,
42+
3143
pub st_atime: crate::time_t,
44+
#[cfg(gnu_time_bits64)]
45+
_atime_pad: c_int,
3246
pub st_atime_nsec: c_long,
3347
pub st_mtime: crate::time_t,
48+
#[cfg(gnu_time_bits64)]
49+
_mtime_pad: c_int,
3450
pub st_mtime_nsec: c_long,
3551
pub st_ctime: crate::time_t,
52+
#[cfg(gnu_time_bits64)]
53+
_ctime_pad: c_int,
3654
pub st_ctime_nsec: c_long,
3755

56+
#[cfg(not(gnu_time_bits64))]
3857
pub st_blksize: crate::blksize_t,
39-
#[cfg(gnu_file_offset_bits64)]
58+
#[cfg(all(not(gnu_time_bits64), gnu_file_offset_bits64))]
4059
st_pad4: c_long,
60+
#[cfg(not(gnu_time_bits64))]
4161
pub st_blocks: crate::blkcnt_t,
62+
#[cfg(not(gnu_time_bits64))]
4263
st_pad5: [c_long; 14],
4364
}
4465

src/unix/linux_like/linux/gnu/b32/mod.rs

Lines changed: 11 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -80,11 +80,12 @@ cfg_if! {
8080
pub struct stat {
8181
pub st_dev: crate::dev_t,
8282

83+
#[cfg(not(gnu_time_bits64))]
8384
__pad1: c_uint,
8485

85-
#[cfg(not(gnu_file_offset_bits64))]
86+
#[cfg(any(gnu_time_bits64, not(gnu_file_offset_bits64)))]
8687
pub st_ino: crate::ino_t,
87-
#[cfg(all(gnu_file_offset_bits64))]
88+
#[cfg(all(not(gnu_time_bits64), gnu_file_offset_bits64))]
8889
__st_ino: __ino_t,
8990

9091
pub st_mode: crate::mode_t,
@@ -94,6 +95,7 @@ cfg_if! {
9495

9596
pub st_rdev: crate::dev_t,
9697

98+
#[cfg(not(gnu_time_bits64))]
9799
__pad2: c_uint,
98100

99101
pub st_size: off_t,
@@ -103,16 +105,22 @@ cfg_if! {
103105

104106
pub st_atime: crate::time_t,
105107
pub st_atime_nsec: c_long,
108+
#[cfg(gnu_time_bits64)]
109+
_atime_pad: c_int,
106110
pub st_mtime: crate::time_t,
107111
pub st_mtime_nsec: c_long,
112+
#[cfg(gnu_time_bits64)]
113+
_mtime_pad: c_int,
108114
pub st_ctime: crate::time_t,
109115
pub st_ctime_nsec: c_long,
116+
#[cfg(gnu_time_bits64)]
117+
_ctime_pad: c_int,
110118

111119
#[cfg(not(gnu_file_offset_bits64))]
112120
__glibc_reserved4: c_long,
113121
#[cfg(not(gnu_file_offset_bits64))]
114122
__glibc_reserved5: c_long,
115-
#[cfg(gnu_file_offset_bits64)]
123+
#[cfg(all(not(gnu_time_bits64), gnu_file_offset_bits64))]
116124
pub st_ino: crate::ino_t,
117125
}
118126
}

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

Lines changed: 9 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -67,17 +67,26 @@ s! {
6767
pub st_uid: crate::uid_t,
6868
pub st_gid: crate::gid_t,
6969
pub st_rdev: crate::dev_t,
70+
#[cfg(not(gnu_time_bits64))]
7071
__pad2: c_ushort,
7172
pub st_size: off_t,
7273
pub st_blksize: crate::blksize_t,
7374
pub st_blocks: crate::blkcnt_t,
7475
pub st_atime: crate::time_t,
76+
#[cfg(gnu_time_bits64)]
77+
_atime_pad: c_int,
7578
pub st_atime_nsec: c_long,
7679
pub st_mtime: crate::time_t,
80+
#[cfg(gnu_time_bits64)]
81+
_mtime_pad: c_int,
7782
pub st_mtime_nsec: c_long,
7883
pub st_ctime: crate::time_t,
84+
#[cfg(gnu_time_bits64)]
85+
_ctime_pad: c_int,
7986
pub st_ctime_nsec: c_long,
87+
#[cfg(not(gnu_time_bits64))]
8088
__glibc_reserved4: c_ulong,
89+
#[cfg(not(gnu_time_bits64))]
8190
__glibc_reserved5: c_ulong,
8291
}
8392

0 commit comments

Comments
 (0)