2012-12-10 19:32:48 -06:00
|
|
|
// Copyright 2012 The Rust Project Developers. See the COPYRIGHT
|
|
|
|
// file at the top-level directory of this distribution and at
|
|
|
|
// http://rust-lang.org/COPYRIGHT.
|
|
|
|
//
|
|
|
|
// Licensed under the Apache License, Version 2.0 <LICENSE-APACHE or
|
|
|
|
// http://www.apache.org/licenses/LICENSE-2.0> or the MIT license
|
|
|
|
// <LICENSE-MIT or http://opensource.org/licenses/MIT>, at your
|
|
|
|
// option. This file may not be copied, modified, or distributed
|
|
|
|
// except according to those terms.
|
|
|
|
|
2011-08-31 06:22:58 -05:00
|
|
|
// 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) -> ();
|
|
|
|
}
|
|
|
|
|
2011-11-09 18:04:07 -06:00
|
|
|
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";
|