diff options
Diffstat (limited to 'libs/log/src/unhandled_exception_count.cpp')
-rw-r--r-- | libs/log/src/unhandled_exception_count.cpp | 10 |
1 files changed, 5 insertions, 5 deletions
diff --git a/libs/log/src/unhandled_exception_count.cpp b/libs/log/src/unhandled_exception_count.cpp index 6aec558fb..c8eebe1dd 100644 --- a/libs/log/src/unhandled_exception_count.cpp +++ b/libs/log/src/unhandled_exception_count.cpp @@ -1,5 +1,5 @@ /* - * Copyright Andrey Semashev 2007 - 2014. + * Copyright Andrey Semashev 2007 - 2015. * Distributed under the Boost Software License, Version 1.0. * (See accompanying file LICENSE_1_0.txt or copy at * http://www.boost.org/LICENSE_1_0.txt) @@ -49,8 +49,8 @@ extern "C" void* __cxa_get_globals(); #elif defined(_MSC_VER) #if _MSC_VER >= 1900 // Visual Studio 14 has redesigned CRT -#define BOOST_LOG_HAS_VCRT_GETPTD -extern "C" void* __vcrt_getptd(); +#define BOOST_LOG_HAS_PROCESSING_THROW +extern "C" int* __processing_throw(); #elif _MSC_VER >= 1400 #define BOOST_LOG_HAS_GETPTD extern "C" void* _getptd(); @@ -68,9 +68,9 @@ BOOST_LOG_API unsigned int unhandled_exception_count() BOOST_NOEXCEPT #elif defined(BOOST_LOG_HAS_GETPTD) // MSVC specific. Tested on {MSVC2005SP1,MSVC2008SP1,MSVC2010SP1,MSVC2012}x{x32,x64}. return *(reinterpret_cast< const unsigned int* >(static_cast< const char* >(_getptd()) + (sizeof(void*) == 8 ? 0x100 : 0x90))); // _tiddata::_ProcessingThrow, x32 offset - 0x90, x64 - 0x100 -#elif defined(BOOST_LOG_HAS_VCRT_GETPTD) +#elif defined(BOOST_LOG_HAS_PROCESSING_THROW) // MSVC specific. Tested on {MSVC 14 CTP}x{x32,x64}. - return *(reinterpret_cast< const unsigned int* >(static_cast< const char* >(__vcrt_getptd()) + (sizeof(void*) == 8 ? 0x38 : 0x1c))); // __vcrt_ptd::_ProcessingThrow, x32 offset - 0x1c, x64 - 0x38 + return static_cast< unsigned int >(*__processing_throw()); #else // Portable implementation. Does not allow to detect multiple nested exceptions. return static_cast< unsigned int >(std::uncaught_exception()); |