File tree Expand file tree Collapse file tree 4 files changed +26
-10
lines changed
Expand file tree Collapse file tree 4 files changed +26
-10
lines changed Original file line number Diff line number Diff line change @@ -458,10 +458,7 @@ mod memchr;
458458#[ macro_use]
459459#[ path = "sys/common/mod.rs" ] mod sys_common;
460460
461- #[ cfg( unix) ]
462- #[ path = "sys/unix/mod.rs" ] mod sys;
463- #[ cfg( windows) ]
464- #[ path = "sys/windows/mod.rs" ] mod sys;
461+ mod sys;
465462
466463pub mod rt;
467464mod panicking;
Original file line number Diff line number Diff line change 1+ // Copyright 2016 The Rust Project Developers. See the COPYRIGHT
2+ // file at the top-level directory of this distribution and at
3+ // http://rust-lang.org/COPYRIGHT.
4+ //
5+ // Licensed under the Apache License, Version 2.0 <LICENSE-APACHE or
6+ // http://www.apache.org/licenses/LICENSE-2.0> or the MIT license
7+ // <LICENSE-MIT or http://opensource.org/licenses/MIT>, at your
8+ // option. This file may not be copied, modified, or distributed
9+ // except according to those terms.
10+
11+ pub use self :: imp:: * ;
12+
13+ #[ cfg( unix) ]
14+ #[ path = "unix/mod.rs" ]
15+ mod imp;
16+
17+ #[ cfg( windows) ]
18+ #[ path = "windows/mod.rs" ]
19+ mod imp;
Original file line number Diff line number Diff line change @@ -179,7 +179,7 @@ pub fn truncate_utf16_at_nul<'a>(v: &'a [u16]) -> &'a [u16] {
179179 }
180180}
181181
182- trait IsZero {
182+ pub trait IsZero {
183183 fn is_zero ( & self ) -> bool ;
184184}
185185
@@ -193,15 +193,15 @@ macro_rules! impl_is_zero {
193193
194194impl_is_zero ! { i8 i16 i32 i64 isize u8 u16 u32 u64 usize }
195195
196- fn cvt < I : IsZero > ( i : I ) -> io:: Result < I > {
196+ pub fn cvt < I : IsZero > ( i : I ) -> io:: Result < I > {
197197 if i. is_zero ( ) {
198198 Err ( io:: Error :: last_os_error ( ) )
199199 } else {
200200 Ok ( i)
201201 }
202202}
203203
204- fn dur2timeout ( dur : Duration ) -> c:: DWORD {
204+ pub fn dur2timeout ( dur : Duration ) -> c:: DWORD {
205205 // Note that a duration is a (u64, u32) (seconds, nanoseconds) pair, and the
206206 // timeouts in windows APIs are typically u32 milliseconds. To translate, we
207207 // have two pieces to take care of:
Original file line number Diff line number Diff line change @@ -57,13 +57,13 @@ const EXCEPTION_PATHS: &'static [&'static str] = &[
5757 "src/libpanic_abort" ,
5858 "src/libpanic_unwind" ,
5959 "src/libunwind" ,
60- "src/libstd/sys/unix" , // This is where platform-specific code for std should live
61- "src/libstd/sys/windows" , // Ditto
60+ "src/libstd/sys/unix" , // This is where platform-specific code for unix
61+ "src/libstd/sys/windows" , // Ditto for windows
62+ "src/libstd/sys/mod.rs" , // This file chooses the platform
6263 "src/libstd/os" , // Platform-specific public interfaces
6364 "src/rtstartup" , // Not sure what to do about this. magic stuff for mingw
6465
6566 // temporary exceptions
66- "src/libstd/lib.rs" , // This could probably be done within the sys directory
6767 "src/libstd/rtdeps.rs" , // Until rustbuild replaces make
6868 "src/libstd/path.rs" ,
6969 "src/libstd/num/f32.rs" ,
You can’t perform that action at this time.
0 commit comments