-#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
#if defined(__BORLANDC__) && !defined(__MT__)
// I can't set -tWM in the IDE (anyone?) so have to do this
// 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)
// 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)
-#if defined(__VISUALC__) || (defined(__BORLANDC__) && (__BORLANDC__ >= 0x500))
+#if defined(__VISUALC__) || \
+ (defined(__BORLANDC__) && (__BORLANDC__ >= 0x500)) || \
+ (defined(__GNUG__) && defined(__MSVCRT__))
typedef unsigned (__stdcall *RtlThreadStart)(void *);
m_hThread = (HANDLE)_beginthreadex(NULL, 0,
typedef unsigned (__stdcall *RtlThreadStart)(void *);
m_hThread = (HANDLE)_beginthreadex(NULL, 0,
wxThreadInternal::WinThreadStart,
thread, CREATE_SUSPENDED,
(unsigned int *)&m_tid);
wxThreadInternal::WinThreadStart,
thread, CREATE_SUSPENDED,
(unsigned int *)&m_tid);
m_hThread = ::CreateThread
(
NULL, // default security
m_hThread = ::CreateThread
(
NULL, // default security
CREATE_SUSPENDED, // flags
&m_tid // [out] thread id
);
CREATE_SUSPENDED, // flags
&m_tid // [out] thread id
);
-#if defined(__VISUALC__) || (defined(__BORLANDC__) && (__BORLANDC__ >= 0x500))
+#if defined(__VISUALC__) || \
+ (defined(__BORLANDC__) && (__BORLANDC__ >= 0x500)) || \
+ (defined(__GNUG__) && defined(__MSVCRT__))