浏览代码

Merge branch 'master' into master

Tom Almeida 7 年之前
父节点
当前提交
d3c2e99ed7
共有 2 个文件被更改,包括 12 次插入0 次删除
  1. 11 0
      src/fenv/src/lib.rs
  2. 1 0
      src/float/src/lib.rs

+ 11 - 0
src/fenv/src/lib.rs

@@ -17,46 +17,57 @@ pub struct fenv_t {
     pub cw: u64,
 }
 
+#[no_mangle]
 pub unsafe extern "C" fn feclearexcept(excepts: c_int) -> c_int {
     unimplemented!();
 }
 
+#[no_mangle]
 pub unsafe extern "C" fn fegenenv(envp: *mut fenv_t) -> c_int {
     unimplemented!();
 }
 
+#[no_mangle]
 pub unsafe extern "C" fn fegetexceptflag(flagp: *mut fexcept_t, excepts: c_int) -> c_int {
     unimplemented!();
 }
 
+#[no_mangle]
 pub unsafe extern "C" fn fegetround() -> c_int {
     FE_TONEAREST
 }
 
+#[no_mangle]
 pub unsafe extern "C" fn feholdexcept(envp: *mut fenv_t) -> c_int {
     unimplemented!();
 }
 
+#[no_mangle]
 pub unsafe extern "C" fn feraiseexcept(except: c_int) -> c_int {
     unimplemented!();
 }
 
+#[no_mangle]
 pub unsafe extern "C" fn fesetenv(envp: *const fenv_t) -> c_int {
     unimplemented!();
 }
 
+#[no_mangle]
 pub unsafe extern "C" fn fesetexceptflag(flagp: *const fexcept_t, excepts: c_int) -> c_int {
     unimplemented!();
 }
 
+#[no_mangle]
 pub unsafe extern "C" fn fesetround(round: c_int) -> c_int {
     unimplemented!();
 }
 
+#[no_mangle]
 pub unsafe extern "C" fn fetestexcept(excepts: c_int) -> c_int {
     unimplemented!();
 }
 
+#[no_mangle]
 pub unsafe extern "C" fn feupdateenv(envp: *const fenv_t) -> c_int {
     unimplemented!();
 }

+ 1 - 0
src/float/src/lib.rs

@@ -11,6 +11,7 @@ use fenv::{fegetround, FE_TONEAREST};
 
 pub const FLT_RADIX: c_int = 2;
 
+#[no_mangle]
 pub unsafe extern "C" fn flt_rounds() -> c_int {
     match fegetround() {
         FE_TONEAREST => 1,