OSDN Git Service

Update TortoiseUDiff to version 16491
[tortoisegit/TortoiseGitJp.git] / src / TortoiseMerge / svninclude / svn_version.h
1 /**\r
2  * @copyright\r
3  * ====================================================================\r
4  * Copyright (c) 2001-2008 CollabNet.  All rights reserved.\r
5  *\r
6  * This software is licensed as described in the file COPYING, which\r
7  * you should have received as part of this distribution.  The terms\r
8  * are also available at http://subversion.tigris.org/license-1.html.\r
9  * If newer versions of this license are posted there, you may use a\r
10  * newer version instead, at your option.\r
11  *\r
12  * This software consists of voluntary contributions made by many\r
13  * individuals.  For exact contribution history, see the revision\r
14  * history and logs, available at http://subversion.tigris.org/.\r
15  * ====================================================================\r
16  * @endcopyright\r
17  *\r
18  * @file svn_version.h\r
19  * @brief Version information.\r
20  */\r
21 \r
22 #ifndef SVN_VERSION_H\r
23 #define SVN_VERSION_H\r
24 \r
25 /* Hack to prevent the resource compiler from including\r
26    apr_general.h.  It doesn't resolve the include paths\r
27    correctly and blows up without this.\r
28  */\r
29 #ifndef APR_STRINGIFY\r
30 #include <apr_general.h>\r
31 #endif\r
32 \r
33 #include "svn_types.h"\r
34 \r
35 #ifdef __cplusplus\r
36 extern "C" {\r
37 #endif /* __cplusplus */\r
38 \r
39 \f\r
40 /* Symbols that define the version number. */\r
41 \r
42 /* Version numbers: <major>.<minor>.<micro>\r
43  *\r
44  * The version numbers in this file follow the rules established by:\r
45  *\r
46  *   http://apr.apache.org/versioning.html\r
47  */\r
48 \r
49 /** Major version number.\r
50  *\r
51  * Modify when incompatible changes are made to published interfaces.\r
52  */\r
53 #define SVN_VER_MAJOR      1\r
54 \r
55 /** Minor version number.\r
56  *\r
57  * Modify when new functionality is added or new interfaces are\r
58  * defined, but all changes are backward compatible.\r
59  */\r
60 #define SVN_VER_MINOR      6\r
61 \r
62 /**\r
63  * Patch number.\r
64  *\r
65  * Modify for every released patch.\r
66  *\r
67  * @since New in 1.1.\r
68  */\r
69 #define SVN_VER_PATCH      1\r
70 \r
71 \r
72 /** @deprecated Provided for backward compatibility with the 1.0 API. */\r
73 #define SVN_VER_MICRO      SVN_VER_PATCH\r
74 \r
75 /** @deprecated Provided for backward compatibility with the 1.0 API. */\r
76 #define SVN_VER_LIBRARY    SVN_VER_MAJOR\r
77 \r
78 \r
79 /** Version tag: a string describing the version.\r
80  *\r
81  * This tag remains " (dev build)" in the repository so that we can\r
82  * always see from "svn --version" that the software has been built\r
83  * from the repository rather than a "blessed" distribution.\r
84  *\r
85  * When rolling a tarball, we automatically replace this text with " (r1234)"\r
86  * (where 1234 is the last revision on the branch prior to the release)\r
87  * for final releases; in prereleases, it becomes " (Alpha 1)",\r
88  * " (Beta 1)", etc., as appropriate.\r
89  *\r
90  * Always change this at the same time as SVN_VER_NUMTAG.\r
91  */\r
92 #define SVN_VER_TAG        " (dev build)"\r
93 \r
94 \r
95 /** Number tag: a string describing the version.\r
96  *\r
97  * This tag is used to generate a version number string to identify\r
98  * the client and server in HTTP requests, for example. It must not\r
99  * contain any spaces. This value remains "-dev" in the repository.\r
100  *\r
101  * When rolling a tarball, we automatically replace this text with ""\r
102  * for final releases; in prereleases, it becomes "-alpha1, "-beta1",\r
103  * etc., as appropriate.\r
104  *\r
105  * Always change this at the same time as SVN_VER_TAG.\r
106  */\r
107 #define SVN_VER_NUMTAG     "-dev"\r
108 \r
109 \r
110 /** Revision number: The repository revision number of this release.\r
111  *\r
112  * This constant is used to generate the build number part of the Windows\r
113  * file version. Its value remains 0 in the repository.\r
114  *\r
115  * When rolling a tarball, we automatically replace it with what we\r
116  * guess to be the correct revision number.\r
117  */\r
118 #define SVN_VER_REVISION   0\r
119 \r
120 \f\r
121 /* Version strings composed from the above definitions. */\r
122 \r
123 /** Version number */\r
124 #define SVN_VER_NUM        APR_STRINGIFY(SVN_VER_MAJOR) \\r
125                            "." APR_STRINGIFY(SVN_VER_MINOR) \\r
126                            "." APR_STRINGIFY(SVN_VER_PATCH)\r
127 \r
128 /** Version number with tag (contains no whitespace) */\r
129 #define SVN_VER_NUMBER     SVN_VER_NUM SVN_VER_NUMTAG\r
130 \r
131 /** Complete version string */\r
132 #define SVN_VERSION        SVN_VER_NUM SVN_VER_TAG\r
133 \r
134 \r
135 \f\r
136 /* Version queries and compatibility checks */\r
137 \r
138 /**\r
139  * Version information. Each library contains a function called\r
140  * svn_<i>libname</i>_version() that returns a pointer to a statically\r
141  * allocated object of this type.\r
142  *\r
143  * @since New in 1.1.\r
144  */\r
145 typedef struct svn_version_t\r
146 {\r
147   int major;                    /**< Major version number */\r
148   int minor;                    /**< Minor version number */\r
149   int patch;                    /**< Patch number */\r
150 \r
151   /**\r
152    * The version tag (#SVN_VER_NUMTAG).\ Must always point to a\r
153    * statically allocated string.\r
154    */\r
155   const char *tag;\r
156 } svn_version_t;\r
157 \r
158 /**\r
159  * Define a static svn_version_t object.\r
160  *\r
161  * @since New in 1.1.\r
162  */\r
163 #define SVN_VERSION_DEFINE(name) \\r
164   static const svn_version_t name = \\r
165     { \\r
166       SVN_VER_MAJOR, \\r
167       SVN_VER_MINOR, \\r
168       SVN_VER_PATCH, \\r
169       SVN_VER_NUMTAG \\r
170     } \\r
171 \r
172 /**\r
173  * Generate the implementation of a version query function.\r
174  *\r
175  * @since New in 1.1.\r
176  */\r
177 #define SVN_VERSION_BODY \\r
178   SVN_VERSION_DEFINE(versioninfo);              \\r
179   return &versioninfo\r
180 \r
181 /**\r
182  * Check library version compatibility. Return #TRUE if the client's\r
183  * version, given in @a my_version, is compatible with the library\r
184  * version, provided in @a lib_version.\r
185  *\r
186  * This function checks for version compatibility as per our\r
187  * guarantees, but requires an exact match when linking to an\r
188  * unreleased library. A development client is always compatible with\r
189  * a previous released library.\r
190  *\r
191  * @since New in 1.1.\r
192  */\r
193 svn_boolean_t\r
194 svn_ver_compatible(const svn_version_t *my_version,\r
195                    const svn_version_t *lib_version);\r
196 \r
197 /**\r
198  * Check if @a my_version and @a lib_version encode the same version number.\r
199  *\r
200  * @since New in 1.2.\r
201  */\r
202 svn_boolean_t\r
203 svn_ver_equal(const svn_version_t *my_version,\r
204               const svn_version_t *lib_version);\r
205 \r
206 \r
207 /**\r
208  * An entry in the compatibility checklist.\r
209  * @see svn_ver_check_list()\r
210  *\r
211  * @since New in 1.1.\r
212  */\r
213 typedef struct svn_version_checklist_t\r
214 {\r
215   const char *label;            /**< Entry label */\r
216 \r
217   /** Version query function for this entry */\r
218   const svn_version_t *(*version_query)(void);\r
219 } svn_version_checklist_t;\r
220 \r
221 \r
222 /**\r
223  * Perform a series of version compatibility checks. Checks if @a\r
224  * my_version is compatible with each entry in @a checklist. @a\r
225  * checklist must end with an entry whose label is @c NULL.\r
226  *\r
227  * @see svn_ver_compatible()\r
228  *\r
229  * @since New in 1.1.\r
230  */\r
231 svn_error_t *\r
232 svn_ver_check_list(const svn_version_t *my_version,\r
233                    const svn_version_checklist_t *checklist);\r
234 \r
235 \r
236 /**\r
237  * Type of function returning library version.\r
238  *\r
239  * @since New in 1.6.\r
240  */\r
241 typedef const svn_version_t *(*svn_version_func_t)(void);\r
242 \r
243 \r
244 /* libsvn_subr doesn't have an svn_subr header, so put the prototype here. */\r
245 /**\r
246  * Get libsvn_subr version information.\r
247  *\r
248  * @since New in 1.1.\r
249  */\r
250 const svn_version_t *\r
251 svn_subr_version(void);\r
252 \r
253 \r
254 #ifdef __cplusplus\r
255 }\r
256 #endif /* __cplusplus */\r
257 \r
258 #endif /* SVN_VERSION_H */\r