libzmq/builds/msvc/errno.cpp
boris@boressoft.ru 318ba8836f 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
2012-03-14 19:12:28 +04:00

32 lines
521 B
C++

#if defined WINCE
//#include "..\..\include\zmq.h"
#include "..\..\src\err.hpp"
int errno;
int _doserrno;
int _sys_nerr;
char* error_desc_buff = NULL;
char* strerror(int errno)
{
if (NULL != error_desc_buff)
{
LocalFree(error_desc_buff);
error_desc_buff = NULL;
}
FormatMessage(
FORMAT_MESSAGE_FROM_SYSTEM | FORMAT_MESSAGE_IGNORE_INSERTS | FORMAT_MESSAGE_ALLOCATE_BUFFER,
NULL,
errno,
0,
(LPTSTR)&error_desc_buff,
1024,
NULL
);
return error_desc_buff;
}
#endif