about summary refs log tree commit diff
path: root/src/libstd/sys/unix
diff options
context:
space:
mode:
Diffstat (limited to 'src/libstd/sys/unix')
-rw-r--r--src/libstd/sys/unix/os.rs5
-rw-r--r--src/libstd/sys/unix/thread.rs6
2 files changed, 4 insertions, 7 deletions
diff --git a/src/libstd/sys/unix/os.rs b/src/libstd/sys/unix/os.rs
index 75aeafe6e3c..a5a2f71acb7 100644
--- a/src/libstd/sys/unix/os.rs
+++ b/src/libstd/sys/unix/os.rs
@@ -306,12 +306,11 @@ pub fn args() -> Args {
 // In general it looks like:
 // res = Vec::new()
 // let args = [[NSProcessInfo processInfo] arguments]
-// for i in range(0, [args count])
+// for i in (0..[args count])
 //      res.push([args objectAtIndex:i])
 // res
 #[cfg(target_os = "ios")]
 pub fn args() -> Args {
-    use iter::range;
     use mem;
 
     #[link(name = "objc")]
@@ -341,7 +340,7 @@ pub fn args() -> Args {
         let args = objc_msgSend(info, arguments_sel);
 
         let cnt: int = mem::transmute(objc_msgSend(args, count_sel));
-        for i in range(0, cnt) {
+        for i in (0..cnt) {
             let tmp = objc_msgSend(args, object_at_sel, i);
             let utf_c_str: *const libc::c_char =
                 mem::transmute(objc_msgSend(tmp, utf8_sel));
diff --git a/src/libstd/sys/unix/thread.rs b/src/libstd/sys/unix/thread.rs
index 04508294981..c5f07c6c75a 100644
--- a/src/libstd/sys/unix/thread.rs
+++ b/src/libstd/sys/unix/thread.rs
@@ -130,12 +130,13 @@ pub mod guard {
     #[cfg(any(target_os = "openbsd", target_os = "bitrig"))]
     pub unsafe fn current() -> usize {
         #[repr(C)]
-        pub struct stack_t {
+        struct stack_t {
             ss_sp: *mut libc::c_void,
             ss_size: libc::size_t,
             ss_flags: libc::c_int,
         }
         extern {
+            fn pthread_main_np() -> libc::c_uint;
             fn pthread_stackseg_np(thread: pthread_t,
                                    sinfo: *mut stack_t) -> libc::c_uint;
         }
@@ -339,9 +340,6 @@ fn min_stack_size(_: *const libc::pthread_attr_t) -> libc::size_t {
 }
 
 extern {
-    #[cfg(any(target_os = "bitrig", target_os = "openbsd"))]
-    fn pthread_main_np() -> libc::c_uint;
-
     fn pthread_self() -> libc::pthread_t;
     fn pthread_create(native: *mut libc::pthread_t,
                       attr: *const libc::pthread_attr_t,