diff --git a/asio/include/asio/detail/impl/win_mutex.ipp b/asio/include/asio/detail/impl/win_mutex.ipp index 6340b6e125..637f420b62 100644 --- a/asio/include/asio/detail/impl/win_mutex.ipp +++ b/asio/include/asio/detail/impl/win_mutex.ipp @@ -52,7 +52,7 @@ int win_mutex::do_init() # endif return 0; #else - __try + try { # if defined(UNDER_CE) ::InitializeCriticalSection(&crit_section_); @@ -64,7 +64,7 @@ int win_mutex::do_init() return ::GetLastError(); # endif } - __except(GetExceptionCode() == STATUS_NO_MEMORY + except(GetExceptionCode() == STATUS_NO_MEMORY ? EXCEPTION_EXECUTE_HANDLER : EXCEPTION_CONTINUE_SEARCH) { return ERROR_OUTOFMEMORY; diff --git a/asio/include/asio/detail/impl/win_static_mutex.ipp b/asio/include/asio/detail/impl/win_static_mutex.ipp index 5b45984333..309aba0e90 100644 --- a/asio/include/asio/detail/impl/win_static_mutex.ipp +++ b/asio/include/asio/detail/impl/win_static_mutex.ipp @@ -89,7 +89,7 @@ int win_static_mutex::do_init() } # endif #else - __try + try { # if defined(UNDER_CE) ::InitializeCriticalSection(&crit_section_); @@ -111,7 +111,7 @@ int win_static_mutex::do_init() } # endif } - __except(GetExceptionCode() == STATUS_NO_MEMORY + except(GetExceptionCode() == STATUS_NO_MEMORY ? EXCEPTION_EXECUTE_HANDLER : EXCEPTION_CONTINUE_SEARCH) { ::ReleaseMutex(mutex);