stdlib: Implement an interior-vector version of the io module
This commit is contained in:
@@ -33,6 +33,13 @@ native "cdecl" mod libc = "" {
|
||||
fn waitpid(int pid, vbuf status, int options) -> int;
|
||||
}
|
||||
|
||||
native "cdecl" mod libc_ivec = "" {
|
||||
fn read(int fd, *u8 buf, uint count) -> int;
|
||||
fn write(int fd, *u8 buf, uint count) -> int;
|
||||
fn fread(*u8 buf, uint size, uint n, libc::FILE f) -> uint;
|
||||
fn fwrite(*u8 buf, uint size, uint n, libc::FILE f) -> uint;
|
||||
}
|
||||
|
||||
mod libc_constants {
|
||||
fn O_RDONLY() -> int { ret 0; }
|
||||
fn O_WRONLY() -> int { ret 1; }
|
||||
|
||||
Reference in New Issue
Block a user