Main Page | Modules | Data Structures | File List | Data Fields | Globals | Related Pages

apr_version.h

Go to the documentation of this file.
00001 /* Copyright 2000-2004 The Apache Software Foundation 00002 * 00003 * Licensed under the Apache License, Version 2.0 (the "License"); 00004 * you may not use this file except in compliance with the License. 00005 * You may obtain a copy of the License at 00006 * 00007 * http://www.apache.org/licenses/LICENSE-2.0 00008 * 00009 * Unless required by applicable law or agreed to in writing, software 00010 * distributed under the License is distributed on an "AS IS" BASIS, 00011 * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 00012 * See the License for the specific language governing permissions and 00013 * limitations under the License. 00014 */ 00015 00016 #ifndef APR_VERSION_H 00017 #define APR_VERSION_H 00018 00019 #include "apr.h" 00020 00021 #ifdef __cplusplus 00022 extern "C" { 00023 #endif 00024 00025 /** 00026 * @file apr_version.h 00027 * @brief APR Versioning Interface 00028 * 00029 * APR's Version 00030 * 00031 * There are several different mechanisms for accessing the version. There 00032 * is a string form, and a set of numbers; in addition, there are constants 00033 * which can be compiled into your application, and you can query the library 00034 * being used for its actual version. 00035 * 00036 * Note that it is possible for an application to detect that it has been 00037 * compiled against a different version of APR by use of the compile-time 00038 * constants and the use of the run-time query function. 00039 * 00040 * APR version numbering follows the guidelines specified in: 00041 * 00042 * http://apr.apache.org/versioning.html 00043 */ 00044 00045 /* The numeric compile-time version constants. These constants are the 00046 * authoritative version numbers for APR. 00047 */ 00048 00049 /** major version 00050 * Major API changes that could cause compatibility problems for older 00051 * programs such as structure size changes. No binary compatibility is 00052 * possible across a change in the major version. 00053 */ 00054 #define APR_MAJOR_VERSION 1 00055 00056 /** 00057 * Minor API changes that do not cause binary compatibility problems. 00058 * Should be reset to 0 when upgrading APR_MAJOR_VERSION 00059 */ 00060 #define APR_MINOR_VERSION 0 00061 00062 /** patch level */ 00063 #define APR_PATCH_VERSION 0 00064 00065 00066 /** The formatted string of APR's version */ 00067 #define APR_VERSION_STRING \ 00068 APR_STRINGIFY(APR_MAJOR_VERSION) "." \ 00069 APR_STRINGIFY(APR_MINOR_VERSION) "." \ 00070 APR_STRINGIFY(APR_PATCH_VERSION) \ 00071 APR_IS_DEV_STRING 00072 00073 00074 /** 00075 * The numeric version information is broken out into fields within this 00076 * structure. 00077 */ 00078 typedef struct { 00079 int major; /**< major number */ 00080 int minor; /**< minor number */ 00081 int patch; /**< patch number */ 00082 int is_dev; /**< is development (1 or 0) */ 00083 } apr_version_t; 00084 00085 /** 00086 * Return APR's version information information in a numeric form. 00087 * 00088 * @param pvsn Pointer to a version structure for returning the version 00089 * information. 00090 */ 00091 APR_DECLARE(void) apr_version(apr_version_t *pvsn); 00092 00093 /** Return APR's version information as a string. */ 00094 APR_DECLARE(const char *) apr_version_string(void); 00095 00096 00097 /** Internal: string form of the "is dev" flag */ 00098 #ifdef APR_IS_DEV_VERSION 00099 #define APR_IS_DEV_STRING "-dev" 00100 #else 00101 #define APR_IS_DEV_STRING "" 00102 #endif 00103 00104 #ifdef __cplusplus 00105 } 00106 #endif 00107 00108 #endif /* APR_VERSION_H */

Generated on Thu Sep 16 13:47:10 2004 for Apache Portable Runtime by doxygen 1.3.7