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
8 * http://www.apache.org/licenses/LICENSE-2.0
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.
28 * @brief APR Versioning Interface
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.
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.
41 * APR version numbering follows the guidelines specified in:
43 * http://apr.apache.org/versioning.html
46 /* The numeric compile-time version constants. These constants are the
47 * authoritative version numbers for APR.
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.
55 #define APR_MAJOR_VERSION 0
58 * Minor API changes that do not cause binary compatibility problems.
59 * Should be reset to 0 when upgrading APR_MAJOR_VERSION
61 #define APR_MINOR_VERSION 9
64 #define APR_PATCH_VERSION 19
67 * This symbol is defined for internal, "development" copies of APR. This
68 * symbol will be #undef'd for releases.
70 /* #define APR_IS_DEV_VERSION */
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) \
82 * The numeric version information is broken out into fields within this
86 int major; /**< major number */
87 int minor; /**< minor number */
88 int patch; /**< patch number */
89 int is_dev; /**< is development (1 or 0) */
93 * Return APR's version information information in a numeric form.
95 * @param pvsn Pointer to a version structure for returning the version
98 APR_DECLARE(void) apr_version(apr_version_t *pvsn);
100 /** Return APR's version information as a string. */
101 APR_DECLARE(const char *) apr_version_string(void);
104 /** Internal: string form of the "is dev" flag */
105 #ifdef APR_IS_DEV_VERSION
106 #define APR_IS_DEV_STRING "-dev"
108 #define APR_IS_DEV_STRING ""
115 #endif /* APR_VERSION_H */