diff options
| author | Corey Richardson <corey@octayn.net> | 2014-03-18 11:18:58 -0400 |
|---|---|---|
| committer | Alex Crichton <alex@alexcrichton.com> | 2014-04-04 09:31:21 -0700 |
| commit | 06ad5eb459f1072d79a815210d69af55ef174d20 (patch) | |
| tree | 2d57469795f016f20a613b6399bd17ff21c3d224 /src/liblibc | |
| parent | 308c03501a9a49d058f2ad76dd17a4e593ce7be7 (diff) | |
| download | rust-06ad5eb459f1072d79a815210d69af55ef174d20.tar.gz rust-06ad5eb459f1072d79a815210d69af55ef174d20.zip | |
Change how the readdir/opendir hack works
Diffstat (limited to 'src/liblibc')
| -rw-r--r-- | src/liblibc/lib.rs | 16 |
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 |
