From c76409fe8a528b692d5a1ef55075f73f305a32a3 Mon Sep 17 00:00:00 2001 From: Clifford Allan Jansen Date: Wed, 13 Jul 2011 06:17:38 +0000 Subject: 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 --- cpp/src/qpid/sys/windows/Thread.cpp | 13 +++++++++---- 1 file changed, 9 insertions(+), 4 deletions(-) (limited to 'cpp') 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); -- cgit v1.2.1