Work around MinGW mangling of "host:/path"
[msysgit/historical-msysgit.git] / mingw / share / man / man3 / curl_global_init.3
blobc04aa96666484e828085bdcfbe720224393c7efc
1 .\" You can view this file with:
2 .\" nroff -man [file]
3 .\" $Id: curl_global_init.3,v 1.6 2006-07-26 22:19:42 bagder Exp $
4 .\"
5 .TH curl_global_init 3 "11 May 2004" "libcurl 7.12" "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 sets up the program environment that libcurl needs.  Think of it
15 as an extension of the library loader.
17 This function must be called at least once within a program (a program is all
18 the code that shares a memory space) before the program calls any other
19 function in libcurl.  The environment it sets up is constant for the life of
20 the program and is the same for every program, so multiple calls have the same
21 effect as one call.
23 The flags option is a bit pattern that tells libcurl exactly what features to
24 init, as described below. Set the desired bits by ORing the values together.
25 In normal operation, you must specify CURL_GLOBAL_ALL.  Don't use any other
26 value unless you are familiar with and mean to control internal operations of
27 libcurl.
29 \fBThis function is not thread safe.\fP You must not call it when any other
30 thread in the program (i.e. a thread sharing the same memory) is running.
31 This doesn't just mean no other thread that is using libcurl.  Because
32 \fIcurl_global_init()\fP calls functions of other libraries that are similarly
33 thread unsafe, it could conflict with any other thread that uses these other
34 libraries.
36 See the description in \fBlibcurl\fP(3) of global environment requirements for
37 details of how to use this function.
39 .SH FLAGS
40 .TP 5
41 .B CURL_GLOBAL_ALL
42 Initialize everything possible. This sets all known bits.
43 .TP
44 .B CURL_GLOBAL_SSL
45 Initialize SSL
46 .TP
47 .B CURL_GLOBAL_WIN32
48 Initialize the Win32 socket libraries.
49 .TP
50 .B CURL_GLOBAL_NOTHING
51 Initialise nothing extra. This sets no bit.
52 .SH RETURN VALUE
53 If this function returns non-zero, something went wrong and you cannot use the
54 other curl functions.
55 .SH "SEE ALSO"
56 .BR curl_global_init_mem "(3), "
57 .BR curl_global_cleanup "(3), "
58 .BR curl_easy_init "(3) "
59 .BR libcurl "(3) "