diff options
-rw-r--r-- | acountry.c | 1 | ||||
-rw-r--r-- | adig.c | 1 | ||||
-rw-r--r-- | ahost.c | 1 | ||||
-rw-r--r-- | ares_fds.c | 1 | ||||
-rw-r--r-- | ares_nowarn.c | 30 | ||||
-rw-r--r-- | ares_nowarn.h | 21 | ||||
-rw-r--r-- | ares_process.c | 1 |
7 files changed, 55 insertions, 1 deletions
@@ -59,6 +59,7 @@ #include "ares_getopt.h" #include "inet_net_pton.h" #include "inet_ntop.h" +#include "ares_nowarn.h" #ifndef HAVE_STRDUP # include "ares_strdup.h" @@ -57,6 +57,7 @@ #include "inet_ntop.h" #include "inet_net_pton.h" #include "ares_getopt.h" +#include "ares_nowarn.h" #ifndef HAVE_STRDUP # include "ares_strdup.h" @@ -42,6 +42,7 @@ #include "inet_net_pton.h" #include "ares_getopt.h" #include "ares_ipv6.h" +#include "ares_nowarn.h" #ifndef HAVE_STRDUP # include "ares_strdup.h" @@ -21,6 +21,7 @@ #endif #include "ares.h" +#include "ares_nowarn.h" #include "ares_private.h" int ares_fds(ares_channel channel, fd_set *read_fds, fd_set *write_fds) diff --git a/ares_nowarn.c b/ares_nowarn.c index 0c77771..bc2c5da 100644 --- a/ares_nowarn.c +++ b/ares_nowarn.c @@ -21,6 +21,8 @@ # include <assert.h> #endif +#define BUILDING_ARES_NOWARN_C 1 + #include "ares_nowarn.h" #if (SIZEOF_INT == 2) @@ -111,3 +113,31 @@ unsigned int aresx_sztoui(ssize_t sznum) # pragma warning(pop) #endif } + +#if defined(__INTEL_COMPILER) && defined(__unix__) + +int aresx_FD_ISSET(int fd, fd_set *fdset) +{ + #pragma warning(push) + #pragma warning(disable:1469) /* clobber ignored */ + return FD_ISSET(fd, fdset); + #pragma warning(pop) +} + +void aresx_FD_SET(int fd, fd_set *fdset) +{ + #pragma warning(push) + #pragma warning(disable:1469) /* clobber ignored */ + FD_SET(fd, fdset); + #pragma warning(pop) +} + +void aresx_FD_ZERO(fd_set *fdset) +{ + #pragma warning(push) + #pragma warning(disable:593) /* variable was set but never used */ + FD_ZERO(fdset); + #pragma warning(pop) +} + +#endif /* __INTEL_COMPILER && __unix__ */ diff --git a/ares_nowarn.h b/ares_nowarn.h index 6aa478f..0cc204c 100644 --- a/ares_nowarn.h +++ b/ares_nowarn.h @@ -2,7 +2,7 @@ #define HEADER_CARES_NOWARN_H -/* Copyright (C) 2010 by Daniel Stenberg +/* Copyright (C) 2010-2011 by Daniel Stenberg * * Permission to use, copy, modify, and distribute this * software and its documentation for any purpose and without @@ -25,4 +25,23 @@ int aresx_sztosi(ssize_t sznum); unsigned int aresx_sztoui(ssize_t sznum); +#if defined(__INTEL_COMPILER) && defined(__unix__) + +int aresx_FD_ISSET(int fd, fd_set *fdset); + +void aresx_FD_SET(int fd, fd_set *fdset); + +void aresx_FD_ZERO(fd_set *fdset); + +#ifndef BUILDING_ARES_NOWARN_C +# undef FD_ISSET +# define FD_ISSET(a,b) aresx_FD_ISSET((a),(b)) +# undef FD_SET +# define FD_SET(a,b) aresx_FD_SET((a),(b)) +# undef FD_ZERO +# define FD_ZERO(a) aresx_FD_ZERO((a)) +#endif + +#endif /* __INTEL_COMPILER && __unix__ */ + #endif /* HEADER_CARES_NOWARN_H */ diff --git a/ares_process.c b/ares_process.c index f5e7d25..e5efa5f 100644 --- a/ares_process.c +++ b/ares_process.c @@ -66,6 +66,7 @@ #include "ares.h" #include "ares_dns.h" +#include "ares_nowarn.h" #include "ares_private.h" |