summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorGuenter Knauf <lists@gknw.net>2012-07-12 15:01:18 +0200
committerGuenter Knauf <lists@gknw.net>2012-07-12 15:01:18 +0200
commitdf5a47b8198ad51146390c80162d098a3c9b7ba5 (patch)
tree87fe535912263a3901f378be73e7dc7f953bfe68
parenta39789c85cb88aa10284e07051dea2b8aaec8596 (diff)
downloadcurl-df5a47b8198ad51146390c80162d098a3c9b7ba5.tar.gz
Added curl_global_* functions.
-rw-r--r--docs/examples/post-callback.c5
1 files changed, 5 insertions, 0 deletions
diff --git a/docs/examples/post-callback.c b/docs/examples/post-callback.c
index 9736d8854..fa0c4b686 100644
--- a/docs/examples/post-callback.c
+++ b/docs/examples/post-callback.c
@@ -60,6 +60,10 @@ int main(void)
pooh.readptr = data;
pooh.sizeleft = strlen(data);
+ /* In windows, this will init the winsock stuff */
+ curl_global_init(CURL_GLOBAL_DEFAULT);
+
+ /* get a curl handle */
curl = curl_easy_init();
if(curl) {
/* First set the URL that is about to receive our POST. */
@@ -128,5 +132,6 @@ int main(void)
/* always cleanup */
curl_easy_cleanup(curl);
}
+ curl_global_cleanup();
return 0;
}