summaryrefslogtreecommitdiff
path: root/cpp/src/qpid/sys
diff options
context:
space:
mode:
authorClifford Allan Jansen <cliffjansen@apache.org>2011-07-13 06:17:38 +0000
committerClifford Allan Jansen <cliffjansen@apache.org>2011-07-13 06:17:38 +0000
commitc76409fe8a528b692d5a1ef55075f73f305a32a3 (patch)
treec3dd2f5bfbd1e251958518c32967e451eefe5399 /cpp/src/qpid/sys
parent2885957b73306b183b5889dd8bbfd8b58c61c521 (diff)
downloadqpid-python-c76409fe8a528b692d5a1ef55075f73f305a32a3.tar.gz
qpid-3256 additional changes to also work for mingw
git-svn-id: https://svn.apache.org/repos/asf/qpid/trunk/qpid@1145876 13f79535-47bb-0310-9956-ffa450edef68
Diffstat (limited to 'cpp/src/qpid/sys')
-rwxr-xr-xcpp/src/qpid/sys/windows/Thread.cpp13
1 files changed, 9 insertions, 4 deletions
diff --git a/cpp/src/qpid/sys/windows/Thread.cpp b/cpp/src/qpid/sys/windows/Thread.cpp
index ea50c37290..23b0033be4 100755
--- a/cpp/src/qpid/sys/windows/Thread.cpp
+++ b/cpp/src/qpid/sys/windows/Thread.cpp
@@ -19,6 +19,11 @@
*
*/
+// Ensure definition of OpenThread in mingw
+#ifndef _WIN32_WINNT
+#define _WIN32_WINNT 0x0501
+#endif
+
#include "qpid/sys/Thread.h"
#include "qpid/sys/Runnable.h"
#include "qpid/sys/windows/check.h"
@@ -66,14 +71,14 @@ private:
Runnable* runnable;
shared_ptr keepAlive;
- ThreadPrivate() : runnable(NULL), initCompleted(NULL),
- qpidThreadDone(NULL), threadId(GetCurrentThreadId()) {
+ ThreadPrivate() : threadId(GetCurrentThreadId()), initCompleted(NULL),
+ qpidThreadDone(NULL), runnable(NULL) {
threadHandle = OpenThread (SYNCHRONIZE, FALSE, threadId);
QPID_WINDOWS_CHECK_CRT_NZ(threadHandle);
}
- ThreadPrivate(Runnable* r) : runnable(r), threadHandle(NULL), initCompleted(NULL),
- qpidThreadDone(NULL){}
+ ThreadPrivate(Runnable* r) : threadHandle(NULL), initCompleted(NULL),
+ qpidThreadDone(NULL), runnable(r) {}
void start(shared_ptr& p);
static shared_ptr createThread(Runnable* r);