Skip to content

Commit d13b5d3

Browse files
committed
---
yaml --- r: 129238 b: refs/heads/try c: 1777047 h: refs/heads/master v: v3
1 parent 791e27a commit d13b5d3

File tree

28 files changed

+60
-26
lines changed

28 files changed

+60
-26
lines changed

[refs]

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -2,7 +2,7 @@
22
refs/heads/master: 1cad4089ba0dc46248da2459af904e38243f294d
33
refs/heads/snap-stage1: e33de59e47c5076a89eadeb38f4934f58a3618a6
44
refs/heads/snap-stage3: a86d9ad15e339ab343a12513f9c90556f677b9ca
5-
refs/heads/try: 6843d8ccd562c5c5d45c0bba570908d5aa765610
5+
refs/heads/try: 1777047a547cbd16d9638c22db1d3001a778c732
66
refs/tags/release-0.1: 1f5c5126e96c79d22cb7862f75304136e204f105
77
refs/heads/ndm: f3868061cd7988080c30d6d5bf352a5a5fe2460b
88
refs/heads/try2: 147ecfdd8221e4a4d4e090486829a06da1e0ca3c

branches/try/src/compiletest/runtest.rs

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

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

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

833835
#[cfg(target_os = "windows")]
836+
#[cfg(stage0, target_os = "win32")] // NOTE: Remove after snapshot
834837
fn prefix_matches( line : &str, prefix : &str ) -> bool {
835838
to_lower(line).as_slice().starts_with(to_lower(prefix).as_slice())
836839
}
@@ -1248,13 +1251,15 @@ fn make_cmdline(_libpath: &str, prog: &str, args: &[String]) -> String {
12481251
}
12491252

12501253
#[cfg(target_os = "windows")]
1254+
#[cfg(stage0, target_os = "win32")] // NOTE: Remove after snapshot
12511255
fn make_cmdline(libpath: &str, prog: &str, args: &[String]) -> String {
12521256
format!("{} {} {}", lib_path_cmd_prefix(libpath), prog, args.connect(" "))
12531257
}
12541258

12551259
// Build the LD_LIBRARY_PATH variable as it would be seen on the command line
12561260
// for diagnostic purposes
12571261
#[cfg(target_os = "windows")]
1262+
#[cfg(stage0, target_os = "win32")] // NOTE: Remove after snapshot
12581263
fn lib_path_cmd_prefix(path: &str) -> String {
12591264
format!("{}=\"{}\"", util::lib_path_env_var(), util::make_new_path(path))
12601265
}

branches/try/src/compiletest/util.rs

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

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

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

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

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

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

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

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

branches/try/src/doc/guide.md

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -3325,7 +3325,8 @@ To do that, we'll need to make a new module. Make a new file, `src/lib.rs`,
33253325
and put this in it:
33263326

33273327
```{rust}
3328-
fn add_three_times_four(x: int) -> int {
3328+
# fn main() {}
3329+
pub fn add_three_times_four(x: int) -> int {
33293330
(x + 3) * 4
33303331
}
33313332
```

branches/try/src/etc/mklldeps.py

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -68,6 +68,8 @@ 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,))
7173

7274
version = run([llconfig, '--version']).strip()
7375

branches/try/src/liblibc/lib.rs

Lines changed: 10 additions & 3 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 Windows
67+
* 'extra'). This would be things like significant OSX foundation kit, or win32
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,14 +1195,15 @@ pub mod types {
11951195
}
11961196

