vc_compat.h revision 461e84d8
1#pragma once 2#include <Windows.h> 3#include <winsock2.h> 4typedef SSIZE_T ssize_t; 5struct iovec { 6 void *iov_base; /* Starting address */ 7 size_t iov_len; /* Number of bytes to transfer */ 8}; 9#define strcasecmp(a,b) _strcmpi(a,b) 10#define strdup _strdup 11 12#define posix_memalign(p, a, s) (((*(p)) = _aligned_malloc((s), (a))), *(p) ?0 :errno) 13 14#pragma warning(disable: 4018 4100 4127 4189 4200 4204 4214 4152 4221 4244 4245 4267 4334 4702 4706 4804 ) 15 /* 16 4018:signed/unsigned mismatch 17 4100:unreferenced formal parameter, 18 4127: conditional expression is constant 19 4152: nonstandard extension, function/data pointer conversion in expression 20 4189:local variable is initialized but not referenced 21 4200:zero-sized-array in struct, 22 4204: nonstandard extension used: non-constant aggregate initializer, 23 4214: nonstandard extension used: bit field types other than int 24 4221: nonstandard extension used:xx cannot be initialized using address of automatic variable y, 25 4244: '+=': conversion from 'int' to 'unsigned short', possible loss of data 26 4245:'=': conversion from 'int' to 'unsigned int', signed/unsigned mismatch 27 4267 function': conversion from 'size_t' to 'int', possible loss of data 28 4334: '<<': result of 32-bit shift implicitly converted to 64 bits (was 64-bit shift intended?) 29 4702: unreachable code 30 4706: assignment within conditional expression, 31 4804: '-': unsafe use of type 'bool' in operation 32 */ 33 34 35