[Libreoffice-commits] .: desktop/win32

Tor Lillqvist tml at kemper.freedesktop.org
Thu Sep 1 06:40:50 PDT 2011


 desktop/win32/source/setup/setup.cpp |   26 +++++++++++++++++++++++++-
 1 file changed, 25 insertions(+), 1 deletion(-)

New commits:
commit d3e60204f430fd76d7b5f3e53f0bdc23f981af85
Author: Tor Lillqvist <tlillqvist at novell.com>
Date:   Thu Sep 1 08:17:05 2011 +0300

    Work around compilation errors with mingw-w64 and --enable-debug

diff --git a/desktop/win32/source/setup/setup.cpp b/desktop/win32/source/setup/setup.cpp
index 673fe57..ad91bfd 100644
--- a/desktop/win32/source/setup/setup.cpp
+++ b/desktop/win32/source/setup/setup.cpp
@@ -45,7 +45,31 @@
 #include <locale.h>
 #include <msiquery.h>
 #include <msidefs.h>
-#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 <strsafe.h>
+
+#ifdef __MINGW32__
+}
+
+#ifdef DID_UNDEFINE__CRT__NO_INLINE
+#define __CRT__NO_INLINE
+#endif
+
+#endif
 
 #include "setup.hxx"
 


More information about the Libreoffice-commits mailing list