]> granicus.if.org Git - curl/commitdiff
Made sure to pass longs in to curl_easy_setopt where necessary in the
authorDan Fandrich <dan@coneharvesters.com>
Thu, 22 May 2008 21:49:52 +0000 (21:49 +0000)
committerDan Fandrich <dan@coneharvesters.com>
Thu, 22 May 2008 21:49:52 +0000 (21:49 +0000)
libtest code.

36 files changed:
CHANGES
tests/libtest/lib500.c
tests/libtest/lib501.c
tests/libtest/lib503.c
tests/libtest/lib504.c
tests/libtest/lib505.c
tests/libtest/lib506.c
tests/libtest/lib508.c
tests/libtest/lib510.c
tests/libtest/lib511.c
tests/libtest/lib512.c
tests/libtest/lib513.c
tests/libtest/lib514.c
tests/libtest/lib515.c
tests/libtest/lib516.c
tests/libtest/lib518.c
tests/libtest/lib519.c
tests/libtest/lib520.c
tests/libtest/lib521.c
tests/libtest/lib523.c
tests/libtest/lib524.c
tests/libtest/lib525.c
tests/libtest/lib526.c
tests/libtest/lib530.c
tests/libtest/lib536.c
tests/libtest/lib537.c
tests/libtest/lib540.c
tests/libtest/lib541.c
tests/libtest/lib542.c
tests/libtest/lib544.c
tests/libtest/lib547.c
tests/libtest/lib549.c
tests/libtest/lib552.c
tests/libtest/lib553.c
tests/libtest/lib554.c
tests/libtest/lib555.c

diff --git a/CHANGES b/CHANGES
index cb53ab53de8da89d56ca4413afe1888a5bba22a8..7112efc583024d71651f3260cf489188168d0b60 100644 (file)
--- a/CHANGES
+++ b/CHANGES
@@ -7,6 +7,10 @@
                                   Changelog
 
 
+Daniel Fandrich (22 May 2008)
+- Made sure to pass longs in to curl_easy_setopt where necessary in the
+  example programs and libtest code.
+
 Daniel Stenberg (19 May 2008)
 - When trying to repeat a multi interface problem I fell over a few multi
   interface problems:
index 9ee164e2cd4f749c7e8c831579b7723ab1d0143a..d22aecdbcddca96202437df2a34e82fac87dfc93 100644 (file)
@@ -27,7 +27,7 @@ int test(char *URL)
   }
 
   curl_easy_setopt(curl, CURLOPT_URL, URL);
-  curl_easy_setopt(curl, CURLOPT_HEADER, TRUE);
+  curl_easy_setopt(curl, CURLOPT_HEADER, 1L);
 
   res = curl_easy_perform(curl);
 
index a4d78159d2dbd6a2bfbe41bbd323583b4224d256..cf2d957241df4689fbe078bd4dee413af967c402 100644 (file)
@@ -28,7 +28,7 @@ int test(char *URL)
     return TEST_ERR_MAJOR_BAD;
   }
 
-  curl_easy_setopt(curl, CURLOPT_HEADER, TRUE);
+  curl_easy_setopt(curl, CURLOPT_HEADER, 1L);
 
   res = curl_easy_perform(curl);
 
index 327402242713576059f0bec59fe2d8a626308bb5..5eda5996ea4804227f4dea99c48df6673c3cdab5 100644 (file)
@@ -52,8 +52,8 @@ int test(char *URL)
   curl_easy_setopt(c, CURLOPT_URL, URL);
   curl_easy_setopt(c, CURLOPT_USERPWD, "test:ing");
   curl_easy_setopt(c, CURLOPT_PROXYUSERPWD, "test:ing");
