Skip to content

Commit fdebd1e

Browse files
committed
adjust and un-xfail
1 parent c1be673 commit fdebd1e

File tree

2 files changed

+21
-17
lines changed

2 files changed

+21
-17
lines changed

src/test/run-pass/bind-native-fn.rs

+21
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,21 @@
1+
// From #1174:
2+
// xfail-test bots are crashing on this on x86_64
3+
4+
use std;
5+
import std::str;
6+
import std::ctypes::*;
7+
8+
#[link_name = ""]
9+
native mod libc {
10+
fn write(fd: c_int, buf: *u8, nbyte: size_t);
11+
}
12+
13+
fn main() {
14+
let s = "hello world\n";
15+
let b = str::bytes(s);
16+
let l = str::byte_len(s);
17+
let b8 = unsafe { std::vec::unsafe::to_ptr(b) };
18+
libc::write(0i32, b8, l);
19+
let a = bind libc::write(0i32, _, _);
20+
a(b8, l);
21+
}

src/test/run-pass/bind-native-printf.rs

-17
This file was deleted.

0 commit comments

Comments
 (0)