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