-  curl_easy_setopt(c, CURLOPT_HTTPPROXYTUNNEL, 1);
-  curl_easy_setopt(c, CURLOPT_HEADER, 1);
+  curl_easy_setopt(c, CURLOPT_HTTPPROXYTUNNEL, 1L);
+  curl_easy_setopt(c, CURLOPT_HEADER, 1L);
 
   if ((m = curl_multi_init()) == NULL) {
     fprintf(stderr, "curl_multi_init() failed\n");
index a6e988657ad58d607394399686ae760e1e4e5f25..a57a3d15796667972f8cd2dc11a655842fe62325 100644 (file)
@@ -55,7 +55,7 @@ int test(char *URL)
      proxy port */
   curl_easy_setopt(c, CURLOPT_PROXY, libtest_arg2);
   curl_easy_setopt(c, CURLOPT_URL, URL);
-  curl_easy_setopt(c, CURLOPT_VERBOSE, 1);
+  curl_easy_setopt(c, CURLOPT_VERBOSE, 1L);
 
   if ((m = curl_multi_init()) == NULL) {
     fprintf(stderr, "curl_multi_init() failed\n");
index d2698faa95647838378ce2ad65620e0396b4c58b..eec2071c9f94d10a37f907ec20450a5b1792494b 100644 (file)
@@ -116,10 +116,10 @@ int test(char *URL)
   headerlist = hl;
 
   /* enable uploading */
-  curl_easy_setopt(curl, CURLOPT_UPLOAD, TRUE) ;
+  curl_easy_setopt(curl, CURLOPT_UPLOAD, 1L);
 
   /* enable verbose */
-  curl_easy_setopt(curl, CURLOPT_VERBOSE, TRUE) ;
+  curl_easy_setopt(curl, CURLOPT_VERBOSE, 1L);
 
   /* specify target */
   curl_easy_setopt(curl,CURLOPT_URL, URL);
index 4bec2884f91b9924663f92295e35cb3506ad121f..cadd2ee6368c04becefeec01893466c4ab6dafcc 100644 (file)
@@ -106,7 +106,7 @@ static void *fire(void *ptr)
   }
 
   headers = sethost(NULL);
-  curl_easy_setopt(curl, CURLOPT_VERBOSE,    1);
+  curl_easy_setopt(curl, CURLOPT_VERBOSE,    1L);
   curl_easy_setopt(curl, CURLOPT_HTTPHEADER, headers);
   curl_easy_setopt(curl, CURLOPT_URL,        tdata->url);
   printf( "CURLOPT_SHARE\n" );
index ecbc41912900b1cf89b37a69729b23675dd1035f..35679d18084bc0f8e916faa688de50dfb8f04ea8 100644 (file)
@@ -59,7 +59,7 @@ int test(char *URL)
   curl_easy_setopt(curl, CURLOPT_URL, URL);
 
   /* Now specify we want to POST data */
-  curl_easy_setopt(curl, CURLOPT_POST, TRUE);
+  curl_easy_setopt(curl, CURLOPT_POST, 1L);
 
   /* Set the expected POST size */
   curl_easy_setopt(curl, CURLOPT_POSTFIELDSIZE, (long)pooh.sizeleft);
@@ -71,10 +71,10 @@ int test(char *URL)
   curl_easy_setopt(curl, CURLOPT_INFILE, &pooh);
 
   /* get verbose debug output please */
-  curl_easy_setopt(curl, CURLOPT_VERBOSE, 1);
+  curl_easy_setopt(curl, CURLOPT_VERBOSE, 1L);
 
   /* include headers in the output */
-  curl_easy_setopt(curl, CURLOPT_HEADER, TRUE);
+  curl_easy_setopt(curl, CURLOPT_HEADER, 1L);
 
   /* Perform the request, res will get the return code */
   res = curl_easy_perform(curl);
index 53797473cf61bf1652c8b39d5a8ca286b7013706..d8644c3faf887990f8011aed3aeb54bf08986f40 100644 (file)
@@ -74,7 +74,7 @@ int test(char *URL)
   curl_easy_setopt(curl, CURLOPT_URL, URL);
 
   /* Now specify we want to POST data */
-  curl_easy_setopt(curl, CURLOPT_POST, TRUE);
+  curl_easy_setopt(curl, CURLOPT_POST, 1L);
 
   /* we want to use our own read function */
   curl_easy_setopt(curl, CURLOPT_READFUNCTION, read_callback);
@@ -83,10 +83,10 @@ int test(char *URL)
   curl_easy_setopt(curl, CURLOPT_INFILE, &pooh);
 
   /* get verbose debug output please */
-  curl_easy_setopt(curl, CURLOPT_VERBOSE, 1);
+  curl_easy_setopt(curl, CURLOPT_VERBOSE, 1L);
 
   /* include headers in the output */
-  curl_easy_setopt(curl, CURLOPT_HEADER, TRUE);
+  curl_easy_setopt(curl, CURLOPT_HEADER, 1L);
 
   /* enforce chunked transfer by setting the header */
   curl_easy_setopt(curl, CURLOPT_HTTPHEADER, slist);
index 7fcdebf933f43545c5288654acdb693b075025b6..b0f455d5980aed273b0630d9d9951fb8dd0df5fa 100644 (file)
@@ -27,9 +27,9 @@ int test(char *URL)
   }
 
   curl_easy_setopt(curl, CURLOPT_URL, URL);
-  curl_easy_setopt(curl, CURLOPT_FILETIME, 1);
-  curl_easy_setopt(curl, CURLOPT_NOBODY, 1);
-  curl_easy_setopt(curl, CURLOPT_VERBOSE, 1);
+  curl_easy_setopt(curl, CURLOPT_FILETIME, 1L);
+  curl_easy_setopt(curl, CURLOPT_NOBODY, 1L);
+  curl_easy_setopt(curl, CURLOPT_VERBOSE, 1L);
 
   res = curl_easy_perform(curl);
 
