From e664cd5826d43930fcc5b5dbaedbec94af33184b Mon Sep 17 00:00:00 2001 From: Dan Fandrich Date: Thu, 22 May 2008 21:20:07 +0000 Subject: Fixed a surprising number of example programs that were passing int arguments to curl_easy_setopt instead of long. --- docs/examples/anyauthput.c | 7 ++++--- 1 file changed, 4 insertions(+), 3 deletions(-) (limited to 'docs/examples/anyauthput.c') diff --git a/docs/examples/anyauthput.c b/docs/examples/anyauthput.c index 952c7c2d7..41531f7aa 100644 --- a/docs/examples/anyauthput.c +++ b/docs/examples/anyauthput.c @@ -110,7 +110,7 @@ int main(int argc, char **argv) curl_easy_setopt(curl, CURLOPT_IOCTLDATA, (void*)hd); /* enable "uploading" (which means PUT when doing HTTP) */ - curl_easy_setopt(curl, CURLOPT_UPLOAD, TRUE) ; + curl_easy_setopt(curl, CURLOPT_UPLOAD, 1L) ; /* specify target URL, and note that this URL should also include a file name, not only a directory (as you can do with GTP uploads) */ @@ -118,12 +118,13 @@ int main(int argc, char **argv) /* and give the size of the upload, this supports large file sizes on systems that have general support for it */ - curl_easy_setopt(curl, CURLOPT_INFILESIZE_LARGE, file_info.st_size); + curl_easy_setopt(curl, CURLOPT_INFILESIZE_LARGE, + (curl_off_t)file_info.st_size); /* tell libcurl we can use "any" auth, which lets the lib pick one, but it also costs one extra round-trip and possibly sending of all the PUT data twice!!! */ - curl_easy_setopt(curl, CURLOPT_HTTPAUTH, CURLAUTH_ANY); + curl_easy_setopt(curl, CURLOPT_HTTPAUTH, (long)CURLAUTH_ANY); /* set user name and password for the authentication */ curl_easy_setopt(curl, CURLOPT_USERPWD, "user:password"); -- cgit v1.2.3