rework langinfo code for ABI compat and for use by time code
[musl] / src / math / lrint.c
index feba28d..bdca8b7 100644 (file)
@@ -25,9 +25,10 @@ otherwise LONG_MAX and LONG_MIN can be represented exactly
 as a double.
 */
 
-#if LONG_MAX < 1U<<53
+#if LONG_MAX < 1U<<53 && defined(FE_INEXACT)
 long lrint(double x)
 {
+       #pragma STDC FENV_ACCESS ON
        int e;
 
        e = fetestexcept(FE_INEXACT);