2 * Functions Windows doesn't have... but should
3 * Copyright(C) 2001, Linux Support Services, Inc.
5 * Distributed under GNU LGPL.
7 * These are NOT fully compliant with BSD 4.3 and are not
16 #define INLINE __inline
17 #define inline __inline
20 #define snprintf _snprintf
23 // should try without these
24 #pragma warning(disable: 4996 4244 4305 4018 4804)
26 typedef __int64 ssize_t;
28 typedef __int32 ssize_t;
34 #include <winsock2.h> // this include <windows.h>
35 #include <io.h> // for open, close, write, read
38 void gettimeofday(struct timeval *tv, void /*struct timezone*/ *tz);
40 static INLINE int inet_aton(char *cp, struct in_addr *inp)
45 if (sscanf(cp, "%d.%d.%d.%d", &a1, &a2, &a3, &a4) != 4)
51 saddr = (a1 << 24) | (a2 << 16) | (a3 << 8) | a4;
52 inp->s_addr = htonl(saddr);