[Libreoffice-commits] core.git: bridges/inc bridges/source

David Ostrovsky david at ostrovsky.org
Fri Mar 3 08:30:14 UTC 2017


 bridges/inc/except.hxx                              |    2 --
 bridges/source/cpp_uno/msvc_win32_intel/except.cxx  |   16 +---------------
 bridges/source/cpp_uno/msvc_win32_x86-64/except.cxx |   16 +---------------
 3 files changed, 2 insertions(+), 32 deletions(-)

New commits:
commit 1d4f1eae902fa115b1d7ef818a75dcdcdb9c8a65
Author: David Ostrovsky <david at ostrovsky.org>
Date:   Sun Mar 13 23:21:57 2016 +0100

    UNO bridges: Remove MSVC 2013 legacy code
    
    Change-Id: Ia6f59f825ead50f92ed7a343df0c01f34ce5c6f8
    Reviewed-on: https://gerrit.libreoffice.org/23199
    Tested-by: Jenkins <ci at libreoffice.org>
    Reviewed-by: Stephan Bergmann <sbergman at redhat.com>

diff --git a/bridges/inc/except.hxx b/bridges/inc/except.hxx
index f1437f3..4b90ee1 100644
--- a/bridges/inc/except.hxx
+++ b/bridges/inc/except.hxx
@@ -20,7 +20,6 @@
 #ifndef INCLUDED_BRIDGES_INC_EXCEPT_HXX
 #define INCLUDED_BRIDGES_INC_EXCEPT_HXX
 
-#if _MSC_VER >= 1900 // VC 2015/2017 (and later?)
 // extern "C" void** __cdecl __current_exception()
 // is defined in MSVS14.0/VC/crt/src/vcruntime/frame.cpp:
 // return &__vcrt_getptd()->_curexception;
@@ -34,7 +33,6 @@
 //void*              _curexception;    // current exception
 //[...]
 extern "C" void** __current_exception();
-#endif
 
 #endif
 
diff --git a/bridges/source/cpp_uno/msvc_win32_intel/except.cxx b/bridges/source/cpp_uno/msvc_win32_intel/except.cxx
index bd805a4..3fa9474 100644
--- a/bridges/source/cpp_uno/msvc_win32_intel/except.cxx
+++ b/bridges/source/cpp_uno/msvc_win32_intel/except.cxx
@@ -484,21 +484,7 @@ int msci_filterCppException(
 
     if (rethrow && pRecord == pPointers->ExceptionRecord)
     {
-        pRecord = *reinterpret_cast< EXCEPTION_RECORD ** >(
-#if _MSC_VER >= 1900 // VC 2015 (and later?)
-           __current_exception()
-#else
-            // hack to get msvcrt internal _curexception field:
-            reinterpret_cast< char * >( __pxcptinfoptrs() ) +
-            // as long as we don't demand msvcr source as build prerequisite
-            // (->platform sdk), we have to code those offsets here.
-            //
-            // crt\src\mtdll.h:
-            // offsetof (_tiddata, _curexception) -
-            // offsetof (_tiddata, _tpxcptinfoptrs):
-            0x28 // msvcr80.dll (and later?)
-#endif
-            );
+        pRecord = *reinterpret_cast< EXCEPTION_RECORD ** >(__current_exception());
     }
     // rethrow: handle only C++ exceptions:
     if (pRecord == 0 || pRecord->ExceptionCode != MSVC_ExceptionCode)
diff --git a/bridges/source/cpp_uno/msvc_win32_x86-64/except.cxx b/bridges/source/cpp_uno/msvc_win32_x86-64/except.cxx
index 5687c0d..8860344 100644
--- a/bridges/source/cpp_uno/msvc_win32_x86-64/except.cxx
+++ b/bridges/source/cpp_uno/msvc_win32_x86-64/except.cxx
@@ -802,21 +802,7 @@ int mscx_filterCppException(
 
     if (rethrow && pRecord == pPointers->ExceptionRecord)
     {
-        pRecord = *reinterpret_cast< EXCEPTION_RECORD ** >(
-#if _MSC_VER >= 1900 // VC 2015/2017 (and later?)
-            __current_exception()
-#else
-            // Hack to get msvcrt internal _curexception field
-            reinterpret_cast< char * >( __pxcptinfoptrs() ) +
-            // As long as we don't demand MSVCR source as build prerequisite,
-            // we have to code those offsets here.
-            //
-            // MSVS9/crt/src/mtdll.h:
-            // offsetof (_tiddata, _curexception) -
-            // offsetof (_tiddata, _tpxcptinfoptrs):
-            0x48
-#endif
-            );
+        pRecord = *reinterpret_cast< EXCEPTION_RECORD ** >(__current_exception());
     }
 
     // Rethrow: handle only C++ exceptions:


More information about the Libreoffice-commits mailing list