[Libreoffice-commits] core.git: include/wntgccx vcl/source vcl/win

Fridrich Å trba fridrich.strba at bluewin.ch
Thu Jun 6 02:38:57 PDT 2013


 include/wntgccx/jni_md.h           |   35 ++++++++++++++++++++++++++++
 include/wntgccx/sehandler.hxx      |   46 +++++++++++++++++++++++++++++++++++++
 vcl/source/window/window.cxx       |    4 +--
 vcl/win/source/app/salinst.cxx     |   10 ++++----
 vcl/win/source/app/saltimer.cxx    |    2 -
 vcl/win/source/gdi/salprn.cxx      |    2 -
 vcl/win/source/window/salframe.cxx |    2 -
 7 files changed, 91 insertions(+), 10 deletions(-)

New commits:
commit 057891e7a2721cdd204e1eef4051b2021d2c5c6b
Author: Fridrich Å trba <fridrich.strba at bluewin.ch>
Date:   Thu Jun 6 11:38:05 2013 +0200

    Some more movement to mingw64 port
    
    Change-Id: I6af3cb1ac205dae20feb5a35481071bc4232680b

diff --git a/include/wntgccx/jni_md.h b/include/wntgccx/jni_md.h
new file mode 100644
index 0000000..e77438d
--- /dev/null
+++ b/include/wntgccx/jni_md.h
@@ -0,0 +1,35 @@
+/* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */
+/*
+ * This file is part of the LibreOffice project.
+ *
+ * This Source Code Form is subject to the terms of the Mozilla Public
+ * License, v. 2.0. If a copy of the MPL was not distributed with this
+ * file, You can obtain one at http://mozilla.org/MPL/2.0/.
+ *
+ * This file incorporates work covered by the following license notice:
+ *
+ *   Licensed to the Apache Software Foundation (ASF) under one or more
+ *   contributor license agreements. See the NOTICE file distributed
+ *   with this work for additional information regarding copyright
+ *   ownership. The ASF licenses this file to you under the Apache
+ *   License, Version 2.0 (the "License"); you may not use this file
+ *   except in compliance with the License. You may obtain a copy of
+ *   the License at http://www.apache.org/licenses/LICENSE-2.0 .
+ */
+
+/* Fake jni_md.h for use when cross-compiling to Windows */
+
+#ifndef JNI_MD_H_INCLUDED
+#define JNI_MD_H_INCLUDED
+
+#define JNIEXPORT __declspec (dllexport)
+#define JNIIMPORT __declspec (dllimport)
+#define JNICALL   __stdcall
+
+typedef long jint;
+typedef __int64 jlong;
+typedef char jbyte;
+
+#endif /* JNI_MD_H_INCLUDED */
+
+/* vim:set shiftwidth=4 softtabstop=4 expandtab: */
diff --git a/include/wntgccx/sehandler.hxx b/include/wntgccx/sehandler.hxx
new file mode 100644
index 0000000..49bd0f2
--- /dev/null
+++ b/include/wntgccx/sehandler.hxx
@@ -0,0 +1,46 @@
+/* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */
+
+/* From mingw-w64 excpt.h */
+
+#ifndef _SEHANDLER_HXX
+#define _SEHANDLER_HXX
+
+#if !defined( __MINGW32__ ) || !defined ( _WIN64 )
+#error This file should be included only in a 64-bit MinGW compilation
+#endif
+
+#ifdef __try
+#undef __try
+#endif
+
+#if 0
+#define __try \
+  __asm__ __volatile__ ("\t.l_startw:\n" \
+  );
+#else
+#define __try \
+  if (true)
+#endif
+
+#ifdef __except
+#undef __except
+#endif
+
+#if 0
+#define __except(exvalue) \
+  __asm__ __volatile__ ("\tnop\n" \
+  "\t.seh_handler __C_specific_handler, @except\n" \
+  "\t.seh_handlerdata\n" \
+  "\t.long 1\n" \
+  "\t.rva .l_startw, .l_endw, " __MINGW64_STRINGIFY(exvalue) " ,.l_endw\n" \
+  "\t.text\n" \
+  "\t.l_endw: nop\n" \
+  );
+#else
+#define __except(exvalue) \
+  if (false)
+#endif
+
+
+#endif // _SEHANDLER_HXX
+
diff --git a/vcl/source/window/window.cxx b/vcl/source/window/window.cxx
index e69dd35..c76e2d7 100644
--- a/vcl/source/window/window.cxx
+++ b/vcl/source/window/window.cxx
@@ -8363,8 +8363,8 @@ uno::Reference< XDragSource > Window::GetDragSource()
 #if defined WNT
                     aDragSourceSN = OUString("com.sun.star.datatransfer.dnd.OleDragSource");
                     aDropTargetSN = OUString("com.sun.star.datatransfer.dnd.OleDropTarget");
