crt: Move stdio/[v]snprintf.c to libmsvcr*.a from libmingwex.a Originally, these source files only defined the symbols __ms_[v]snprintf (based on the _vsnprintf function from msvcr*.dll), but since 3a1127672ba390, they also define [v]snprintf as aliases to those functions. For ucrt, we shouldn't be defining [v]snprintf aliases based on msvcr*.dll functions; we already have [v]snprintf for ucrt in stdio/ucrt_[v]snprintf.c. The __ms_[v]snprintf functions aren't visible in UCRT mode at all, so there's no need to keep them available in libmingwex.a. Alternatively, we could also consider splitting out the aliases into small wrapper functions in separate source files. This fixes using [v]snprintf functions with UCRT, which was broken since 3a1127672ba390. Signed-off-by: Martin Storsjö <martin@martin.st>
diff --git a/mingw-w64-crt/Makefile.am b/mingw-w64-crt/Makefile.am index 308c1ce..833a721 100644 --- a/mingw-w64-crt/Makefile.am +++ b/mingw-w64-crt/Makefile.am
@@ -169,6 +169,8 @@ misc/uchar_mbrtoc32.c \ misc/wcrtomb.c \ stdio/acrt_iob_func.c \ + stdio/snprintf.c \ + stdio/vsnprintf.c \ math/frexp.c src_msvcrt=\ @@ -458,9 +460,9 @@ 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/snwprintf.c stdio/strtof.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/vscanf.c stdio/vsnwprintf.c stdio/vsscanf.c \ stdio/vswscanf.c stdio/vwscanf.c stdio/wtoll.c stdio/mingw_asprintf.c stdio/mingw_vasprintf.c # these go into both 32 and 64 bit x86 versions: