1
0
mirror of https://github.com/moparisthebest/curl synced 2024-12-21 23:58:49 -05:00

Fixed signed/unsigned convertion errors in Salford-C.

#ifdef around WSAEDISCON in strerror.c.
This commit is contained in:
Gisle Vanem 2006-04-26 17:26:22 +00:00
parent 3cbb1b2b64
commit 12db20be4e
4 changed files with 6 additions and 5 deletions

View File

@ -1279,7 +1279,7 @@ static size_t readfromfile(struct Form *form, char *buffer, size_t size)
/* this file hasn't yet been opened */ /* this file hasn't yet been opened */
form->fp = fopen(form->data->line, "rb"); /* b is for binary */ form->fp = fopen(form->data->line, "rb"); /* b is for binary */
if(!form->fp) if(!form->fp)
return -1; /* failure */ return (size_t)-1; /* failure */
} }
nread = fread(buffer, 1, size, form->fp); nread = fread(buffer, 1, size, form->fp);

View File

@ -780,7 +780,7 @@ static CURLMcode multi_runsingle(struct Curl_multi *multi,
/* if we failed anywhere, we must clean up the secondary socket if /* if we failed anywhere, we must clean up the secondary socket if
it was used */ it was used */
sclose(easy->easy_conn->sock[SECONDARYSOCKET]); sclose(easy->easy_conn->sock[SECONDARYSOCKET]);
easy->easy_conn->sock[SECONDARYSOCKET]=-1; easy->easy_conn->sock[SECONDARYSOCKET] = CURL_SOCKET_BAD;
} }
Curl_posttransfer(easy->easy_handle); Curl_posttransfer(easy->easy_handle);
Curl_done(&easy->easy_conn, easy->result); Curl_done(&easy->easy_conn, easy->result);

View File

@ -131,7 +131,7 @@ int Curl_select(curl_socket_t readfd, curl_socket_t writefd, int timeout_ms)
timeout.tv_usec = (timeout_ms % 1000) * 1000; timeout.tv_usec = (timeout_ms % 1000) * 1000;
FD_ZERO(&fds_err); FD_ZERO(&fds_err);
maxfd = -1; maxfd = (curl_socket_t)-1;
FD_ZERO(&fds_read); FD_ZERO(&fds_read);
if (readfd != CURL_SOCKET_BAD) { if (readfd != CURL_SOCKET_BAD) {
@ -206,7 +206,7 @@ int Curl_poll(struct pollfd ufds[], unsigned int nfds, int timeout_ms)
FD_ZERO(&fds_read); FD_ZERO(&fds_read);
FD_ZERO(&fds_write); FD_ZERO(&fds_write);
FD_ZERO(&fds_err); FD_ZERO(&fds_err);
maxfd = -1; maxfd = (curl_socket_t)-1;
for (i = 0; i < nfds; i++) { for (i = 0; i < nfds; i++) {
if (ufds[i].fd == CURL_SOCKET_BAD) if (ufds[i].fd == CURL_SOCKET_BAD)

View File

@ -519,10 +519,11 @@ get_winsock_error (int err, char *buf, size_t len)
case WSAEREMOTE: case WSAEREMOTE:
p = "Remote error"; p = "Remote error";
break; break;
#ifdef WSAEDISCON /* missing in SalfordC! */
case WSAEDISCON: case WSAEDISCON:
p = "Disconnected"; p = "Disconnected";
break; break;
#endif
/* Extended Winsock errors */ /* Extended Winsock errors */
case WSASYSNOTREADY: case WSASYSNOTREADY:
p = "Winsock library is not ready"; p = "Winsock library is not ready";