]> git.lizzy.rs Git - rust.git/commitdiff
Fix cfg syntax warnings in libnative
authorMichael Gehring <mg@ebfe.org>
Sun, 5 Oct 2014 16:30:04 +0000 (18:30 +0200)
committerMichael Gehring <mg@ebfe.org>
Sun, 5 Oct 2014 16:44:14 +0000 (18:44 +0200)
src/libnative/io/c_unix.rs

index 2601d493443a17099ab64da5652a23a39029aa08..a8ebcda3cdd1a7bc15db74deff0a6b780a4ef7f6 100644 (file)
@@ -232,11 +232,9 @@ mod signal {
     pub static SA_SIGINFO: libc::c_int = 0x0040;
     pub static SIGCHLD: libc::c_int = 20;
 
-    #[cfg(target_os = "macos")]
-    #[cfg(target_os = "ios")]
+    #[cfg(any(target_os = "macos", target_os = "ios"))]
     pub type sigset_t = u32;
-    #[cfg(target_os = "freebsd")]
-    #[cfg(target_os = "dragonfly")]
+    #[cfg(any(target_os = "freebsd", target_os = "dragonfly"))]
     #[repr(C)]
     pub struct sigset_t {
         bits: [u32, ..4],
@@ -254,8 +252,7 @@ pub struct siginfo {
         pub status: libc::c_int,
     }
 
-    #[cfg(target_os = "macos")]
-    #[cfg(target_os = "ios")]
+    #[cfg(any(target_os = "macos", target_os = "ios"))]
     #[repr(C)]
     pub struct sigaction {
         pub sa_handler: extern fn(libc::c_int),
@@ -264,8 +261,7 @@ pub struct sigaction {
         pub sa_flags: libc::c_int,
     }
 
-    #[cfg(target_os = "freebsd")]
-    #[cfg(target_os = "dragonfly")]
+    #[cfg(any(target_os = "freebsd", target_os = "dragonfly"))]
     #[repr(C)]
     pub struct sigaction {
         pub sa_handler: extern fn(libc::c_int),