1
0
mirror of https://frontier.innolan.net/rainlance/c-ares.git synced 2025-10-06 06:59:25 +00:00

Check for USE_WINSOCK instead of WIN32 where the check was done

to verify winsock API availability.
This commit is contained in:
Yang Tse
2006-10-18 21:05:40 +00:00
parent 70ed671edf
commit 77ac18117c
4 changed files with 6 additions and 6 deletions

4
adig.c
View File

@ -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

View File

@ -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

View File

@ -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

View File

@ -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