From d5647a8ea3932c8a44dad13699e128d3d3fee255 Mon Sep 17 00:00:00 2001 From: Steven Fackler Date: Sun, 28 Sep 2014 22:31:50 -0700 Subject: Fix libstd --- src/libstd/rt/backtrace.rs | 28 ++++++++++++++-------------- 1 file changed, 14 insertions(+), 14 deletions(-) (limited to 'src/libstd/rt/backtrace.rs') diff --git a/src/libstd/rt/backtrace.rs b/src/libstd/rt/backtrace.rs index aa9505d83fc..33f8713e1a1 100644 --- a/src/libstd/rt/backtrace.rs +++ b/src/libstd/rt/backtrace.rs @@ -253,7 +253,7 @@ mod imp { /// play well with green threads, so while it is extremely nice /// and simple to use it should be used only on iOS devices as the /// only viable option. - #[cfg(target_os = "ios", target_arch = "arm")] + #[cfg(all(target_os = "ios", target_arch = "arm"))] #[inline(never)] pub fn write(w: &mut Writer) -> IoResult<()> { use iter::{Iterator, range}; @@ -284,7 +284,7 @@ mod imp { result::fold(iter, (), |_, _| ()) } - #[cfg(not(target_os = "ios", target_arch = "arm"))] + #[cfg(not(all(target_os = "ios", target_arch = "arm")))] #[inline(never)] // if we know this is a function call, we can skip it when // tracing pub fn write(w: &mut Writer) -> IoResult<()> { @@ -365,8 +365,7 @@ mod imp { } } - #[cfg(target_os = "macos")] - #[cfg(target_os = "ios")] + #[cfg(any(target_os = "macos", target_os = "ios"))] fn print(w: &mut Writer, idx: int, addr: *mut libc::c_void) -> IoResult<()> { use intrinsics; #[repr(C)] @@ -391,7 +390,7 @@ mod imp { } } - #[cfg(not(target_os = "macos"), not(target_os = "ios"))] + #[cfg(not(any(target_os = "macos", target_os = "ios")))] fn print(w: &mut Writer, idx: int, addr: *mut libc::c_void) -> IoResult<()> { use collections::Collection; use iter::Iterator; @@ -571,16 +570,17 @@ mod imp { extern { // No native _Unwind_Backtrace on iOS - #[cfg(not(target_os = "ios", target_arch = "arm"))] + #[cfg(not(all(target_os = "ios", target_arch = "arm")))] pub fn _Unwind_Backtrace(trace: _Unwind_Trace_Fn, trace_argument: *mut libc::c_void) -> _Unwind_Reason_Code; - #[cfg(not(target_os = "android"), - not(target_os = "linux", target_arch = "arm"))] + #[cfg(all(not(target_os = "android"), + not(all(target_os = "linux", target_arch = "arm"))))] pub fn _Unwind_GetIP(ctx: *mut _Unwind_Context) -> libc::uintptr_t; - #[cfg(not(target_os = "android"), - not(target_os = "linux", target_arch = "arm"))] + + #[cfg(all(not(target_os = "android"), + not(all(target_os = "linux", target_arch = "arm"))))] pub fn _Unwind_FindEnclosingFunction(pc: *mut libc::c_void) -> *mut libc::c_void; } @@ -588,8 +588,8 @@ mod imp { // On android, the function _Unwind_GetIP is a macro, and this is the // expansion of the macro. This is all copy/pasted directly from the // header file with the definition of _Unwind_GetIP. - #[cfg(target_os = "android")] - #[cfg(target_os = "linux", target_arch = "arm")] + #[cfg(any(target_os = "android", + all(target_os = "linux", target_arch = "arm")))] pub unsafe fn _Unwind_GetIP(ctx: *mut _Unwind_Context) -> libc::uintptr_t { #[repr(C)] enum _Unwind_VRS_Result { @@ -634,8 +634,8 @@ mod imp { // This function also doesn't exist on Android or ARM/Linux, so make it // a no-op - #[cfg(target_os = "android")] - #[cfg(target_os = "linux", target_arch = "arm")] + #[cfg(any(target_os = "android", + all(target_os = "linux", target_arch = "arm")))] pub unsafe fn _Unwind_FindEnclosingFunction(pc: *mut libc::c_void) -> *mut libc::c_void { -- cgit 1.4.1-3-g733a5