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