diff options
author | Daniel Stenberg <daniel@haxx.se> | 2003-10-18 20:34:33 +0000 |
---|---|---|
committer | Daniel Stenberg <daniel@haxx.se> | 2003-10-18 20:34:33 +0000 |
commit | 5eee801d06b0447c156a935df2d71bf05f20ce7f (patch) | |
tree | 9eef2961d39e2bb5227a4009c55778d4f8234a1c /lib/connect.c | |
parent | 80a06403e403be7b1ba80161fc3b65ab0c70d013 (diff) | |
download | curl-5eee801d06b0447c156a935df2d71bf05f20ce7f.tar.gz |
don't shadow 'socket'
Diffstat (limited to 'lib/connect.c')
-rw-r--r-- | lib/connect.c | 16 |
1 files changed, 8 insertions, 8 deletions
diff --git a/lib/connect.c b/lib/connect.c index bde66b764..164fe328d 100644 --- a/lib/connect.c +++ b/lib/connect.c @@ -98,7 +98,7 @@ int Curl_ourerrno(void) * Set the socket to either blocking or non-blocking mode. */ -int Curl_nonblock(int socket, /* operate on this */ +int Curl_nonblock(int sockfd, /* operate on this */ int nonblock /* TRUE or FALSE */) { #undef SETBLOCK @@ -106,11 +106,11 @@ int Curl_nonblock(int socket, /* operate on this */ /* most recent unix versions */ int flags; - flags = fcntl(socket, F_GETFL, 0); + flags = fcntl(sockfd, F_GETFL, 0); if (TRUE == nonblock) - return fcntl(socket, F_SETFL, flags | O_NONBLOCK); + return fcntl(sockfd, F_SETFL, flags | O_NONBLOCK); else - return fcntl(socket, F_SETFL, flags & (~O_NONBLOCK)); + return fcntl(sockfd, F_SETFL, flags & (~O_NONBLOCK)); #define SETBLOCK 1 #endif @@ -119,7 +119,7 @@ int Curl_nonblock(int socket, /* operate on this */ int flags; flags = nonblock; - return ioctl(socket, FIONBIO, &flags); + return ioctl(sockfd, FIONBIO, &flags); #define SETBLOCK 2 #endif @@ -127,20 +127,20 @@ int Curl_nonblock(int socket, /* operate on this */ /* Windows? */ int flags; flags = nonblock; - return ioctlsocket(socket, FIONBIO, &flags); + return ioctlsocket(sockfd, FIONBIO, &flags); #define SETBLOCK 3 #endif #ifdef HAVE_IOCTLSOCKET_CASE /* presumably for Amiga */ - return IoctlSocket(socket, FIONBIO, (long)nonblock); + return IoctlSocket(sockfd, FIONBIO, (long)nonblock); #define SETBLOCK 4 #endif #ifdef HAVE_SO_NONBLOCK /* BeOS */ long b = nonblock ? 1 : 0; - return setsockopt(socket, SOL_SOCKET, SO_NONBLOCK, &b, sizeof(b)); + return setsockopt(sockfd, SOL_SOCKET, SO_NONBLOCK, &b, sizeof(b)); #define SETBLOCK 5 #endif |