From 597cc5edd624525563e6549dc0057eca2a51c81d Mon Sep 17 00:00:00 2001 From: Micah Anderson Date: Tue, 11 Nov 2014 13:30:46 -0500 Subject: upgrade to new version --- builds/msvc/errno.cpp | 32 ++++++++++++++++++++++++++++++++ 1 file changed, 32 insertions(+) create mode 100644 builds/msvc/errno.cpp (limited to 'builds/msvc/errno.cpp') diff --git a/builds/msvc/errno.cpp b/builds/msvc/errno.cpp new file mode 100644 index 0000000..ddfe59f --- /dev/null +++ b/builds/msvc/errno.cpp @@ -0,0 +1,32 @@ +#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 \ No newline at end of file -- cgit v1.2.3