X-Git-Url: http://nsz.repo.hu/git/?a=blobdiff_plain;f=src%2Fmath%2Fllrintl.c;h=3449f6f2b400944f64076270433144626d9eb4b5;hb=5652d70054daf3c2c9b6d475fdf9d24a940e51aa;hp=f1cc47ed453c82d07e40554f11b9f5cfea53b83b;hpb=9b6899f2c5cec70af6cea80ead7ba98fd2366ce9;p=musl diff --git a/src/math/llrintl.c b/src/math/llrintl.c index f1cc47ed..3449f6f2 100644 --- a/src/math/llrintl.c +++ b/src/math/llrintl.c @@ -8,7 +8,7 @@ long long llrintl(long double x) { return llrint(x); } -#else +#elif defined(FE_INEXACT) /* see comments in lrint.c @@ -18,6 +18,7 @@ raises inexact (with tonearest or upward rounding mode) */ long long llrintl(long double x) { + #pragma STDC FENV_ACCESS ON int e; e = fetestexcept(FE_INEXACT); @@ -27,4 +28,9 @@ long long llrintl(long double x) /* conversion */ return x; } +#else +long long llrintl(long double x) +{ + return rintl(x); +} #endif