index 1d7d02a6a2d487d401c691febf7b69a0d4af6f9a..0af95919b68675eb9f09b3abe3a808dfc20c8599 100644 (file)
@@ -26,8 +26,8 @@ int test(char *URL)
     curl = curl_easy_init();
     if(curl) {
 
-      curl_easy_setopt(curl, CURLOPT_VERBOSE, 1);
-      curl_easy_setopt(curl, CURLOPT_HEADER, 1);
+      curl_easy_setopt(curl, CURLOPT_VERBOSE, 1L);
+      curl_easy_setopt(curl, CURLOPT_HEADER, 1L);
 
       curl2 = curl_easy_duphandle(curl);
       if(curl2) {
index 4cb593cec0153fd64453393a4b59a2f24aac6c6c..d6f3756b78b45aa0ab538499dbfa28b05aea54de 100644 (file)
@@ -39,10 +39,10 @@ int test(char *URL)
   curl_easy_setopt(curl, CURLOPT_URL, URL);
 
   /* Now specify we want to POST data */
-  curl_easy_setopt(curl, CURLOPT_POST, TRUE);
+  curl_easy_setopt(curl, CURLOPT_POST, 1L);
 
   /* Set the expected POST size */
-  curl_easy_setopt(curl, CURLOPT_POSTFIELDSIZE, 1);
+  curl_easy_setopt(curl, CURLOPT_POSTFIELDSIZE, 1L);
 
   /* we want to use our own read function */
   curl_easy_setopt(curl, CURLOPT_READFUNCTION, read_callback);
@@ -51,10 +51,10 @@ int test(char *URL)
   curl_easy_setopt(curl, CURLOPT_INFILE, NULL);
 
   /* get verbose debug output please */
-  curl_easy_setopt(curl, CURLOPT_VERBOSE, 1);
+  curl_easy_setopt(curl, CURLOPT_VERBOSE, 1L);
 
   /* include headers in the output */
-  curl_easy_setopt(curl, CURLOPT_HEADER, TRUE);
+  curl_easy_setopt(curl, CURLOPT_HEADER, 1L);
 
   /* Perform the request, res will get the return code */
   res = curl_easy_perform(curl);
index 93d576fbd11f64d19dd347450b6002f0e7e3777c..419b8422af5ee9b49ec97e4fd930bb1ce21c9bec 100644 (file)
@@ -39,16 +39,16 @@ int test(char *URL)
   */
 
   curl_easy_setopt(curl, CURLOPT_POSTFIELDS, "moo");
-  curl_easy_setopt(curl, CURLOPT_POSTFIELDSIZE, 3);
-  curl_easy_setopt(curl, CURLOPT_POST, 1);
+  curl_easy_setopt(curl, CURLOPT_POSTFIELDSIZE, 3L);
+  curl_easy_setopt(curl, CURLOPT_POST, 1L);
 
   /* this is where transfer 1 would take place, but skip that and change
      options right away instead */
 
-  curl_easy_setopt(curl, CURLOPT_NOBODY, 1);
+  curl_easy_setopt(curl, CURLOPT_NOBODY, 1L);
 
-  curl_easy_setopt(curl, CURLOPT_VERBOSE, 1); /* show verbose for debug */
-  curl_easy_setopt(curl, CURLOPT_HEADER, 1); /* include header */
+  curl_easy_setopt(curl, CURLOPT_VERBOSE, 1L); /* show verbose for debug */
+  curl_easy_setopt(curl, CURLOPT_HEADER, 1L); /* include header */
 
   /* Now, we should be making a fine HEAD request */
 
index 6086ecb09ee937d96f5bcfbfec96874f2f87d6c8..18df7c9380229a9355dcb0ff48e2996d042e6c2b 100644 (file)
@@ -29,9 +29,9 @@ int test(char *URL)
   /* First set the URL that is about to receive our POST. */
   curl_easy_setopt(curl, CURLOPT_URL, URL);
   curl_easy_setopt(curl, CURLOPT_POSTFIELDS, NULL);
-  curl_easy_setopt(curl, CURLOPT_POSTFIELDSIZE, 0);
-  curl_easy_setopt(curl, CURLOPT_VERBOSE, 1); /* show verbose for debug */
-  curl_easy_setopt(curl, CURLOPT_HEADER, 1); /* include header */
+  curl_easy_setopt(curl, CURLOPT_POSTFIELDSIZE, 0L);
+  curl_easy_setopt(curl, CURLOPT_VERBOSE, 1L); /* show verbose for debug */
+  curl_easy_setopt(curl, CURLOPT_HEADER, 1L); /* include header */
 
   /* Now, we should be making a zero byte POST request */
   res = curl_easy_perform(curl);
index 5eaa140e61433db6178d1a7656c90082772feee9..8295699e3a5a13eddeaafccf8842e03c64fe8f76 100644 (file)
@@ -29,8 +29,8 @@ int test(char *URL)
   /* First set the URL that is about to receive our POST. */
   curl_easy_setopt(curl, CURLOPT_URL, URL);
   curl_easy_setopt(curl, CURLOPT_HTTPPOST, NULL);
-  curl_easy_setopt(curl, CURLOPT_VERBOSE, 1); /* show verbose for debug */
-  curl_easy_setopt(curl, CURLOPT_HEADER, 1); /* include header */
+  curl_easy_setopt(curl, CURLOPT_VERBOSE, 1L); /* show verbose for debug */
+  curl_easy_setopt(curl, CURLOPT_HEADER, 1L); /* include header */
 
   /* Now, we should be making a zero byte POST request */
   res = curl_easy_perform(curl);
index 22680688bd9ae0bbf15968fe2bde426dff43a39c..41c3fe282159d5eb526bfa7a308ea11c4510847b 100644 (file)
@@ -483,7 +483,7 @@ int test(char *URL)
   }
 
   curl_easy_setopt(curl, CURLOPT_URL, URL);
-  curl_easy_setopt(curl, CURLOPT_HEADER, TRUE);
+  curl_easy_setopt(curl, CURLOPT_HEADER, 1L);
 
   res = curl_easy_perform(curl);
 
index 58f38150d5c24976795c854b9717c51d4fcd4cc7..ce440485a784af2a6fac9a9b05b813fd2739fa5a 100644 (file)
@@ -28,8 +28,8 @@ int test(char *URL)
 
   curl_easy_setopt(curl, CURLOPT_URL, URL);
   curl_easy_setopt(curl, CURLOPT_USERPWD, "monster:underbed");
-  curl_easy_setopt(curl, CURLOPT_HEADER, TRUE);
-  curl_easy_setopt(curl, CURLOPT_VERBOSE, TRUE);
+  curl_easy_setopt(curl, CURLOPT_HEADER, 1L);
+  curl_easy_setopt(curl, CURLOPT_VERBOSE, 1L);
 
   /* get first page */
   res = curl_easy_perform(curl);
index a673007a60031bbbf5498c581f5416b7983f01a3..46cad415df206664d65c32f46a714da8ad670132 100644 (file)
@@ -27,8 +27,8 @@ int test(char *URL)
   }
 
   curl_easy_setopt(curl, CURLOPT_URL, URL);
