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
File renamed without changes.

src/librustc/back/link.rs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -856,7 +856,7 @@ pub fn get_cc_prog(sess: &Session) -> String {
856856
// In the future, FreeBSD will use clang as default compiler.
857857
// It would be flexible to use cc (system's default C compiler)
858858
// instead of hard-coded gcc.
859-
// For win32, there is no cc command, so we add a condition to make it use gcc.
859+
// For Windows, there is no cc command, so we add a condition to make it use gcc.
860860
match sess.targ_cfg.os {
861861
abi::OsWindows => "gcc",
862862
_ => "cc",

src/librustc/middle/trans/adt.rs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -876,7 +876,7 @@ pub fn trans_drop_flag_ptr<'b>(mut bcx: &'b Block<'b>, r: &Repr,
876876
* depending on which case of an enum it is.
877877
*
878878
* To understand the alignment situation, consider `enum E { V64(u64),
879-
* V32(u32, u32) }` on win32. The type has 8-byte alignment to
879+
* V32(u32, u32) }` on Windows. The type has 8-byte alignment to
880880
* accommodate the u64, but `V32(x, y)` would have LLVM type `{i32,
881881
* i32, i32}`, which is 4-byte aligned.
882882
*

src/librustdoc/plugins.rs

Lines changed: 1 addition & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -74,7 +74,6 @@ impl PluginManager {
7474
}
7575

7676
#[cfg(target_os = "windows")]
77-
#[cfg(stage0, target_os = "win32")] // NOTE: Remove after snapshot
7877
fn libname(mut n: String) -> String {
7978
n.push_str(".dll");
8079
n
@@ -86,8 +85,7 @@ fn libname(mut n: String) -> String {
8685
n
8786
}
8887

89-
#[cfg(not(stage0), not(target_os="windows"), not(target_os="macos"))]
90-
#[cfg(stage0, not(target_os="win32"), not(target_os="macos"))] // NOTE: Remove after snapshot
88+
#[cfg(not(target_os="windows"), not(target_os="macos"))]
9189
fn libname(n: String) -> String {
9290
let mut i = String::from_str("lib");
9391
i.push_str(n.as_slice());

src/librustrt/args.rs

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -148,7 +148,6 @@ mod imp {
148148
#[cfg(target_os = "macos")]
149149
#[cfg(target_os = "ios")]
150150
#[cfg(target_os = "windows")]
151-
#[cfg(stage0, target_os = "win32")] // NOTE: Remove after snapshot
152151
mod imp {
153152
use core::prelude::*;
154153
use collections::vec::Vec;

src/librustrt/libunwind.rs

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -88,7 +88,6 @@ pub type _Unwind_Exception_Cleanup_Fn =
8888
#[cfg(target_os = "linux")]
8989
#[cfg(target_os = "freebsd")]
9090
#[cfg(target_os = "windows")]
91-
#[cfg(stage0, target_os = "win32")] // NOTE: Remove after snapshot
9291
#[link(name = "gcc_s")]
9392
extern {}
9493

src/librustrt/stack.rs

Lines changed: 0 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -200,7 +200,6 @@ pub unsafe fn record_sp_limit(limit: uint) {
200200
asm!("movq $0, %fs:112" :: "r"(limit) :: "volatile")
201201
}
202202
#[cfg(target_arch = "x86_64", target_os = "windows")] #[inline(always)]
203-
#[cfg(stage0, target_arch = "x86_64", target_os = "win32")] // NOTE: Remove after snapshot
204203
unsafe fn target_record_sp_limit(limit: uint) {
205204
// see: http://en.wikipedia.org/wiki/Win32_Thread_Information_Block
206205
// store this inside of the "arbitrary data slot", but double the size
@@ -229,7 +228,6 @@ pub unsafe fn record_sp_limit(limit: uint) {
229228
asm!("movl $0, %gs:48" :: "r"(limit) :: "volatile")
230229
}
231230
#[cfg(target_arch = "x86", target_os = "windows")] #[inline(always)]
232-
#[cfg(stage0, target_arch = "x86", target_os = "win32")] // NOTE: Remove after snapshot
233231
unsafe fn target_record_sp_limit(limit: uint) {
234232
// see: http://en.wikipedia.org/wiki/Win32_Thread_Information_Block
235233
// store this inside of the "arbitrary data slot"
@@ -283,7 +281,6 @@ pub unsafe fn get_sp_limit() -> uint {
283281
return limit;
284282
}
285283
#[cfg(target_arch = "x86_64", target_os = "windows")] #[inline(always)]
286-
#[cfg(stage0, target_arch = "x86_64", target_os = "win32")] // NOTE: Remove after snapshot
287284
unsafe fn target_get_sp_limit() -> uint {
288285
let limit;
289286
asm!("movq %gs:0x28, $0" : "=r"(limit) ::: "volatile");
@@ -320,7 +317,6 @@ pub unsafe fn get_sp_limit() -> uint {
320317
return limit;
321318
}
322319
#[cfg(target_arch = "x86", target_os = "windows")] #[inline(always)]
323-
#[cfg(stage0, target_arch = "x86", target_os = "win32")] // NOTE: Remove after snapshot
324320
unsafe fn target_get_sp_limit() -> uint {
325321
let limit;
326322
asm!("movl %fs:0x14, $0" : "=r"(limit) ::: "volatile");

src/librustuv/uvll.rs

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -733,7 +733,6 @@ extern {}
733733
extern {}
734734

735735
#[cfg(target_os = "windows")]
736-
#[cfg(stage0, target_os = "win32")] // NOTE: Remove after snapshot
737736
#[link(name = "ws2_32")]
738737
#[link(name = "psapi")]
739738
#[link(name = "iphlpapi")]

src/libstd/dynamic_lib.rs

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -279,7 +279,6 @@ pub mod dl {
279279
}
280280

281281
#[cfg(target_os = "windows")]
282-
#[cfg(stage0, target_os = "win32")] // NOTE: Remove after snapshot
283282
pub mod dl {
284283
use c_str::ToCStr;
285284
use iter::Iterator;

src/libstd/io/mod.rs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -348,7 +348,7 @@ impl IoError {
348348
// libuv maps this error code to EISDIR. we do too. if it is found
349349
// to be incorrect, we can add in some more machinery to only
350350
// return this message when ERROR_INVALID_FUNCTION after certain
351-
// win32 calls.
351+
// Windows calls.
352352
libc::ERROR_INVALID_FUNCTION => (InvalidInput,
353353
"illegal operation on a directory"),
354354

0 commit comments

Comments
 (0)