Remove all uses of native cdecl except for those that yield
This commit is contained in:
@@ -6,7 +6,7 @@ TODO: Restructure and document
|
||||
|
||||
// FIXME Somehow merge stuff duplicated here and macosx_os.rs. Made difficult
|
||||
// by https://github.com/graydon/rust/issues#issue/268
|
||||
native "cdecl" mod libc = "" {
|
||||
native "c-stack-cdecl" mod libc = "" {
|
||||
fn read(fd: int, buf: *u8, count: uint) -> int;
|
||||
fn write(fd: int, buf: *u8, count: uint) -> int;
|
||||
fn fread(buf: *u8, size: uint, n: uint, f: libc::FILE) -> uint;
|
||||
@@ -72,6 +72,14 @@ fn fd_FILE(fd: int) -> libc::FILE {
|
||||
ret str::as_buf("r", {|modebuf| libc::fdopen(fd, modebuf) });
|
||||
}
|
||||
|
||||
fn close(fd: int) -> int {
|
||||
libc::close(fd)
|
||||
}
|
||||
|
||||
fn fclose(file: libc::FILE) {
|
||||
libc::fclose(file)
|
||||
}
|
||||
|
||||
fn waitpid(pid: int) -> int {
|
||||
let status = 0;
|
||||
assert (os::libc::waitpid(pid, status, 0) != -1);
|
||||
|
||||
Reference in New Issue
Block a user