/pidgin/main: 9def6c9f26a6: cross-win32: don't redefine (v)snpri...

Tomasz Wasilczyk twasilczyk at pidgin.im
Wed Apr 16 19:49:43 EDT 2014


Changeset: 9def6c9f26a609ced30659755ed588663449d1ee
Author:	 Tomasz Wasilczyk <twasilczyk at pidgin.im>
Date:	 2014-04-17 01:49 +0200
Branch:	 default
URL: https://hg.pidgin.im/pidgin/main/rev/9def6c9f26a6

Description:

cross-win32: don't redefine (v)snprintf on mingw64

diffstat:

 libpurple/win32/libc_interface.h |  10 ++++++----
 1 files changed, 6 insertions(+), 4 deletions(-)

diffs (20 lines):

diff --git a/libpurple/win32/libc_interface.h b/libpurple/win32/libc_interface.h
--- a/libpurple/win32/libc_interface.h
+++ b/libpurple/win32/libc_interface.h
@@ -132,10 +132,12 @@ wpurple_gethostname( name, size )
 wpurple_gettimeofday( timeval, timezone )
 
 /* stdio.h */
-#undef snprintf
-#define snprintf _snprintf
-#undef vsnprintf
-#define vsnprintf _vsnprintf
+#if !defined(__MINGW64_VERSION_MAJOR) || __MINGW64_VERSION_MAJOR < 3
+#  undef snprintf
+#  define snprintf _snprintf
+#  undef vsnprintf
+#  define vsnprintf _vsnprintf
+#endif
 
 #define rename( oldname, newname ) \
 g_rename( oldname, newname )



More information about the Commits mailing list