aboutsummaryrefslogtreecommitdiff
path: root/lib
diff options
context:
space:
mode:
Diffstat (limited to 'lib')
-rw-r--r--lib/http.c2
-rw-r--r--lib/multi.c4
-rw-r--r--lib/sendf.h6
-rw-r--r--lib/ssluse.h2
-rw-r--r--lib/transfer.c5
-rw-r--r--lib/transfer.h9
-rw-r--r--lib/url.c4
7 files changed, 18 insertions, 14 deletions
diff --git a/lib/http.c b/lib/http.c
index a4fa44f95..37976ac78 100644
--- a/lib/http.c
+++ b/lib/http.c
@@ -750,7 +750,7 @@ CURLcode Curl_ConnectHTTPProxyTunnel(struct connectdata *conn,
fd_set readfd;
char *line_start;
char *host_port;
- int tunnelsocket = conn->sock[sockindex];
+ curl_socket_t tunnelsocket = conn->sock[sockindex];
#define SELECT_OK 0
#define SELECT_ERROR 1
diff --git a/lib/multi.c b/lib/multi.c
index 2f038d397..e4ee5c63d 100644
--- a/lib/multi.c
+++ b/lib/multi.c
@@ -279,8 +279,8 @@ CURLMcode curl_multi_fdset(CURLM *multi_handle,
FD_SET(sockfd, write_fd_set);
}
- if(sockfd > *max_fd)
- *max_fd = sockfd;
+ if((int)sockfd > *max_fd)
+ *max_fd = (int)sockfd;
}
break;
case CURLM_STATE_PERFORM:
diff --git a/lib/sendf.h b/lib/sendf.h
index 73cd215ae..4c001ec13 100644
--- a/lib/sendf.h
+++ b/lib/sendf.h
@@ -23,7 +23,8 @@
* $Id$
***************************************************************************/
-CURLcode Curl_sendf(int fd, struct connectdata *, const char *fmt, ...);
+CURLcode Curl_sendf(curl_socket_t sockfd, struct connectdata *,
+ const char *fmt, ...);
void Curl_infof(struct SessionHandle *, const char *fmt, ...);
void Curl_failf(struct SessionHandle *, const char *fmt, ...);
@@ -42,7 +43,8 @@ int Curl_read(struct connectdata *conn, curl_socket_t sockfd,
char *buf, size_t buffersize,
ssize_t *n);
/* internal write-function, does plain socket, SSL and krb4 */
-CURLcode Curl_write(struct connectdata *conn, int sockfd,
+CURLcode Curl_write(struct connectdata *conn,
+ curl_socket_t sockfd,
void *mem, size_t len,
ssize_t *written);
diff --git a/lib/ssluse.h b/lib/ssluse.h
index 4a34a7dd4..886d2ca13 100644
--- a/lib/ssluse.h
+++ b/lib/ssluse.h
@@ -23,7 +23,7 @@
* $Id$
***************************************************************************/
#include "urldata.h"
-CURLcode Curl_SSLConnect(struct connectdata *conn, curl_socket_t sockfd);
+CURLcode Curl_SSLConnect(struct connectdata *conn, int sockindex);
void Curl_SSL_init(void); /* Global SSL init */
void Curl_SSL_cleanup(void); /* Global SSL cleanup */
diff --git a/lib/transfer.c b/lib/transfer.c
index b20204605..dd1ceef48 100644
--- a/lib/transfer.c
+++ b/lib/transfer.c
@@ -1368,7 +1368,10 @@ void Curl_single_fdset(struct connectdata *conn,
}
if(conn->keep.keepon & KEEP_WRITE) {
FD_SET(conn->writesockfd, write_fd_set);
- if(conn->writesockfd > *max_fd)
+
+ /* since sockets are curl_socket_t nowadays, we typecast it to int here
+ to compare it nicely */
+ if((int)conn->writesockfd > *max_fd)
*max_fd = conn->writesockfd;
conn->keep.writefdp = write_fd_set; /* store the address of the set */
}
diff --git a/lib/transfer.h b/lib/transfer.h
index cc6eca0df..c99c20347 100644
--- a/lib/transfer.h
+++ b/lib/transfer.h
@@ -37,14 +37,13 @@ CURLcode Curl_readwrite_init(struct connectdata *conn);
/* This sets up a forthcoming transfer */
CURLcode
Curl_Transfer (struct connectdata *data,
- curl_socket_t sockfd, /* socket to read from or
- CURL_SOCKET_BAD */
+ int sockindex, /* socket index to read from or -1 */
curl_off_t size, /* -1 if unknown at this point */
bool getheader, /* TRUE if header parsing is wanted */
curl_off_t *bytecountp, /* return number of bytes read */
- curl_socket_t writesockfd, /* socket to write to, it may very
- well be the same we read from.
- CURL_SOCKET_BAD disables */
+ int writesockindex, /* socket index to write to, it may
+ very well be the same we read from.
+ -1 disables */
curl_off_t *writecountp /* return number of bytes written */
);
#endif
diff --git a/lib/url.c b/lib/url.c
index e189de5d1..0b06cf5ea 100644
--- a/lib/url.c
+++ b/lib/url.c
@@ -1378,7 +1378,7 @@ CURLcode Curl_disconnect(struct connectdata *conn)
* be dead. Most commonly this happens when the server has closed the
* connection due to inactivity.
*/
-static bool SocketIsDead(int sock)
+static bool SocketIsDead(curl_socket_t sock)
{
int sval;
bool ret_val = TRUE;
@@ -1386,7 +1386,7 @@ static bool SocketIsDead(int sock)
struct timeval to;
FD_ZERO(&check_set);
- FD_SET(sock,&check_set);
+ FD_SET(sock, &check_set);
to.tv_sec = 0;
to.tv_usec = 0;