X-Git-Url: https://git.saurik.com/wxWidgets.git/blobdiff_plain/611cb666563526542d0fb84cc9fc11ceac5a899c..e1208c3103734c8581c9854c344b97323e381897:/src/msw/thread.cpp?ds=sidebyside diff --git a/src/msw/thread.cpp b/src/msw/thread.cpp index 439992a63a..27b948f785 100644 --- a/src/msw/thread.cpp +++ b/src/msw/thread.cpp @@ -26,7 +26,7 @@ #endif #ifndef WX_PRECOMP - #include "wx/wx.h" +# include "wx/wx.h" #endif #if wxUSE_THREADS @@ -36,12 +36,18 @@ #include "wx/module.h" #include "wx/thread.h" +#ifdef Yield +# undef Yield +#endif + // must have this symbol defined to get _beginthread/_endthread declarations #ifndef _MT #define _MT #endif -#if defined(__VISUALC__) || (defined(__BORLANDC__) && (__BORLANDC__ >= 0x500)) +#if defined(__VISUALC__) || \ + (defined(__BORLANDC__) && (__BORLANDC__ >= 0x500)) || \ + (defined(__GNUG__) && defined(__MSVCRT__)) #if defined(__BORLANDC__) && !defined(__MT__) // I can't set -tWM in the IDE (anyone?) so have to do this @@ -53,7 +59,6 @@ #define __MFC_COMPAT__ #endif - #include #endif @@ -455,8 +460,8 @@ bool wxThreadInternal::Create(wxThread *thread) // creation instead of Win32 API one because otherwise we will have memory // leaks if the thread uses C RTL (and most threads do) #if defined(__VISUALC__) || \ - (defined(__BORLANDC__) && (__BORLANDC__ >= 0x500)) \\ - (defined(__GNUG__) && defined(__MSVCRT__) + (defined(__BORLANDC__) && (__BORLANDC__ >= 0x500)) || \ + (defined(__GNUG__) && defined(__MSVCRT__)) typedef unsigned (__stdcall *RtlThreadStart)(void *); m_hThread = (HANDLE)_beginthreadex(NULL, 0, @@ -926,7 +931,9 @@ void wxThread::Exit(ExitCode status) delete this; } -#if defined(__VISUALC__) || (defined(__BORLANDC__) && (__BORLANDC__ >= 0x500)) +#if defined(__VISUALC__) || \ + (defined(__BORLANDC__) && (__BORLANDC__ >= 0x500)) || \ + (defined(__GNUG__) && defined(__MSVCRT__)) _endthreadex((unsigned)status); #else // !VC++ ::ExitThread((DWORD)status);