From cb91e6009ee081e8a481406568c3b6242e602cfb Mon Sep 17 00:00:00 2001 From: chris Date: Sun, 28 Sep 2003 07:51:59 +0000 Subject: [PATCH] Fixes to get win_thread working --- asio/src/asio/detail/win_thread.hpp | 15 ++++++++++----- 1 file changed, 10 insertions(+), 5 deletions(-) diff --git a/asio/src/asio/detail/win_thread.hpp b/asio/src/asio/detail/win_thread.hpp index dc2c6810..3e560d0e 100644 --- a/asio/src/asio/detail/win_thread.hpp +++ b/asio/src/asio/detail/win_thread.hpp @@ -21,10 +21,14 @@ #include "asio/detail/socket_types.hpp" +#include "asio/detail/push_options.hpp" +#include +#include "asio/detail/pop_options.hpp" + namespace asio { namespace detail { -extern "C" void* __stdcall asio_detail_win_thread_function(void* arg); +extern "C" unsigned int __stdcall asio_detail_win_thread_function(void* arg); class win_thread : private boost::noncopyable @@ -48,17 +52,17 @@ public: } private: - friend void* asio_detail_win_thread_function(void* arg); + friend unsigned int asio_detail_win_thread_function(void* arg); class func_base { public: - virtual ~function_base() {} + virtual ~func_base() {} virtual run() = 0; }; template - class func + class func : public func_base { public: @@ -73,12 +77,13 @@ private: } private: + Function f_; }; ::HANDLE thread_; }; -inline void* __stdcall asio_detail_win_thread_function(void* arg) +inline unsigned int __stdcall asio_detail_win_thread_function(void* arg) { win_thread::func_base* func = static_cast(arg);