Some fixes for MinGW
* Rename Windows.h uses to windows.h * Comment out structured exception handling usage Makes MinGW happier. Mostly the same as previous work by Nicolas Dufresne <nicolas.dufresne@collabora.com>, with the exception that we now don't try to invoke RaiseException which would fail in MinGW as it raises a Windows structured exception.
This commit is contained in:
parent
f8a6ea0a9a
commit
a9f97c9fdd
@ -118,11 +118,13 @@ void SetCurrentThreadName(const char* name) {
|
||||
|
||||
#pragma warning(push)
|
||||
#pragma warning(disable : 6320 6322)
|
||||
#ifndef __MINGW32__
|
||||
__try {
|
||||
::RaiseException(0x406D1388, 0, sizeof(threadname_info) / sizeof(ULONG_PTR),
|
||||
reinterpret_cast<ULONG_PTR*>(&threadname_info));
|
||||
} __except (EXCEPTION_EXECUTE_HANDLER) { // NOLINT
|
||||
}
|
||||
#endif
|
||||
#pragma warning(pop)
|
||||
#elif defined(WEBRTC_LINUX) || defined(WEBRTC_ANDROID)
|
||||
prctl(PR_SET_NAME, reinterpret_cast<unsigned long>(name)); // NOLINT
|
||||
|
@ -22,7 +22,7 @@
|
||||
#include "rtc_base/numerics/safe_conversions.h"
|
||||
|
||||
#ifdef _WIN32
|
||||
#include <Windows.h>
|
||||
#include <windows.h>
|
||||
#else
|
||||
#endif
|
||||
|
||||
|
Loading…
x
Reference in New Issue
Block a user