-  curl_easy_setopt(curl, CURLOPT_FILETIME, 1);
-  curl_easy_setopt(curl, CURLOPT_VERBOSE, 1);
+  curl_easy_setopt(curl, CURLOPT_FILETIME, 1L);
+  curl_easy_setopt(curl, CURLOPT_VERBOSE, 1L);
 
   res = curl_easy_perform(curl);
 
index 7301e3cd1c79ed040b31b17ba9616a659c37cb3f..346ece0561e8b616b34f94d58cc3437dc6700315 100644 (file)
@@ -29,7 +29,7 @@ int test(char *URL)
   curl_easy_setopt(curl, CURLOPT_URL, URL);
   curl_easy_setopt(curl, CURLOPT_PORT, atoi(libtest_arg2));
   curl_easy_setopt(curl, CURLOPT_USERPWD, "xxx:yyy");
-  curl_easy_setopt(curl, CURLOPT_VERBOSE, TRUE);
+  curl_easy_setopt(curl, CURLOPT_VERBOSE, 1L);
 
   res = curl_easy_perform(curl);
 
index c6c8e2e31a789a945c4b9b806ca596264ed1aaf5..9f485ffedbce7a34bcd2ccaba3afe70871264a00 100644 (file)
@@ -28,9 +28,9 @@ int test(char *URL)
 
   curl_easy_setopt(curl, CURLOPT_PROXY, libtest_arg2);
   curl_easy_setopt(curl, CURLOPT_URL, URL);
-  curl_easy_setopt(curl, CURLOPT_PORT, 19999);
+  curl_easy_setopt(curl, CURLOPT_PORT, 19999L);
   curl_easy_setopt(curl, CURLOPT_USERPWD, "xxx:yyy");
-  curl_easy_setopt(curl, CURLOPT_VERBOSE, TRUE);
+  curl_easy_setopt(curl, CURLOPT_VERBOSE, 1L);
 
   res = curl_easy_perform(curl);
 
index 55f29784cb93c19d9e6ea7c9a735b9acedd96e4b..2fde663cab50d103e8c5c829dbaa7a5228d2d5b3 100644 (file)
@@ -27,8 +27,8 @@ int test(char *URL)
   }
 
   curl_easy_setopt(curl, CURLOPT_URL, URL);
