Skip to content

Commit

Permalink
~strify win32-specific fns
Browse files Browse the repository at this point in the history
  • Loading branch information
nikomatsakis committed Jul 15, 2012
1 parent 3ef7ff8 commit 54cd5e1
Show file tree
Hide file tree
Showing 3 changed files with 9 additions and 9 deletions.
12 changes: 6 additions & 6 deletions src/compiletest/procsrv.rs
Original file line number Diff line number Diff line change
Expand Up @@ -5,21 +5,21 @@ import libc::{c_int, pid_t};
export run;

#[cfg(target_os = "win32")]
fn target_env(lib_path: str, prog: str) -> ~[(str,str)] {
fn target_env(lib_path: ~str, prog: ~str) -> ~[(~str,~str)] {

let mut env = os::env();

// Make sure we include the aux directory in the path
assert prog.ends_with(".exe");
let aux_path = prog.slice(0u, prog.len() - 4u) + ".libaux";
assert prog.ends_with(~".exe");
let aux_path = prog.slice(0u, prog.len() - 4u) + ~".libaux";

env = do vec::map(env) |pair| {
let (k,v) = pair;
if k == "PATH" { ("PATH", v + ";" + lib_path + ";" + aux_path) }
if k == ~"PATH" { (~"PATH", v + ~";" + lib_path + ~";" + aux_path) }
else { (k,v) }
};
if str::ends_with(prog, "rustc.exe") {
vec::push(env, ("RUST_THREADS", "1"));
if str::ends_with(prog, ~"rustc.exe") {
vec::push(env, (~"RUST_THREADS", ~"1"));
}
ret env;
}
Expand Down
4 changes: 2 additions & 2 deletions src/compiletest/runtest.rs
Original file line number Diff line number Diff line change
Expand Up @@ -434,9 +434,9 @@ fn make_cmdline(_libpath: ~str, prog: ~str, args: ~[~str]) -> ~str {
}
#[cfg(target_os = "win32")]
fn make_cmdline(libpath: str, prog: str, args: ~[str]) -> str {
fn make_cmdline(libpath: ~str, prog: ~str, args: ~[~str]) -> ~str {
#fmt["%s %s %s", lib_path_cmd_prefix(libpath), prog,
str::connect(args, " ")]
str::connect(args, ~" ")]
}
// Build the LD_LIBRARY_PATH variable as it would be seen on the command line
Expand Down
2 changes: 1 addition & 1 deletion src/compiletest/util.rs
Original file line number Diff line number Diff line change
Expand Up @@ -31,7 +31,7 @@ fn lib_path_env_var() -> ~str { ~"PATH" }
fn path_div() -> ~str { ~":" }

#[cfg(target_os = "win32")]
fn path_div() -> str { ~";" }
fn path_div() -> ~str { ~";" }

fn logv(config: config, s: ~str) {
log(debug, s);
Expand Down

0 comments on commit 54cd5e1

Please sign in to comment.