diff options
author | Tor Lillqvist <tlillqvist@novell.com> | 2011-08-31 10:58:46 +0300 |
---|---|---|
committer | Tor Lillqvist <tlillqvist@novell.com> | 2011-08-31 10:59:39 +0300 |
commit | c477ad1858a35a81666debbce66e7fca68b01483 (patch) | |
tree | 52bcf60fa6b4643467cb200b3dd86658d86afe86 /shell/inc | |
parent | Minor update to the Windows autogen.lastrun sample to match mine (diff) | |
download | core-c477ad1858a35a81666debbce66e7fca68b01483.tar.gz core-c477ad1858a35a81666debbce66e7fca68b01483.zip |
Work around compilation errors with mingw-w64 and --enable-debug
Diffstat (limited to 'shell/inc')
-rw-r--r-- | shell/inc/internal/utilities.hxx | 23 |
1 files changed, 23 insertions, 0 deletions
diff --git a/shell/inc/internal/utilities.hxx b/shell/inc/internal/utilities.hxx index 2697c8002dc6..3a410bf37e08 100644 --- a/shell/inc/internal/utilities.hxx +++ b/shell/inc/internal/utilities.hxx @@ -44,8 +44,31 @@ #include <string> #define STRSAFE_NO_DEPRECATE +#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 + //--------------------------------- /** Convert a string to a wstring using CP_ACP |