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