Index: boost/config/compiler/visualc.hpp =================================================================== --- boost/config/compiler/visualc.hpp (revision 85020) +++ boost/config/compiler/visualc.hpp (working copy) @@ -108,11 +108,6 @@ # define BOOST_NO_CXX11_VARIADIC_MACROS #endif -#if defined(UNDER_CE) -// Windows CE does not have a conforming signature for swprintf -# define BOOST_NO_SWPRINTF -#endif - #if _MSC_VER < 1500 // 140X == VC++ 8.0 # define BOOST_NO_MEMBER_TEMPLATE_FRIENDS #endif @@ -142,16 +137,6 @@ # define BOOST_NO_INTRINSIC_WCHAR_T #endif -#if defined(_WIN32_WCE) || defined(UNDER_CE) -# define BOOST_NO_SWPRINTF -#endif - -// we have ThreadEx or GetSystemTimeAsFileTime unless we're running WindowsCE -#if !defined(_WIN32_WCE) && !defined(UNDER_CE) -# define BOOST_HAS_THREADEX -# define BOOST_HAS_GETSYSTEMTIMEASFILETIME -#endif - // // check for exception handling support: #if !defined(_CPPUNWIND) && !defined(BOOST_NO_EXCEPTIONS) Index: boost/config/platform/win32.hpp =================================================================== --- boost/config/platform/win32.hpp (revision 85020) +++ boost/config/platform/win32.hpp (working copy) @@ -61,6 +61,17 @@ # define BOOST_HAS_GETSYSTEMTIMEASFILETIME #endif +#if defined(_WIN32_WCE) || defined(UNDER_CE) +// Windows CE does not have a conforming signature for swprintf +# define BOOST_NO_SWPRINTF +#endif + +// we have ThreadEx or GetSystemTimeAsFileTime unless we're running WindowsCE +#if !defined(_WIN32_WCE) && !defined(UNDER_CE) +# define BOOST_HAS_THREADEX +# define BOOST_HAS_GETSYSTEMTIMEASFILETIME +#endif + #ifndef BOOST_HAS_PTHREADS # define BOOST_HAS_WINTHREADS #endif Index: libs/thread/src/win32/thread.cpp =================================================================== --- libs/thread/src/win32/thread.cpp (revision 85020) +++ libs/thread/src/win32/thread.cpp (working copy) @@ -111,42 +111,19 @@ namespace { #ifndef BOOST_HAS_THREADEX -// Windows CE doesn't define _beginthreadex - - struct ThreadProxyData - { - typedef unsigned (__stdcall* func)(void*); - func start_address_; - void* arglist_; - ThreadProxyData(func start_address,void* arglist) : start_address_(start_address), arglist_(arglist) {} - }; - - DWORD WINAPI ThreadProxy(LPVOID args) - { - std::auto_ptr data(reinterpret_cast(args)); - DWORD ret=data->start_address_(data->arglist_); - return ret; - } - - typedef void* uintptr_t; - - inline uintptr_t _beginthreadex(void* security, unsigned stack_size, unsigned (__stdcall* start_address)(void*), - void* arglist, unsigned initflag, unsigned* thrdaddr) - { - DWORD threadID; - ThreadProxyData* data = new ThreadProxyData(start_address,arglist); - HANDLE hthread=CreateThread(static_cast(security),stack_size,ThreadProxy, - data,initflag,&threadID); - if (hthread==0) { - delete data; - return 0; - } - *thrdaddr=threadID; - return reinterpret_cast(hthread); - } - -#endif - +#define _beginthreadex(security, \ + stack_size, \ + start_proc, \ + arg, \ + flags, \ + pid) \ + CreateThread(security, \ + stack_size, \ + (LPTHREAD_START_ROUTINE) start_proc, \ + arg, \ + flags, \ + pid) +#endif // !BOOST_HAS_THREADEX } namespace detail