Skip to content

Commit 6881181

Browse files
committed
Complete renaming of win32 to windows
1 parent 8c994a1 commit 6881181

File tree

14 files changed

+23
-31
lines changed

14 files changed

+23
-31
lines changed

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,
@@ -1907,7 +1906,6 @@ pub mod consts {
19071906
// into this module.
19081907

19091908
#[cfg(target_os = "windows")]
1910-
#[cfg(stage0, target_os = "win32")] // NOTE: Remove after snapshot
19111909
pub mod os {
19121910
pub mod c95 {
19131911
use types::os::arch::c95::{c_int, c_uint};
@@ -3992,7 +3990,6 @@ pub mod funcs {
39923990
// with the same POSIX functions and types as other platforms.
39933991

39943992
#[cfg(target_os = "windows")]
3995-
#[cfg(stage0, target_os = "win32")] // NOTE: Remove after snapshot
39963993
pub mod posix88 {
39973994
pub mod stat_ {
39983995
use types::os::common::posix01::{stat, utimbuf};
@@ -4422,7 +4419,6 @@ pub mod funcs {
44224419
}
44234420

44244421
#[cfg(target_os = "windows")]
4425-
#[cfg(stage0, target_os = "win32")] // NOTE: Remove after snapshot
44264422
pub mod posix01 {
44274423
pub mod stat_ {
44284424
}
@@ -4439,7 +4435,6 @@ pub mod funcs {
44394435

44404436

44414437
#[cfg(target_os = "windows")]
4442-
#[cfg(stage0, target_os = "win32")] // NOTE: Remove after snapshot
44434438
#[cfg(target_os = "linux")]
44444439
#[cfg(target_os = "android")]
44454440
#[cfg(target_os = "macos")]
@@ -4578,7 +4573,6 @@ pub mod funcs {
45784573

45794574

45804575
#[cfg(target_os = "windows")]
4581-
#[cfg(stage0, target_os = "win32")] // NOTE: Remove after snapshot
45824576
pub mod bsd44 {
45834577
}
45844578

@@ -4605,7 +4599,6 @@ pub mod funcs {
46054599

46064600

46074601
#[cfg(target_os = "windows")]
4608-
#[cfg(stage0, target_os = "win32")] // NOTE: Remove after snapshot
46094602
pub mod extra {
46104603

46114604
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/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

src/libstd/os.rs

Lines changed: 6 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -139,7 +139,7 @@ pub fn getcwd() -> Path {
139139
}
140140

141141
#[cfg(windows)]
142-
pub mod win32 {
142+
pub mod windows {
143143
use libc::types::os::arch::extra::DWORD;
144144
use libc;
145145
use option::{None, Option};
@@ -362,7 +362,7 @@ pub fn getenv_as_bytes(n: &str) -> Option<Vec<u8>> {
362362
pub fn getenv(n: &str) -> Option<String> {
363363
unsafe {
364364
with_env_lock(|| {
365-
use os::win32::{fill_utf16_buf_and_decode};
365+
use os::windows::{fill_utf16_buf_and_decode};
366366
let n: Vec<u16> = n.utf16_units().collect();
367367
let n = n.append_one(0);
368368
fill_utf16_buf_and_decode(|buf, sz| {
@@ -707,7 +707,7 @@ pub fn self_exe_name() -> Option<Path> {
707707
#[cfg(windows)]
708708
fn load_self() -> Option<Vec<u8>> {
709709
unsafe {
710-
use os::win32::fill_utf16_buf_and_decode;
710+
use os::windows::fill_utf16_buf_and_decode;
711711
fill_utf16_buf_and_decode(|buf, sz| {
712712
libc::GetModuleFileNameW(0u as libc::DWORD, buf, sz)
713713
}).map(|s| s.into_string().into_bytes())
@@ -1315,7 +1315,7 @@ pub fn page_size() -> uint {
13151315

13161316
/// A memory mapped file or chunk of memory. This is a very system-specific
13171317
/// interface to the OS's memory mapping facilities (`mmap` on POSIX,
1318-
/// `VirtualAlloc`/`CreateFileMapping` on win32). It makes no attempt at
1318+
/// `VirtualAlloc`/`CreateFileMapping` on Windows). It makes no attempt at
13191319
/// abstracting platform differences, besides in error values returned. Consider
13201320
/// yourself warned.
13211321
///
@@ -1385,7 +1385,7 @@ pub enum MapError {
13851385
ErrZeroLength,
13861386
/// Unrecognized error. The inner value is the unrecognized errno.
13871387
ErrUnknown(int),
1388-
/// ## The following are win32-specific
1388+
/// ## The following are Windows-specific
13891389
///
13901390
/// Unsupported combination of protection flags
13911391
/// (`MapReadable`/`MapWritable`/`MapExecutable`).
@@ -1849,7 +1849,7 @@ pub mod consts {
18491849
pub static FAMILY: &'static str = "windows";
18501850

18511851
/// A string describing the specific operating system in use: in this
1852-
/// case, `win32`.
1852+
/// case, `windows`.
18531853
pub static SYSNAME: &'static str = "windows";
18541854

18551855
/// Specifies the filename prefix used for shared libraries on this

src/libterm/win.rs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -10,7 +10,7 @@
1010

1111
//! Windows console handling
1212
13-
// FIXME (#13400): this is only a tiny fraction of the win32 console api
13+
// FIXME (#13400): this is only a tiny fraction of the Windows console api
1414

1515
extern crate libc;
1616

src/test/run-pass/linkage-visibility.rs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -10,7 +10,7 @@
1010

1111
// aux-build:linkage-visibility.rs
1212
// ignore-android: FIXME(#10379)
13-
// ignore-windows: std::dynamic_lib does not work on win32 well
13+
// ignore-windows: std::dynamic_lib does not work on Windows well
1414

1515
extern crate foo = "linkage-visibility";
1616

0 commit comments

Comments
 (0)