diff options
author | Clifford Allan Jansen <cliffjansen@apache.org> | 2011-07-13 06:17:38 +0000 |
---|---|---|
committer | Clifford Allan Jansen <cliffjansen@apache.org> | 2011-07-13 06:17:38 +0000 |
commit | c76409fe8a528b692d5a1ef55075f73f305a32a3 (patch) | |
tree | c3dd2f5bfbd1e251958518c32967e451eefe5399 /cpp/src/qpid/sys | |
parent | 2885957b73306b183b5889dd8bbfd8b58c61c521 (diff) | |
download | qpid-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-x | cpp/src/qpid/sys/windows/Thread.cpp | 13 |
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); |