Apache Portable Runtime Utility Library
 All Data Structures Namespaces Files Functions Variables Typedefs Enumerations Enumerator Macros Groups Pages
apu_version.h
Go to the documentation of this file.
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 APU_VERSION_H
18 #define APU_VERSION_H
19 
41 /* The numeric compile-time version constants. These constants are the
42  * authoritative version numbers for APU.
43  */
44 
50 #define APU_MAJOR_VERSION 1
51 
56 #define APU_MINOR_VERSION 5
57 
62 #define APU_PATCH_VERSION 3
63 
69 #define APU_IS_DEV_VERSION
70 
71 
72 #if defined(APU_IS_DEV_VERSION) || defined(DOXYGEN)
73 
74 #define APU_IS_DEV_STRING "-dev"
75 #else
76 #define APU_IS_DEV_STRING ""
77 #endif
78 
79 
80 #ifndef APU_STRINGIFY
81 
82 #define APU_STRINGIFY(n) APU_STRINGIFY_HELPER(n)
83 
84 #define APU_STRINGIFY_HELPER(n) #n
85 #endif
86 
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
93 
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
99 
100 
101 #ifndef APU_VERSION_ONLY
102 
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.
107  */
108 
109 #include "apr_version.h"
110 
111 #include "apu.h"
112 
113 #ifdef __cplusplus
114 extern "C" {
115 #endif
116 
123 APU_DECLARE(void) apu_version(apr_version_t *pvsn);
124 
126 APU_DECLARE(const char *) apu_version_string(void);
127 
128 #ifdef __cplusplus
129 }
130 #endif
131 
132 #endif /* ndef APU_VERSION_ONLY */
133 
134 #endif /* ndef APU_VERSION_H */