]> git.ipfire.org Git - thirdparty/curl.git/commitdiff
Added curl_global_* functions.
authorGuenter Knauf <lists@gknw.net>
Thu, 12 Jul 2012 00:02:22 +0000 (02:02 +0200)
committerGuenter Knauf <lists@gknw.net>
Thu, 12 Jul 2012 00:02:57 +0000 (02:02 +0200)
docs/examples/http-post.c

index 80f2b343b644ef59d5600ca7c40bede572169e9a..f1975b1ec336dfd67359e5464d25aaed2e0e78f4 100644 (file)
@@ -27,6 +27,10 @@ int main(void)
   CURL *curl;
   CURLcode res;
 
+  /* In windows, this will init the winsock stuff */
+  curl_global_init(CURL_GLOBAL_ALL);
+
+  /* get a curl handle */
   curl = curl_easy_init();
   if(curl) {
     /* First set the URL that is about to receive our POST. This URL can
@@ -46,5 +50,6 @@ int main(void)
     /* always cleanup */
     curl_easy_cleanup(curl);
   }
+  curl_global_cleanup();
   return 0;
 }