crt: Move the strtof() function from libmingwex.a to libmsvcr*.a This avoids using this function (where strtof() is implemented with strtof()) in UCRT builds. In stdlib.h, we don't define __USE_MINGW_STRTOX when targeting UCRT - with the intent that we'd use the CRT's implementation instead. This makes that actually work as intended for strtof. This also fixes accuracy issues reported in https://github.com/msys2/MINGW-packages/issues/12472 by simply deferring to the UCRT's implementation - as originally intended. Signed-off-by: Martin Storsjö <martin@martin.st>
diff --git a/mingw-w64-crt/Makefile.am b/mingw-w64-crt/Makefile.am index 8026571..23b1ab9 100644 --- a/mingw-w64-crt/Makefile.am +++ b/mingw-w64-crt/Makefile.am
@@ -181,6 +181,7 @@ stdio/_putc_nolock.c \ stdio/_putwc_nolock.c \ stdio/acrt_iob_func.c \ + stdio/strtof.c \ stdio/snprintf_alias.c \ stdio/vsnprintf_alias.c \ math/frexp.c @@ -576,7 +577,7 @@ stdio/mingw_snprintfw.c stdio/mingw_sprintf.c stdio/mingw_sprintfw.c stdio/mingw_sscanf.c stdio/mingw_swscanf.c \ stdio/mingw_vfprintf.c stdio/mingw_vfprintfw.c stdio/mingw_vfscanf.c stdio/mingw_vprintf.c stdio/mingw_vprintfw.c \ stdio/mingw_vsnprintf.c stdio/mingw_vsnprintfw.c stdio/mingw_vsprintf.c stdio/mingw_vsprintfw.c stdio/mingw_wscanf.c \ - stdio/mingw_wvfscanf.c stdio/snprintf.c stdio/snwprintf.c stdio/strtof.c stdio/truncate.c \ + stdio/mingw_wvfscanf.c stdio/snprintf.c stdio/snwprintf.c stdio/truncate.c \ stdio/ulltoa.c stdio/ulltow.c stdio/vasprintf.c stdio/vfscanf.c stdio/vfwscanf.c \ stdio/vscanf.c stdio/vsnprintf.c stdio/vsnwprintf.c stdio/vsscanf.c \ stdio/vswscanf.c stdio/vwscanf.c stdio/wtoll.c stdio/mingw_asprintf.c stdio/mingw_vasprintf.c