@@ -19,41 +19,42 @@ pub use self::signal::{SA_NODEFER, SA_NOCLDWAIT, SA_SIGINFO, SIGCHLD};
1919
2020use libc;
2121
22- #[ cfg( target_os = "macos" ) ]
23- # [ cfg ( target_os = "ios" ) ]
24- # [ cfg ( target_os = "freebsd" ) ]
25- # [ cfg ( target_os = "dragonfly" ) ]
22+ #[ cfg( any ( target_os = "macos" ,
23+ target_os = "ios" ,
24+ target_os = "freebsd" ,
25+ target_os = "dragonfly" ) ) ]
2626pub static FIONBIO : libc:: c_ulong = 0x8004667e ;
27- #[ cfg( target_os = "linux" , target_arch = "x86" ) ]
28- #[ cfg( target_os = "linux" , target_arch = "x86_64" ) ]
29- #[ cfg( target_os = "linux" , target_arch = "arm" ) ]
30- #[ cfg( target_os = "android" ) ]
27+ #[ cfg( any( all( target_os = "linux" ,
28+ any( target_arch = "x86" ,
29+ target_arch = "x86_64" ,
30+ target_arch = "arm" ) ) ,
31+ target_os = "android" ) ) ]
3132pub static FIONBIO : libc:: c_ulong = 0x5421 ;
32- #[ cfg( target_os = "linux" , target_arch = "mips" ) ]
33- # [ cfg ( target_os = "linux " , target_arch = "mipsel" ) ]
33+ #[ cfg( all ( target_os = "linux" ,
34+ any ( target_arch = "mips " , target_arch = "mipsel" ) ) ) ]
3435pub static FIONBIO : libc:: c_ulong = 0x667e ;
3536
36- #[ cfg( target_os = "macos" ) ]
37- # [ cfg ( target_os = "ios" ) ]
38- # [ cfg ( target_os = "freebsd" ) ]
39- # [ cfg ( target_os = "dragonfly" ) ]
37+ #[ cfg( any ( target_os = "macos" ,
38+ target_os = "ios" ,
39+ target_os = "freebsd" ,
40+ target_os = "dragonfly" ) ) ]
4041pub static FIOCLEX : libc:: c_ulong = 0x20006601 ;
41- #[ cfg( target_os = "linux" , target_arch = "x86" ) ]
42- #[ cfg( target_os = "linux" , target_arch = "x86_64" ) ]
43- #[ cfg( target_os = "linux" , target_arch = "arm" ) ]
44- #[ cfg( target_os = "android" ) ]
42+ #[ cfg( any( all( target_os = "linux" ,
43+ any( target_arch = "x86" ,
44+ target_arch = "x86_64" ,
45+ target_arch = "arm" ) ) ,
46+ target_os = "android" ) ) ]
4547pub static FIOCLEX : libc:: c_ulong = 0x5451 ;
46- #[ cfg( target_os = "linux" , target_arch = "mips" ) ]
47- # [ cfg ( target_os = "linux " , target_arch = "mipsel" ) ]
48+ #[ cfg( all ( target_os = "linux" ,
49+ any ( target_arch = "mips " , target_arch = "mipsel" ) ) ) ]
4850pub static FIOCLEX : libc:: c_ulong = 0x6601 ;
4951
50- #[ cfg( target_os = "macos" ) ]
51- # [ cfg ( target_os = "ios" ) ]
52- # [ cfg ( target_os = "freebsd" ) ]
53- # [ cfg ( target_os = "dragonfly" ) ]
52+ #[ cfg( any ( target_os = "macos" ,
53+ target_os = "ios" ,
54+ target_os = "freebsd" ,
55+ target_os = "dragonfly" ) ) ]
5456pub static MSG_DONTWAIT : libc:: c_int = 0x80 ;
55- #[ cfg( target_os = "linux" ) ]
56- #[ cfg( target_os = "android" ) ]
57+ #[ cfg( any( target_os = "linux" , target_os = "android" ) ) ]
5758pub static MSG_DONTWAIT : libc:: c_int = 0x40 ;
5859
5960pub static WNOHANG : libc:: c_int = 1 ;
@@ -86,8 +87,7 @@ extern {
8687 pub fn sigemptyset ( set : * mut sigset_t ) -> libc:: c_int ;
8788}
8889
89- #[ cfg( target_os = "macos" ) ]
90- #[ cfg( target_os = "ios" ) ]
90+ #[ cfg( any( target_os = "macos" , target_os = "ios" ) ) ]
9191mod select {
9292 pub static FD_SETSIZE : uint = 1024 ;
9393
@@ -101,10 +101,10 @@ mod select {
101101 }
102102}
103103
104- #[ cfg( target_os = "android" ) ]
105- # [ cfg ( target_os = "freebsd" ) ]
106- # [ cfg ( target_os = "dragonfly" ) ]
107- # [ cfg ( target_os = "linux" ) ]
104+ #[ cfg( any ( target_os = "android" ,
105+ target_os = "freebsd" ,
106+ target_os = "dragonfly" ,
107+ target_os = "linux" ) ) ]
108108mod select {
109109 use std:: uint;
110110 use libc;
@@ -123,10 +123,11 @@ mod select {
123123 }
124124}
125125
126- #[ cfg( target_os = "linux" , target_arch = "x86" ) ]
127- #[ cfg( target_os = "linux" , target_arch = "x86_64" ) ]
128- #[ cfg( target_os = "linux" , target_arch = "arm" ) ]
129- #[ cfg( target_os = "android" ) ]
126+ #[ cfg( any( all( target_os = "linux" ,
127+ any( target_arch = "x86" ,
128+ target_arch = "x86_64" ,
129+ target_arch = "arm" ) ) ,
130+ target_os = "android" ) ) ]
130131mod signal {
131132 use libc;
132133
@@ -173,8 +174,8 @@ mod signal {
173174 }
174175}
175176
176- #[ cfg( target_os = "linux" , target_arch = "mips" ) ]
177- # [ cfg ( target_os = "linux " , target_arch = "mipsel" ) ]
177+ #[ cfg( all ( target_os = "linux" ,
178+ any ( target_arch = "mips " , target_arch = "mipsel" ) ) ) ]
178179mod signal {
179180 use libc;
180181
@@ -215,10 +216,10 @@ mod signal {
215216 }
216217}
217218
218- #[ cfg( target_os = "macos" ) ]
219- # [ cfg ( target_os = "ios" ) ]
220- # [ cfg ( target_os = "freebsd" ) ]
221- # [ cfg ( target_os = "dragonfly" ) ]
219+ #[ cfg( any ( target_os = "macos" ,
220+ target_os = "ios" ,
221+ target_os = "freebsd" ,
222+ target_os = "dragonfly" ) ) ]
222223mod signal {
223224 use libc;
224225
0 commit comments