summaryrefslogtreecommitdiffstats
path: root/common
diff options
context:
space:
mode:
authorPeter Åstrand <astrand@cendio.se>2008-12-12 14:05:23 +0000
committerPeter Åstrand <astrand@cendio.se>2008-12-12 14:05:23 +0000
commit1306c56d1d762ebce3a86308193135364eb19841 (patch)
treedd2b92c53099aa28af7561ef0a89604e12442477 /common
parentd0a617e187c04d0c32640b9ff16088f7892edad3 (diff)
downloadtigervnc-1306c56d1d762ebce3a86308193135364eb19841.tar.gz
tigervnc-1306c56d1d762ebce3a86308193135364eb19841.zip
MinGW fix: If vsnprintf if defined before MinGWs stdio.h, things will
break: MinGW will misinterpret the invocation of vsnprintf in Exception.cc as a definition of vsnprintf, and the rest of vncviewer will call this function, resulting in a runtime hang. git-svn-id: svn://svn.code.sf.net/p/tigervnc/code/trunk@3398 3789f03b-4d11-0410-bbf8-ca57d06f2519
Diffstat (limited to 'common')
-rw-r--r--common/common-config.win.h4
1 files changed, 4 insertions, 0 deletions
diff --git a/common/common-config.win.h b/common/common-config.win.h
index b984fb40..2f84e9cd 100644
--- a/common/common-config.win.h
+++ b/common/common-config.win.h
@@ -1,7 +1,11 @@
/* common-config.win.h - Platform-specific definitions for Windows */
#define HAVE_VSNPRINTF 1
+#ifdef _MSC_VER
+/* Older versions of MSVC lacks vsnprintf. MinGW has it, and if this
+ macro is defined before stdio.h is included, things will break. */
#define vsnprintf _vsnprintf
+#endif
#define HAVE_SNPRINTF 1
#define snprintf _snprintf