rust/src/test/run-pass/native-mod.rc
2011-11-09 16:47:44 -08:00

18 lines
385 B
Rust

// xfail-test
// -*- rust -*-
native mod libc = target_libc {
fn open(int name, int flags, int mode) -> int;
fn close(int fd) -> int;
fn read(int fd, int buf, int count) -> int;
fn write(int fd, int buf, int count) -> int;
fn malloc(int sz) -> int;
fn free(int p) -> ();
}
native "cdecl" mod rustrt {
fn str_buf(str s) -> int;
}
mod inner = "native-mod-src/inner.rs";