aboutsummaryrefslogtreecommitdiff
path: root/docs/examples/anyauthput.c
diff options
context:
space:
mode:
authorDan Fandrich <dan@coneharvesters.com>2008-05-22 21:20:07 +0000
committerDan Fandrich <dan@coneharvesters.com>2008-05-22 21:20:07 +0000
commite664cd5826d43930fcc5b5dbaedbec94af33184b (patch)
tree7cca8fe1a4d1649d4d40ed7dcd4fc64486dedf00 /docs/examples/anyauthput.c
parentb8abeab6d3729ce4c9cc3eccb69e2bd3be2b58d3 (diff)
Fixed a surprising number of example programs that were passing int arguments
to curl_easy_setopt instead of long.
Diffstat (limited to 'docs/examples/anyauthput.c')
-rw-r--r--docs/examples/anyauthput.c7
1 files changed, 4 insertions, 3 deletions
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");