Setting e.g. the rounding mode with fesetround doesn't seem to set
the FPU control word for rounding, which means that other math
functions implemented in libmingwex don't round in the right direction.
Additionally it doesn't actually seem to have any effect on e.g.
UCRT's *rint* family of functions rounding either.

Normally their existence here isn't an issue, but if -lucrt happens
to be linked before -lmingwex, these functions would happen to be
used.

Signed-off-by: Martin Storsjö <[email protected]>
---
 .../api-ms-win-crt-runtime-l1-1-0.def.in      | 21 +++++++++++--------
 mingw-w64-crt/lib-common/ucrtbase.def.in      | 21 +++++++++++--------
 2 files changed, 24 insertions(+), 18 deletions(-)

diff --git a/mingw-w64-crt/lib-common/api-ms-win-crt-runtime-l1-1-0.def.in 
b/mingw-w64-crt/lib-common/api-ms-win-crt-runtime-l1-1-0.def.in
index 14db58b62..ea310d426 100644
--- a/mingw-w64-crt/lib-common/api-ms-win-crt-runtime-l1-1-0.def.in
+++ b/mingw-w64-crt/lib-common/api-ms-win-crt-runtime-l1-1-0.def.in
@@ -97,15 +97,18 @@ _wperror
 _wsystem
 abort
 exit
-feclearexcept
-fegetenv
-fegetexceptflag
-fegetround
-feholdexcept
-fesetenv
-fesetexceptflag
-fesetround
-fetestexcept
+; Don't use the float env functions from UCRT; fesetround doesn't seem to have
+; any effect on the FPU control word as required by other libmingwex math
+; routines.
+feclearexcept DATA
+fegetenv DATA
+fegetexceptflag DATA
+fegetround DATA
+feholdexcept DATA
+fesetenv DATA
+fesetexceptflag DATA
+fesetround DATA
+fetestexcept DATA
 perror
 quick_exit
 raise
diff --git a/mingw-w64-crt/lib-common/ucrtbase.def.in 
b/mingw-w64-crt/lib-common/ucrtbase.def.in
index 1bb153aa8..8bdc194de 100644
--- a/mingw-w64-crt/lib-common/ucrtbase.def.in
+++ b/mingw-w64-crt/lib-common/ucrtbase.def.in
@@ -2321,17 +2321,20 @@ fclose
 fdim
 fdimf
 fdiml
-feclearexcept
-fegetenv
-fegetexceptflag
-fegetround
-feholdexcept
+; Don't use the float env functions from UCRT; fesetround doesn't seem to have
+; any effect on the FPU control word as required by other libmingwex math
+; routines.
+feclearexcept DATA
+fegetenv DATA
+fegetexceptflag DATA
+fegetround DATA
+feholdexcept DATA
 feof
 ferror
-fesetenv
-fesetexceptflag
-fesetround
-fetestexcept
+fesetenv DATA
+fesetexceptflag DATA
+fesetround DATA
+fetestexcept DATA
 fflush
 fgetc
 fgetpos
-- 
2.17.1



_______________________________________________
Mingw-w64-public mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/mingw-w64-public

Reply via email to