On Wednesday 29 December 2021 22:35:08 LIU Hao wrote:
> 在 2021-12-23 22:20, Pali Rohár 写道:
> > Original MSVC 6.0 msvcrt.dll library does not provide _vscprintf()
> > function. Therefore usage of snprintf() with this DLL library cause
> > application crash. Add simple fallback implementation of _vscprintf() just
> > for __ms_vsnprintf() to allow usage of snprintf() function also when using
> > original msvcrt.dll library. This fallback implementation is static and not
> > exported outside of vsnprintf.c source file.
> > ---
> >   mingw-w64-crt/stdio/vsnprintf.c | 67 +++++++++++++++++++++++++++++++++
> >   1 file changed, 67 insertions(+)
> > 
> 
> I have an impression that we have not been supporting for VC6 since many
> years ago. All code targeting MSVCRT now requires Windows XP and the
> MSVCRT.DLL from it.

Hello! It is truth that WinXP's system MSVCRT has this function.

But there is an issue that system MSVCRT library is not versioned and you
never know at compile / link time which version of MSVCRT will be loaded
at runtime (as opposite of when not using system MSVCRT library but e.g.
msvcr90.dll which has version in its name).

So for example if some plugin (DLL) is compiled by mingw-w64 and code of
this plugin uses snprintf() then this plugin fails to load in (older)
application which is shipped with original 6.0 msvcrt.dll library.

And this happens on any Windows, including XP and newer.


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

Reply via email to