X-Git-Url: https://git.lyx.org/gitweb/?a=blobdiff_plain;f=3rdparty%2Fboost%2Fboost%2Fsmart_ptr%2Fdetail%2Flwm_win32_cs.hpp;h=d8dccb0141b3b047fc812654f686ca7e1081f579;hb=c40d23deacc277e4a862db803c565ff04e6031f1;hp=7d3e1561667871872284f860da9dd8f6596c2622;hpb=2dc84b69d5a040e6343e21606f1c16a7c0957383;p=features.git diff --git a/3rdparty/boost/boost/smart_ptr/detail/lwm_win32_cs.hpp b/3rdparty/boost/boost/smart_ptr/detail/lwm_win32_cs.hpp index 7d3e156166..d8dccb0141 100644 --- a/3rdparty/boost/boost/smart_ptr/detail/lwm_win32_cs.hpp +++ b/3rdparty/boost/boost/smart_ptr/detail/lwm_win32_cs.hpp @@ -61,10 +61,23 @@ extern "C" __declspec(dllimport) void __stdcall EnterCriticalSection(::_RTL_CRIT extern "C" __declspec(dllimport) void __stdcall LeaveCriticalSection(::_RTL_CRITICAL_SECTION *); extern "C" __declspec(dllimport) void __stdcall DeleteCriticalSection(::_RTL_CRITICAL_SECTION *); -#else +typedef ::_RTL_CRITICAL_SECTION rtl_critical_section; + +#else // #ifndef BOOST_USE_WINDOWS_H typedef ::CRITICAL_SECTION critical_section; +#if BOOST_PLAT_WINDOWS_RUNTIME +using ::InitializeCriticalSectionEx; +#else +using ::InitializeCriticalSection; +#endif +using ::EnterCriticalSection; +using ::LeaveCriticalSection; +using ::DeleteCriticalSection; + +typedef ::CRITICAL_SECTION rtl_critical_section; + #endif // #ifndef BOOST_USE_WINDOWS_H class lightweight_mutex @@ -81,15 +94,15 @@ public: lightweight_mutex() { #if BOOST_PLAT_WINDOWS_RUNTIME - boost::detail::InitializeCriticalSectionEx(reinterpret_cast< ::_RTL_CRITICAL_SECTION* >(&cs_), 4000, 0); + boost::detail::InitializeCriticalSectionEx(reinterpret_cast< rtl_critical_section* >(&cs_), 4000, 0); #else - boost::detail::InitializeCriticalSection(reinterpret_cast< ::_RTL_CRITICAL_SECTION* >(&cs_)); + boost::detail::InitializeCriticalSection(reinterpret_cast< rtl_critical_section* >(&cs_)); #endif } ~lightweight_mutex() { - boost::detail::DeleteCriticalSection(reinterpret_cast< ::_RTL_CRITICAL_SECTION* >(&cs_)); + boost::detail::DeleteCriticalSection(reinterpret_cast< rtl_critical_section* >(&cs_)); } class scoped_lock; @@ -108,12 +121,12 @@ public: explicit scoped_lock(lightweight_mutex & m): m_(m) { - boost::detail::EnterCriticalSection(reinterpret_cast< ::_RTL_CRITICAL_SECTION* >(&m_.cs_)); + boost::detail::EnterCriticalSection(reinterpret_cast< rtl_critical_section* >(&m_.cs_)); } ~scoped_lock() { - boost::detail::LeaveCriticalSection(reinterpret_cast< ::_RTL_CRITICAL_SECTION* >(&m_.cs_)); + boost::detail::LeaveCriticalSection(reinterpret_cast< rtl_critical_section* >(&m_.cs_)); } }; };