-  curl_easy_setopt(curl, CURLOPT_UPLOAD, 1);
-  curl_easy_setopt(curl, CURLOPT_VERBOSE, TRUE);
+  curl_easy_setopt(curl, CURLOPT_UPLOAD, 1L);
+  curl_easy_setopt(curl, CURLOPT_VERBOSE, 1L);
 
   res = curl_easy_perform(curl);
 
index 222f8c278e9ad7d93e23f94b5531b2e6a1a5d7d3..154c209e389f913055ed8aa6714d0a5bfcd7335c 100644 (file)
@@ -71,13 +71,13 @@ int test(char *URL)
   }
 
   /* enable uploading */
-  curl_easy_setopt(curl, CURLOPT_UPLOAD, TRUE) ;
+  curl_easy_setopt(curl, CURLOPT_UPLOAD, 1L);
 
   /* specify target */
   curl_easy_setopt(curl,CURLOPT_URL, URL);
 
   /* go verbose */
-  curl_easy_setopt(curl, CURLOPT_VERBOSE, 1);
+  curl_easy_setopt(curl, CURLOPT_VERBOSE, 1L);
 
   /* use active FTP */
   curl_easy_setopt(curl, CURLOPT_FTPPORT, "-");
index ba3fff7bd1f8d07e478be4e04abd90cdabe42f39..8951a7444c3d3e64ddbc32a3601662973f1feb7d 100644 (file)
@@ -74,7 +74,7 @@ int test(char *URL)
     curl_easy_setopt(curl[i], CURLOPT_URL, URL);
 
     /* go verbose */
-    curl_easy_setopt(curl[i], CURLOPT_VERBOSE, 1);
+    curl_easy_setopt(curl[i], CURLOPT_VERBOSE, 1L);
   }
 
   if ((m = curl_multi_init()) == NULL) {
@@ -142,7 +142,7 @@ int test(char *URL)
              the handle first too */
           curl_easy_reset(curl[0]);
           curl_easy_setopt(curl[0], CURLOPT_URL, URL);
-          curl_easy_setopt(curl[0], CURLOPT_VERBOSE, 1);
+          curl_easy_setopt(curl[0], CURLOPT_VERBOSE, 1L);
 
           /* re-add it */
           res = (int)curl_multi_add_handle(m, curl[0]);
index 98eeb52732a99ea2a813a3bede0670ea9dcaccaa..af7d00d02fb16fe023b23eb984d3bc88afbf4009 100644 (file)
@@ -71,10 +71,10 @@ int test(char *URL)
     curl_easy_setopt(curl[i], CURLOPT_URL, target_url);
 
     /* go verbose */
-    curl_easy_setopt(curl[i], CURLOPT_VERBOSE, 1);
+    curl_easy_setopt(curl[i], CURLOPT_VERBOSE, 1L);
 
     /* include headers */
-    curl_easy_setopt(curl[i], CURLOPT_HEADER, 1);
+    curl_easy_setopt(curl[i], CURLOPT_HEADER, 1L);
 
     /* add handle to multi */
     if ((res = (int)curl_multi_add_handle(m, curl[i])) != CURLM_OK) {
@@ -91,7 +91,7 @@ int test(char *URL)
     }
   }
 
-  curl_multi_setopt(m, CURLMOPT_PIPELINING, 1);
+  curl_multi_setopt(m, CURLMOPT_PIPELINING, 1L);
 
   ml_timedout = FALSE;
   ml_start = tutil_tvnow();
index 29e599fcd2cdb1b308393a975dbc9e6230d4a7ea..9e764a97acb2e599131386fe958b32340bed4376 100644 (file)
@@ -90,10 +90,10 @@ int test(char *URL)
     return TEST_ERR_MAJOR_BAD;
   }
 
-  curl_multi_setopt(multi, CURLMOPT_PIPELINING, 1);
+  curl_multi_setopt(multi, CURLMOPT_PIPELINING, 1L);
 
   curl_easy_setopt(easy, CURLOPT_WRITEFUNCTION, fwrite);
-  curl_easy_setopt(easy, CURLOPT_FAILONERROR, 1);
+  curl_easy_setopt(easy, CURLOPT_FAILONERROR, 1L);
   curl_easy_setopt(easy, CURLOPT_URL, URL);
 
   if (curl_multi_add_handle(multi, easy) != CURLM_OK) {
@@ -107,7 +107,7 @@ int test(char *URL)
   }
   curl_easy_reset(easy);
 
