Update ralloc, fix invalid c++ names
This commit is contained in:
@@ -265,11 +265,11 @@ pub fn read(fd: c_int, buf: &mut [u8]) -> ssize_t {
|
||||
e(syscall::read(fd as usize, buf)) as ssize_t
|
||||
}
|
||||
|
||||
pub fn rename(old: *const c_char, new: *const c_char) -> c_int {
|
||||
let (old_path, new_path) = unsafe { (c_str(old), c_str(new)) };
|
||||
match syscall::open(old_path, O_WRONLY) {
|
||||
pub fn rename(oldpath: *const c_char, newpath: *const c_char) -> c_int {
|
||||
let (oldpath, newpath) = unsafe { (c_str(oldpath), c_str(newpath)) };
|
||||
match syscall::open(oldpath, O_WRONLY) {
|
||||
Ok(fd) => {
|
||||
let retval = syscall::frename(fd, new_path);
|
||||
let retval = syscall::frename(fd, newpath);
|
||||
let _ = syscall::close(fd);
|
||||
e(retval) as c_int
|
||||
}
|
||||
|
||||
@@ -760,8 +760,8 @@ pub extern "C" fn remove(path: *const c_char) -> c_int {
|
||||
}
|
||||
|
||||
#[no_mangle]
|
||||
pub extern "C" fn rename(old: *const c_char, new: *const c_char) -> c_int {
|
||||
platform::rename(old, new)
|
||||
pub extern "C" fn rename(oldpath: *const c_char, newpath: *const c_char) -> c_int {
|
||||
platform::rename(oldpath, newpath)
|
||||
}
|
||||
|
||||
/// Rewind `stream` back to the beginning of it
|
||||
|
||||
@@ -354,12 +354,12 @@ pub extern "C" fn mbtowc(pwc: *mut wchar_t, s: *const c_char, n: size_t) -> c_in
|
||||
}
|
||||
|
||||
#[no_mangle]
|
||||
pub extern "C" fn mktemp(template: *mut c_char) -> *mut c_char {
|
||||
pub extern "C" fn mktemp(name: *mut c_char) -> *mut c_char {
|
||||
unimplemented!();
|
||||
}
|
||||
|
||||
#[no_mangle]
|
||||
pub extern "C" fn mkstemp(template: *mut c_char) -> c_int {
|
||||
pub extern "C" fn mkstemp(name: *mut c_char) -> c_int {
|
||||
unimplemented!();
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user