在 2024-04-09 02:02, Pali Rohár 写道:
Symbols _swprintf and _vswprintf were added in Windows Vista and have same
meaning as symbols without leading underscore in msvcrt.dll. These symbols
(both with and without leading underscore) differs from C99 variant as they
do not take maxlen parameter.

For compatibility with pre-Vista systems, which are x86-only, define
_swprintf and _vswprintf symbols on I386 and X64 as aliases to swprintf and
vswprintf.
---
  mingw-w64-crt/lib-common/msvcrt.def.in | 4 ++--
  1 file changed, 2 insertions(+), 2 deletions(-)

This change looks good to me, so I pushed this.

A little suggestion: If I was to import these functions, I would not add `swprintf` due to the inconsistency. For example, MSVCR120.DLL does not export `swprintf`, but only `_swprintf` and two C++ overloads; C++ names are mangled so they can never match each other. Maybe it's possible to add `swprintf` as an alias to the C99 one..?


--
Best regards,
LIU Hao

Attachment: OpenPGP_signature.asc
Description: OpenPGP digital signature

_______________________________________________
Mingw-w64-public mailing list
Mingw-w64-public@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/mingw-w64-public

Reply via email to