Add initial visual studio project files and fix the win32 build

Win32 has been rotting for a while. This patch adds vs17 build files
as well as fixing up all build errors that have accumulated.
There are still build warnings but those can be addressed in a followup
patch.

Signed-off-by: Ronnie Sahlberg <ronniesahlberg@gmail.com>
This commit is contained in:
Ronnie Sahlberg
2017-05-11 19:52:06 -07:00
parent 7c10722449
commit f750101980
14 changed files with 463 additions and 60 deletions
+7 -2
View File
@@ -43,15 +43,20 @@ typedef int gid_t;
typedef int socklen_t;
/* Wrapper macros to call misc. functions win32 is missing */
#define writev win32_writev
#define readv win32_readv
#define close closesocket
#define ioctl ioctlsocket
#define readv win32_readv
#define writev win32_writev
#define poll(x, y, z) win32_poll(x, y, z)
#define inet_pton(x,y,z) win32_inet_pton(x,y,z)
#define sleep(x) Sleep(x * 1000)
#define snprintf sprintf_s
#define snprintf(a, b, c, ...) _snprintf_s(a, b, b, c, ## __VA_ARGS__)
int win32_inet_pton(int af, const char * src, void * dst);
int win32_poll(struct pollfd *fds, unsigned int nfsd, int timeout);
int win32_gettimeofday(struct timeval *tv, struct timezone *tz);
ssize_t win32_writev(int fd, const struct iovec *iov, int iovcnt);
ssize_t win32_readv(int fd, const struct iovec *iov, int iovcnt);
struct iovec {
void *iov_base;