upload apache
[bottlenecks.git] / rubbos / app / apache2 / include / apr_version.h
1 /* Licensed to the Apache Software Foundation (ASF) under one or more
2  * contributor license agreements.  See the NOTICE file distributed with
3  * this work for additional information regarding copyright ownership.
4  * The ASF licenses this file to You under the Apache License, Version 2.0
5  * (the "License"); you may not use this file except in compliance with
6  * the License.  You may obtain a copy of the License at
7  *
8  *     http://www.apache.org/licenses/LICENSE-2.0
9  *
10  * Unless required by applicable law or agreed to in writing, software
11  * distributed under the License is distributed on an "AS IS" BASIS,
12  * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
13  * See the License for the specific language governing permissions and
14  * limitations under the License.
15  */
16
17 #ifndef APR_VERSION_H
18 #define APR_VERSION_H
19
20 #include "apr.h"
21
22 #ifdef __cplusplus
23 extern "C" {
24 #endif
25
26 /**
27  * @file apr_version.h
28  * @brief APR Versioning Interface
29  * 
30  * APR's Version
31  *
32  * There are several different mechanisms for accessing the version. There
33  * is a string form, and a set of numbers; in addition, there are constants
34  * which can be compiled into your application, and you can query the library
35  * being used for its actual version.
36  *
37  * Note that it is possible for an application to detect that it has been
38  * compiled against a different version of APR by use of the compile-time
39  * constants and the use of the run-time query function.
40  *
41  * APR version numbering follows the guidelines specified in:
42  *
43  *     http://apr.apache.org/versioning.html
44  */
45
46 /* The numeric compile-time version constants. These constants are the
47  * authoritative version numbers for APR. 
48  */
49
50 /** major version 
51  * Major API changes that could cause compatibility problems for older
52  * programs such as structure size changes.  No binary compatibility is
53  * possible across a change in the major version.
54  */
55 #define APR_MAJOR_VERSION       0
56
57 /** 
58  * Minor API changes that do not cause binary compatibility problems.
59  * Should be reset to 0 when upgrading APR_MAJOR_VERSION
60  */
61 #define APR_MINOR_VERSION       9
62
63 /** patch level */
64 #define APR_PATCH_VERSION      19
65
66 /** 
67  *  This symbol is defined for internal, "development" copies of APR. This
68  *  symbol will be #undef'd for releases. 
69  */
70 /* #define APR_IS_DEV_VERSION */
71
72
73 /** The formatted string of APR's version */
74 #define APR_VERSION_STRING \
75      APR_STRINGIFY(APR_MAJOR_VERSION) "." \
76      APR_STRINGIFY(APR_MINOR_VERSION) "." \
77      APR_STRINGIFY(APR_PATCH_VERSION) \
78      APR_IS_DEV_STRING
79
80
81 /** 
82  * The numeric version information is broken out into fields within this 
83  * structure. 
84  */
85 typedef struct {
86     int major;      /**< major number */
87     int minor;      /**< minor number */
88     int patch;      /**< patch number */
89     int is_dev;     /**< is development (1 or 0) */
90 } apr_version_t;
91
92 /**
93  * Return APR's version information information in a numeric form.
94  *
95  *  @param pvsn Pointer to a version structure for returning the version
96  *              information.
97  */
98 APR_DECLARE(void) apr_version(apr_version_t *pvsn);
99
100 /** Return APR's version information as a string. */
101 APR_DECLARE(const char *) apr_version_string(void);
102
103
104 /** Internal: string form of the "is dev" flag */
105 #ifdef APR_IS_DEV_VERSION
106 #define APR_IS_DEV_STRING "-dev"
107 #else
108 #define APR_IS_DEV_STRING ""
109 #endif
110
111 #ifdef __cplusplus
112 }
113 #endif
114
115 #endif /* APR_VERSION_H */