aboutsummaryrefslogtreecommitdiff
path: root/src/test/run-pass/native-mod.rc
blob: c805f5f960c5ff1b7ec5a6c8fbbfdc15082701c4 (plain) (blame)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
// xfail-stage0
// xfail-stage1
// xfail-stage2
// -*- 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 "rust" mod rustrt {
  fn str_buf(str s) -> int;
}

mod inner = "native-mod-src/inner.rs";