On Wed, 26 Jun 2024, Pali Rohár wrote:
On Sunday 23 June 2024 14:21:18 Pali Rohár wrote:
On Saturday 22 June 2024 21:58:13 Pali Rohár wrote:
ARM32 and ARM64 always contain all Vista symbols. So use them directly
instead of the mingw-w64 emulation.
The only Vista+ symbol which is not enabled right now is vsnprintf. It
needs to be inspected if this Vista+ symbol is C99 compatible vsnprintf()
function or MSVC variant _vsnprintf() which does not fill nul term byte.
Now I have looked at it and vsnprintf symbol has same address as
_vsnprintf symbol in msvcrt.dll library. So it is not C99 compatible as
it does not fill nul term byte when there is not space for it.
Could you append following change to this patch?
diff --git a/mingw-w64-crt/lib-common/msvcrt.def.in
b/mingw-w64-crt/lib-common/msvcrt.def.in
index a58c76c306d4..1ae45480cb0e 100644
--- a/mingw-w64-crt/lib-common/msvcrt.def.in
+++ b/mingw-w64-crt/lib-common/msvcrt.def.in
@@ -1832,7 +1832,7 @@ F_ARM_ANY(utime) ; i386 and x64 utime replaced by alias
in crt-aliases.def.in
vfprintf_s
vfwprintf_s
vprintf_s
-; vsnprintf replaced by emu
+; vsnprintf replaced by emu, in msvcrt.dll it is alias to _vsnprintf, which is
not C99 compatible
F_ARM_ANY(vsprintf_s) ; i386 and x64 vsprintf_s replaced by emu
vswprintf_s
vwprintf_s
Together with changing second paragraph of commit message to:
The only Vista+ symbol which stay disabled in the def file is vsnprintf.
It is because this Vista+ vsnprintf symbol is not C99 compatible and is
just an alias to _vsnprintf symbol which does not fill nul term byte.
Done, I amended these change into my local copy of this patch.
// Martin
_______________________________________________
Mingw-w64-public mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/mingw-w64-public