rust/src/test/run-pass/foreign-mod.rc

18 lines
385 B
Plaintext
Raw Normal View History

// xfail-test
2010-06-23 23:03:09 -05:00
// -*- 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 {
2010-06-23 23:03:09 -05:00
fn str_buf(str s) -> int;
}
mod inner = "native-mod-src/inner.rs";