提交 06ad5eb4 编写于 作者: C Corey Richardson 提交者: Alex Crichton

Change how the readdir/opendir hack works

上级 308c0350
......@@ -3695,18 +3695,12 @@ pub mod dirent {
// 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 fn open_osfhandle(osfhandle: intptr_t,
}
}
}
#[test] fn work_on_windows() { } // FIXME #10872 needed for a happy windows
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册