mirror of
https://git.code.sf.net/p/mingw-w64/mingw-w64
synced 2024-11-26 19:33:27 +08:00
c85d64d8cb
C95 compatible (v)swprintf function takes size argument and returns negative value on error. __mingw_(v)swprintf function (which is called when __USE_MINGW_ANSI_STDIO=1) does not take size argument at all. Fix this problem by adjusting mingw_sprintfw.c and mingw_vsprintfw.c files to include "n" function variant and also adjust mingw_vsnprintf.c implementation to return correct value on error for ISO C95+ variant. Fix also header files to provide correct declarations for __mingw_(v)swprintf() function and then also inline definitions for (v)swprintf() when __USE_MINGW_ANSI_STDIO=1. Note that mingw-w64 provides also additional non-ISO C (v)snwprintf() function which is built from the same mingw_vsnprintf.c source file. Distinguish between non-ISO C (v)snwprintf() and ISO C95+ (v)swprintf() by a new __BUILD_WIDEAPI_ISO macro. With all these changes, functions swprintf() and vswprintf() when __USE_MINGW_ANSI_STDIO is set to 1 are now compatible with ISO C95+. Signed-off-by: Martin Storsjö <martin@martin.st> |
||
---|---|---|
build-aux | ||
COPYING.MinGW-w64 | ||
COPYING.MinGW-w64-runtime | ||
mingw-w64-crt | ||
mingw-w64-doc | ||
mingw-w64-headers | ||
mingw-w64-libraries | ||
mingw-w64-tools | ||
.gitignore | ||
aclocal.m4 | ||
AUTHORS | ||
config.h.in | ||
configure | ||
configure.ac | ||
COPYING | ||
DISCLAIMER | ||
DISCLAIMER.PD | ||
Makefile.am | ||
Makefile.in |