diff --git a/lib/easy.c b/lib/easy.c index 9cb275b1a..ac037d266 100644 --- a/lib/easy.c +++ b/lib/easy.c @@ -86,6 +86,7 @@ #include "slist.h" #include "curl_rand.h" #include "non-ascii.h" +#include "warnless.h" #define _MPRINTF_REPLACE /* use our functions only */ #include diff --git a/lib/select.c b/lib/select.c index 65682f134..86af1dda9 100644 --- a/lib/select.c +++ b/lib/select.c @@ -47,6 +47,7 @@ #include "urldata.h" #include "connect.h" #include "select.h" +#include "warnless.h" /* Winsock and TPF sockets are not in range [0..FD_SETSIZE-1] */ diff --git a/lib/warnless.c b/lib/warnless.c index bc29d28df..89abd14bc 100644 --- a/lib/warnless.c +++ b/lib/warnless.c @@ -5,7 +5,7 @@ * | (__| |_| | _ <| |___ * \___|\___/|_| \_\_____| * - * Copyright (C) 1998 - 2010, Daniel Stenberg, , et al. + * Copyright (C) 1998 - 2011, Daniel Stenberg, , et al. * * This software is licensed as described in the file COPYING, which * you should have received as part of this distribution. The terms @@ -22,6 +22,8 @@ #include "setup.h" +#define BUILDING_WARNLESS_C 1 + #include "warnless.h" #define CURL_MASK_SCHAR 0x7F @@ -251,3 +253,31 @@ size_t curlx_sotouz(curl_off_t sonum) # pragma warning(pop) #endif } + +#if defined(__INTEL_COMPILER) && defined(__unix__) + +int curlx_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 curlx_FD_SET(int fd, fd_set *fdset) +{ + #pragma warning(push) + #pragma warning(disable:1469) /* clobber ignored */ + FD_SET(fd, fdset); + #pragma warning(pop) +} + +void curlx_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/lib/warnless.h b/lib/warnless.h index 7b9bd3c7f..a27c7d32c 100644 --- a/lib/warnless.h +++ b/lib/warnless.h @@ -7,7 +7,7 @@ * | (__| |_| | _ <| |___ * \___|\___/|_| \_\_____| * - * Copyright (C) 1998 - 2010, Daniel Stenberg, , et al. + * Copyright (C) 1998 - 2011, Daniel Stenberg, , et al. * * This software is licensed as described in the file COPYING, which * you should have received as part of this distribution. The terms @@ -38,4 +38,20 @@ ssize_t curlx_uztosz(size_t uznum); size_t curlx_sotouz(curl_off_t sonum); +#if defined(__INTEL_COMPILER) && defined(__unix__) + +int curlx_FD_ISSET(int fd, fd_set *fdset); + +void curlx_FD_SET(int fd, fd_set *fdset); + +void curlx_FD_ZERO(fd_set *fdset); + +#ifndef BUILDING_WARNLESS_C +# define FD_ISSET(a,b) curlx_FD_ISSET((a),(b)) +# define FD_SET(a,b) curlx_FD_SET((a),(b)) +# define FD_ZERO(a) curlx_FD_ZERO((a)) +#endif + +#endif /* __INTEL_COMPILER && __unix__ */ + #endif /* HEADER_CURL_WARNLESS_H */