vc_compat.h revision fb3e20e0
1fb3e20e0SDmitri Tikhonov/* Copyright (c) 2017 - 2020 LiteSpeed Technologies Inc. See LICENSE. */ 2461e84d8SAmol Deshpande#pragma once 3461e84d8SAmol Deshpande#include <Windows.h> 4461e84d8SAmol Deshpande#include <winsock2.h> 5461e84d8SAmol Deshpandetypedef SSIZE_T ssize_t; 6461e84d8SAmol Deshpandestruct iovec { 7461e84d8SAmol Deshpande void *iov_base; /* Starting address */ 8461e84d8SAmol Deshpande size_t iov_len; /* Number of bytes to transfer */ 9461e84d8SAmol Deshpande}; 10461e84d8SAmol Deshpande#define strcasecmp(a,b) _strcmpi(a,b) 11fb3e20e0SDmitri Tikhonov#define strncasecmp _strnicmp 12461e84d8SAmol Deshpande#define strdup _strdup 13fb3e20e0SDmitri Tikhonov#define PATH_MAX MAX_PATH 14461e84d8SAmol Deshpande 15461e84d8SAmol Deshpande#define posix_memalign(p, a, s) (((*(p)) = _aligned_malloc((s), (a))), *(p) ?0 :errno) 16461e84d8SAmol Deshpande 172d296031SDmitri Tikhonov#pragma warning(disable: 4018 4100 4127 4189 4200 4204 4152 4221 4244 4245 4267 4334 4702 4706 4804 ) 18461e84d8SAmol Deshpande /* 19461e84d8SAmol Deshpande 4018:signed/unsigned mismatch 20461e84d8SAmol Deshpande 4100:unreferenced formal parameter, 21461e84d8SAmol Deshpande 4127: conditional expression is constant 22461e84d8SAmol Deshpande 4152: nonstandard extension, function/data pointer conversion in expression 23461e84d8SAmol Deshpande 4189:local variable is initialized but not referenced 24461e84d8SAmol Deshpande 4200:zero-sized-array in struct, 25461e84d8SAmol Deshpande 4204: nonstandard extension used: non-constant aggregate initializer, 26461e84d8SAmol Deshpande 4221: nonstandard extension used:xx cannot be initialized using address of automatic variable y, 27461e84d8SAmol Deshpande 4244: '+=': conversion from 'int' to 'unsigned short', possible loss of data 28461e84d8SAmol Deshpande 4245:'=': conversion from 'int' to 'unsigned int', signed/unsigned mismatch 29461e84d8SAmol Deshpande 4267 function': conversion from 'size_t' to 'int', possible loss of data 30461e84d8SAmol Deshpande 4334: '<<': result of 32-bit shift implicitly converted to 64 bits (was 64-bit shift intended?) 31461e84d8SAmol Deshpande 4702: unreachable code 32461e84d8SAmol Deshpande 4706: assignment within conditional expression, 33461e84d8SAmol Deshpande 4804: '-': unsafe use of type 'bool' in operation 34461e84d8SAmol Deshpande */ 35461e84d8SAmol Deshpande 36