From: Guenter Knauf Date: Thu, 12 Jul 2012 00:02:22 +0000 (+0200) Subject: Added curl_global_* functions. X-Git-Tag: curl-7_27_0~37 X-Git-Url: http://git.ipfire.org/?a=commitdiff_plain;h=be795f90dac26c240ab64e1e1e156a66fa21db89;p=thirdparty%2Fcurl.git Added curl_global_* functions. --- diff --git a/docs/examples/http-post.c b/docs/examples/http-post.c index 80f2b343b6..f1975b1ec3 100644 --- a/docs/examples/http-post.c +++ b/docs/examples/http-post.c @@ -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; }