File tree 3 files changed +47
-1
lines changed
3 files changed +47
-1
lines changed Original file line number Diff line number Diff line change @@ -130,6 +130,22 @@ macro_rules! libc_bitflags {
130
130
}
131
131
} ;
132
132
133
+ // Munch last ident with as
134
+ ( @accumulate_flags
135
+ $prefix: tt,
136
+ [ $( $flags: tt) * ] ;
137
+ $flag: ident as $ty: ty
138
+ ) => {
139
+ libc_bitflags! {
140
+ @accumulate_flags
141
+ $prefix,
142
+ [
143
+ $( $flags) *
144
+ const $flag = libc:: $flag as $ty;
145
+ ] ;
146
+ }
147
+ } ;
148
+
133
149
// Munch an ident; covers terminating comma case.
134
150
( @accumulate_flags
135
151
$prefix: tt,
@@ -147,6 +163,23 @@ macro_rules! libc_bitflags {
147
163
}
148
164
} ;
149
165
166
+ // Munch an ident; covers terminating comma case with as.
167
+ ( @accumulate_flags
168
+ $prefix: tt,
169
+ [ $( $flags: tt) * ] ;
170
+ $flag: ident as $ty: ty, $( $tail: tt) *
171
+ ) => {
172
+ libc_bitflags! {
173
+ @accumulate_flags
174
+ $prefix,
175
+ [
176
+ $( $flags) *
177
+ const $flag = libc:: $flag as $ty;
178
+ ] ;
179
+ $( $tail) *
180
+ }
181
+ } ;
182
+
150
183
// (non-pub) Entry rule.
151
184
(
152
185
$( #[ $attr: meta] ) *
Original file line number Diff line number Diff line change @@ -198,6 +198,7 @@ pub const SIGIOT : Signal = SIGABRT;
198
198
pub const SIGPOLL : Signal = SIGIO ;
199
199
pub const SIGUNUSED : Signal = SIGSYS ;
200
200
201
+ #[ cfg( not( target_os = "android" ) ) ]
201
202
libc_bitflags ! {
202
203
pub flags SaFlags : libc:: c_int {
203
204
SA_NOCLDSTOP ,
@@ -210,6 +211,19 @@ libc_bitflags!{
210
211
}
211
212
}
212
213
214
+ #[ cfg( target_os = "android" ) ]
215
+ libc_bitflags ! {
216
+ pub flags SaFlags : libc:: c_ulong {
217
+ SA_NOCLDSTOP as libc:: c_ulong,
218
+ SA_NOCLDWAIT as libc:: c_ulong,
219
+ SA_NODEFER as libc:: c_ulong,
220
+ SA_ONSTACK as libc:: c_ulong,
221
+ SA_RESETHAND as libc:: c_ulong,
222
+ SA_RESTART as libc:: c_ulong,
223
+ SA_SIGINFO as libc:: c_ulong,
224
+ }
225
+ }
226
+
213
227
#[ repr( i32 ) ]
214
228
#[ derive( Clone , Copy , PartialEq ) ]
215
229
pub enum SigmaskHow {
Original file line number Diff line number Diff line change @@ -39,7 +39,6 @@ mod ffi {
39
39
pub use self :: non_android:: * ;
40
40
41
41
// On Android before 5.0, Bionic directly inline these to ioctl() calls.
42
- #[ inline]
43
42
#[ cfg( all( target_os = "android" , not( target_arch = "mips" ) ) ) ]
44
43
mod android {
45
44
use libc;
You can’t perform that action at this time.
0 commit comments