]> wimlib.net Git - wimlib/commitdiff
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 8d2271fc77e426e8c470eb068b536909118c72bf..4f4b8678289704df5157237012e89782a56de2ed 100644 (file)
@@ -213,7 +213,7 @@ case "$host" in
                WINDOWS_NATIVE_BUILD="yes"
                VISIBILITY_CFLAGS=""
                WINDOWS_CFLAGS="-municode"
                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"
                WINDOWS_LDFLAGS="-no-undefined"
                WINDOWS_LDADD="-lshlwapi"
                ENABLE_XATTR_DEFAULT="no"
index 4d33efef554fa2c804a5b79bbc59dd10b81b03c0..5b92310066b5781291430e25f716b16353349d33 100644 (file)
@@ -24,7 +24,7 @@ typedef wchar_t tchar;
 #  define tmempcpy     wmempcpy
 #  define tstrcpy      wcscpy
 #  define tprintf      wprintf
 #  define tmempcpy     wmempcpy
 #  define tstrcpy      wcscpy
 #  define tprintf      wprintf
-#  define tsprintf     _swprintf
+#  define tsprintf     swprintf
 #  define tfprintf     fwprintf
 #  define tvfprintf    vfwprintf
 #  define istalpha     iswalpha
 #  define tfprintf     fwprintf
 #  define tvfprintf    vfwprintf
 #  define istalpha     iswalpha