From bf59efd3f41b7e2f0583a0b3aca5cce4894a08dc Mon Sep 17 00:00:00 2001 From: Christoffer Lerno Date: Wed, 9 Oct 2024 16:14:24 +0200 Subject: [PATCH] Fix sincos to be different on Darwin compared to other. --- lib/std/math/math.c3 | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) diff --git a/lib/std/math/math.c3 b/lib/std/math/math.c3 index 203c314c1..406fab07d 100644 --- a/lib/std/math/math.c3 +++ b/lib/std/math/math.c3 @@ -1027,8 +1027,10 @@ extern fn double _atan(double x) @extern("atan"); extern fn float _atanf(float x) @extern("atanf"); extern fn double _atan2(double, double) @extern("atan2"); extern fn float _atan2f(float, float) @extern("atan2f"); -extern fn void _sincos(double, double*, double*) @extern("__sincos") @link("m"); -extern fn void _sincosf(float, float*, float*) @extern("__sincosf") @link("m"); +extern fn void _sincos(double, double*, double*) @extern("__sincos") @link("m") @if(env::DARWIN); +extern fn void _sincosf(float, float*, float*) @extern("__sincosf") @link("m") @if(env::DARWIN); +extern fn void _sincos(double, double*, double*) @extern("sincos") @link("m") @if(!env::DARWIN); +extern fn void _sincosf(float, float*, float*) @extern("sincosf") @link("m") @if(!env::DARWIN); extern fn double _tan(double x) @extern("tan"); extern fn float _tanf(float x) @extern("tanf"); extern fn double _scalbn(double x, int n) @extern("scalbn");