qpid-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From cliffjan...@apache.org
Subject svn commit: r1145876 - /qpid/trunk/qpid/cpp/src/qpid/sys/windows/Thread.cpp
Date Wed, 13 Jul 2011 06:17:38 GMT
Author: cliffjansen
Date: Wed Jul 13 06:17:38 2011
New Revision: 1145876

URL: http://svn.apache.org/viewvc?rev=1145876&view=rev
Log:
qpid-3256 additional changes to also work for mingw

Modified:
    qpid/trunk/qpid/cpp/src/qpid/sys/windows/Thread.cpp

Modified: qpid/trunk/qpid/cpp/src/qpid/sys/windows/Thread.cpp
URL: http://svn.apache.org/viewvc/qpid/trunk/qpid/cpp/src/qpid/sys/windows/Thread.cpp?rev=1145876&r1=1145875&r2=1145876&view=diff
==============================================================================
--- qpid/trunk/qpid/cpp/src/qpid/sys/windows/Thread.cpp (original)
+++ qpid/trunk/qpid/cpp/src/qpid/sys/windows/Thread.cpp Wed Jul 13 06:17:38 2011
@@ -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);



---------------------------------------------------------------------
Apache Qpid - AMQP Messaging Implementation
Project:      http://qpid.apache.org
Use/Interact: mailto:commits-subscribe@qpid.apache.org


Mime
View raw message