Document FreeTDS DBD params
[apr-util.git] / include / apu_version.h
blobed62f348b743c3e4924111f6985b498eef2ef404
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.
17 #ifndef APU_VERSION_H
18 #define APU_VERSION_H
20 /**
21 * @file apu_version.h
22 * @brief APR-util Versioning Interface
24 * APR-util's Version
26 * There are several different mechanisms for accessing the version. There
27 * is a string form, and a set of numbers; in addition, there are constants
28 * which can be compiled into your application, and you can query the library
29 * being used for its actual version.
31 * Note that it is possible for an application to detect that it has been
32 * compiled against a different version of APU by use of the compile-time
33 * constants and the use of the run-time query function.
35 * APU version numbering follows the guidelines specified in:
37 * http://apr.apache.org/versioning.html
41 /* The numeric compile-time version constants. These constants are the
42 * authoritative version numbers for APU.
45 /** major version
46 * Major API changes that could cause compatibility problems for older
47 * programs such as structure size changes. No binary compatibility is
48 * possible across a change in the major version.
50 #define APU_MAJOR_VERSION 1
52 /** minor version
53 * Minor API changes that do not cause binary compatibility problems.
54 * Reset to 0 when upgrading APU_MAJOR_VERSION
56 #define APU_MINOR_VERSION 3
58 /** patch level
59 * The Patch Level never includes API changes, simply bug fixes.
60 * Reset to 0 when upgrading APR_MINOR_VERSION
62 #define APU_PATCH_VERSION 0
64 /**
65 * The symbol APU_IS_DEV_VERSION is only defined for internal,
66 * "development" copies of APU. It is undefined for released versions
67 * of APU.
69 #define APU_IS_DEV_VERSION
72 #if defined(APU_IS_DEV_VERSION) || defined(DOXYGEN)
73 /** Internal: string form of the "is dev" flag */
74 #define APU_IS_DEV_STRING "-dev"
75 #else
76 #define APU_IS_DEV_STRING ""
77 #endif
80 #ifndef APU_STRINGIFY
81 /** Properly quote a value as a string in the C preprocessor */
82 #define APU_STRINGIFY(n) APU_STRINGIFY_HELPER(n)
83 /** Helper macro for APU_STRINGIFY */
84 #define APU_STRINGIFY_HELPER(n) #n
85 #endif
87 /** The formatted string of APU's version */
88 #define APU_VERSION_STRING \
89 APU_STRINGIFY(APU_MAJOR_VERSION) "." \
90 APU_STRINGIFY(APU_MINOR_VERSION) "." \
91 APU_STRINGIFY(APU_PATCH_VERSION) \
92 APU_IS_DEV_STRING
94 /** An alternative formatted string of APR's version */
95 /* macro for Win32 .rc files using numeric csv representation */
96 #define APU_VERSION_STRING_CSV APU_MAJOR_VERSION ##, \
97 ##APU_MINOR_VERSION ##, \
98 ##APU_PATCH_VERSION
101 #ifndef APU_VERSION_ONLY
103 /* The C language API to access the version at run time,
104 * as opposed to compile time. APU_VERSION_ONLY may be defined
105 * externally when preprocessing apr_version.h to obtain strictly
106 * the C Preprocessor macro declarations.
109 #include "apr_version.h"
111 #include "apu.h"
113 #ifdef __cplusplus
114 extern "C" {
115 #endif
118 * Return APR-util's version information information in a numeric form.
120 * @param pvsn Pointer to a version structure for returning the version
121 * information.
123 APU_DECLARE(void) apu_version(apr_version_t *pvsn);
125 /** Return APU's version information as a string. */
126 APU_DECLARE(const char *) apu_version_string(void);
128 #ifdef __cplusplus
130 #endif
132 #endif /* ndef APU_VERSION_ONLY */
134 #endif /* ndef APU_VERSION_H */