diff options
author | Andy Cedilnik <andy.cedilnik@kitware.com> | 2004-10-07 11:39:28 (GMT) |
---|---|---|
committer | Andy Cedilnik <andy.cedilnik@kitware.com> | 2004-10-07 11:39:28 (GMT) |
commit | 7d0b2eabd66effc91b511b24632e3b4a70bc01b3 (patch) | |
tree | d8dd512da21f14fb7fd368174094092417032aa2 /Source/CTest/Curl | |
parent | 8732505a174469d6905bd9020cd6b4920e142ebb (diff) | |
download | CMake-7d0b2eabd66effc91b511b24632e3b4a70bc01b3.zip CMake-7d0b2eabd66effc91b511b24632e3b4a70bc01b3.tar.gz CMake-7d0b2eabd66effc91b511b24632e3b4a70bc01b3.tar.bz2 |
COMP: If both tests are succesfull, prevent compiler error
Diffstat (limited to 'Source/CTest/Curl')
-rw-r--r-- | Source/CTest/Curl/connect.c | 26 |
1 files changed, 15 insertions, 11 deletions
diff --git a/Source/CTest/Curl/connect.c b/Source/CTest/Curl/connect.c index d9f2783..8963fa0 100644 --- a/Source/CTest/Curl/connect.c +++ b/Source/CTest/Curl/connect.c @@ -132,23 +132,27 @@ int Curl_nonblock(curl_socket_t sockfd, /* operate on this */ { #undef SETBLOCK #ifdef HAVE_O_NONBLOCK - /* most recent unix versions */ - int flags; + { + /* most recent unix versions */ + int flags; - flags = fcntl(sockfd, F_GETFL, 0); - if (TRUE == nonblock) - return fcntl(sockfd, F_SETFL, flags | O_NONBLOCK); - else - return fcntl(sockfd, F_SETFL, flags & (~O_NONBLOCK)); + flags = fcntl(sockfd, F_GETFL, 0); + if (TRUE == nonblock) + return fcntl(sockfd, F_SETFL, flags | O_NONBLOCK); + else + return fcntl(sockfd, F_SETFL, flags & (~O_NONBLOCK)); + } #define SETBLOCK 1 #endif #ifdef HAVE_FIONBIO - /* older unix versions */ - int flags; + { + /* older unix versions */ + int flags; - flags = nonblock; - return ioctl(sockfd, FIONBIO, &flags); + flags = nonblock; + return ioctl(sockfd, FIONBIO, &flags); + } #define SETBLOCK 2 #endif |