GME  13
api_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 API_VERSION_H
00017 #define API_VERSION_H
00018 
00040 /* The numeric compile-time version constants. These constants are the
00041  * authoritative version numbers for API. 
00042  */
00043 
00049 #define API_MAJOR_VERSION       1
00050 
00055 #define API_MINOR_VERSION       2
00056 
00061 #define API_PATCH_VERSION       1
00062 
00068 /* #undef API_IS_DEV_VERSION */
00069 
00070 
00071 #if defined(API_IS_DEV_VERSION) || defined(DOXYGEN)
00072 
00073 #define API_IS_DEV_STRING "-dev"
00074 #else
00075 #define API_IS_DEV_STRING ""
00076 #endif
00077 
00078 #ifndef API_STRINGIFY
00079 
00080 #define API_STRINGIFY(n) API_STRINGIFY_HELPER(n)
00081 
00082 #define API_STRINGIFY_HELPER(n) #n
00083 #endif
00084 
00086 #define API_VERSION_STRING \
00087      API_STRINGIFY(API_MAJOR_VERSION) "." \
00088      API_STRINGIFY(API_MINOR_VERSION) "." \
00089      API_STRINGIFY(API_PATCH_VERSION) \
00090      API_IS_DEV_STRING
00091 
00093 /* macro for Win32 .rc files using numeric csv representation */
00094 #define API_VERSION_STRING_CSV API_MAJOR_VERSION ##, \
00095                              ##API_MINOR_VERSION ##, \
00096                              ##API_PATCH_VERSION
00097 
00098 
00099 #ifndef API_VERSION_ONLY
00100 
00101 /* The C language API to access the version at run time, 
00102  * as opposed to compile time.  API_VERSION_ONLY may be defined 
00103  * externally when preprocessing apr_version.h to obtain strictly 
00104  * the C Preprocessor macro declarations.
00105  */
00106 
00107 #include "apr_version.h"
00108 
00109 #include "apr_iconv.h"
00110 
00111 #ifdef __cplusplus
00112 extern "C" {
00113 #endif
00114 
00121 API_DECLARE(void) api_version(apr_version_t *pvsn);
00122 
00124 API_DECLARE(const char *) api_version_string(void);
00125 
00126 #ifdef __cplusplus
00127 }
00128 #endif
00129 
00130 #endif /* ndef API_VERSION_ONLY */
00131 
00132 #endif /* ndef API_VERSION_H */