From ddd94c20133dbe47589d098bec44d4977ef11469 Mon Sep 17 00:00:00 2001 From: "Ben \"root\" Anderson" Date: Sat, 26 Oct 2013 15:31:45 -0500 Subject: [PATCH] SEH not supported on GCC. We are just kind of hoping this never throws an exception because I do not think it is possible to catch SEH exceptions under GCC anyway. --- src/arch/Threads/Threads_Win32.cpp | 6 ++++++ 1 file changed, 6 insertions(+) diff --git a/src/arch/Threads/Threads_Win32.cpp b/src/arch/Threads/Threads_Win32.cpp index 008d93597d..b0030a314f 100644 --- a/src/arch/Threads/Threads_Win32.cpp +++ b/src/arch/Threads/Threads_Win32.cpp @@ -79,10 +79,16 @@ static void SetThreadName( DWORD dwThreadID, LPCTSTR szThreadName ) info.dwThreadID = dwThreadID; info.dwFlags = 0; +#if defined(_MSC_VER) __try { +#endif + // XXX: How does GCC react if this throws an exception, since it doesn't implement SEH? RaiseException(MS_VC_EXCEPTION, 0, sizeof(info) / sizeof(DWORD), (ULONG_PTR *)&info); +#if defined(_MSC_VER) } __except (EXCEPTION_CONTINUE_EXECUTION) { } +#endif + LOG->Warn("SetThreadName: stub!"); } static DWORD WINAPI StartThread( LPVOID pData )