I changed my mind. Remove ioctl() macro in setup.h instead.

This commit is contained in:
Gisle Vanem 2004-11-26 16:08:15 +00:00
Родитель f0e66d8c76
Коммит d85bc18178
4 изменённых файлов: 10 добавлений и 11 удалений

Просмотреть файл

@ -208,7 +208,6 @@ defined(HAVE_LIBSSL) && defined(HAVE_LIBCRYPTO)
#define sread(x,y,z) read_s(x,y,z) #define sread(x,y,z) read_s(x,y,z)
#define swrite(x,y,z) write_s(x,y,z) #define swrite(x,y,z) write_s(x,y,z)
#define select(n,r,w,x,t) select_s(n,r,w,x,t) #define select(n,r,w,x,t) select_s(n,r,w,x,t)
#define ioctl(x,y,z) ioctlsocket(x,y,(char *)(z))
#define IOCTL_3_ARGS #define IOCTL_3_ARGS
#include <tcp.h> #include <tcp.h>
#ifdef word #ifdef word

Просмотреть файл

@ -211,16 +211,16 @@ CURLcode Curl_readrewind(struct connectdata *conn)
(data->set.httpreq == HTTPREQ_POST_FORM)) (data->set.httpreq == HTTPREQ_POST_FORM))
; /* do nothing */ ; /* do nothing */
else { else {
if(data->set.ioctrl) { if(data->set.ioctl) {
curlioerr err; curlioerr err;
err = data->set.ioctrl(data, CURLIOCMD_RESTARTREAD, err = data->set.ioctl(data, CURLIOCMD_RESTARTREAD,
data->set.ioctrl_client); data->set.ioctl_client);
infof(data, "the ioctrl callback returned %d\n", (int)err); infof(data, "the ioctl callback returned %d\n", (int)err);
if(err) { if(err) {
/* FIXME: convert to a human readable error message */ /* FIXME: convert to a human readable error message */
failf(data, "ioctrl callback returned error %d\n", (int)err); failf(data, "ioctl callback returned error %d\n", (int)err);
return CURLE_SEND_FAIL_REWIND; return CURLE_SEND_FAIL_REWIND;
} }
} }
@ -1424,7 +1424,7 @@ CURLcode Curl_readwrite_init(struct connectdata *conn)
/* we want header and/or body, if neither then don't do this! */ /* we want header and/or body, if neither then don't do this! */
if(conn->bits.getheader || !conn->bits.no_body) { if(conn->bits.getheader || !conn->bits.no_body) {
if(conn->sockfd != CURL_SOCKET_BAD) { if(conn->sockfd != CURL_SOCKET_BAD) {
k->keepon |= KEEP_READ; k->keepon |= KEEP_READ;
} }

Просмотреть файл

@ -1105,13 +1105,13 @@ CURLcode Curl_setopt(struct SessionHandle *data, CURLoption option, ...)
/* /*
* I/O control callback. Might be NULL. * I/O control callback. Might be NULL.
*/ */
data->set.ioctrl = va_arg(param, curl_ioctl_callback); data->set.ioctl = va_arg(param, curl_ioctl_callback);
break; break;
case CURLOPT_IOCTLDATA: case CURLOPT_IOCTLDATA:
/* /*
* I/O control data pointer. Might be NULL. * I/O control data pointer. Might be NULL.
*/ */
data->set.ioctrl_client = va_arg(param, void *); data->set.ioctl_client = va_arg(param, void *);
break; break;
case CURLOPT_SSLCERT: case CURLOPT_SSLCERT:
/* /*

Просмотреть файл

@ -847,9 +847,9 @@ struct UserDefined {
curl_read_callback fread; /* function that reads the input */ curl_read_callback fread; /* function that reads the input */
curl_progress_callback fprogress; /* function for progress information */ curl_progress_callback fprogress; /* function for progress information */
curl_debug_callback fdebug; /* function that write informational data */ curl_debug_callback fdebug; /* function that write informational data */
curl_ioctl_callback ioctrl; /* function for I/O control */ curl_ioctl_callback ioctl; /* function for I/O control */
void *progress_client; /* pointer to pass to the progress callback */ void *progress_client; /* pointer to pass to the progress callback */
void *ioctrl_client; /* pointer to pass to the ioctrl callback */ void *ioctl_client; /* pointer to pass to the ioctl callback */
long timeout; /* in seconds, 0 means no timeout */ long timeout; /* in seconds, 0 means no timeout */
long connecttimeout; /* in seconds, 0 means no timeout */ long connecttimeout; /* in seconds, 0 means no timeout */
long ftp_response_timeout; /* in seconds, 0 means no timeout */ long ftp_response_timeout; /* in seconds, 0 means no timeout */