Merge branch 'android-run-pass' of https://github.com/malbarbo/rust into rollup

This commit is contained in:
Alex Crichton
2018-01-26 06:52:36 -08:00
3 changed files with 5 additions and 24 deletions
+2 -13
View File
@@ -19,7 +19,8 @@ mod rusti {
}
}
#[cfg(any(target_os = "cloudabi",
#[cfg(any(target_os = "android",
target_os = "cloudabi",
target_os = "dragonfly",
target_os = "emscripten",
target_os = "freebsd",
@@ -80,15 +81,3 @@ pub fn main() {
}
}
}
#[cfg(target_os = "android")]
mod m {
#[main]
#[cfg(any(target_arch = "arm", target_arch = "aarch64"))]
pub fn main() {
unsafe {
assert_eq!(::rusti::pref_align_of::<u64>(), 8);
assert_eq!(::rusti::min_align_of::<u64>(), 8);
}
}
}
+2 -10
View File
@@ -38,7 +38,8 @@ struct Outer {
}
#[cfg(any(target_os = "cloudabi",
#[cfg(any(target_os = "android",
target_os = "cloudabi",
target_os = "dragonfly",
target_os = "emscripten",
target_os = "freebsd",
@@ -85,15 +86,6 @@ pub fn size() -> usize { 16 }
}
}
#[cfg(target_os = "android")]
mod m {
#[cfg(any(target_arch = "arm", target_arch = "aarch64"))]
pub mod m {
pub fn align() -> usize { 8 }
pub fn size() -> usize { 16 }
}
}
pub fn main() {
unsafe {
let x = Outer {c8: 22, t: Inner {c64: 44}};
@@ -35,7 +35,7 @@ fn main() {
unsafe {
// Install signal hander that runs on alternate signal stack.
let mut action: sigaction = std::mem::zeroed();
action.sa_flags = SA_SIGINFO | SA_ONSTACK;
action.sa_flags = (SA_ONSTACK | SA_SIGINFO) as _;
action.sa_sigaction = signal_handler as sighandler_t;
sigaction(SIGWINCH, &action, std::ptr::null_mut());