Skip to content

Commit

Permalink
Fix conflicting definitions
Browse files Browse the repository at this point in the history
This fix compilation issue for windows targets
  • Loading branch information
Amjad50 committed Mar 28, 2024
1 parent f45bd3c commit 1bf01c7
Showing 1 changed file with 3 additions and 6 deletions.
9 changes: 3 additions & 6 deletions src/math.rs
Original file line number Diff line number Diff line change
Expand Up @@ -16,6 +16,7 @@ macro_rules! no_mangle {
}
}

#[cfg(not(target_os = "windows"))]
no_mangle! {
fn acos(x: f64) -> f64;
fn asin(x: f64) -> f64;
Expand All @@ -31,19 +32,13 @@ no_mangle! {
fn log10f(x: f32) -> f32;
fn log(x: f64) -> f64;
fn logf(x: f32) -> f32;
fn fmin(x: f64, y: f64) -> f64;
fn fminf(x: f32, y: f32) -> f32;
fn fmax(x: f64, y: f64) -> f64;
fn fmaxf(x: f32, y: f32) -> f32;
fn round(x: f64) -> f64;
fn roundf(x: f32) -> f32;
fn rint(x: f64) -> f64;
fn rintf(x: f32) -> f32;
fn sin(x: f64) -> f64;
fn pow(x: f64, y: f64) -> f64;
fn powf(x: f32, y: f32) -> f32;
fn fmod(x: f64, y: f64) -> f64;
fn fmodf(x: f32, y: f32) -> f32;
fn acosf(n: f32) -> f32;
fn atan2f(a: f32, b: f32) -> f32;
fn atanf(n: f32) -> f32;
Expand Down Expand Up @@ -75,8 +70,10 @@ no_mangle! {
fn cbrtf(n: f32) -> f32;
fn hypotf(x: f32, y: f32) -> f32;
fn tanf(n: f32) -> f32;

fn sqrtf(x: f32) -> f32;
fn sqrt(x: f64) -> f64;

fn ceil(x: f64) -> f64;
fn ceilf(x: f32) -> f32;
fn floor(x: f64) -> f64;
Expand Down

0 comments on commit 1bf01c7

Please sign in to comment.