diff options
| author | bors <bors@rust-lang.org> | 2015-01-08 05:35:51 +0000 |
|---|---|---|
| committer | bors <bors@rust-lang.org> | 2015-01-08 05:35:51 +0000 |
| commit | 5b3cd3900ceda838f5798c30ab96ceb41f962534 (patch) | |
| tree | 7593bacffb7c8111eee7fa2a0a05d0357ccba763 /src/libstd/sys/common | |
| parent | 9f1ead8fadc56bad30dc74f5cc50d78af4fbc972 (diff) | |
| parent | 0abf4583486071a958aa1bd14ab8c5b8870fb74d (diff) | |
| download | rust-5b3cd3900ceda838f5798c30ab96ceb41f962534.tar.gz rust-5b3cd3900ceda838f5798c30ab96ceb41f962534.zip | |
auto merge of #20733 : alexcrichton/rust/rollup, r=alexcrichton
Diffstat (limited to 'src/libstd/sys/common')
| -rw-r--r-- | src/libstd/sys/common/backtrace.rs | 7 | ||||
| -rw-r--r-- | src/libstd/sys/common/net.rs | 2 |
2 files changed, 6 insertions, 3 deletions
diff --git a/src/libstd/sys/common/backtrace.rs b/src/libstd/sys/common/backtrace.rs index be44aa99f49..f6161ec193d 100644 --- a/src/libstd/sys/common/backtrace.rs +++ b/src/libstd/sys/common/backtrace.rs @@ -12,8 +12,11 @@ use prelude::v1::*; use io::IoResult; -#[cfg(target_word_size = "64")] pub const HEX_WIDTH: uint = 18; -#[cfg(target_word_size = "32")] pub const HEX_WIDTH: uint = 10; +#[cfg(any(all(stage0, target_word_size = "64"), all(not(stage0), target_pointer_width = "64")))] +pub const HEX_WIDTH: uint = 18; + +#[cfg(any(all(stage0, target_word_size = "32"), all(not(stage0), target_pointer_width = "32")))] +pub const HEX_WIDTH: uint = 10; // All rust symbols are in theory lists of "::"-separated identifiers. Some // assemblers, however, can't handle these characters in symbol names. To get diff --git a/src/libstd/sys/common/net.rs b/src/libstd/sys/common/net.rs index 902942d7244..4cf891ac498 100644 --- a/src/libstd/sys/common/net.rs +++ b/src/libstd/sys/common/net.rs @@ -469,7 +469,7 @@ pub fn write<T, L, W>(fd: sock_t, // Also as with read(), we use MSG_DONTWAIT to guard ourselves // against unforeseen circumstances. let _guard = lock(); - let ptr = buf.index(&(written..)).as_ptr(); + let ptr = buf[written..].as_ptr(); let len = buf.len() - written; match retry(|| write(deadline.is_some(), ptr, len)) { -1 if wouldblock() => {} |
