Install curl-7.21.1.tar.bz2
[msysgit.git] / mingw / share / man / man3 / curl_global_init.3
blobe732911f8a1f30455bb74659d9ea041253c37e47
1 .\" You can view this file with:
2 .\" nroff -man [file]
3 .\"
4 .TH curl_global_init 3 "11 May 2004" "libcurl 7.12" "libcurl Manual"
5 .SH NAME
6 curl_global_init - Global libcurl initialisation
7 .SH SYNOPSIS
8 .B #include <curl/curl.h>
9 .sp
10 .BI "CURLcode curl_global_init(long " flags ");"
11 .ad
12 .SH DESCRIPTION
13 This function sets up the program environment that libcurl needs.  Think of it
14 as an extension of the library loader.
16 This function must be called at least once within a program (a program is all
17 the code that shares a memory space) before the program calls any other
18 function in libcurl.  The environment it sets up is constant for the life of
19 the program and is the same for every program, so multiple calls have the same
20 effect as one call.
22 The flags option is a bit pattern that tells libcurl exactly what features to
23 init, as described below. Set the desired bits by ORing the values together.
24 In normal operation, you must specify CURL_GLOBAL_ALL.  Don't use any other
25 value unless you are familiar with it and mean to control internal operations of
26 libcurl.
28 \fBThis function is not thread safe.\fP You must not call it when any other
29 thread in the program (i.e. a thread sharing the same memory) is running.
30 This doesn't just mean no other thread that is using libcurl.  Because
31 \fIcurl_global_init()\fP calls functions of other libraries that are similarly
32 thread unsafe, it could conflict with any other thread that uses these other
33 libraries.
35 See the description in \fBlibcurl\fP(3) of global environment requirements for
36 details of how to use this function.
38 .SH FLAGS
39 .TP 5
40 .B CURL_GLOBAL_ALL
41 Initialize everything possible. This sets all known bits.
42 .TP
43 .B CURL_GLOBAL_SSL
44 Initialize SSL
45 .TP
46 .B CURL_GLOBAL_WIN32
47 Initialize the Win32 socket libraries.
48 .TP
49 .B CURL_GLOBAL_NOTHING
50 Initialise nothing extra. This sets no bit.
51 .SH RETURN VALUE
52 If this function returns non-zero, something went wrong and you cannot use the
53 other curl functions.
54 .SH "SEE ALSO"
55 .BR curl_global_init_mem "(3), "
56 .BR curl_global_cleanup "(3), "
57 .BR curl_easy_init "(3) "
58 .BR libcurl "(3) "