1*c1879761SAndrew Rist/************************************************************** 2cdf0e10cSrcweir * 3*c1879761SAndrew Rist * Licensed to the Apache Software Foundation (ASF) under one 4*c1879761SAndrew Rist * or more contributor license agreements. See the NOTICE file 5*c1879761SAndrew Rist * distributed with this work for additional information 6*c1879761SAndrew Rist * regarding copyright ownership. The ASF licenses this file 7*c1879761SAndrew Rist * to you under the Apache License, Version 2.0 (the 8*c1879761SAndrew Rist * "License"); you may not use this file except in compliance 9*c1879761SAndrew Rist * with the License. You may obtain a copy of the License at 10cdf0e10cSrcweir * 11*c1879761SAndrew Rist * http://www.apache.org/licenses/LICENSE-2.0 12cdf0e10cSrcweir * 13*c1879761SAndrew Rist * Unless required by applicable law or agreed to in writing, 14*c1879761SAndrew Rist * software distributed under the License is distributed on an 15*c1879761SAndrew Rist * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY 16*c1879761SAndrew Rist * KIND, either express or implied. See the License for the 17*c1879761SAndrew Rist * specific language governing permissions and limitations 18*c1879761SAndrew Rist * under the License. 19cdf0e10cSrcweir * 20*c1879761SAndrew Rist *************************************************************/ 21*c1879761SAndrew Rist 22*c1879761SAndrew Rist 23cdf0e10cSrcweir 24cdf0e10cSrcweir#ifndef _VERINFO_HRC 25cdf0e10cSrcweir#define _VERINFO_HRC 26cdf0e10cSrcweir 27cdf0e10cSrcweir// include --------------------------------------------------------------- 28cdf0e10cSrcweir 29cdf0e10cSrcweir#ifndef WIN32 30cdf0e10cSrcweir#include <ver.h> 31cdf0e10cSrcweir#else 32cdf0e10cSrcweir#include <winver.h> 33cdf0e10cSrcweir#endif 34cdf0e10cSrcweir 35cdf0e10cSrcweir// general preprocessor string management -------------------------------- 36cdf0e10cSrcweir 37cdf0e10cSrcweir#ifndef PPSX 38cdf0e10cSrcweir#define PPSX(s) #s 39cdf0e10cSrcweir#endif 40cdf0e10cSrcweir#ifndef PPS 41cdf0e10cSrcweir#define PPS(s) PPSX(s) 42cdf0e10cSrcweir#endif 43cdf0e10cSrcweir 44cdf0e10cSrcweir#ifndef PPCX 45cdf0e10cSrcweir#define PPCX(s1, s2) s1##s2 46cdf0e10cSrcweir#endif 47cdf0e10cSrcweir#ifndef PPCAT 48cdf0e10cSrcweir#define PPCAT(s1, s2) PPCX(s1, s2) 49cdf0e10cSrcweir#endif 50cdf0e10cSrcweir 51cdf0e10cSrcweir// define order of date parts -------------------------------------------- 52cdf0e10cSrcweir 53cdf0e10cSrcweir#if defined(LG_D) 54cdf0e10cSrcweir #define VER_DMY 55cdf0e10cSrcweir#else 56cdf0e10cSrcweir #define VER_YMD 57cdf0e10cSrcweir#endif 58cdf0e10cSrcweir 59cdf0e10cSrcweir// set VERVARIANT to 0 if not defined ------------------------------------ 60cdf0e10cSrcweir 61cdf0e10cSrcweir#if !defined(VERVARIANT) 62cdf0e10cSrcweir #define VERVARIANT 0 63cdf0e10cSrcweir#endif 64cdf0e10cSrcweir 65cdf0e10cSrcweir// define pre release state ---------------------------------------------- 66cdf0e10cSrcweir 67cdf0e10cSrcweir#ifdef VER_CONCEPT 68cdf0e10cSrcweir #define VER_PREL 1 69cdf0e10cSrcweir #define VER_COUNT (0+VER_CONCEPT) 70cdf0e10cSrcweir #define VER1 Concept (Level VER_CONCEPT) 71cdf0e10cSrcweir#endif 72cdf0e10cSrcweir 73cdf0e10cSrcweir#ifdef VER_ALPHA 74cdf0e10cSrcweir #define VER_PREL 1 75cdf0e10cSrcweir #define VER_COUNT (100+VER_ALPHA) 76cdf0e10cSrcweir #define VER1 Alpha (Level VER_ALPHA) 77cdf0e10cSrcweir#endif 78cdf0e10cSrcweir 79cdf0e10cSrcweir#ifdef VER_BETA 80cdf0e10cSrcweir #define VER_PREL 1 81cdf0e10cSrcweir #define VER_COUNT (200+VER_BETA) 82cdf0e10cSrcweir #define VER1 Beta (Level VER_BETA) 83cdf0e10cSrcweir#endif 84cdf0e10cSrcweir 85cdf0e10cSrcweir#ifdef VER_GAMMA 86cdf0e10cSrcweir #define VER_PREL 1 87cdf0e10cSrcweir #define VER_COUNT (300+VER_GAMMA) 88cdf0e10cSrcweir #define VER1 Gamma (Level VER_GAMMA) 89cdf0e10cSrcweir#endif 90cdf0e10cSrcweir 91cdf0e10cSrcweir#ifdef VER_FINAL 92cdf0e10cSrcweir #define VER_COUNT (500+VER_FINAL) 93cdf0e10cSrcweir #if VER_FINAL==0 94cdf0e10cSrcweir #undef VER1 95cdf0e10cSrcweir #elif VER_FINAL==1 96cdf0e10cSrcweir #define VER1 1 97cdf0e10cSrcweir #elif VER_FINAL==2 98cdf0e10cSrcweir #define VER1 2 99cdf0e10cSrcweir #elif VER_FINAL==3 100cdf0e10cSrcweir #define VER1 3 101cdf0e10cSrcweir #elif VER_FINAL==4 102cdf0e10cSrcweir #define VER1 4 103cdf0e10cSrcweir #elif VER_FINAL==5 104cdf0e10cSrcweir #define VER1 5 105cdf0e10cSrcweir #elif VER_FINAL==6 106cdf0e10cSrcweir #define VER1 6 107cdf0e10cSrcweir #elif VER_FINAL==7 108cdf0e10cSrcweir #define VER1 7 109cdf0e10cSrcweir #elif VER_FINAL==8 110cdf0e10cSrcweir #define VER1 8 111cdf0e10cSrcweir #elif VER_FINAL==9 112cdf0e10cSrcweir #define VER1 9 113cdf0e10cSrcweir #elif VER_FINAL==10 114cdf0e10cSrcweir #define VER1 a 115cdf0e10cSrcweir #elif VER_FINAL==11 116cdf0e10cSrcweir #define VER1 b 117cdf0e10cSrcweir #elif VER_FINAL==12 118cdf0e10cSrcweir #define VER1 c 119cdf0e10cSrcweir #endif 120cdf0e10cSrcweir#endif 121cdf0e10cSrcweir 122cdf0e10cSrcweir#ifdef SUBVERSION 123cdf0e10cSrcweir#if SUBVERSION < 10 124cdf0e10cSrcweir #define VER4 PPCAT(0, SUBVERSION) 125cdf0e10cSrcweir#else 126cdf0e10cSrcweir #define VER4 SUBVERSION 127cdf0e10cSrcweir#endif 128cdf0e10cSrcweir#else 129cdf0e10cSrcweir #define VER4 0.0 130cdf0e10cSrcweir#endif 131cdf0e10cSrcweir 132cdf0e10cSrcweir#ifndef VER1 133cdf0e10cSrcweir#if VERVARIANT > 0 134cdf0e10cSrcweir #define VER_LEVEL VERSION.VER4.VERVARIANT 135cdf0e10cSrcweir#else 136cdf0e10cSrcweir #define VER_LEVEL VERSION.VER4 137cdf0e10cSrcweir#endif 138cdf0e10cSrcweir#else 139cdf0e10cSrcweir #define VERC1(a, b, c) a.b##c 140cdf0e10cSrcweir #define VERC2(a, b, c) VERC1(a, b, c) 141cdf0e10cSrcweir #define VER_LEVEL VERC2(VERSION, VER4, VER1) 142cdf0e10cSrcweir#endif 143cdf0e10cSrcweir 144cdf0e10cSrcweir#if !defined(VER_DMY) && VER_DAY < 10 145cdf0e10cSrcweir #define VER5 PPCAT(0, VER_DAY) 146cdf0e10cSrcweir#else 147cdf0e10cSrcweir #define VER5 VER_DAY 148cdf0e10cSrcweir#endif 149cdf0e10cSrcweir 150cdf0e10cSrcweir// define month strings -------------------------------------------------- 151cdf0e10cSrcweir 152cdf0e10cSrcweir#if VER_MONTH==1 153cdf0e10cSrcweir #define VER2 Jan 154cdf0e10cSrcweir#elif VER_MONTH==2 155cdf0e10cSrcweir #define VER2 Feb 156cdf0e10cSrcweir#elif VER_MONTH==3 157cdf0e10cSrcweir #ifdef LG_D 158cdf0e10cSrcweir #define VER2 M\344r 159cdf0e10cSrcweir #else 160cdf0e10cSrcweir #define VER2 Mar 161cdf0e10cSrcweir #endif 162cdf0e10cSrcweir#elif VER_MONTH==4 163cdf0e10cSrcweir #define VER2 Apr 164cdf0e10cSrcweir#elif VER_MONTH==5 165cdf0e10cSrcweir #ifdef LG_D 166cdf0e10cSrcweir #define VER2 Mai 167cdf0e10cSrcweir #else 168cdf0e10cSrcweir #define VER2 May 169cdf0e10cSrcweir #endif 170cdf0e10cSrcweir#elif VER_MONTH==6 171cdf0e10cSrcweir #define VER2 Jun 172cdf0e10cSrcweir#elif VER_MONTH==7 173cdf0e10cSrcweir #define VER2 Jul 174cdf0e10cSrcweir#elif VER_MONTH==8 175cdf0e10cSrcweir #define VER2 Aug 176cdf0e10cSrcweir#elif VER_MONTH==9 177cdf0e10cSrcweir #define VER2 Sep 178cdf0e10cSrcweir#elif VER_MONTH==10 179cdf0e10cSrcweir #ifdef LG_D 180cdf0e10cSrcweir #define VER2 Okt 181cdf0e10cSrcweir #else 182cdf0e10cSrcweir #define VER2 Oct 183cdf0e10cSrcweir #endif 184cdf0e10cSrcweir#elif VER_MONTH==11 185cdf0e10cSrcweir #define VER2 Nov 186cdf0e10cSrcweir#elif VER_MONTH==12 187cdf0e10cSrcweir #ifdef LG_D 188cdf0e10cSrcweir #define VER2 Dez 189cdf0e10cSrcweir #else 190cdf0e10cSrcweir #define VER2 Dec 191cdf0e10cSrcweir #endif 192cdf0e10cSrcweir#endif 193cdf0e10cSrcweir 194cdf0e10cSrcweir#ifdef LG_D 195cdf0e10cSrcweir #define VERC3(a, b, c) a.b.c 196cdf0e10cSrcweir#else 197cdf0e10cSrcweir #define VERC3(a, b, c) c-b-a 198cdf0e10cSrcweir#endif 199cdf0e10cSrcweir#define VERC4(a, b, c) VERC3(a, b, c) 200cdf0e10cSrcweir#define VER_DATE VERC4(VER5, VER2, VER_YEAR) 201cdf0e10cSrcweir 202cdf0e10cSrcweir#if PPCAT(1, VER_FIRSTYEAR)==PPCAT(1, VER_YEAR) 203cdf0e10cSrcweir #define VER_YEARRANGE VER_FIRSTYEAR 204cdf0e10cSrcweir#else 205cdf0e10cSrcweir #define VER_YEARRANGE VER_FIRSTYEAR-VER_YEAR 206cdf0e10cSrcweir#endif 207cdf0e10cSrcweir 208cdf0e10cSrcweir#if VER_FIRSTYEAR > 100 209cdf0e10cSrcweir#define VERC5(a) Copyright \251 a by 210cdf0e10cSrcweir#define VERC6(a) VERC5(a) 211cdf0e10cSrcweir#else 212cdf0e10cSrcweir#define VERC5(a) Copyright \251 20##a by 213cdf0e10cSrcweir#define VERC6(a) VERC5(a) 214cdf0e10cSrcweir#endif 215cdf0e10cSrcweir 216cdf0e10cSrcweir#define S_CRIGHT PPS(VERC6(VER_YEARRANGE)) 217cdf0e10cSrcweir 218cdf0e10cSrcweir#ifdef LG_D 219cdf0e10cSrcweir#define S_VERSION PPS(Version VER_LEVEL vom VER_DATE) 220cdf0e10cSrcweir#else 221cdf0e10cSrcweir#define S_VERSION PPS(Version VER_LEVEL of VER_DATE) 222cdf0e10cSrcweir#endif 223cdf0e10cSrcweir 224cdf0e10cSrcweir#endif // _VERINFO_HRC 225cdf0e10cSrcweir 226