This repository was archived by the owner on May 28, 2025. It is now read-only.
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;
458
458
#[ macro_use]
459
459
#[ path = "sys/common/mod.rs" ] mod sys_common;
460
460
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;
465
462
466
463
pub mod rt;
467
464
mod 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] {
179
179
}
180
180
}
181
181
182
- trait IsZero {
182
+ pub trait IsZero {
183
183
fn is_zero ( & self ) -> bool ;
184
184
}
185
185
@@ -193,15 +193,15 @@ macro_rules! impl_is_zero {
193
193
194
194
impl_is_zero ! { i8 i16 i32 i64 isize u8 u16 u32 u64 usize }
195
195
196
- fn cvt < I : IsZero > ( i : I ) -> io:: Result < I > {
196
+ pub fn cvt < I : IsZero > ( i : I ) -> io:: Result < I > {
197
197
if i. is_zero ( ) {
198
198
Err ( io:: Error :: last_os_error ( ) )
199
199
} else {
200
200
Ok ( i)
201
201
}
202
202
}
203
203
204
- fn dur2timeout ( dur : Duration ) -> c:: DWORD {
204
+ pub fn dur2timeout ( dur : Duration ) -> c:: DWORD {
205
205
// Note that a duration is a (u64, u32) (seconds, nanoseconds) pair, and the
206
206
// timeouts in windows APIs are typically u32 milliseconds. To translate, we
207
207
// 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] = &[
57
57
"src/libpanic_abort" ,
58
58
"src/libpanic_unwind" ,
59
59
"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
62
63
"src/libstd/os" , // Platform-specific public interfaces
63
64
"src/rtstartup" , // Not sure what to do about this. magic stuff for mingw
64
65
65
66
// temporary exceptions
66
- "src/libstd/lib.rs" , // This could probably be done within the sys directory
67
67
"src/libstd/rtdeps.rs" , // Until rustbuild replaces make
68
68
"src/libstd/path.rs" ,
69
69
"src/libstd/num/f32.rs" ,
You can’t perform that action at this time.
0 commit comments