Success build TortoiseMerge.
[TortoiseGit.git] / src / TortoiseMerge / svninclude / svn_dso.h
blob38c1f9914a772ccaa4eb918090ad54ceda97e6cf
1 /**
2 * @copyright
3 * ====================================================================
4 * Copyright (c) 2006, 2008 CollabNet. All rights reserved.
6 * This software is licensed as described in the file COPYING, which
7 * you should have received as part of this distribution. The terms
8 * are also available at http://subversion.tigris.org/license-1.html.
9 * If newer versions of this license are posted there, you may use a
10 * newer version instead, at your option.
12 * This software consists of voluntary contributions made by many
13 * individuals. For exact contribution history, see the revision
14 * history and logs, available at http://subversion.tigris.org/.
15 * ====================================================================
16 * @endcopyright
18 * @file svn_dso.h
19 * @brief DSO loading routines
24 #ifndef SVN_DSO_H
25 #define SVN_DSO_H
27 #include <apr_dso.h>
29 #include "svn_types.h"
31 #ifdef __cplusplus
32 extern "C" {
33 #endif /* __cplusplus */
35 /**
36 * Initialize the DSO loading routines.
38 * @note This should be called prior to the creation of any pool that
39 * is passed to a function that comes from a DSO, otherwise you
40 * risk having the DSO unloaded before all pool cleanup callbacks
41 * that live in the DSO have been executed. If it is not called
42 * prior to @c svn_dso_load being used for the first time there
43 * will be a best effort attempt made to initialize the subsystem,
44 * but it will not be entirely thread safe and it risks running
45 * into the previously mentioned problems with DSO unloading and
46 * pool cleanup callbacks.
48 * Returns svn_error_t object with corresponding apr_err returned by
49 * underlying calls. In case of no error returns @c SVN_NO_ERROR.
51 * @since New in 1.6.
53 svn_error_t *
54 svn_dso_initialize2(void);
56 /**
57 * Initialize the DSO loading routines.
59 * @note This should be called prior to the creation of any pool that
60 * is passed to a function that comes from a DSO, otherwise you
61 * risk having the DSO unloaded before all pool cleanup callbacks
62 * that live in the DSO have been executed. If it is not called
63 * prior to @c svn_dso_load being used for the first time there
64 * will be a best effort attempt made to initialize the subsystem,
65 * but it will not be entirely thread safe and it risks running
66 * into the previously mentioned problems with DSO unloading and
67 * pool cleanup callbacks.
69 * Calls svn_dso_initialize2(void) upon error aborts.
71 * @deprecated Provided for backwards compatibility with the 1.5 API.
73 * @since New in 1.4.
75 SVN_DEPRECATED
76 void
77 svn_dso_initialize(void);
80 #if APR_HAS_DSO
82 /**
83 * Attempt to load @a libname, returning it in @a dso.
85 * If @a libname cannot be loaded set @a dso to NULL and return
86 * @c SVN_NO_ERROR.
88 * @note Due to pool lifetime issues DSOs are all loaded into a global
89 * pool, so you must be certain that there is a bounded number of
90 * them that will ever be loaded by the system, otherwise you will
91 * leak memory.
93 * @since New in 1.4.
95 svn_error_t *
96 svn_dso_load(apr_dso_handle_t **dso,
97 const char *libname);
99 #endif /* APR_HAS_DSO */
102 #ifdef __cplusplus
104 #endif /* __cplusplus */
106 #endif /* SVN_DSO_H */