indentation problem in the generated code
[deliverable/titan.core.git] / common / version_internal.h
CommitLineData
d44e3c4f 1/******************************************************************************
2 * Copyright (c) 2000-2016 Ericsson Telecom AB
3 * All rights reserved. This program and the accompanying materials
4 * are made available under the terms of the Eclipse Public License v1.0
5 * which accompanies this distribution, and is available at
6 * http://www.eclipse.org/legal/epl-v10.html
7 *
8 * Contributors:
9 * Balasko, Jeno
10 * Godar, Marton
11 * Kovacs, Ferenc
12 * Lovassy, Arpad
13 * Raduly, Csaba
14 * Szabados, Kristof
398d100f 15 * Szabo, Bence Janos
d44e3c4f 16 * Szabo, Janos Zoltan – initial implementation
17 *
18 ******************************************************************************/
970ed795
EL
19#ifndef VERSION_INTERNAL_H
20#define VERSION_INTERNAL_H
21
22#include "version.h"
23
24/* This file contains the macro settings that are not delivered to the user
25 * in the binary package. */
26
27/* Symbolic version string */
28#ifdef TTCN3_BUILDNUMBER
29/* pre-release, e.g. "1.6.pre4 build 1" */
30# define GEN_VER2(major, minor, patchlevel, buildnumber) \
31 #major "." #minor ".pre" #patchlevel " build " #buildnumber
32# define GEN_VER(major, minor, patchlevel, buildnumber) \
33 GEN_VER2(major, minor, patchlevel, buildnumber)
34# define VERSION_STRING GEN_VER(TTCN3_MAJOR, TTCN3_MINOR, TTCN3_PATCHLEVEL, \
35 TTCN3_BUILDNUMBER)
36#else
37/* stable release, e.g. "1.4.pl3" */
38# define GEN_VER2(major, minor, patchlevel) #major "." #minor ".pl" #patchlevel
39# define GEN_VER(major, minor, patchlevel) GEN_VER2(major, minor, patchlevel)
40# define VERSION_STRING GEN_VER(TTCN3_MAJOR, TTCN3_MINOR, TTCN3_PATCHLEVEL)
41#endif
42
43/* Product number */
44#define PRODNR_EXECUTOR "CRL 113 200"
45
46/* Ericsson revision: /m Rnx
47 * m = TTCN3_MAJOR
48 * n = TTCN3_MINOR
49 * x = 'A' + TTCN3_PATCHLEVEL
50 * Example: 1.4.pl3 = R4D */
51
52#define GEN_ERICSSON_SUFFIX2(num) #num
53#define GEN_ERICSSON_SUFFIX(num) GEN_ERICSSON_SUFFIX2(num)
54#define ERICSSON_SUFFIX GEN_ERICSSON_SUFFIX(TTCN3_MAJOR)
55
56#define GEN_ERICSSON_NUMBER2(num) #num
57#define GEN_ERICSSON_NUMBER(num) GEN_ERICSSON_NUMBER2(num)
58#define ERICSSON_NUMBER GEN_ERICSSON_NUMBER(TTCN3_MINOR)
59
60#if TTCN3_PATCHLEVEL == 0
61#define ERICSSON_LETTER "A"
62#elif TTCN3_PATCHLEVEL == 1
63#define ERICSSON_LETTER "B"
64#elif TTCN3_PATCHLEVEL == 2
65#define ERICSSON_LETTER "C"
66#elif TTCN3_PATCHLEVEL == 3
67#define ERICSSON_LETTER "D"
68#elif TTCN3_PATCHLEVEL == 4
69#define ERICSSON_LETTER "E"
70#elif TTCN3_PATCHLEVEL == 5
71#define ERICSSON_LETTER "F"
72#elif TTCN3_PATCHLEVEL == 6
73#define ERICSSON_LETTER "G"
74#elif TTCN3_PATCHLEVEL == 7
75#define ERICSSON_LETTER "H"
76#elif TTCN3_PATCHLEVEL == 8
77/* I: forbidden */
78#define ERICSSON_LETTER "J"
79#elif TTCN3_PATCHLEVEL == 9
80#define ERICSSON_LETTER "K"
81#elif TTCN3_PATCHLEVEL == 10
82#define ERICSSON_LETTER "L"
83#elif TTCN3_PATCHLEVEL == 11
84#define ERICSSON_LETTER "M"
85#elif TTCN3_PATCHLEVEL == 12
86#define ERICSSON_LETTER "N"
87/* O, P, Q, R: forbidden */
88#elif TTCN3_PATCHLEVEL == 13
89#define ERICSSON_LETTER "S"
90#elif TTCN3_PATCHLEVEL == 14
91#define ERICSSON_LETTER "T"
92#elif TTCN3_PATCHLEVEL == 15
93#define ERICSSON_LETTER "U"
94#elif TTCN3_PATCHLEVEL == 16
95#define ERICSSON_LETTER "V"
96#elif TTCN3_PATCHLEVEL == 17
97/* W: forbidden */
98#define ERICSSON_LETTER "X"
99#elif TTCN3_PATCHLEVEL == 18
100#define ERICSSON_LETTER "Y"
101#elif TTCN3_PATCHLEVEL == 19
102#define ERICSSON_LETTER "Z"
103#else
104#error "Ericsson revision letter is not defined."
105#endif
106
107#ifdef TTCN3_BUILDNUMBER
108/* The Ericsson version is suffixed with the build number (at least 2 digits)
109 * in preliminary releases (like this: "R6E01") */
110# if TTCN3_BUILDNUMBER < 10
111# define ERICSSON_BUILDNUMBER "0" GEN_ERICSSON_NUMBER(TTCN3_BUILDNUMBER)
112# else
113# define ERICSSON_BUILDNUMBER GEN_ERICSSON_NUMBER(TTCN3_BUILDNUMBER)
114# endif
115#else
116# define ERICSSON_BUILDNUMBER
117#endif
118
119#define ERICSSON_VERSION "/" ERICSSON_SUFFIX " R" ERICSSON_NUMBER ERICSSON_LETTER \
120 ERICSSON_BUILDNUMBER
121
122#define PRODUCT_NUMBER PRODNR_EXECUTOR ERICSSON_VERSION
123
124/* Version of the C/C++ compiler */
125
126#if defined(__GNUC__)
398d100f
BB
127# ifdef __clang__
128# ifdef __clang_patchlevel__
129# define GEN_COMP_VER2(major, minor, patchlevel) "clang " #major "." #minor "." #patchlevel
130# define GEN_COMP_VER(major, minor, patchlevel) GEN_COMP_VER2(major, minor, patchlevel)
131# define C_COMPILER_VERSION GEN_COMP_VER(__clang_major__, __clang_minor__, __clang_patchlevel__)
132# else
133# define GEN_COMP_VER2(major, minor) "clang " #major "." #minor ".?"
134# define GEN_COMP_VER(major, minor) GEN_COMP_VER2(major, minor)
135# define C_COMPILER_VERSION GEN_COMP_VER(__clang_major__, __clang_minor__)
136# endif
970ed795 137# else
398d100f
BB
138 /* the code is compiled with GCC */
139# ifdef __GNUC_PATCHLEVEL__
140 /* the patch number is known (version 3.0 or later) */
141# define GEN_COMP_VER2(major, minor, patchlevel) "GCC " #major "." #minor "." #patchlevel
142# define GEN_COMP_VER(major, minor, patchlevel) GEN_COMP_VER2(major, minor, patchlevel)
143# define C_COMPILER_VERSION GEN_COMP_VER(__GNUC__, __GNUC_MINOR__, __GNUC_PATCHLEVEL__)
144# else
145 /* the patch number is unknown (version 2.x.?) */
146# define GEN_COMP_VER2(major, minor) "GCC " #major "." #minor ".?"
147# define GEN_COMP_VER(major, minor) GEN_COMP_VER2(major, minor)
148# define C_COMPILER_VERSION GEN_COMP_VER(__GNUC__, __GNUC_MINOR__)
149# endif
970ed795
EL
150# endif
151#elif defined(__SUNPRO_C) || defined(__SUNPRO_CC)
152 /* the code is compiled with Sun Workshop C/C++ compiler */
153# ifdef __SUNPRO_C
154# define __SUNPRO_VERSION __SUNPRO_C
155# else
156# define __SUNPRO_VERSION __SUNPRO_CC
157# endif
158# if __SUNPRO_VERSION <= 0xfff
159 /* the version number is in format 0xVRP */
160 /* version number (V) */
161# if (__SUNPRO_VERSION & 0xf00) == 0x000
162# define SUNPRO_V "0"
163# elif (__SUNPRO_VERSION & 0xf00) == 0x100
164# define SUNPRO_V "1"
165# elif (__SUNPRO_VERSION & 0xf00) == 0x200
166# define SUNPRO_V "2"
167# elif (__SUNPRO_VERSION & 0xf00) == 0x300
168# define SUNPRO_V "3"
169# elif (__SUNPRO_VERSION & 0xf00) == 0x400
170# define SUNPRO_V "4"
171# elif (__SUNPRO_VERSION & 0xf00) == 0x500
172# define SUNPRO_V "5"
173# elif (__SUNPRO_VERSION & 0xf00) == 0x600
174# define SUNPRO_V "6"
175# elif (__SUNPRO_VERSION & 0xf00) == 0x700
176# define SUNPRO_V "7"
177# elif (__SUNPRO_VERSION & 0xf00) == 0x800
178# define SUNPRO_V "8"
179# elif (__SUNPRO_VERSION & 0xf00) == 0x900
180# define SUNPRO_V "9"
181# elif (__SUNPRO_VERSION & 0xf00) == 0xa00
182# define SUNPRO_V "10"
183# elif (__SUNPRO_VERSION & 0xf00) == 0xb00
184# define SUNPRO_V "11"
185# elif (__SUNPRO_VERSION & 0xf00) == 0xc00
186# define SUNPRO_V "12"
187# elif (__SUNPRO_VERSION & 0xf00) == 0xd00
188# define SUNPRO_V "13"
189# elif (__SUNPRO_VERSION & 0xf00) == 0xe00
190# define SUNPRO_V "14"
191# else
192# define SUNPRO_V "15"
193# endif
194 /* release number (R) */
195# if (__SUNPRO_VERSION & 0xf0) == 0x00
196# define SUNPRO_R "0"
197# elif (__SUNPRO_VERSION & 0xf0) == 0x10
198# define SUNPRO_R "1"
199# elif (__SUNPRO_VERSION & 0xf0) == 0x20
200# define SUNPRO_R "2"
201# elif (__SUNPRO_VERSION & 0xf0) == 0x30
202# define SUNPRO_R "3"
203# elif (__SUNPRO_VERSION & 0xf0) == 0x40
204# define SUNPRO_R "4"
205# elif (__SUNPRO_VERSION & 0xf0) == 0x50
206# define SUNPRO_R "5"
207# elif (__SUNPRO_VERSION & 0xf0) == 0x60
208# define SUNPRO_R "6"
209# elif (__SUNPRO_VERSION & 0xf0) == 0x70
210# define SUNPRO_R "7"
211# elif (__SUNPRO_VERSION & 0xf0) == 0x80
212# define SUNPRO_R "8"
213# elif (__SUNPRO_VERSION & 0xf0) == 0x90
214# define SUNPRO_R "9"
215# elif (__SUNPRO_VERSION & 0xf0) == 0xa0
216# define SUNPRO_R "10"
217# elif (__SUNPRO_VERSION & 0xf0) == 0xb0
218# define SUNPRO_R "11"
219# elif (__SUNPRO_VERSION & 0xf0) == 0xc0
220# define SUNPRO_R "12"
221# elif (__SUNPRO_VERSION & 0xf0) == 0xd0
222# define SUNPRO_R "13"
223# elif (__SUNPRO_VERSION & 0xf0) == 0xe0
224# define SUNPRO_R "14"
225# else
226# define SUNPRO_R "15"
227# endif
228 /* patch number (P) */
229# if (__SUNPRO_VERSION & 0xf) == 0x0
230# define SUNPRO_P "0"
231# elif (__SUNPRO_VERSION & 0xf) == 0x1
232# define SUNPRO_P "1"
233# elif (__SUNPRO_VERSION & 0xf) == 0x2
234# define SUNPRO_P "2"
235# elif (__SUNPRO_VERSION & 0xf) == 0x3
236# define SUNPRO_P "3"
237# elif (__SUNPRO_VERSION & 0xf) == 0x4
238# define SUNPRO_P "4"
239# elif (__SUNPRO_VERSION & 0xf) == 0x5
240# define SUNPRO_P "5"
241# elif (__SUNPRO_VERSION & 0xf) == 0x6
242# define SUNPRO_P "6"
243# elif (__SUNPRO_VERSION & 0xf) == 0x7
244# define SUNPRO_P "7"
245# elif (__SUNPRO_VERSION & 0xf) == 0x8
246# define SUNPRO_P "8"
247# elif (__SUNPRO_VERSION & 0xf) == 0x9
248# define SUNPRO_P "9"
249# elif (__SUNPRO_VERSION & 0xf) == 0xa
250# define SUNPRO_P "10"
251# elif (__SUNPRO_VERSION & 0xf) == 0xb
252# define SUNPRO_P "11"
253# elif (__SUNPRO_VERSION & 0xf) == 0xc
254# define SUNPRO_P "12"
255# elif (__SUNPRO_VERSION & 0xf) == 0xd
256# define SUNPRO_P "13"
257# elif (__SUNPRO_VERSION & 0xf) == 0xe
258# define SUNPRO_P "14"
259# else
260# define SUNPRO_P "15"
261# endif
262 /* the macro is defined in such an ugly way because the C preprocessor
263 * cannot stringify the result of an arithmetic expression */
264# define C_COMPILER_VERSION "Sun Workshop Pro " SUNPRO_V "." SUNPRO_R "." SUNPRO_P
265# else
266 /* the version number is in unknown format */
267# define C_COMPILER_VERSION "Sun Workshop Pro unknown version"
268# endif
269#else
270 /* the C/C++ compiler is unknown */
271# define C_COMPILER_VERSION "unknown C/C++ compiler"
272#endif
273
274/* Copyright message */
d44e3c4f 275#define COPYRIGHT_STRING COMMENT_PREFIX "Copyright (c) 2000-2016 Ericsson Telecom AB"
970ed795
EL
276
277/* For prefixing the above messages. Default value: empty string. */
278#define COMMENT_PREFIX
279
280#endif
This page took 0.035482 seconds and 5 git commands to generate.