adjust and un-xfail

This commit is contained in:
Niko Matsakis 2011-11-30 15:55:28 -08:00
parent c1be673e76
commit fdebd1e2ef
2 changed files with 21 additions and 17 deletions

View File

@ -0,0 +1,21 @@
// From #1174:
// xfail-test bots are crashing on this on x86_64
use std;
import std::str;
import std::ctypes::*;
#[link_name = ""]
native mod libc {
fn write(fd: c_int, buf: *u8, nbyte: size_t);
}
fn main() {
let s = "hello world\n";
let b = str::bytes(s);
let l = str::byte_len(s);
let b8 = unsafe { std::vec::unsafe::to_ptr(b) };
libc::write(0i32, b8, l);
let a = bind libc::write(0i32, _, _);
a(b8, l);
}

View File

@ -1,17 +0,0 @@
// From #1174:
// xfail-test bots are crashing on this on x86_64
use std;
#[link_name = ""]
native mod libc {
fn printf(s: *u8, a: int); /* A tenuous definition. */
}
fn main() {
let b = std::str::bytes("%d\n");
let b8 = unsafe { std::vec::unsafe::to_ptr(b) };
libc::printf(b8, 4);
let a = bind libc::printf(b8, 5);
a(); /* core dump */
}