00001 /** 00002 * @copyright 00003 * ==================================================================== 00004 * Copyright (c) 2000-2004 CollabNet. All rights reserved. 00005 * 00006 * This software is licensed as described in the file COPYING, which 00007 * you should have received as part of this distribution. The terms 00008 * are also available at http://subversion.tigris.org/license-1.html. 00009 * If newer versions of this license are posted there, you may use a 00010 * newer version instead, at your option. 00011 * 00012 * This software consists of voluntary contributions made by many 00013 * individuals. For exact contribution history, see the revision 00014 * history and logs, available at http://subversion.tigris.org/. 00015 * ==================================================================== 00016 * @endcopyright 00017 * 00018 * @file svn_version.h 00019 * @brief Version information. 00020 */ 00021 00022 #ifndef SVN_VERSION_H 00023 #define SVN_VERSION_H 00024 00025 /* Hack to prevent the resource compiler from including 00026 apr_general.h. It doesn't resolve the include paths 00027 correctly and blows up without this. 00028 */ 00029 #ifndef APR_STRINGIFY 00030 #include <apr_general.h> 00031 #endif 00032 00033 #include "svn_types.h" 00034 00035 #ifdef __cplusplus 00036 extern "C" { 00037 #endif /* __cplusplus */ 00038 00039 00040 /* Symbols that define the version number. */ 00041 00042 /* Version numbers: <major>.<minor>.<micro> 00043 * 00044 * The version numbers in this file follow the rules established by: 00045 * 00046 * http://apr.apache.org/versioning.html 00047 */ 00048 00049 /** Major version number. 00050 * 00051 * Modify when incompatible changes are made to published interfaces. 00052 */ 00053 #define SVN_VER_MAJOR 1 00054 00055 /** Minor version number. 00056 * 00057 * Modify when new functionality is added or new interfaces are 00058 * defined, but all changes are backward compatible. 00059 */ 00060 #define SVN_VER_MINOR 1 00061 00062 /** Patch number. 00063 * 00064 * @since New in 1.1. 00065 * 00066 * Modify for every released patch. 00067 */ 00068 #define SVN_VER_PATCH 4 00069 00070 00071 /** @deprecated Provided for backward compatibility with the 1.0 API. */ 00072 #define SVN_VER_MICRO SVN_VER_PATCH 00073 00074 /** @deprecated Provided for backward compatibility with the 1.0 API. */ 00075 #define SVN_VER_LIBRARY SVN_VER_MAJOR 00076 00077 00078 /** Version tag: a string describing the version. 00079 * 00080 * This tag remains " (dev build)" in the repository so that we can 00081 * always see from "svn --version" that the software has been built 00082 * from the repository rather than a "blessed" distribution. 00083 * 00084 * When rolling a tarball, we automatically replace this text with " (r1234)" 00085 * (where 1234 is the last revision on the branch prior to the release) 00086 * for final releases; in prereleases, it becomes " (Alpha)", 00087 * " (Beta 1)", etc., as appropriate. 00088 * 00089 * Always change this at the same time as SVN_VER_NUMTAG. 00090 */ 00091 #define SVN_VER_TAG " (r13838)" 00092 00093 00094 /** Number tag: a string describing the version. 00095 * 00096 * This tag is used to generate a version number string to identify 00097 * the client and server in HTTP requests, for example. It must not 00098 * contain any spaces. This value remains "-dev" in the repository. 00099 * 00100 * When rolling a tarball, we automatically replace this text with "" 00101 * for final releases; in prereleases, it becomes "-alpha", "-beta1", 00102 * etc., as appropriate. 00103 * 00104 * Always change this at the same time as SVN_VER_TAG. 00105 */ 00106 #define SVN_VER_NUMTAG "" 00107 00108 00109 /** Revision number: The repository revision number of this release. 00110 * 00111 * This constant is used to generate the build number part of the Windows 00112 * file version. Its value remains 0 in the repository. 00113 * 00114 * When rolling a tarball, we automatically replace it with what we 00115 * guess to be the correct revision number. 00116 */ 00117 #define SVN_VER_REVISION 0 00118 00119 00120 /* Version strings composed from the above definitions. */ 00121 00122 /** Version number */ 00123 #define SVN_VER_NUM APR_STRINGIFY(SVN_VER_MAJOR) \ 00124 "." APR_STRINGIFY(SVN_VER_MINOR) \ 00125 "." APR_STRINGIFY(SVN_VER_PATCH) 00126 00127 /** Version number with tag (contains no whitespace) */ 00128 #define SVN_VER_NUMBER SVN_VER_NUM SVN_VER_NUMTAG 00129 00130 /** Complete version string */ 00131 #define SVN_VERSION SVN_VER_NUM SVN_VER_TAG 00132 00133 00134 00135 /* Version queries and compatibility checks */ 00136 00137 /** 00138 * Version information. Each library contains a function called 00139 * svn_<i>libname</i>_version() that returns a pointer to a statically 00140 * allocated object of this type. 00141 * 00142 * @since New in 1.1. 00143 */ 00144 typedef struct svn_version_t 00145 { 00146 int major; /**< Major version number */ 00147 int minor; /**< Minor version number */ 00148 int patch; /**< Patch number */ 00149 00150 /** 00151 * The verison tag (#SVN_VER_NUMTAG).\ Must always point to a 00152 * statically allocated string. 00153 */ 00154 const char *tag; 00155 } svn_version_t; 00156 00157 /** 00158 * Define a static svn_version_t object. 00159 * @since New in 1.1. 00160 */ 00161 #define SVN_VERSION_DEFINE(name) \ 00162 static const svn_version_t name = \ 00163 { \ 00164 SVN_VER_MAJOR, \ 00165 SVN_VER_MINOR, \ 00166 SVN_VER_PATCH, \ 00167 SVN_VER_NUMTAG \ 00168 } \ 00169 00170 /** 00171 * Generate the implementation of a version query function. 00172 * @since New in 1.1. 00173 */ 00174 #define SVN_VERSION_BODY \ 00175 SVN_VERSION_DEFINE (versioninfo); \ 00176 return &versioninfo 00177 00178 /** 00179 * Check library version compatibility. Returns #TRUE if the clent's 00180 * version, given in @a my_version, is compatible with the library 00181 * version, provided in @a lib_version. 00182 * 00183 * This function checks for version compatibility as per our 00184 * guarantees, but requires an exact match when linking to an 00185 * unreleased library. A development client is always compatible with 00186 * a previous released library. 00187 * 00188 * @since New in 1.1. 00189 */ 00190 svn_boolean_t svn_ver_compatible (const svn_version_t *my_version, 00191 const svn_version_t *lib_version); 00192 00193 00194 /** 00195 * An entry in the compatibility checklist. 00196 * @see svn_ver_check_list() 00197 * @since New in 1.1. 00198 */ 00199 typedef struct svn_version_checklist_t 00200 { 00201 const char *label; /**< Entry label */ 00202 00203 /** Version query function for this entry */ 00204 const svn_version_t *(*version_query) (void); 00205 } svn_version_checklist_t; 00206 00207 00208 /** 00209 * Perform a series of version compatibility checks. Checks if @a 00210 * my_version is compatible with each entry in @a checklist. @a 00211 * checklist must end with an entry whose label is @c NULL. 00212 * 00213 * @see svn_ver_compatible() 00214 * @since New in 1.1. 00215 */ 00216 svn_error_t *svn_ver_check_list (const svn_version_t *my_version, 00217 const svn_version_checklist_t *checklist); 00218 00219 00220 /* libsvn_subr doesn't have an svn_subr header, so put the prototype here. */ 00221 /** 00222 * Get libsvn_subr version information. 00223 * @since New in version 1.1. 00224 */ 00225 const svn_version_t *svn_subr_version (void); 00226 00227 00228 #ifdef __cplusplus 00229 } 00230 #endif /* __cplusplus */ 00231 00232 #endif /* SVN_VERSION_H */
1.2.18