aboutsummaryrefslogtreecommitdiff
path: root/ares
diff options
context:
space:
mode:
authorYang Tse <yangsita@gmail.com>2006-10-18 21:05:40 +0000
committerYang Tse <yangsita@gmail.com>2006-10-18 21:05:40 +0000
commit5df4be11657fc49d74e1e6b39c0003f7cf2f3772 (patch)
tree93d2ef65b7accbd9a6572dbfca634dc69e95ffce /ares
parent96445f1b7da2013c294c541530f0160e248b430e (diff)
Check for USE_WINSOCK instead of WIN32 where the check was done
to verify winsock API availability.
Diffstat (limited to 'ares')
-rw-r--r--ares/adig.c4
-rw-r--r--ares/ahost.c4
-rw-r--r--ares/ares_process.c2
-rw-r--r--ares/setup.h2
4 files changed, 6 insertions, 6 deletions
diff --git a/ares/adig.c b/ares/adig.c
index fb3a43222..a0f622abd 100644
--- a/ares/adig.c
+++ b/ares/adig.c
@@ -153,8 +153,8 @@ int main(int argc, char **argv)
fd_set read_fds, write_fds;
struct timeval *tvp, tv;
-#ifdef WIN32
- WORD wVersionRequested = MAKEWORD(1,1);
+#ifdef USE_WINSOCK
+ WORD wVersionRequested = MAKEWORD(USE_WINSOCK,USE_WINSOCK);
WSADATA wsaData;
WSAStartup(wVersionRequested, &wsaData);
#endif
diff --git a/ares/ahost.c b/ares/ahost.c
index 40cd08439..92eacd76a 100644
--- a/ares/ahost.c
+++ b/ares/ahost.c
@@ -64,8 +64,8 @@ int main(int argc, char **argv)
struct in_addr addr4;
struct in6_addr addr6;
-#ifdef WIN32
- WORD wVersionRequested = MAKEWORD(1,1);
+#ifdef USE_WINSOCK
+ WORD wVersionRequested = MAKEWORD(USE_WINSOCK,USE_WINSOCK);
WSADATA wsaData;
WSAStartup(wVersionRequested, &wsaData);
#endif
diff --git a/ares/ares_process.c b/ares/ares_process.c
index fb98e70b9..f34ae9e5c 100644
--- a/ares/ares_process.c
+++ b/ares/ares_process.c
@@ -59,7 +59,7 @@
#define TRUE 1
#endif
-#if (defined(WIN32) || defined(WATT32)) && !defined(MSDOS)
+#ifdef USE_WINSOCK
#define GET_ERRNO() WSAGetLastError()
#else
#define GET_ERRNO() errno
diff --git a/ares/setup.h b/ares/setup.h
index 3b97e273e..a5899d883 100644
--- a/ares/setup.h
+++ b/ares/setup.h
@@ -121,7 +121,7 @@
* Typedef our socket type
*/
-#if defined(WIN32) && !defined(WATT32)
+#ifdef USE_WINSOCK
typedef SOCKET ares_socket_t;
#define ARES_SOCKET_BAD INVALID_SOCKET
#else