Auto merge of #23372 - tamird:fix-ios-compilation, r=alexcrichton

r? @alexcrichton cc @vhbit
This commit is contained in:
bors 2015-03-15 13:32:21 +00:00
commit 95018eec69
2 changed files with 3 additions and 13 deletions

View File

@ -118,7 +118,7 @@ fn backtrace(buf: *mut *mut libc::c_void,
// local, it still displays much nicer backtraces when a
// couple of tasks panic simultaneously
static LOCK: StaticMutex = MUTEX_INIT;
let _g = unsafe { LOCK.lock() };
let _g = LOCK.lock();
try!(writeln!(w, "stack backtrace:"));
// 100 lines should be enough

View File

@ -23,6 +23,8 @@ pub struct TTY {
}
#[cfg(any(target_os = "macos",
target_os = "ios",
target_os = "dragonfly",
target_os = "freebsd",
target_os = "bitrig",
target_os = "openbsd"))]
@ -54,12 +56,6 @@ pub fn set_raw(&mut self, _raw: bool) -> IoResult<()> {
Err(sys_common::unimpl())
}
#[cfg(any(target_os = "linux",
target_os = "android",
target_os = "macos",
target_os = "freebsd",
target_os = "bitrig",
target_os = "openbsd"))]
pub fn get_winsize(&mut self) -> IoResult<(int, int)> {
unsafe {
#[repr(C)]
@ -82,10 +78,4 @@ struct winsize {
}
}
}
#[cfg(any(target_os = "ios",
target_os = "dragonfly"))]
pub fn get_winsize(&mut self) -> IoResult<(int, int)> {
Err(sys_common::unimpl())
}
}