ripped out from ../ and put in its own directory now
[platform/upstream/curl.git] / docs / libcurl / curl_global_init.3
1 .\" You can view this file with:
2 .\" nroff -man [file]
3 .\" $Id$
4 .\"
5 .TH curl_global_init 3 "13 Nov 2001" "libcurl 7.9.1" "libcurl Manual"
6 .SH NAME
7 curl_global_init - Global libcurl initialisation
8 .SH SYNOPSIS
9 .B #include <curl/curl.h>
10 .sp
11 .BI "CURLcode curl_global_init(long " flags ");"
12 .ad
13 .SH DESCRIPTION
14 This function should only be called once (no matter how many threads or
15 libcurl sessions that'll be used) by every application that uses libcurl.
16
17 If this function hasn't been invoked when \fIcurl_easy_init\fP is called, it
18 will be done automatically by libcurl.
19
20 The flags option is a bit pattern that tells libcurl exact what features to
21 init, as described below. Set the desired bits by ORing the values together.
22
23 You must however \fBalways\fP use the \fIcurl_global_cleanup\fP function, as
24 that cannot be called automatically for you by libcurl.
25
26 Calling this function more than once will cause unpredictable results.
27
28 This function was added in libcurl 7.8.
29 .SH FLAGS
30 .TP 5
31 .B CURL_GLOBAL_ALL
32 Initialize everything possible. This sets all known bits.
33 .TP
34 .B CURL_GLOBAL_SSL
35 Initialize SSL
36 .TP
37 .B CURL_GLOBAL_WIN32
38 Initialize the Win32 socket libraries. (added in libcurl 7.8.1)
39 .TP
40 .B CURL_GLOBAL_NOTHING
41 Initialise nothing extra. This sets no bit.
42 .SH RETURN VALUE
43 If this function returns non-zero, something went wrong and you cannot use the
44 other curl functions.
45 .SH "SEE ALSO"
46 .BR curl_global_cleanup "(3), "
47 .SH BUGS
48 None.
49