Skip to content

Commit a9277b2

Browse files
committed
---
yaml --- r: 6524 b: refs/heads/master c: fdebd1e h: refs/heads/master v: v3
1 parent d42f07e commit a9277b2

File tree

3 files changed

+22
-18
lines changed

3 files changed

+22
-18
lines changed

[refs]

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,2 +1,2 @@
11
---
2-
refs/heads/master: c1be673e760963b3360b987d694cd48852a77272
2+
refs/heads/master: fdebd1e2ef440312ac791d505af7dd089efa2499
Lines changed: 21 additions & 0 deletions
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+
}

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

Lines changed: 0 additions & 17 deletions
This file was deleted.

0 commit comments

Comments
 (0)