-  curl_easy_setopt(easy, CURLOPT_FAILONERROR, 1);
+  curl_easy_setopt(easy, CURLOPT_FAILONERROR, 1L);
   curl_easy_setopt(easy, CURLOPT_URL, libtest_arg2);
 
   if (curl_multi_add_handle(multi, easy) != CURLM_OK) {
index 1f5a34221bdb5be058afe635de77c950212ea2bd..f3b42e755720bed36b494812eb271c77bef5fd47 100644 (file)
@@ -486,7 +486,7 @@ int test(char *URL)
   }
 
   curl_easy_setopt(curl, CURLOPT_URL, URL);
-  curl_easy_setopt(curl, CURLOPT_HEADER, TRUE);
+  curl_easy_setopt(curl, CURLOPT_HEADER, 1L);
 
   res = curl_easy_perform(curl);
 
index 4560eb8158b5488dfc2e490a997c016996bc2171..089fcd5cb23469e9d7595381257a30467036f2c6 100644 (file)
@@ -30,9 +30,9 @@ static void init(CURLM *cm, const char* url, const char* userpwd,
   curl_easy_setopt(eh, CURLOPT_URL, url);
   curl_easy_setopt(eh, CURLOPT_PROXY, PROXY);
   curl_easy_setopt(eh, CURLOPT_PROXYUSERPWD, userpwd);
-  curl_easy_setopt(eh, CURLOPT_PROXYAUTH, CURLAUTH_ANY);
-  curl_easy_setopt(eh, CURLOPT_VERBOSE, 1);
-  curl_easy_setopt(eh, CURLOPT_HEADER, 1);
+  curl_easy_setopt(eh, CURLOPT_PROXYAUTH, (long)CURLAUTH_ANY);
+  curl_easy_setopt(eh, CURLOPT_VERBOSE, 1L);
+  curl_easy_setopt(eh, CURLOPT_HEADER, 1L);
   curl_easy_setopt(eh, CURLOPT_HTTPHEADER, headers); /* custom Host: */
 
   curl_multi_add_handle(cm, eh);
index 71d2e38ed6c47305a42a9f7e5cc0daeac24fcc41..a2224ae696d585ae8c1440cdc0c992d4600c0f68 100644 (file)
@@ -89,10 +89,10 @@ int test(char *URL)
   }
 
   /* enable uploading */
-  curl_easy_setopt(curl, CURLOPT_UPLOAD, TRUE) ;
+  curl_easy_setopt(curl, CURLOPT_UPLOAD, 1L);
 
   /* enable verbose */
-  curl_easy_setopt(curl, CURLOPT_VERBOSE, TRUE) ;
+  curl_easy_setopt(curl, CURLOPT_VERBOSE, 1L);
 
   /* specify target */
   curl_easy_setopt(curl,CURLOPT_URL, URL);
index deb229d19ee2d39d61eaa9a8afb6e509a1d3f530..ffd8f361cd0b230a6fe7b84d8018bedd911769b2 100644 (file)
@@ -50,13 +50,13 @@ int test(char *URL)
   }
 
   /* enable verbose */
-  curl_easy_setopt(curl, CURLOPT_VERBOSE, TRUE) ;
+  curl_easy_setopt(curl, CURLOPT_VERBOSE, 1L);
 
   /* enable NOBODY */
-  curl_easy_setopt(curl, CURLOPT_NOBODY, TRUE) ;
+  curl_easy_setopt(curl, CURLOPT_NOBODY, 1L);
 
   /* disable HEADER */
-  curl_easy_setopt(curl, CURLOPT_HEADER, FALSE) ;
+  curl_easy_setopt(curl, CURLOPT_HEADER, 0L);
 
   /* specify target */
   curl_easy_setopt(curl,CURLOPT_URL, URL);
index bde630d6b1acac472cee760f4874b919a0367b40..f91cef354a1df2c010d9eead107c0f0bb9eb07fd 100644 (file)
@@ -35,13 +35,13 @@ int test(char *URL)
   curl_easy_setopt(curl, CURLOPT_URL, URL);
 
 #ifdef LIB545
-  curl_easy_setopt(curl, CURLOPT_POSTFIELDSIZE, sizeof teststring - 1);
+  curl_easy_setopt(curl, CURLOPT_POSTFIELDSIZE, (long) sizeof teststring - 1);
 #endif
 
   curl_easy_setopt(curl, CURLOPT_COPYPOSTFIELDS, teststring);
 
-  curl_easy_setopt(curl, CURLOPT_VERBOSE, 1); /* show verbose for debug */
-  curl_easy_setopt(curl, CURLOPT_HEADER, 1); /* include header */
+  curl_easy_setopt(curl, CURLOPT_VERBOSE, 1L); /* show verbose for debug */
+  curl_easy_setopt(curl, CURLOPT_HEADER, 1L); /* include header */
 
   /* Update the original data to detect non-copy. */
   strcpy(teststring, "FAIL");
