From 1306c56d1d762ebce3a86308193135364eb19841 Mon Sep 17 00:00:00 2001 From: =?utf8?q?Peter=20=C3=85strand?= Date: Fri, 12 Dec 2008 14:05:23 +0000 Subject: [PATCH] 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 --- common/common-config.win.h | 4 ++++ 1 file changed, 4 insertions(+) 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 -- 2.39.5