diff options
author | Mike Kaganski <mike.kaganski@collabora.com> | 2019-08-31 02:23:38 +0200 |
---|---|---|
committer | Mike Kaganski <mike.kaganski@collabora.com> | 2019-08-31 03:17:40 +0200 |
commit | 4e527f55d74e3220873075a8ec2799e2206fdb2d (patch) | |
tree | 06cbe5189b8b02f9ebba24665f1568079b79d197 /desktop | |
parent | cb204a382da220f8b282d6da507716c918716272 (diff) |
Fix MSVC2019 build after 629dfff3c7289f185268c7088e67931f6bbd9ce0
... failing like this:
[CXX] desktop/source/app/sofficemain.cxx
C:\PROGRA~2\WI3CF2~1\10\Include\10.0.18362.0\um\winnt.h(656): error C4005: 'DECLARE_HANDLE': macro redefinition
C:\lo\src\core\include\sal/main.h(91): note: see previous definition of 'DECLARE_HANDLE'
C:\PROGRA~2\WI3CF2~1\10\Include\10.0.18362.0\shared\minwindef.h(250): error C2371: 'HINSTANCE': redefinition; different basic types
C:\lo\src\core\include\sal/main.h(93): note: see declaration of 'HINSTANCE'
make[1]: *** [C:/lo/src/core/solenv/gbuild/LinkTarget.mk:293: C:/lo/src/core/workdir/CxxObject/desktop/source/app/sofficemain.o] Error 2
Apparently MSVC2017 isn't affected, since the problematic commit passed
CI happliy (didn't test myself if MSVC version is actually the problem,
or maybe specific Windows SDK version).
Change-Id: Ibcaa3a8d09bae54e436366623fe103e8c5f58f40
Reviewed-on: https://gerrit.libreoffice.org/78334
Reviewed-by: Mike Kaganski <mike.kaganski@collabora.com>
Tested-by: Mike Kaganski <mike.kaganski@collabora.com>
Diffstat (limited to 'desktop')
-rw-r--r-- | desktop/source/app/sofficemain.cxx | 4 |
1 files changed, 4 insertions, 0 deletions
diff --git a/desktop/source/app/sofficemain.cxx b/desktop/source/app/sofficemain.cxx index 2a692fdae8d4..917361ebf0d3 100644 --- a/desktop/source/app/sofficemain.cxx +++ b/desktop/source/app/sofficemain.cxx @@ -28,6 +28,9 @@ #include "cmdlineargs.hxx" #include "cmdlinehelp.hxx" +// needed before sal/main.h to avoid redefinition of macros +#include <prewin.h> + #include <desktop/exithelper.h> #include <osl/file.hxx> #include <rtl/bootstrap.hxx> @@ -62,6 +65,7 @@ #endif +#include <postwin.h> #ifdef ANDROID # include <jni.h> |