mirror of
https://github.com/zeromq/libzmq.git
synced 2025-10-30 13:47:13 +01:00
Add WinCE support.
* Added two new files: errno.hpp and errno.cpp. They are required to use errno functionality on WM. * zmq.cpp, msg.h: removed inclusion of errno.h because it is included in zmq.h that is also included by .cpp. * windows.hpp: process.h is included only for desktop builds. * thread.cpp: on CE CreateThread is used instead of __beginthreadex * socket_base.cpp, clock.cpp: on CE include cmnintrin.h instead on intrin.h * signaler.cpp: on Windows should use special macro around event name (for unicode builds) * err.hpp: make it include errno.hpp (my file) instead on errno.h when building for CE * err.cpp: use FormatMessage when building for CE (because CE does not have ANSI API functions) * zmq.h: do not include errno.h whe building for CE * libzmq.vcproj: add tro new files
This commit is contained in:
@@ -27,7 +27,11 @@
|
||||
|
||||
extern "C"
|
||||
{
|
||||
#if defined _WIN32_WCE
|
||||
static DWORD thread_routine (LPVOID arg_)
|
||||
#else
|
||||
static unsigned int __stdcall thread_routine (void *arg_)
|
||||
#endif
|
||||
{
|
||||
zmq::thread_t *self = (zmq::thread_t*) arg_;
|
||||
self->tfn (self->arg);
|
||||
@@ -39,8 +43,13 @@ void zmq::thread_t::start (thread_fn *tfn_, void *arg_)
|
||||
{
|
||||
tfn = tfn_;
|
||||
arg =arg_;
|
||||
#if defined WINCE
|
||||
descriptor = (HANDLE) CreateThread (NULL, 0,
|
||||
&::thread_routine, this, 0 , NULL);
|
||||
#else
|
||||
descriptor = (HANDLE) _beginthreadex (NULL, 0,
|
||||
&::thread_routine, this, 0 , NULL);
|
||||
#endif
|
||||
win_assert (descriptor != NULL);
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user