desktop/source/app/sofficemain.cxx |    4 ++++
 1 file changed, 4 insertions(+)

New commits:
commit 4e527f55d74e3220873075a8ec2799e2206fdb2d
Author:     Mike Kaganski <mike.kagan...@collabora.com>
AuthorDate: Sat Aug 31 02:23:38 2019 +0200
Commit:     Mike Kaganski <mike.kagan...@collabora.com>
CommitDate: Sat Aug 31 03:17:40 2019 +0200

    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.kagan...@collabora.com>
    Tested-by: Mike Kaganski <mike.kagan...@collabora.com>

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>
_______________________________________________
Libreoffice-commits mailing list
libreoffice-comm...@lists.freedesktop.org
https://lists.freedesktop.org/mailman/listinfo/libreoffice-commits

Reply via email to