11971197
#[cfg(target_os = "windows")]
1198+
#[cfg(stage0, target_os = "win32")] // NOTE: Remove after snapshot
11981199
pub mod os {
11991200
pub mod common {
12001201
pub mod posix01 {
12011202
use types::os::arch::c95::{c_short, time_t, c_long};
12021203
use types::os::arch::extra::{int64, time64_t};
12031204
use types::os::arch::posix88::{dev_t, ino_t};
12041205

1205-
// pub Note: this is the struct called stat64 in Windows. Not stat,
1206+
// pub Note: this is the struct called stat64 in win32. Not stat,
12061207
// nor stati64.
12071208
#[repr(C)]
12081209
pub struct stat {
@@ -1219,7 +1220,7 @@ pub mod types {
12191220
pub st_ctime: time64_t,
12201221
}
12211222

1222-
// note that this is called utimbuf64 in Windows
1223+
// note that this is called utimbuf64 in win32
12231224
#[repr(C)]
12241225
pub struct utimbuf {
12251226
pub actime: time64_t,
@@ -1914,6 +1915,7 @@ pub mod consts {
19141915
// into this module.
19151916

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

40004002
#[cfg(target_os = "windows")]
4003+
#[cfg(stage0, target_os = "win32")] // NOTE: Remove after snapshot
40014004
pub mod posix88 {
40024005
pub mod stat_ {
40034006
use types::os::common::posix01::{stat, utimbuf};
@@ -4427,6 +4430,7 @@ pub mod funcs {
44274430
}
44284431

44294432
#[cfg(target_os = "windows")]
4433+
#[cfg(stage0, target_os = "win32")] // NOTE: Remove after snapshot
44304434
pub mod posix01 {
44314435
pub mod stat_ {
44324436
}
@@ -4443,6 +4447,7 @@ pub mod funcs {
44434447

44444448

44454449
#[cfg(target_os = "windows")]
4450+
#[cfg(stage0, target_os = "win32")] // NOTE: Remove after snapshot
44464451
#[cfg(target_os = "linux")]
44474452
#[cfg(target_os = "android")]
44484453
#[cfg(target_os = "macos")]
@@ -4581,6 +4586,7 @@ pub mod funcs {
45814586

45824587

45834588
#[cfg(target_os = "windows")]
4589+
#[cfg(stage0, target_os = "win32")] // NOTE: Remove after snapshot
45844590
pub mod bsd44 {
45854591
}
45864592

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

46084614

46094615
#[cfg(target_os = "windows")]
4616+
#[cfg(stage0, target_os = "win32")] // NOTE: Remove after snapshot
46104617
pub mod extra {
46114618

46124619
pub mod kernel32 {

branches/try/src/libnative/io/file_windows.rs renamed to branches/try/src/libnative/io/file_win32.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 Windows-based file I/O
11+
//! Blocking win32-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::windows::fill_utf16_buf_and_decode;
18+
use std::os::win32::fill_utf16_buf_and_decode;
1919
use std::ptr;
2020
use std::rt::rtio;
2121
use std::rt::rtio::{IoResult, IoError};

branches/try/src/libnative/io/mod.rs

Lines changed: 6 additions & 5 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_windows.rs"]
49+
#[path = "file_win32.rs"]
5050
pub mod file;
5151

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

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

6566
#[cfg(unix)]
6667
#[path = "pipe_unix.rs"]
6768
pub mod pipe;
6869

6970
#[cfg(windows)]
70-
#[path = "pipe_windows.rs"]
71+
#[path = "pipe_win32.rs"]
7172
pub mod pipe;
7273

7374
#[cfg(windows)]
74-
#[path = "tty_windows.rs"]
75+
#[path = "tty_win32.rs"]
7576
mod tty;
7677

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

8081
fn unimpl() -> IoError {
8182
#[cfg(unix)] use libc::ENOSYS as ERROR;

branches/try/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 Windows we pass an "environment block" which is not a char**, but
789+
// On win32 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 {

branches/try/src/libnative/io/timer_windows.rs renamed to branches/try/src/libnative/io/timer_win32.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 Windows WaitableTimers
11+
//! Timers based on win32 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

branches/try/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 Windows, there is no cc command, so we add a condition to make it use gcc.
859+
// For win32, 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",

branches/try/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 Windows. The type has 8-byte alignment to
879+
* V32(u32, u32) }` on win32. 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
*

branches/try/src/librustdoc/plugins.rs

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

7676
#[cfg(target_os = "windows")]
77+
#[cfg(stage0, target_os = "win32")] // NOTE: Remove after snapshot
7778
fn libname(mut n: String) -> String {
7879
n.push_str(".dll");
7980
n
@@ -85,7 +86,8 @@ fn libname(mut n: String) -> String {
8586
n
8687
}
8788

88-
#[cfg(not(target_os="windows"), not(target_os="macos"))]
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
8991
fn libname(n: String) -> String {
9092
let mut i = String::from_str("lib");
9193
i.push_str(n.as_slice());

branches/try/src/librustrt/args.rs

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -148,6 +148,7 @@ 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
151152
mod imp {
152153
use core::prelude::*;
153154
use collections::vec::Vec;

branches/try/src/librustrt/libunwind.rs

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -88,6 +88,7 @@ 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
9192
#[link(name = "gcc_s")]
9293
extern {}
9394

branches/try/src/librustrt/stack.rs

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -200,6 +200,7 @@ 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
203204
unsafe fn target_record_sp_limit(limit: uint) {
204205
// see: http://en.wikipedia.org/wiki/Win32_Thread_Information_Block
205206
// store this inside of the "arbitrary data slot", but double the size
@@ -228,6 +229,7 @@ pub unsafe fn record_sp_limit(limit: uint) {
228229
asm!("movl $0, %gs:48" :: "r"(limit) :: "volatile")
229230
}
230231
#[cfg(target_arch = "x86", target_os = "windows")] #[inline(always)]
232+
#[cfg(stage0, target_arch = "x86", target_os = "win32")] // NOTE: Remove after snapshot
231233
unsafe fn target_record_sp_limit(limit: uint) {
232234
// see: http://en.wikipedia.org/wiki/Win32_Thread_Information_Block
233235
// store this inside of the "arbitrary data slot"
@@ -281,6 +283,7 @@ pub unsafe fn get_sp_limit() -> uint {
281283
return limit;
282284
}
283285
#[cfg(target_arch = "x86_64", target_os = "windows")] #[inline(always)]
286+
#[cfg(stage0, target_arch = "x86_64", target_os = "win32")] // NOTE: Remove after snapshot
284287
unsafe fn target_get_sp_limit() -> uint {
285288
let limit;
286289
asm!("movq %gs:0x28, $0" : "=r"(limit) ::: "volatile");
@@ -317,6 +320,7 @@ pub unsafe fn get_sp_limit() -> uint {
317320
return limit;
318321
}
319322
#[cfg(target_arch = "x86", target_os = "windows")] #[inline(always)]
323+
#[cfg(stage0, target_arch = "x86", target_os = "win32")] // NOTE: Remove after snapshot
320324
unsafe fn target_get_sp_limit() -> uint {
321325
let limit;
322326
asm!("movl %fs:0x14, $0" : "=r"(limit) ::: "volatile");

branches/try/src/librustuv/uvll.rs

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

735735
#[cfg(target_os = "windows")]
736+
#[cfg(stage0, target_os = "win32")] // NOTE: Remove after snapshot
736737
#[link(name = "ws2_32")]
737738
#[link(name = "psapi")]
738739
#[link(name = "iphlpapi")]

branches/try/src/libstd/dynamic_lib.rs

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

281281
#[cfg(target_os = "windows")]
282+
#[cfg(stage0, target_os = "win32")] // NOTE: Remove after snapshot
282283
pub mod dl {
283284
use c_str::ToCStr;
284285
use iter::Iterator;

branches/try/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-
// Windows calls.
351+
// win32 calls.
352352
libc::ERROR_INVALID_FUNCTION => (InvalidInput,
353353
"illegal operation on a directory"),
354354

0 commit comments

Comments
 (0)