Win32: Define _CRT_NON_CONFORMING_SWPRINTFS
authorEric Biggers <ebiggers3@gmail.com>
Sat, 31 Aug 2013 23:29:41 +0000 (18:29 -0500)
committerEric Biggers <ebiggers3@gmail.com>
Sat, 31 Aug 2013 23:31:47 +0000 (18:31 -0500)
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
include/wimlib_tchar.h

index 8d2271f..4f4b867 100644 (file)
@@ -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"
index 4d33efe..5b92310 100644 (file)
@@ -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