From: Eric Biggers Date: Sat, 31 Aug 2013 23:29:41 +0000 (-0500) Subject: Win32: Define _CRT_NON_CONFORMING_SWPRINTFS X-Git-Tag: v1.5.0~16 X-Git-Url: https://wimlib.net/git/?p=wimlib;a=commitdiff_plain;h=c49e8aad747683540b3ddedc5ef2c1739b84aedf Win32: Define _CRT_NON_CONFORMING_SWPRINTFS To get the "old" swprintf() declaration with all versions of MinGW, at least until the code is fixed to use the standard form, define _CRT_NON_CONFORMING_SWPRINTFS. --- diff --git a/configure.ac b/configure.ac index 8d2271fc..4f4b8678 100644 --- a/configure.ac +++ b/configure.ac @@ -213,7 +213,7 @@ case "$host" in WINDOWS_NATIVE_BUILD="yes" VISIBILITY_CFLAGS="" WINDOWS_CFLAGS="-municode" - WINDOWS_CPPFLAGS="-D_POSIX -DUNICODE -D_UNICODE" + WINDOWS_CPPFLAGS="-D_POSIX -DUNICODE -D_UNICODE -D_CRT_NON_CONFORMING_SWPRINTFS" WINDOWS_LDFLAGS="-no-undefined" WINDOWS_LDADD="-lshlwapi" ENABLE_XATTR_DEFAULT="no" diff --git a/include/wimlib_tchar.h b/include/wimlib_tchar.h index 4d33efef..5b923100 100644 --- a/include/wimlib_tchar.h +++ b/include/wimlib_tchar.h @@ -24,7 +24,7 @@ typedef wchar_t tchar; # define tmempcpy wmempcpy # define tstrcpy wcscpy # define tprintf wprintf -# define tsprintf _swprintf +# define tsprintf swprintf # define tfprintf fwprintf # define tvfprintf vfwprintf # define istalpha iswalpha