about summary refs log tree commit diff
path: root/src/liblibc
diff options
context:
space:
mode:
authorCorey Richardson <corey@octayn.net>2014-03-18 11:18:58 -0400
committerAlex Crichton <alex@alexcrichton.com>2014-04-04 09:31:21 -0700
commit06ad5eb459f1072d79a815210d69af55ef174d20 (patch)
tree2d57469795f016f20a613b6399bd17ff21c3d224 /src/liblibc
parent308c03501a9a49d058f2ad76dd17a4e593ce7be7 (diff)
downloadrust-06ad5eb459f1072d79a815210d69af55ef174d20.tar.gz
rust-06ad5eb459f1072d79a815210d69af55ef174d20.zip
Change how the readdir/opendir hack works
Diffstat (limited to 'src/liblibc')
-rw-r--r--src/liblibc/lib.rs16
1 files changed, 6 insertions, 10 deletions
diff --git a/src/liblibc/lib.rs b/src/liblibc/lib.rs
index 442f7849d96..bf2baf95b84 100644
--- a/src/liblibc/lib.rs
+++ b/src/liblibc/lib.rs
@@ -3695,18 +3695,12 @@ pub mod funcs {
             // opendir$INODE64, etc. but for some reason rustc
             // doesn't link it correctly on i686, so we're going
             // through a C function that mysteriously does work.
-            pub unsafe fn opendir(dirname: *c_char) -> *DIR {
-                rust_opendir(dirname)
-            }
-            pub unsafe fn readdir_r(dirp: *DIR,
-                                    entry: *mut dirent_t,
-                                    result: *mut *mut dirent_t) -> c_int {
-                rust_readdir_r(dirp, entry, result)
-            }
 
             extern {
-                fn rust_opendir(dirname: *c_char) -> *DIR;
-                fn rust_readdir_r(dirp: *DIR, entry: *mut dirent_t,
+                #[link_name="rust_opendir"]
+                pub fn opendir(dirname: *c_char) -> *DIR;
+                #[link_name="rust_readdir_r"]
+                pub fn readdir_r(dirp: *DIR, entry: *mut dirent_t,
                                   result: *mut *mut dirent_t) -> c_int;
             }
 
@@ -4321,3 +4315,5 @@ pub mod funcs {
         }
     }
 }
+
+#[test] fn work_on_windows() { } // FIXME #10872 needed for a happy windows