GME  13
apr_version.h
Go to the documentation of this file.
00001 /* Licensed to the Apache Software Foundation (ASF) under one or more
00002  * contributor license agreements.  See the NOTICE file distributed with
00003  * this work for additional information regarding copyright ownership.
00004  * The ASF licenses this file to You under the Apache License, Version 2.0
00005  * (the "License"); you may not use this file except in compliance with
00006  * the License.  You may obtain a copy of the License at
00007  *
00008  *     http://www.apache.org/licenses/LICENSE-2.0
00009  *
00010  * Unless required by applicable law or agreed to in writing, software
00011  * distributed under the License is distributed on an "AS IS" BASIS,
00012  * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
00013  * See the License for the specific language governing permissions and
00014  * limitations under the License.
00015  */
00016 
00017 #ifndef APR_VERSION_H
00018 #define APR_VERSION_H
00019 
00041 #define APR_COPYRIGHT "Copyright (c) 2013 The Apache Software " \
00042                       "Foundation or its licensors, as applicable."
00043 
00044 /* The numeric compile-time version constants. These constants are the
00045  * authoritative version numbers for APR. 
00046  */
00047 
00053 #define APR_MAJOR_VERSION       1
00054 
00059 #define APR_MINOR_VERSION       4
00060 
00065 #define APR_PATCH_VERSION       8
00066 
00072 /* #define APR_IS_DEV_VERSION */
00073 
00086 #define APR_VERSION_AT_LEAST(major,minor,patch)                    \
00087 (((major) < APR_MAJOR_VERSION)                                     \
00088  || ((major) == APR_MAJOR_VERSION && (minor) < APR_MINOR_VERSION) \
00089  || ((major) == APR_MAJOR_VERSION && (minor) == APR_MINOR_VERSION && (patch) <= APR_PATCH_VERSION))
00090 
00091 #if defined(APR_IS_DEV_VERSION) || defined(DOXYGEN)
00092 
00093 #ifndef APR_IS_DEV_STRING
00094 #define APR_IS_DEV_STRING "-dev"
00095 #endif
00096 #else
00097 #define APR_IS_DEV_STRING ""
00098 #endif
00099 
00100 /* APR_STRINGIFY is defined here, and also in apr_general.h, so wrap it */
00101 #ifndef APR_STRINGIFY
00102 
00103 #define APR_STRINGIFY(n) APR_STRINGIFY_HELPER(n)
00104 
00105 #define APR_STRINGIFY_HELPER(n) #n
00106 #endif
00107 
00109 #define APR_VERSION_STRING \
00110      APR_STRINGIFY(APR_MAJOR_VERSION) "." \
00111      APR_STRINGIFY(APR_MINOR_VERSION) "." \
00112      APR_STRINGIFY(APR_PATCH_VERSION) \
00113      APR_IS_DEV_STRING
00114 
00116 /* macro for Win32 .rc files using numeric csv representation */
00117 #define APR_VERSION_STRING_CSV APR_MAJOR_VERSION ##, \
00118                              ##APR_MINOR_VERSION ##, \
00119                              ##APR_PATCH_VERSION
00120 
00121 
00122 #ifndef APR_VERSION_ONLY
00123 
00124 /* The C language API to access the version at run time, 
00125  * as opposed to compile time.  APR_VERSION_ONLY may be defined 
00126  * externally when preprocessing apr_version.h to obtain strictly 
00127  * the C Preprocessor macro declarations.
00128  */
00129 
00130 #include "apr.h"
00131 
00132 #ifdef __cplusplus
00133 extern "C" {
00134 #endif
00135 
00140 typedef struct {
00141     int major;      
00142     int minor;      
00143     int patch;      
00144     int is_dev;     
00145 } apr_version_t;
00146 
00153 APR_DECLARE(void) apr_version(apr_version_t *pvsn);
00154 
00156 APR_DECLARE(const char *) apr_version_string(void);
00157 
00158 #ifdef __cplusplus
00159 }
00160 #endif
00161 
00162 #endif /* ndef APR_VERSION_ONLY */
00163 
00164 #endif /* ndef APR_VERSION_H */