about summary refs log tree commit diff
path: root/src/libstd/os.rs
diff options
context:
space:
mode:
Diffstat (limited to 'src/libstd/os.rs')
-rw-r--r--src/libstd/os.rs12
1 files changed, 2 insertions, 10 deletions
diff --git a/src/libstd/os.rs b/src/libstd/os.rs
index 34331769614..ff939310865 100644
--- a/src/libstd/os.rs
+++ b/src/libstd/os.rs
@@ -32,6 +32,7 @@
 use c_str::CString;
 use clone::Clone;
 use container::Container;
+#[cfg(target_os = "macos")]
 use iter::range;
 use libc;
 use libc::{c_char, c_void, c_int, size_t};
@@ -338,12 +339,6 @@ pub fn pipe() -> Pipe {
     }
 }
 
-fn dup2(src: c_int, dst: c_int) -> c_int {
-    unsafe {
-        libc::dup2(src, dst)
-    }
-}
-
 /// Returns the proper dll filename for the given basename of a file.
 pub fn dll_filename(base: &str) -> ~str {
     format!("{}{}{}", DLL_PREFIX, base, DLL_SUFFIX)
@@ -708,6 +703,7 @@ pub fn set_exit_status(code: int) {
     rt::set_exit_status(code);
 }
 
+#[cfg(target_os = "macos")]
 unsafe fn load_argc_and_argv(argc: c_int, argv: **c_char) -> ~[~str] {
     let mut args = ~[];
     for i in range(0u, argc as uint) {
@@ -787,10 +783,6 @@ extern "system" {
     fn CommandLineToArgvW(lpCmdLine: LPCWSTR, pNumArgs: *mut c_int) -> **u16;
 }
 
-struct OverriddenArgs {
-    val: ~[~str]
-}
-
 /// Returns the arguments which this program was started with (normally passed
 /// via the command line).
 pub fn args() -> ~[~str] {