2) Fix IPV6 build breakage
+3) Some fixes for WinCE build
v2.0.0
#include <winsock2.h>
#include <ws2tcpip.h>
#include <stddef.h>
-#include <stdint.h>
#include <basetsd.h>
#ifndef _WIN32_WCE
+#include <stdint.h>
#include <fcntl.h>
#else
#define _O_RDONLY 0x0000
#define O_RDONLY _O_RDONLY
#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
#else
#define strcasecmp stricmp
time_t time(time_t *t)
{
time_t ret = time_in_microseconds() / 1000000;
- *t = ret;
+
+ if(t != NULL)
+ *t = ret;
+
return ret;
}
#endif
#define __func__ __FUNCTION__
#endif
-#ifdef _WIN32_WCE
+#if defined(_MSC_VER) || defined(_WIN32_WCE)
#define vsnprintf _vsnprintf
#else
#ifdef LWS_HAVE__VSNPRINTF