Skip to content

Commit 656a76e

Browse files
committed
---
yaml --- r: 4062 b: refs/heads/master c: 06a6005 h: refs/heads/master v: v3
1 parent a4feaad commit 656a76e

File tree

3 files changed

+14
-15
lines changed

3 files changed

+14
-15
lines changed

[refs]

+1-1
Original file line numberDiff line numberDiff line change
@@ -1,2 +1,2 @@
11
---
2-
refs/heads/master: a0a2cee8960d67eb0e901d09bd34c504ef3e699b
2+
refs/heads/master: 06a6005447da632200a8b1b8a36dad21c39264df

trunk/src/lib/win32_os.rs

+6-6
Original file line numberDiff line numberDiff line change
@@ -32,12 +32,12 @@ mod libc_constants {
3232
fn O_RDONLY() -> int { ret 0; }
3333
fn O_WRONLY() -> int { ret 1; }
3434
fn O_RDWR() -> int { ret 2; }
35-
fn O_APPEND() -> int { ret 1024; }
36-
fn O_CREAT() -> int { ret 64; }
37-
fn O_EXCL() -> int { ret 128; }
38-
fn O_TRUNC() -> int { ret 512; }
39-
fn O_TEXT() -> int { ret 16384; }
40-
fn O_BINARY() -> int { ret 32768; }
35+
fn O_APPEND() -> int { ret 0x0008; }
36+
fn O_CREAT() -> int { ret 0x0100; }
37+
fn O_EXCL() -> int { ret 0x0400; }
38+
fn O_TRUNC() -> int { ret 0x0200; }
39+
fn O_TEXT() -> int { ret 0x4000; }
40+
fn O_BINARY() -> int { ret 0x8000; }
4141
fn S_IRUSR() -> uint {
4242
ret 256u; // really _S_IREAD in win32
4343

trunk/src/test/run-pass/lib-io.rs

+7-8
Original file line numberDiff line numberDiff line change
@@ -1,20 +1,17 @@
1-
2-
31
// xfail-stage0
4-
// xfail-stage1
5-
// xfail-stage2
62
// -*- rust -*-
73
use std;
84
import std::io;
95
import std::str;
106

11-
fn test_simple(str tmpfilebase) {
12-
let str tmpfile = tmpfilebase + ".tmp";
7+
fn test_simple() {
8+
let str tmpfile = "test/run-pass/lib-io-test-simple.tmp";
139
log tmpfile;
1410
let str frood = "A hoopy frood who really knows where his towel is.";
1511
log frood;
1612
{
17-
let io::writer out = io::file_writer(tmpfile, [io::create]);
13+
let io::writer out = io::file_writer(tmpfile, [io::create,
14+
io::truncate]);
1815
out.write_str(frood);
1916
}
2017
let io::reader inp = io::file_reader(tmpfile);
@@ -23,4 +20,6 @@ fn test_simple(str tmpfilebase) {
2320
assert (str::eq(frood, frood2));
2421
}
2522

26-
fn main(vec[str] argv) { test_simple(argv.(0)); }
23+
fn main() {
24+
test_simple();
25+
}

0 commit comments

Comments
 (0)