From c49e8aad747683540b3ddedc5ef2c1739b84aedf Mon Sep 17 00:00:00 2001 From: Eric Biggers Date: Sat, 31 Aug 2013 18:29:41 -0500 Subject: [PATCH] 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. --- configure.ac | 2 +- include/wimlib_tchar.h | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) 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 -- 2.43.0