Fix Windows support

This commit is contained in:
Dmitri Tikhonov 2020-06-03 00:13:30 -04:00
parent 41d574f34c
commit fb3e20e0bc
72 changed files with 912 additions and 475 deletions

View file

@ -1,3 +1,4 @@
/* Copyright (c) 2017 - 2020 LiteSpeed Technologies Inc. See LICENSE. */
#pragma once
#include <Windows.h>
#include <winsock2.h>
@ -7,7 +8,9 @@ struct iovec {
size_t iov_len; /* Number of bytes to transfer */
};
#define strcasecmp(a,b) _strcmpi(a,b)
#define strncasecmp _strnicmp
#define strdup _strdup
#define PATH_MAX MAX_PATH
#define posix_memalign(p, a, s) (((*(p)) = _aligned_malloc((s), (a))), *(p) ?0 :errno)