diff options
| author | Graydon Hoare <graydon@mozilla.com> | 2012-07-03 16:11:00 -0700 |
|---|---|---|
| committer | Graydon Hoare <graydon@mozilla.com> | 2012-07-03 16:11:00 -0700 |
| commit | debb7e4641af2ea71cf8733b3f071d614803dcbd (patch) | |
| tree | 3c087869d79d340300a1383b95b994b2fce43517 /src/test/run-pass/foreign-mod-src | |
| parent | 7259195caff1fdcce6266e6ecf51c0fd614e041f (diff) | |
| download | rust-debb7e4641af2ea71cf8733b3f071d614803dcbd.tar.gz rust-debb7e4641af2ea71cf8733b3f071d614803dcbd.zip | |
Switch 'native' to 'extern' (or 'foreign' in some descriptions)
Diffstat (limited to 'src/test/run-pass/foreign-mod-src')
| -rw-r--r-- | src/test/run-pass/foreign-mod-src/inner.rs | 14 |
1 files changed, 14 insertions, 0 deletions
diff --git a/src/test/run-pass/foreign-mod-src/inner.rs b/src/test/run-pass/foreign-mod-src/inner.rs new file mode 100644 index 00000000000..bee820cf3be --- /dev/null +++ b/src/test/run-pass/foreign-mod-src/inner.rs @@ -0,0 +1,14 @@ + + + +// -*- rust -*- +fn main() { + let f = "Makefile"; + let s = rustrt.str_buf(f); + let buf = libc.malloc(1024); + let fd = libc.open(s, 0, 0); + libc.read(fd, buf, 1024); + libc.write(1, buf, 1024); + libc.close(fd); + libc.free(buf); +} |
