From d3e60204f430fd76d7b5f3e53f0bdc23f981af85 Mon Sep 17 00:00:00 2001 From: Tor Lillqvist Date: Thu, 1 Sep 2011 08:17:05 +0300 Subject: Work around compilation errors with mingw-w64 and --enable-debug --- desktop/win32/source/setup/setup.cpp | 26 +++++++++++++++++++++++++- 1 file changed, 25 insertions(+), 1 deletion(-) diff --git a/desktop/win32/source/setup/setup.cpp b/desktop/win32/source/setup/setup.cpp index 673fe57c3c07..ad91bfd7ebfe 100644 --- a/desktop/win32/source/setup/setup.cpp +++ b/desktop/win32/source/setup/setup.cpp @@ -45,7 +45,31 @@ #include #include #include -#include "strsafe.h" + +#ifdef __MINGW32__ + +// Work around lack of strsafe library in mingw-w64, do let their +// strsafe.h provide inlines of StringCchVPrintfA etc, avoid linking +// errors in a debug build. +#ifdef __CRT__NO_INLINE +#undef __CRT__NO_INLINE +#define DID_UNDEFINE__CRT__NO_INLINE +#endif + +extern "C" { + +#endif + +#include + +#ifdef __MINGW32__ +} + +#ifdef DID_UNDEFINE__CRT__NO_INLINE +#define __CRT__NO_INLINE +#endif + +#endif #include "setup.hxx" -- cgit