Changes to enable WIN CE support

This commit is contained in:
OndraCo 2016-05-06 07:50:17 +08:00 committed by Andy Green
parent f522895234
commit 2f9da92e48
4 changed files with 9 additions and 4 deletions

View file

@ -8,6 +8,7 @@ Fixes
2) Fix IPV6 build breakage 2) Fix IPV6 build breakage
3) Some fixes for WinCE build
v2.0.0 v2.0.0

View file

@ -112,16 +112,17 @@ struct sockaddr_in;
#include <winsock2.h> #include <winsock2.h>
#include <ws2tcpip.h> #include <ws2tcpip.h>
#include <stddef.h> #include <stddef.h>
#include <stdint.h>
#include <basetsd.h> #include <basetsd.h>
#ifndef _WIN32_WCE #ifndef _WIN32_WCE
#include <stdint.h>
#include <fcntl.h> #include <fcntl.h>
#else #else
#define _O_RDONLY 0x0000 #define _O_RDONLY 0x0000
#define O_RDONLY _O_RDONLY #define O_RDONLY _O_RDONLY
#endif #endif
#ifdef _WIN32_WCE // Visual studio older than 2015 and WIN_CE has only _stricmp
#if (defined(_MSC_VER) && _MSC_VER < 1900) || defined(_WIN32_WCE)
#define strcasecmp _stricmp #define strcasecmp _stricmp
#else #else
#define strcasecmp stricmp #define strcasecmp stricmp

View file

@ -31,7 +31,10 @@ time_in_microseconds()
time_t time(time_t *t) time_t time(time_t *t)
{ {
time_t ret = time_in_microseconds() / 1000000; time_t ret = time_in_microseconds() / 1000000;
*t = ret;
if(t != NULL)
*t = ret;
return ret; return ret;
} }
#endif #endif

View file

@ -87,7 +87,7 @@
#define __func__ __FUNCTION__ #define __func__ __FUNCTION__
#endif #endif
#ifdef _WIN32_WCE #if defined(_MSC_VER) || defined(_WIN32_WCE)
#define vsnprintf _vsnprintf #define vsnprintf _vsnprintf
#else #else
#ifdef LWS_HAVE__VSNPRINTF #ifdef LWS_HAVE__VSNPRINTF