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:
boris@boressoft.ru
2012-03-14 19:12:28 +04:00
parent f9674308e8
commit 318ba8836f
13 changed files with 128 additions and 3 deletions

View File

@@ -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);
}