index 52f1e20397ecc585e1dcc7ab2a20ff9c1aa6d44e..85f22fe8ed6725dbe1054dd64ca00797ec23e790 100644 (file)
@@ -76,8 +76,8 @@ int test(char *URL)
   }
 
   curl_easy_setopt(curl, CURLOPT_URL, URL);
-  curl_easy_setopt(curl, CURLOPT_VERBOSE, 1);
-  curl_easy_setopt(curl, CURLOPT_HEADER, TRUE);
+  curl_easy_setopt(curl, CURLOPT_VERBOSE, 1L);
+  curl_easy_setopt(curl, CURLOPT_HEADER, 1L);
 #ifdef LIB548
   /* set the data to POST with a mere pointer to a zero-terminated string */
   curl_easy_setopt(curl, CURLOPT_POSTFIELDS, UPLOADTHIS);
@@ -88,13 +88,13 @@ int test(char *URL)
   curl_easy_setopt(curl, CURLOPT_READFUNCTION, readcallback);
   curl_easy_setopt(curl, CURLOPT_READDATA, &counter);
   /* We CANNOT do the POST fine without setting the size (or choose chunked)! */
-  curl_easy_setopt(curl, CURLOPT_POSTFIELDSIZE, strlen(UPLOADTHIS));
+  curl_easy_setopt(curl, CURLOPT_POSTFIELDSIZE, (long)strlen(UPLOADTHIS));
 #endif
-  curl_easy_setopt(curl, CURLOPT_POST, 1);
+  curl_easy_setopt(curl, CURLOPT_POST, 1L);
   curl_easy_setopt(curl, CURLOPT_PROXY, libtest_arg2);
   curl_easy_setopt(curl, CURLOPT_PROXYUSERPWD, libtest_arg3);
   curl_easy_setopt(curl, CURLOPT_PROXYAUTH,
-                   CURLAUTH_NTLM | CURLAUTH_DIGEST | CURLAUTH_BASIC );
+                   (long) (CURLAUTH_NTLM | CURLAUTH_DIGEST | CURLAUTH_BASIC) );
 
   res = curl_easy_perform(curl);
 
index 1ffef002b03f2c267020c9c08ef5e7534c858df7..d50835624ded875c040eb12d591418237791cdad 100644 (file)
@@ -32,11 +32,11 @@ int test(char *URL)
 
   curl_easy_setopt(curl, CURLOPT_PROXY, libtest_arg2);
   curl_easy_setopt(curl, CURLOPT_URL, URL);
-  curl_easy_setopt(curl, CURLOPT_PROXY_TRANSFER_MODE, 1);
-  curl_easy_setopt(curl, CURLOPT_VERBOSE, TRUE);
+  curl_easy_setopt(curl, CURLOPT_PROXY_TRANSFER_MODE, 1L);
+  curl_easy_setopt(curl, CURLOPT_VERBOSE, 1L);
   if(libtest_arg3)
     /* enable ascii/text mode */
-    curl_easy_setopt(curl, CURLOPT_TRANSFERTEXT, TRUE);
+    curl_easy_setopt(curl, CURLOPT_TRANSFERTEXT, 1L);
 
   res = curl_easy_perform(curl);
 
index 3cfeffe73c42e485d014f841a6642b5c7752ced8..5a0eb1c68260f1f4aecd65aa7f2d4951e04c74bf 100644 (file)
@@ -158,17 +158,17 @@ int test(char *URL)
     curl_easy_setopt(curl, CURLOPT_DEBUGFUNCTION, my_trace);
     curl_easy_setopt(curl, CURLOPT_DEBUGDATA, &config);
     /* the DEBUGFUNCTION has no effect until we enable VERBOSE */
-    curl_easy_setopt(curl, CURLOPT_VERBOSE, 1);
+    curl_easy_setopt(curl, CURLOPT_VERBOSE, 1L);
 
     /* setup repeated data string */
     for (i=0; i < sizeof data; ++i)
         data[i] = fill[i % sizeof fill];
 
     /* Post */
-    curl_easy_setopt(curl, CURLOPT_POST, 1);
+    curl_easy_setopt(curl, CURLOPT_POST, 1L);
 
     /* Setup read callback */
-    curl_easy_setopt(curl, CURLOPT_POSTFIELDSIZE, sizeof data);
+    curl_easy_setopt(curl, CURLOPT_POSTFIELDSIZE, (long) sizeof data);
     curl_easy_setopt(curl, CURLOPT_READFUNCTION, read_callback);
 
     /* Write callback */
@@ -182,7 +182,7 @@ int test(char *URL)
     curl_easy_setopt(curl, CURLOPT_URL, URL);
 
     /* Accept any auth. But for this bug configure proxy with DIGEST, basic might work too, not NTLM */
