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