aboutsummaryrefslogtreecommitdiff
path: root/docs/examples/anyauthput.c
diff options
context:
space:
mode:
authorDaniel Stenberg <daniel@haxx.se>2008-02-27 09:06:15 +0000
committerDaniel Stenberg <daniel@haxx.se>2008-02-27 09:06:15 +0000
commitb12fef3f3137bc606d283a2e527dd9050edf2b12 (patch)
tree1dd1c8756405c783cb0c0935eb9870b8c639e089 /docs/examples/anyauthput.c
parent6cc8df95dd11cc24ffd8b9c64bb4a3ca5eeae1b7 (diff)
Michal Marek's cleanup of how curl_easy_setopt() is used in examples and
test code. Thanks to his curl_easy_setopt() typechecker work...
Diffstat (limited to 'docs/examples/anyauthput.c')
-rw-r--r--docs/examples/anyauthput.c10
1 files changed, 5 insertions, 5 deletions
diff --git a/docs/examples/anyauthput.c b/docs/examples/anyauthput.c
index bc6138f58..2c8f738ea 100644
--- a/docs/examples/anyauthput.c
+++ b/docs/examples/anyauthput.c
@@ -37,7 +37,7 @@
/* ioctl callback function */
static curlioerr my_ioctl(CURL *handle, curliocmd cmd, void *userp)
{
- int fd = (int)userp;
+ intptr_t fd = (intptr_t)userp;
(void)handle; /* not used in here */
@@ -61,7 +61,7 @@ static size_t read_callback(void *ptr, size_t size, size_t nmemb, void *stream)
{
size_t retcode;
- int fd = (int)stream;
+ intptr_t fd = (intptr_t)stream;
retcode = read(fd, ptr, size * nmemb);
@@ -74,7 +74,7 @@ int main(int argc, char **argv)
{
CURL *curl;
CURLcode res;
- int hd ;
+ intptr_t hd ;
struct stat file_info;
char *file;
@@ -100,13 +100,13 @@ int main(int argc, char **argv)
curl_easy_setopt(curl, CURLOPT_READFUNCTION, read_callback);
/* which file to upload */
- curl_easy_setopt(curl, CURLOPT_READDATA, hd);
+ curl_easy_setopt(curl, CURLOPT_READDATA, (void*)hd);
/* set the ioctl function */
curl_easy_setopt(curl, CURLOPT_IOCTLFUNCTION, my_ioctl);
/* pass the file descriptor to the ioctl callback as well */
- curl_easy_setopt(curl, CURLOPT_IOCTLDATA, hd);
+ curl_easy_setopt(curl, CURLOPT_IOCTLDATA, (void*)hd);
/* enable "uploading" (which means PUT when doing HTTP) */
curl_easy_setopt(curl, CURLOPT_UPLOAD, TRUE) ;