libzmq/builds/msvc/errno.cpp
Sébastien Rombauts 41d79bc19e Windows CE support : using standard _WIN32_WCE flag instead of WINCE
- when compiling for Windows CE, a C++ project must define the preprocessor definitions: UNDER_CE=$(CEVersion),_WIN32_WCE=$(CEVersion)
- choosing the "_WIN32_CE" form for uniformization with "_WIN32" and "_WIN32_WINNT" already used in libzmq (boost is using both forms)
- see http://msdn.microsoft.com/en-us/library/ee479161(v=winembedded.60).aspx
2013-02-19 16:49:23 +01:00

32 lines
526 B
C++

#if defined _WIN32_WCE
//#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