#define _MT
#endif
-#ifdef __VISUALC__
+#if defined(__VISUALC__) || (defined(__BORLANDC__) && (__BORLANDC__ >= 0x500))
#include <process.h>
#endif
// 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,
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!
delete this;
}
-#ifdef __VISUALC__
+#if defined(__VISUALC__) || (defined(__BORLANDC__) && (__BORLANDC__ >= 0x500))
_endthreadex((unsigned)status);
#else // !VC++
::ExitThread((DWORD)status);