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 API_VERSION_H 00017 #define API_VERSION_H 00018 00019 #include "apr.h" 00020 #include "apr_version.h" 00021 00022 #include "apr_iconv.h" 00023 00024 #ifdef __cplusplus 00025 extern "C" { 00026 #endif 00027 00028 /** 00029 * @file api_version.h 00030 * @brief 00031 * 00032 * APR-iconv's Version 00033 * 00034 * There are several different mechanisms for accessing the version. There 00035 * is a string form, and a set of numbers; in addition, there are constants 00036 * which can be compiled into your application, and you can query the library 00037 * being used for its actual version. 00038 * 00039 * Note that it is possible for an application to detect that it has been 00040 * compiled against a different version of API by use of the compile-time 00041 * constants and the use of the run-time query function. 00042 * 00043 * API version numbering follows the guidelines specified in: 00044 * 00045 * http://apr.apache.org/versioning.html 00046 */ 00047 00048 /* The numeric compile-time version constants. These constants are the 00049 * authoritative version numbers for API. 00050 */ 00051 00052 /** major version 00053 * Major API changes that could cause compatibility problems for older 00054 * programs such as structure size changes. No binary compatibility is 00055 * possible across a change in the major version. 00056 */ 00057 #define API_MAJOR_VERSION 0 00058 00059 /** 00060 * Minor API changes that do not cause binary compatibility problems. 00061 * Should be reset to 0 when upgrading API_MAJOR_VERSION 00062 */ 00063 #define API_MINOR_VERSION 9 00064 00065 /** patch level */ 00066 #define API_PATCH_VERSION 7 00067 00068 /** 00069 * This symbol is defined for internal, "development" copies of API. This 00070 * symbol will be #undef'd for releases. 00071 */ 00072 /* #define API_IS_DEV_VERSION */ 00073 00074 00075 /** The formatted string of API's version */ 00076 #define API_VERSION_STRING \ 00077 APR_STRINGIFY(API_MAJOR_VERSION) "." \ 00078 APR_STRINGIFY(API_MINOR_VERSION) "." \ 00079 APR_STRINGIFY(API_PATCH_VERSION) \ 00080 API_IS_DEV_STRING 00081 00082 /** 00083 * Return APR-util's version information information in a numeric form. 00084 * 00085 * @param pvsn Pointer to a version structure for returning the version 00086 * information. 00087 */ 00088 API_DECLARE(void) api_version(apr_version_t *pvsn); 00089 00090 /** Return API's version information as a string. */ 00091 API_DECLARE(const char *) api_version_string(void); 00092 00093 00094 /** Internal: string form of the "is dev" flag */ 00095 #ifdef API_IS_DEV_VERSION 00096 #define API_IS_DEV_STRING "-dev" 00097 #else 00098 #define API_IS_DEV_STRING "" 00099 #endif 00100 00101 #ifdef __cplusplus 00102 } 00103 #endif 00104 00105 #endif /* API_VERSION_H */