diff options
| author | bors <bors@rust-lang.org> | 2015-01-07 05:31:23 +0000 |
|---|---|---|
| committer | bors <bors@rust-lang.org> | 2015-01-07 05:31:23 +0000 |
| commit | 9e4e524e0eb17c8f463e731f23b544003e8709c6 (patch) | |
| tree | 916024d35e08f0826c20654f629ec596b5cb1f14 /src/libstd/sys/unix | |
| parent | ea6f65c5f1a3f84e010d2cef02a0160804e9567a (diff) | |
| parent | a64000820f0fc32be4d7535a9a92418a434fa4ba (diff) | |
| download | rust-9e4e524e0eb17c8f463e731f23b544003e8709c6.tar.gz rust-9e4e524e0eb17c8f463e731f23b544003e8709c6.zip | |
auto merge of #20677 : alexcrichton/rust/rollup, r=alexcrichton
Diffstat (limited to 'src/libstd/sys/unix')
| -rw-r--r-- | src/libstd/sys/unix/backtrace.rs | 2 | ||||
| -rw-r--r-- | src/libstd/sys/unix/c.rs | 8 | ||||
| -rw-r--r-- | src/libstd/sys/unix/fs.rs | 2 | ||||
| -rw-r--r-- | src/libstd/sys/unix/mutex.rs | 2 | ||||
| -rw-r--r-- | src/libstd/sys/unix/process.rs | 14 | ||||
| -rw-r--r-- | src/libstd/sys/unix/thread_local.rs | 12 |
6 files changed, 24 insertions, 16 deletions
diff --git a/src/libstd/sys/unix/backtrace.rs b/src/libstd/sys/unix/backtrace.rs index ca268a8f27f..7164931c55a 100644 --- a/src/libstd/sys/unix/backtrace.rs +++ b/src/libstd/sys/unix/backtrace.rs @@ -370,7 +370,7 @@ fn print(w: &mut Writer, idx: int, addr: *mut libc::c_void) -> IoResult<()> { // Finally, after all that work above, we can emit a symbol. fn output(w: &mut Writer, idx: int, addr: *mut libc::c_void, s: Option<&[u8]>) -> IoResult<()> { - try!(write!(w, " {:2}: {:2$} - ", idx, addr, HEX_WIDTH)); + try!(write!(w, " {:2}: {:2$?} - ", idx, addr, HEX_WIDTH)); match s.and_then(|s| str::from_utf8(s).ok()) { Some(string) => try!(demangle(w, string)), None => try!(write!(w, "<unknown>")), diff --git a/src/libstd/sys/unix/c.rs b/src/libstd/sys/unix/c.rs index ca419d1c7f4..cc661877bc0 100644 --- a/src/libstd/sys/unix/c.rs +++ b/src/libstd/sys/unix/c.rs @@ -165,8 +165,8 @@ mod signal { sa_restorer: *mut libc::c_void, } - unsafe impl ::kinds::Send for sigaction { } - unsafe impl ::kinds::Sync for sigaction { } + unsafe impl ::marker::Send for sigaction { } + unsafe impl ::marker::Sync for sigaction { } #[repr(C)] #[cfg(target_word_size = "32")] @@ -217,8 +217,8 @@ mod signal { sa_resv: [libc::c_int; 1], } - unsafe impl ::kinds::Send for sigaction { } - unsafe impl ::kinds::Sync for sigaction { } + unsafe impl ::marker::Send for sigaction { } + unsafe impl ::marker::Sync for sigaction { } #[repr(C)] pub struct sigset_t { diff --git a/src/libstd/sys/unix/fs.rs b/src/libstd/sys/unix/fs.rs index 1ad775517bb..c53f9d22790 100644 --- a/src/libstd/sys/unix/fs.rs +++ b/src/libstd/sys/unix/fs.rs @@ -381,7 +381,7 @@ mod tests { assert_eq!(buf[2], 's' as u8); assert_eq!(buf[3], 't' as u8); } - r => panic!("invalid read: {}", r), + r => panic!("invalid read: {:?}", r), } assert!(writer.read(&mut buf).is_err()); diff --git a/src/libstd/sys/unix/mutex.rs b/src/libstd/sys/unix/mutex.rs index 81f8659d6ae..ada8a7f2349 100644 --- a/src/libstd/sys/unix/mutex.rs +++ b/src/libstd/sys/unix/mutex.rs @@ -9,7 +9,7 @@ // except according to those terms. use cell::UnsafeCell; -use kinds::Sync; +use marker::Sync; use sys::sync as ffi; use sys_common::mutex; diff --git a/src/libstd/sys/unix/process.rs b/src/libstd/sys/unix/process.rs index 5bc6b0c703b..1357bbdd5a3 100644 --- a/src/libstd/sys/unix/process.rs +++ b/src/libstd/sys/unix/process.rs @@ -125,7 +125,7 @@ impl Process { return match input.read(&mut bytes) { Ok(8) => { assert!(combine(CLOEXEC_MSG_FOOTER) == combine(bytes.slice(4, 8)), - "Validation on the CLOEXEC pipe failed: {}", bytes); + "Validation on the CLOEXEC pipe failed: {:?}", bytes); let errno = combine(bytes.slice(0, 4)); assert!(p.wait(0).is_ok(), "wait(0) should either return Ok or panic"); Err(super::decode_error(errno)) @@ -133,7 +133,7 @@ impl Process { Err(ref e) if e.kind == EndOfFile => Ok(p), Err(e) => { assert!(p.wait(0).is_ok(), "wait(0) should either return Ok or panic"); - panic!("the CLOEXEC pipe failed: {}", e) + panic!("the CLOEXEC pipe failed: {:?}", e) }, Ok(..) => { // pipe I/O up to PIPE_BUF bytes should be atomic assert!(p.wait(0).is_ok(), "wait(0) should either return Ok or panic"); @@ -285,7 +285,7 @@ impl Process { let mut status = 0 as c_int; if deadline == 0 { return match retry(|| unsafe { c::waitpid(self.pid, &mut status, 0) }) { - -1 => panic!("unknown waitpid error: {}", super::last_error()), + -1 => panic!("unknown waitpid error: {:?}", super::last_error()), _ => Ok(translate_status(status)), } } @@ -410,7 +410,7 @@ impl Process { continue } - n => panic!("error in select {} ({})", os::errno(), n), + n => panic!("error in select {:?} ({:?})", os::errno(), n), } // Process any pending messages @@ -491,7 +491,7 @@ impl Process { n if n > 0 => { ret = true; } 0 => return true, -1 if wouldblock() => return ret, - n => panic!("bad read {} ({})", os::last_os_error(), n), + n => panic!("bad read {:?} ({:?})", os::last_os_error(), n), } } } @@ -514,7 +514,7 @@ impl Process { } { 1 => {} -1 if wouldblock() => {} // see above comments - n => panic!("bad error on write fd: {} {}", n, os::errno()), + n => panic!("bad error on write fd: {:?} {:?}", n, os::errno()), } } } @@ -526,7 +526,7 @@ impl Process { }) { n if n == self.pid => Some(translate_status(status)), 0 => None, - n => panic!("unknown waitpid error `{}`: {}", n, + n => panic!("unknown waitpid error `{:?}`: {:?}", n, super::last_error()), } } diff --git a/src/libstd/sys/unix/thread_local.rs b/src/libstd/sys/unix/thread_local.rs index e507377a8fc..ea1e9c261fe 100644 --- a/src/libstd/sys/unix/thread_local.rs +++ b/src/libstd/sys/unix/thread_local.rs @@ -37,10 +37,18 @@ pub unsafe fn destroy(key: Key) { debug_assert_eq!(r, 0); } -#[cfg(target_os = "macos")] +#[cfg(any(target_os = "macos", + target_os = "ios"))] type pthread_key_t = ::libc::c_ulong; -#[cfg(not(target_os = "macos"))] +#[cfg(any(target_os = "freebsd", + target_os = "dragonfly"))] +type pthread_key_t = ::libc::c_int; + +#[cfg(not(any(target_os = "macos", + target_os = "ios", + target_os = "freebsd", + target_os = "dragonfly")))] type pthread_key_t = ::libc::c_uint; extern { |