-    curl_easy_setopt(curl, CURLOPT_PROXYAUTH, CURLAUTH_ANY);
+    curl_easy_setopt(curl, CURLOPT_PROXYAUTH, (long)CURLAUTH_ANY);
 
     res = curl_easy_perform(curl);
     fprintf(stderr, "curl_easy_perform = %d\n", (int)res);
index f9c118620f16f08b5907ca12d079bb455006475d..7af25e5bbc943d6e85926739485782ada317f827 100644 (file)
@@ -60,10 +60,10 @@ int test(char *URL)
 
   curl_easy_setopt(curl, CURLOPT_URL, URL);
   curl_easy_setopt(curl, CURLOPT_HTTPHEADER, headerlist);
-  curl_easy_setopt(curl, CURLOPT_POST, 1);
-  curl_easy_setopt(curl, CURLOPT_POSTFIELDSIZE, POSTLEN);
-  curl_easy_setopt(curl, CURLOPT_VERBOSE, 1);
-  curl_easy_setopt(curl, CURLOPT_HEADER, 1);
+  curl_easy_setopt(curl, CURLOPT_POST, 1L);
+  curl_easy_setopt(curl, CURLOPT_POSTFIELDSIZE, (long)POSTLEN);
+  curl_easy_setopt(curl, CURLOPT_VERBOSE, 1L);
+  curl_easy_setopt(curl, CURLOPT_HEADER, 1L);
   curl_easy_setopt(curl, CURLOPT_READFUNCTION, myreadfunc);
   res = curl_easy_perform(curl);
   curl_easy_cleanup(curl);
index 01a5903eac19eb36eacf6eba82e31ef0cdb72389..792bbbed2869492913892ad00eb779ad3bc5bca4 100644 (file)
@@ -96,7 +96,7 @@ int test(char *URL)
   curl_easy_setopt(curl, CURLOPT_URL, URL);
 
   /* Now specify we want to POST data */
-  curl_easy_setopt(curl, CURLOPT_POST, TRUE);
+  curl_easy_setopt(curl, CURLOPT_POST, 1L);
 
   /* Set the expected POST size */
   curl_easy_setopt(curl, CURLOPT_POSTFIELDSIZE, (long)pooh.sizeleft);
@@ -111,10 +111,10 @@ int test(char *URL)
   curl_easy_setopt(curl, CURLOPT_HTTPPOST, formpost);
 
   /* get verbose debug output please */
-  curl_easy_setopt(curl, CURLOPT_VERBOSE, 1);
+  curl_easy_setopt(curl, CURLOPT_VERBOSE, 1L);
 
   /* include headers in the output */
-  curl_easy_setopt(curl, CURLOPT_HEADER, TRUE);
+  curl_easy_setopt(curl, CURLOPT_HEADER, 1L);
 
   /* Perform the request, res will get the return code */
   res = curl_easy_perform(curl);
index ed12c5a44f998dd860f80a816eb8314fed0248a1..ad259e0e61a849a69c05dd87baee7afeefd224ad 100644 (file)
@@ -80,8 +80,8 @@ int test(char *URL)
   }
 
   curl_easy_setopt(curl, CURLOPT_URL, URL);
-  curl_easy_setopt(curl, CURLOPT_VERBOSE, 1);
-  curl_easy_setopt(curl, CURLOPT_HEADER, TRUE);
+  curl_easy_setopt(curl, CURLOPT_VERBOSE, 1L);
+  curl_easy_setopt(curl, CURLOPT_HEADER, 1L);
 
   /* read the POST data from a callback */
   curl_easy_setopt(curl, CURLOPT_IOCTLFUNCTION, ioctlcallback);
@@ -91,11 +91,11 @@ int test(char *URL)
   /* We CANNOT do the POST fine without setting the size (or choose chunked)! */
   curl_easy_setopt(curl, CURLOPT_POSTFIELDSIZE, strlen(UPLOADTHIS));
 
-  curl_easy_setopt(curl, CURLOPT_POST, 1);
+  curl_easy_setopt(curl, CURLOPT_POST, 1L);
   curl_easy_setopt(curl, CURLOPT_PROXY, libtest_arg2);
   curl_easy_setopt(curl, CURLOPT_PROXYUSERPWD, libtest_arg3);
   curl_easy_setopt(curl, CURLOPT_PROXYAUTH,
-                   CURLAUTH_NTLM | CURLAUTH_DIGEST | CURLAUTH_BASIC );
+                   (long) (CURLAUTH_NTLM | CURLAUTH_DIGEST | CURLAUTH_BASIC) );
 
   if ((m = curl_multi_init()) == NULL) {
     fprintf(stderr, "curl_multi_init() failed\n");