@@ -11,11 +11,16 @@ pub type msglen_t = u64;
11
11
pub type fsblkcnt_t = u64 ;
12
12
pub type fsfilcnt_t = u64 ;
13
13
pub type rlim_t = u64 ;
14
- #[ cfg( all( target_arch = "x86_64" , target_pointer_width = "32" ) ) ]
15
- pub type __syscall_ulong_t = :: c_ulonglong ;
16
- #[ cfg( not( all( target_arch = "x86_64" , target_pointer_width = "32" ) ) ) ]
17
- pub type __syscall_ulong_t = :: c_ulong ;
18
14
15
+ cfg_if ! {
16
+ if #[ cfg( all( target_arch = "x86_64" , target_pointer_width = "32" ) ) ] {
17
+ pub type __syscall_ulong_t = :: c_ulonglong;
18
+ pub type __syscall_slong_t = :: c_longlong;
19
+ } else {
20
+ pub type __syscall_ulong_t = :: c_ulong;
21
+ pub type __syscall_slong_t = :: c_long;
22
+ }
23
+ }
19
24
cfg_if ! {
20
25
if #[ cfg( all( target_arch = "aarch64" , target_pointer_width = "32" ) ) ] {
21
26
pub type clock_t = i32 ;
93
98
__glibc_reserved3: :: __syscall_ulong_t,
94
99
__glibc_reserved4: :: __syscall_ulong_t,
95
100
}
96
- pub struct timex {
97
- pub modes: :: c_uint,
98
- #[ cfg( all( target_arch = "x86_64" , target_pointer_width = "32" ) ) ]
99
- pub offset: i64 ,
100
- #[ cfg( not( all( target_arch = "x86_64" , target_pointer_width = "32" ) ) ) ]
101
- pub offset: :: c_long,
102
- #[ cfg( all( target_arch = "x86_64" , target_pointer_width = "32" ) ) ]
103
- pub freq: i64 ,
104
- #[ cfg( not( all( target_arch = "x86_64" , target_pointer_width = "32" ) ) ) ]
105
- pub freq: :: c_long,
106
- #[ cfg( all( target_arch = "x86_64" , target_pointer_width = "32" ) ) ]
107
- pub maxerror: i64 ,
108
- #[ cfg( not( all( target_arch = "x86_64" , target_pointer_width = "32" ) ) ) ]
109
- pub maxerror: :: c_long,
110
- #[ cfg( all( target_arch = "x86_64" , target_pointer_width = "32" ) ) ]
111
- pub esterror: i64 ,
112
- #[ cfg( not( all( target_arch = "x86_64" , target_pointer_width = "32" ) ) ) ]
113
- pub esterror: :: c_long,
114
- pub status: :: c_int,
115
- #[ cfg( all( target_arch = "x86_64" , target_pointer_width = "32" ) ) ]
116
- pub constant: i64 ,
117
- #[ cfg( not( all( target_arch = "x86_64" , target_pointer_width = "32" ) ) ) ]
118
- pub constant: :: c_long,
119
- #[ cfg( all( target_arch = "x86_64" , target_pointer_width = "32" ) ) ]
120
- pub precision: i64 ,
121
- #[ cfg( not( all( target_arch = "x86_64" , target_pointer_width = "32" ) ) ) ]
122
- pub precision: :: c_long,
123
- #[ cfg( all( target_arch = "x86_64" , target_pointer_width = "32" ) ) ]
124
- pub tolerance: i64 ,
125
- #[ cfg( not( all( target_arch = "x86_64" , target_pointer_width = "32" ) ) ) ]
126
- pub tolerance: :: c_long,
127
- pub time: :: timeval,
128
- #[ cfg( all( target_arch = "x86_64" , target_pointer_width = "32" ) ) ]
129
- pub tick: i64 ,
130
- #[ cfg( not( all( target_arch = "x86_64" , target_pointer_width = "32" ) ) ) ]
131
- pub tick: :: c_long,
132
- #[ cfg( all( target_arch = "x86_64" , target_pointer_width = "32" ) ) ]
133
- pub ppsfreq: i64 ,
134
- #[ cfg( not( all( target_arch = "x86_64" , target_pointer_width = "32" ) ) ) ]
135
- pub ppsfreq: :: c_long,
136
- #[ cfg( all( target_arch = "x86_64" , target_pointer_width = "32" ) ) ]
137
- pub jitter: i64 ,
138
- #[ cfg( not( all( target_arch = "x86_64" , target_pointer_width = "32" ) ) ) ]
139
- pub jitter: :: c_long,
140
- pub shift: :: c_int,
141
- #[ cfg( all( target_arch = "x86_64" , target_pointer_width = "32" ) ) ]
142
- pub stabil: i64 ,
143
- #[ cfg( not( all( target_arch = "x86_64" , target_pointer_width = "32" ) ) ) ]
144
- pub stabil: :: c_long,
145
- #[ cfg( all( target_arch = "x86_64" , target_pointer_width = "32" ) ) ]
146
- pub jitcnt: i64 ,
147
- #[ cfg( not( all( target_arch = "x86_64" , target_pointer_width = "32" ) ) ) ]
148
- pub jitcnt: :: c_long,
149
- #[ cfg( all( target_arch = "x86_64" , target_pointer_width = "32" ) ) ]
150
- pub calcnt: i64 ,
151
- #[ cfg( not( all( target_arch = "x86_64" , target_pointer_width = "32" ) ) ) ]
152
- pub calcnt: :: c_long,
153
- #[ cfg( all( target_arch = "x86_64" , target_pointer_width = "32" ) ) ]
154
- pub errcnt: i64 ,
155
- #[ cfg( not( all( target_arch = "x86_64" , target_pointer_width = "32" ) ) ) ]
156
- pub errcnt: :: c_long,
157
- #[ cfg( all( target_arch = "x86_64" , target_pointer_width = "32" ) ) ]
158
- pub stbcnt: i64 ,
159
- #[ cfg( not( all( target_arch = "x86_64" , target_pointer_width = "32" ) ) ) ]
160
- pub stbcnt: :: c_long,
161
- pub tai: :: c_int,
162
- pub __unused1: i32 ,
163
- pub __unused2: i32 ,
164
- pub __unused3: i32 ,
165
- pub __unused4: i32 ,
166
- pub __unused5: i32 ,
167
- pub __unused6: i32 ,
168
- pub __unused7: i32 ,
169
- pub __unused8: i32 ,
170
- pub __unused9: i32 ,
171
- pub __unused10: i32 ,
172
- pub __unused11: i32 ,
173
- }
101
+ }
174
102
103
+ cfg_if ! {
104
+ if #[ cfg( all( target_arch = "x86_64" , target_pointer_width = "32" ) ) ] {
105
+ s!{
106
+ pub struct timex {
107
+ pub modes: :: c_uint,
108
+ pub __unused_pad1: i32 ,
109
+ pub offset: :: c_longlong,
110
+ pub freq: :: c_longlong,
111
+ pub maxerror: :: c_longlong,
112
+ pub esterror: :: c_longlong,
113
+ pub status: :: c_int,
114
+ pub __unused_pad2: i32 ,
115
+ pub constant: :: c_longlong,
116
+ pub precision: :: c_longlong,
117
+ pub tolerance: :: c_longlong,
118
+ pub time: :: timeval,
119
+ pub tick: :: c_longlong,
120
+ pub ppsfreq: :: c_longlong,
121
+ pub jitter: :: c_longlong,
122
+ pub shift: :: c_int,
123
+ pub __unused_pad3: i32 ,
124
+ pub stabil: :: c_longlong,
125
+ pub jitcnt: :: c_longlong,
126
+ pub calcnt: :: c_longlong,
127
+ pub errcnt: :: c_longlong,
128
+ pub stbcnt: :: c_longlong,
129
+ pub tai: :: c_int,
130
+ pub __unused1: i32 ,
131
+ pub __unused2: i32 ,
132
+ pub __unused3: i32 ,
133
+ pub __unused4: i32 ,
134
+ pub __unused5: i32 ,
135
+ pub __unused6: i32 ,
136
+ pub __unused7: i32 ,
137
+ pub __unused8: i32 ,
138
+ pub __unused9: i32 ,
139
+ pub __unused10: i32 ,
140
+ pub __unused11: i32 ,
141
+ }
142
+ }
143
+ } else {
144
+ s!{
145
+ pub struct timex {
146
+ pub modes: :: c_uint,
147
+ pub offset: :: __syscall_slong_t,
148
+ pub freq: :: __syscall_slong_t,
149
+ pub maxerror: :: __syscall_slong_t,
150
+ pub esterror: :: __syscall_slong_t,
151
+ pub status: :: c_int,
152
+ pub constant: :: __syscall_slong_t,
153
+ pub precision: :: __syscall_slong_t,
154
+ pub tolerance: :: __syscall_slong_t,
155
+ pub time: :: timeval,
156
+ pub tick: :: __syscall_slong_t,
157
+ pub ppsfreq: :: __syscall_slong_t,
158
+ pub jitter: :: __syscall_slong_t,
159
+ pub shift: :: c_int,
160
+ pub stabil: :: __syscall_slong_t,
161
+ pub jitcnt: :: __syscall_slong_t,
162
+ pub calcnt: :: __syscall_slong_t,
163
+ pub errcnt: :: __syscall_slong_t,
164
+ pub stbcnt: :: __syscall_slong_t,
165
+ pub tai: :: c_int,
166
+ pub __unused1: i32 ,
167
+ pub __unused2: i32 ,
168
+ pub __unused3: i32 ,
169
+ pub __unused4: i32 ,
170
+ pub __unused5: i32 ,
171
+ pub __unused6: i32 ,
172
+ pub __unused7: i32 ,
173
+ pub __unused8: i32 ,
174
+ pub __unused9: i32 ,
175
+ pub __unused10: i32 ,
176
+ pub __unused11: i32 ,
177
+ }
178
+ }
179
+ }
175
180
}
176
181
177
182
pub const __SIZEOF_PTHREAD_RWLOCKATTR_T: usize = 8 ;
0 commit comments