X-Git-Url: https://git.saurik.com/wxWidgets.git/blobdiff_plain/7f684264b874ffe926a1c9eab18963b6282da4c5..c79853685d09ba1d7eaef604395c40b731ed2f34:/src/msw/thread.cpp diff --git a/src/msw/thread.cpp b/src/msw/thread.cpp index 0fd0fcdfad..a7aff134f2 100644 --- a/src/msw/thread.cpp +++ b/src/msw/thread.cpp @@ -41,7 +41,7 @@ #define _MT #endif -#ifdef __VISUALC__ +#if defined(__VISUALC__) || (defined(__BORLANDC__) && (__BORLANDC__ >= 0x500)) #include #endif @@ -442,7 +442,7 @@ bool wxThreadInternal::Create(wxThread *thread) // for compilers which have it, we should use C RTL function for thread // creation instead of Win32 API one because otherwise we will have memory // leaks if the thread uses C RTL (and most threads do) -#ifdef __VISUALC__ +#if defined(__VISUALC__) || (defined(__BORLANDC__) && (__BORLANDC__ >= 0x500)) typedef unsigned (__stdcall *RtlThreadStart)(void *); m_hThread = (HANDLE)_beginthreadex(NULL, 0, @@ -626,7 +626,12 @@ bool wxThread::SetConcurrency(size_t level) if ( hModKernel ) { pfnSetProcessAffinityMask = (SETPROCESSAFFINITYMASK) - ::GetProcAddress(hModKernel, _T("SetProcessAffinityMask")); + ::GetProcAddress(hModKernel, +#if defined(__BORLANDC__) && (__BORLANDC__ <= 0x520) + "SetProcessAffinityMask"); +#else + _T("SetProcessAffinityMask")); +#endif } // we've discovered a MT version of Win9x! @@ -907,7 +912,7 @@ void wxThread::Exit(ExitCode status) delete this; } -#ifdef __VISUALC__ +#if defined(__VISUALC__) || (defined(__BORLANDC__) && (__BORLANDC__ >= 0x500)) _endthreadex((unsigned)status); #else // !VC++ ::ExitThread((DWORD)status);