Skip to content

Commit 6843d8c

Browse files
committed
auto merge of #16693 : vadimcn/rust/rename--win32, r=pcwalton
2 parents f66fd2e + 6881181 commit 6843d8c

File tree

26 files changed

+24
-57
lines changed

26 files changed

+24
-57
lines changed

src/compiletest/runtest.rs

Lines changed: 0 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -17,7 +17,6 @@ use header;
1717
use procsrv;
1818
use util::logv;
1919
#[cfg(target_os = "windows")]
20-
#[cfg(stage0, target_os = "win32")] // NOTE: Remove after snapshot
2120
use util;
2221

2322
use std::io::File;
@@ -819,7 +818,6 @@ fn check_expected_errors(expected_errors: Vec<errors::ExpectedError> ,
819818
}).collect::<Vec<String> >();
820819

821820
#[cfg(target_os = "windows")]
822-
#[cfg(stage0, target_os = "win32")] // NOTE: Remove after snapshot
823821
fn to_lower( s : &str ) -> String {
824822
let i = s.chars();
825823
let c : Vec<char> = i.map( |c| {
@@ -833,7 +831,6 @@ fn check_expected_errors(expected_errors: Vec<errors::ExpectedError> ,
833831
}
834832

835833
#[cfg(target_os = "windows")]
836-
#[cfg(stage0, target_os = "win32")] // NOTE: Remove after snapshot
837834
fn prefix_matches( line : &str, prefix : &str ) -> bool {
838835
to_lower(line).as_slice().starts_with(to_lower(prefix).as_slice())
839836
}
@@ -1251,15 +1248,13 @@ fn make_cmdline(_libpath: &str, prog: &str, args: &[String]) -> String {
12511248
}
12521249

12531250
#[cfg(target_os = "windows")]
1254-
#[cfg(stage0, target_os = "win32")] // NOTE: Remove after snapshot
12551251
fn make_cmdline(libpath: &str, prog: &str, args: &[String]) -> String {
12561252
format!("{} {} {}", lib_path_cmd_prefix(libpath), prog, args.connect(" "))
12571253
}
12581254

12591255
// Build the LD_LIBRARY_PATH variable as it would be seen on the command line
12601256
// for diagnostic purposes
12611257
#[cfg(target_os = "windows")]
1262-
#[cfg(stage0, target_os = "win32")] // NOTE: Remove after snapshot
12631258
fn lib_path_cmd_prefix(path: &str) -> String {
12641259
format!("{}=\"{}\"", util::lib_path_env_var(), util::make_new_path(path))
12651260
}

src/compiletest/util.rs

Lines changed: 0 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -11,7 +11,6 @@
1111
use common::Config;
1212

1313
#[cfg(target_os = "windows")]
14-
#[cfg(stage0, target_os = "win32")] // NOTE: Remove after snapshot
1514
use std::os::getenv;
1615

1716
/// Conversion table from triple OS name to Rust SYSNAME
@@ -36,7 +35,6 @@ pub fn get_os(triple: &str) -> &'static str {
3635
}
3736

3837
#[cfg(target_os = "windows")]
39-
#[cfg(stage0, target_os = "win32")] // NOTE: Remove after snapshot
4038
pub fn make_new_path(path: &str) -> String {
4139

4240
// Windows just uses PATH as the library search path, so we have to
@@ -50,11 +48,9 @@ pub fn make_new_path(path: &str) -> String {
5048
}
5149

5250
#[cfg(target_os = "windows")]
53-
#[cfg(stage0, target_os = "win32")] // NOTE: Remove after snapshot
5451
pub fn lib_path_env_var() -> &'static str { "PATH" }
5552

5653
#[cfg(target_os = "windows")]
57-
#[cfg(stage0, target_os = "win32")] // NOTE: Remove after snapshot
5854
pub fn path_div() -> &'static str { ";" }
5955

6056
pub fn logv(config: &Config, s: String) {

src/etc/mklldeps.py

Lines changed: 0 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -68,8 +68,6 @@ def run(args):
6868
]
6969

7070
f.write("#[cfg(" + ', '.join(cfg) + ")]\n")
71-
if os == "windows": # NOTE: Remove after snapshot
72-
f.write("#[cfg(stage0, target_arch = \"%s\", target_os = \"win32\")]\n" % (arch,))
7371

7472
version = run([llconfig, '--version']).strip()
7573

src/liblibc/lib.rs

Lines changed: 3 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -64,7 +64,7 @@
6464
* sanity while editing, filling-in-details and eliminating duplication) into
6565
* definitions common-to-all (held in modules named c95, c99, posix88, posix01
6666
* and posix08) and definitions that appear only on *some* platforms (named
67-
* 'extra'). This would be things like significant OSX foundation kit, or win32
67+
* 'extra'). This would be things like significant OSX foundation kit, or Windows
6868
* library kernel32.dll, or various fancy glibc, linux or BSD extensions.
6969
*
7070
* In addition to the per-platform 'extra' modules, we define a module of
@@ -1195,15 +1195,14 @@ pub mod types {
11951195
}
11961196

11971197
#[cfg(target_os = "windows")]
1198-
#[cfg(stage0, target_os = "win32")] // NOTE: Remove after snapshot
11991198
pub mod os {
12001199
pub mod common {
12011200
pub mod posix01 {
12021201
use types::os::arch::c95::{c_short, time_t, c_long};
12031202
use types::os::arch::extra::{int64, time64_t};
12041203
use types::os::arch::posix88::{dev_t, ino_t};
12051204

1206-
// pub Note: this is the struct called stat64 in win32. Not stat,
1205+
// pub Note: this is the struct called stat64 in Windows. Not stat,
12071206
// nor stati64.
12081207
#[repr(C)]
12091208
pub struct stat {
@@ -1220,7 +1219,7 @@ pub mod types {
12201219
pub st_ctime: time64_t,
12211220
}
12221221

1223-
// note that this is called utimbuf64 in win32
1222+
// note that this is called utimbuf64 in Windows
12241223
#[repr(C)]
12251224
pub struct utimbuf {
12261225
pub actime: time64_t,
@@ -1915,7 +1914,6 @@ pub mod consts {
19151914
// into this module.
19161915

19171916
#[cfg(target_os = "windows")]
1918-
#[cfg(stage0, target_os = "win32")] // NOTE: Remove after snapshot
19191917
pub mod os {
19201918
pub mod c95 {
19211919
use types::os::arch::c95::{c_int, c_uint};
@@ -4000,7 +3998,6 @@ pub mod funcs {
40003998
// with the same POSIX functions and types as other platforms.
40013999

40024000
#[cfg(target_os = "windows")]
4003-
#[cfg(stage0, target_os = "win32")] // NOTE: Remove after snapshot
40044001
pub mod posix88 {
40054002
pub mod stat_ {
40064003
use types::os::common::posix01::{stat, utimbuf};
@@ -4430,7 +4427,6 @@ pub mod funcs {
44304427
}
44314428

44324429
#[cfg(target_os = "windows")]
4433-
#[cfg(stage0, target_os = "win32")] // NOTE: Remove after snapshot
44344430
pub mod posix01 {
44354431
pub mod stat_ {
44364432
}
@@ -4447,7 +4443,6 @@ pub mod funcs {
44474443

44484444

44494445
#[cfg(target_os = "windows")]
4450-
#[cfg(stage0, target_os = "win32")] // NOTE: Remove after snapshot
44514446
#[cfg(target_os = "linux")]
44524447
#[cfg(target_os = "android")]
44534448
#[cfg(target_os = "macos")]
@@ -4586,7 +4581,6 @@ pub mod funcs {
45864581

45874582

45884583
#[cfg(target_os = "windows")]
4589-
#[cfg(stage0, target_os = "win32")] // NOTE: Remove after snapshot
45904584
pub mod bsd44 {
45914585
}
45924586

@@ -4613,7 +4607,6 @@ pub mod funcs {
46134607

46144608

46154609
#[cfg(target_os = "windows")]
4616-
#[cfg(stage0, target_os = "win32")] // NOTE: Remove after snapshot
46174610
pub mod extra {
46184611

46194612
pub mod kernel32 {
File renamed without changes.

src/libnative/io/file_win32.rs renamed to src/libnative/io/file_windows.rs

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -8,14 +8,14 @@
88
// option. This file may not be copied, modified, or distributed
99
// except according to those terms.
1010

11-
//! Blocking win32-based file I/O
11+
//! Blocking Windows-based file I/O
1212
1313
use alloc::arc::Arc;
1414
use libc::{c_int, c_void};
1515
use libc;
1616
use std::c_str::CString;
1717
use std::mem;
18-
use std::os::win32::fill_utf16_buf_and_decode;
18+
use std::os::windows::fill_utf16_buf_and_decode;
1919
use std::ptr;
2020
use std::rt::rtio;
2121
use std::rt::rtio::{IoResult, IoError};

src/libnative/io/mod.rs

Lines changed: 5 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -46,7 +46,7 @@ mod util;
4646
#[path = "file_unix.rs"]
4747
pub mod file;
4848
#[cfg(windows)]
49-
#[path = "file_win32.rs"]
49+
#[path = "file_windows.rs"]
5050
pub mod file;
5151

5252
#[cfg(target_os = "macos")]
@@ -59,24 +59,23 @@ pub mod file;
5959
pub mod timer;
6060

6161
#[cfg(target_os = "windows")]
62-
#[cfg(stage0, target_os = "win32")] // NOTE: Remove after snapshot
63-
#[path = "timer_win32.rs"]
62+
#[path = "timer_windows.rs"]
6463
pub mod timer;
6564

6665
#[cfg(unix)]
6766
#[path = "pipe_unix.rs"]
6867
pub mod pipe;
6968

7069
#[cfg(windows)]
71-
#[path = "pipe_win32.rs"]
70+
#[path = "pipe_windows.rs"]
7271
pub mod pipe;
7372

7473
#[cfg(windows)]
75-
#[path = "tty_win32.rs"]
74+
#[path = "tty_windows.rs"]
7675
mod tty;
7776

7877
#[cfg(unix)] #[path = "c_unix.rs"] mod c;
79-
#[cfg(windows)] #[path = "c_win32.rs"] mod c;
78+
#[cfg(windows)] #[path = "c_windows.rs"] mod c;
8079

8180
fn unimpl() -> IoError {
8281
#[cfg(unix)] use libc::ENOSYS as ERROR;
File renamed without changes.

src/libnative/io/process.rs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -786,7 +786,7 @@ fn with_envp<T>(env: Option<&[(&CString, &CString)]>,
786786

787787
#[cfg(windows)]
788788
fn with_envp<T>(env: Option<&[(&CString, &CString)]>, cb: |*mut c_void| -> T) -> T {
789-
// On win32 we pass an "environment block" which is not a char**, but
789+
// On Windows we pass an "environment block" which is not a char**, but
790790
// rather a concatenation of null-terminated k=v\0 sequences, with a final
791791
// \0 to terminate.
792792
match env {

src/libnative/io/timer_win32.rs renamed to src/libnative/io/timer_windows.rs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -8,7 +8,7 @@
88
// option. This file may not be copied, modified, or distributed
99
// except according to those terms.
1010

11-
//! Timers based on win32 WaitableTimers
11+
//! Timers based on Windows WaitableTimers
1212
//!
1313
//! This implementation is meant to be used solely on windows. As with other
1414
//! implementations, there is a worker thread which is doing all the waiting on

0 commit comments

Comments
 (0)