diff options
author | Gisle Vanem <gvanem@broadpark.no> | 2004-08-20 13:45:26 +0000 |
---|---|---|
committer | Gisle Vanem <gvanem@broadpark.no> | 2004-08-20 13:45:26 +0000 |
commit | b17e32baa750d9ce9459e06b144e4ed376dbaa32 (patch) | |
tree | ff1096681439c771456586b8e9e0d542e28ff1ca /ares/windows_port.c | |
parent | cd52b9f0da6ad17287e85e55363248d9f7430ba4 (diff) |
Changes for Watt-32 on Windows. I've assumed Configure
sets the required HAVE_xx defines for non-DOS/Win targets.
Diffstat (limited to 'ares/windows_port.c')
-rw-r--r-- | ares/windows_port.c | 16 |
1 files changed, 12 insertions, 4 deletions
diff --git a/ares/windows_port.c b/ares/windows_port.c index d8c9bda1c..9aa72fa7f 100644 --- a/ares/windows_port.c +++ b/ares/windows_port.c @@ -1,6 +1,8 @@ #include "setup.h" -#ifdef WIN32 /* only do the following on windows */ +/* only do the following on windows + */ +#if (defined(WIN32) || defined(WATT32)) && !defined(MSDOS) #include <stdio.h> #include <stdlib.h> #include <ctype.h> @@ -8,13 +10,19 @@ #include <errno.h> #include <malloc.h> +#ifdef WATT32 +#include <sys/socket.h> +#else #include "nameser.h" +#endif +#include "ares.h" +#include "ares_private.h" #ifndef __MINGW32__ int -ares_strncasecmp(const char *a, const char *b, size_t n) +ares_strncasecmp(const char *a, const char *b, int n) { - size_t i; + int i; for (i = 0; i < n; i++) { int c1 = isupper(a[i]) ? tolower(a[i]) : a[i]; @@ -57,7 +65,7 @@ ares_gettimeofday(struct timeval *tv, struct timezone *tz) } int -ares_writev (SOCKET s, const struct iovec *vector, size_t count) +ares_writev (ares_socket_t s, const struct iovec *vector, size_t count) { char *buffer, *bp; size_t i, bytes = 0; |