Fix linker problem in issue 2214 test case

This commit is contained in:
Tim Chevalier 2012-06-21 16:50:45 -07:00
parent 312faf31df
commit a350bea313

View file

@ -0,0 +1,19 @@
import libc::{c_double, c_int};
import f64::*;
fn lgamma(n: c_double, value: &mut int) -> c_double {
ret m::lgamma(n, value as &mut c_int);
}
#[link_name = "m"]
#[abi = "cdecl"]
native mod m {
#[link_name="lgamma_r"] fn lgamma(n: c_double, sign: &mut c_int)
-> c_double;
}
fn main() {
let mut y: int = 5;
let x: &mut int = &mut y;
assert (lgamma(1.0 as c_double, x) == 0.0 as c_double);
}