1 /* 2 * Licensed to the Apache Software Foundation (ASF) under one or more 3 * contributor license agreements. See the NOTICE file distributed with 4 * this work for additional information regarding copyright ownership. 5 * The ASF licenses this file to You under the Apache License, Version 2.0 6 * (the "License"); you may not use this file except in compliance with 7 * the License. You may obtain a copy of the License at 8 * 9 * http://www.apache.org/licenses/LICENSE-2.0 10 * 11 * Unless required by applicable law or agreed to in writing, software 12 * distributed under the License is distributed on an "AS IS" BASIS, 13 * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 14 * See the License for the specific language governing permissions and 15 * limitations under the License. 16 */ 17 18 /*************************************************************************** 19 * Description: JK version header file * 20 ***************************************************************************/ 21 22 #ifndef __JK_VERSION_H 23 #define __JK_VERSION_H 24 25 /************** START OF AREA TO MODIFY BEFORE RELEASING *************/ 26 #define JK_VERMAJOR 1 27 #define JK_VERMINOR 2 28 #define JK_VERFIX 48 29 30 /* set JK_VERISRELEASE to 1 when release (do not forget to commit!) */ 31 #define JK_VERISRELEASE 1 32 /* Beta number */ 33 #define JK_VERBETA 0 34 #define JK_BETASTRING "0" 35 /* Release candidate */ 36 #define JK_VERRC 0 37 #define JK_RCSTRING "0" 38 39 /************** END OF AREA TO MODIFY BEFORE RELEASING *************/ 40 41 #if !defined(PACKAGE) 42 #if defined(JK_ISAPI) 43 #define PACKAGE "isapi_redirector" 44 #define JK_DLL_SUFFIX "dll" 45 #elif defined(JK_NSAPI) 46 #define PACKAGE "nsapi_redirector" 47 #define JK_DLL_SUFFIX "dll" 48 #else 49 #define PACKAGE "mod_jk" 50 #define JK_DLL_SUFFIX "so" 51 #endif 52 #endif 53 54 /* Build JK_EXPOSED_VERSION and JK_VERSION */ 55 #define JK_EXPOSED_VERSION_INT PACKAGE "/" JK_VERSTRING 56 57 #if (JK_VERBETA != 0) 58 #define JK_EXPOSED_VERSION JK_EXPOSED_VERSION_INT "-beta-" JK_BETASTRING 59 #else 60 #undef JK_VERBETA 61 #define JK_VERBETA 255 62 #if (JK_VERRC != 0) 63 #define JK_EXPOSED_VERSION JK_EXPOSED_VERSION_INT "-rc-" JK_RCSTRING 64 #elif (JK_VERISRELEASE == 1) 65 #define JK_EXPOSED_VERSION JK_EXPOSED_VERSION_INT 66 #else 67 #define JK_EXPOSED_VERSION JK_EXPOSED_VERSION_INT "-dev" 68 #endif 69 #endif 70 #define JK_FULL_EXPOSED_VERSION JK_EXPOSED_VERSION 71 72 #define JK_MAKEVERSION(major, minor, fix, beta) \ 73 (((major) << 24) + ((minor) << 16) + ((fix) << 8) + (beta)) 74 75 #define JK_VERSION JK_MAKEVERSION(JK_VERMAJOR, JK_VERMINOR, JK_VERFIX, JK_VERBETA) 76 77 /** Properly quote a value as a string in the C preprocessor */ 78 #define JK_STRINGIFY(n) JK_STRINGIFY_HELPER(n) 79 /** Helper macro for JK_STRINGIFY */ 80 #define JK_STRINGIFY_HELPER(n) #n 81 #define JK_VERSTRING \ 82 JK_STRINGIFY(JK_VERMAJOR) "." \ 83 JK_STRINGIFY(JK_VERMINOR) "." \ 84 JK_STRINGIFY(JK_VERFIX) 85 86 /* macro for Win32 .rc files using numeric csv representation */ 87 #define JK_VERSIONCSV JK_VERMAJOR ##, \ 88 ##JK_VERMINOR ##, \ 89 ##JK_VERFIX 90 91 92 #endif /* __JK_VERSION_H */ 93 94