diff options
| author | Alex Crichton <alex@alexcrichton.com> | 2013-12-18 09:57:58 -0800 |
|---|---|---|
| committer | Alex Crichton <alex@alexcrichton.com> | 2013-12-25 23:10:46 -0800 |
| commit | 6cad8f4f14da1dd529100779db74b03d6db20faf (patch) | |
| tree | f3610bdf15fbe38e248a1d92b37919ed8d5a6219 /src/libnative | |
| parent | b47ff23673559ee9a5b91221e0212fd6a57d9802 (diff) | |
| download | rust-6cad8f4f14da1dd529100779db74b03d6db20faf.tar.gz rust-6cad8f4f14da1dd529100779db74b03d6db20faf.zip | |
Test fixes and rebase conflicts
* vec::raw::to_ptr is gone * Pausible => Pausable * Removing @ * Calling the main task "<main>" * Removing unused imports * Removing unused mut * Bringing some libextra tests up to date * Allowing compiletest to work at stage0 * Fixing the bootstrap-from-c rmake tests * assert => rtassert in a few cases * printing to stderr instead of stdout in fail!()
Diffstat (limited to 'src/libnative')
| -rw-r--r-- | src/libnative/io/process.rs | 3 | ||||
| -rw-r--r-- | src/libnative/lib.rs | 13 |
2 files changed, 7 insertions, 9 deletions
diff --git a/src/libnative/io/process.rs b/src/libnative/io/process.rs index 2277d408ee4..64ce9d7e348 100644 --- a/src/libnative/io/process.rs +++ b/src/libnative/io/process.rs @@ -8,7 +8,6 @@ // option. This file may not be copied, modified, or distributed // except according to those terms. -use std::cast; use std::io; use std::libc::{pid_t, c_void, c_int}; use std::libc; @@ -17,6 +16,8 @@ use std::ptr; use std::rt::rtio; use p = std::io::process; +#[cfg(windows)] use std::cast; + use super::file; /** diff --git a/src/libnative/lib.rs b/src/libnative/lib.rs index 60ae239ee97..e0666592651 100644 --- a/src/libnative/lib.rs +++ b/src/libnative/lib.rs @@ -15,12 +15,7 @@ //! version of I/O. #[pkgid = "native#0.9-pre"]; -#[link(name = "native", - package_id = "native", - vers = "0.9-pre", - uuid = "535344a7-890f-5a23-e1f3-e0d118805141", - url = "https://github.com/mozilla/rust/tree/master/src/native")]; - +#[crate_id = "native#0.9-pre"]; #[license = "MIT/ASL2"]; #[crate_type = "rlib"]; #[crate_type = "dylib"]; @@ -46,7 +41,7 @@ pub mod task; #[lang = "start"] pub fn lang_start(main: *u8, argc: int, argv: **u8) -> int { use std::cast; - use std::task::try; + use std::task; do start(argc, argv) { // Instead of invoking main directly on this thread, invoke it on @@ -55,7 +50,9 @@ pub fn lang_start(main: *u8, argc: int, argv: **u8) -> int { // of the main thread's stack, so for stack overflow detection to work // we must spawn the task in a subtask which we know the stack size of. let main: extern "Rust" fn() = unsafe { cast::transmute(main) }; - match do try { main() } { + let mut task = task::task(); + task.name("<main>"); + match do task.try { main() } { Ok(()) => { os::set_exit_status(0); } Err(..) => { os::set_exit_status(rt::DEFAULT_ERROR_CODE); } } |