-                    aDragSourceAL[ 1 ] = makeAny( (sal_uInt32) pEnvData->hWnd );
-                    aDropTargetAL[ 0 ] = makeAny( (sal_uInt32) pEnvData->hWnd );
+                    aDragSourceAL[ 1 ] = makeAny( static_cast<sal_uInt64>( reinterpret_cast<sal_IntPtr>(pEnvData->hWnd) ) );
+                    aDropTargetAL[ 0 ] = makeAny( static_cast<sal_uInt64>( reinterpret_cast<sal_IntPtr>(pEnvData->hWnd) ) );
 #elif defined MACOSX
             /* FIXME: Mac OS X specific dnd interface does not exist! *
              * Using Windows based dnd as a temporary solution        */
diff --git a/vcl/win/source/app/salinst.cxx b/vcl/win/source/app/salinst.cxx
index 7da838c..0cbbc5b 100644
--- a/vcl/win/source/app/salinst.cxx
+++ b/vcl/win/source/app/salinst.cxx
@@ -797,7 +797,7 @@ LRESULT CALLBACK SalComWndProcA( HWND hWnd, UINT nMsg, WPARAM wParam, LPARAM lPa
 {
     int bDef = TRUE;
     LRESULT nRet = 0;
-#ifdef __MINGW32__
+#if defined ( __MINGW32__ ) && !defined ( _WIN64 )
     jmp_buf jmpbuf;
     __SEHandler han;
     if (__builtin_setjmp(jmpbuf) == 0)
@@ -809,7 +809,7 @@ LRESULT CALLBACK SalComWndProcA( HWND hWnd, UINT nMsg, WPARAM wParam, LPARAM lPa
 #endif
         nRet = SalComWndProc( hWnd, nMsg, wParam, lParam, bDef );
     }
-#ifdef __MINGW32__
+#if defined ( __MINGW32__ ) && !defined ( _WIN64 )
     han.Reset();
 #else
     __except(WinSalInstance::WorkaroundExceptionHandlingInUSER32Lib(GetExceptionCode(), GetExceptionInformation()))
@@ -828,7 +828,7 @@ LRESULT CALLBACK SalComWndProcW( HWND hWnd, UINT nMsg, WPARAM wParam, LPARAM lPa
 {
     int bDef = TRUE;
     LRESULT nRet = 0;
-#ifdef __MINGW32__
+#if defined ( __MINGW32__ ) && !defined ( _WIN64 )
     jmp_buf jmpbuf;
     __SEHandler han;
     if (__builtin_setjmp(jmpbuf) == 0)
@@ -840,7 +840,7 @@ LRESULT CALLBACK SalComWndProcW( HWND hWnd, UINT nMsg, WPARAM wParam, LPARAM lPa
 #endif
         nRet = SalComWndProc( hWnd, nMsg, wParam, lParam, bDef );
     }
-#ifdef __MINGW32__
+#if defined ( __MINGW32__ ) && !defined ( _WIN64 )
     han.Reset();
 #else
     __except(WinSalInstance::WorkaroundExceptionHandlingInUSER32Lib(GetExceptionCode(), GetExceptionInformation()))
@@ -1072,7 +1072,7 @@ SalSession* WinSalInstance::CreateSalSession()
     return NULL;
 }
 
-#ifndef __MINGW32__
+#if !defined ( __MINGW32__ ) || defined ( _WIN64 )
 // -----------------------------------------------------------------------
 int WinSalInstance::WorkaroundExceptionHandlingInUSER32Lib(int, LPEXCEPTION_POINTERS pExceptionInfo)
 {
diff --git a/vcl/win/source/app/saltimer.cxx b/vcl/win/source/app/saltimer.cxx
index 2e94d01..47d1637 100644
--- a/vcl/win/source/app/saltimer.cxx
+++ b/vcl/win/source/app/saltimer.cxx
@@ -22,7 +22,7 @@
 #include <win/saltimer.h>
 #include <win/salinst.h>
 
-#if defined ( __MINGW32__ ) && !defined ( _WIN64 )
+#if defined ( __MINGW32__ )
 #include <sehandler.hxx>
 #endif
 
diff --git a/vcl/win/source/gdi/salprn.cxx b/vcl/win/source/gdi/salprn.cxx
index 680109f..d87b3a9 100644
--- a/vcl/win/source/gdi/salprn.cxx
+++ b/vcl/win/source/gdi/salprn.cxx
@@ -49,7 +49,7 @@
 
 #include <malloc.h>
 
-#if defined ( __MINGW32__ ) && !defined ( _WIN64 )
+#if defined ( __MINGW32__ )
 #include <sehandler.hxx>
 #endif
 
diff --git a/vcl/win/source/window/salframe.cxx b/vcl/win/source/window/salframe.cxx
index 76de88b..86c3a7b 100644
--- a/vcl/win/source/window/salframe.cxx
+++ b/vcl/win/source/window/salframe.cxx
@@ -86,7 +86,7 @@ using ::std::max;
 
 #include <time.h>
 
-#if defined ( __MINGW32__ ) && !defined ( _WIN64 )
+#if defined ( __MINGW32__ )
 #include <sehandler.hxx>
 #endif
 


More information about the Libreoffice-commits mailing list