-
Notifications
You must be signed in to change notification settings - Fork 14
/
Copy pathcompiler.inc
353 lines (308 loc) · 8.88 KB
/
compiler.inc
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
235
236
237
238
239
240
241
242
243
244
245
246
247
248
249
250
251
252
253
254
255
256
257
258
259
260
261
262
263
264
265
266
267
268
269
270
271
272
273
274
275
276
277
278
279
280
281
282
283
284
285
286
287
288
289
290
291
292
293
294
295
296
297
298
299
300
301
302
303
304
305
306
307
308
309
310
311
312
313
314
315
316
317
318
319
320
321
322
323
324
325
326
327
328
329
330
331
332
333
334
335
336
337
338
339
340
341
342
343
344
345
346
347
348
349
350
351
352
// http://docwiki.embarcadero.com/RADStudio/Rio/en/Compiler_Versions
{$DEFINE DELPHI_XX}
{$IFDEF FPC}
{$MODE DELPHI}
{$UNDEF DELPHI_XX}
// FPC is 100% compatible with D6
{$DEFINE DELPHI6}
{$ENDIF}
// Delphi 1
{$IFDEF VER80}
{$DEFINE DELPHI1}
{$UNDEF DELPHI_XX}
{$ENDIF}
// Delphi 2
{$IFDEF VER90}
{$DEFINE DELPHI2}
{$UNDEF DELPHI_XX}
{$ENDIF}
// Delphi 3
{$IFDEF VER100}
{$DEFINE DELPHI3}
{$UNDEF DELPHI_XX}
{$ENDIF}
// Delphi 4
{$IFDEF VER120}
{$DEFINE DELPHI4}
{$UNDEF DELPHI_XX}
{$ENDIF}
// Delphi 5
{$IFDEF VER130}
{$DEFINE DELPHI5}
{$UNDEF DELPHI_XX}
{$ENDIF}
// Delphi 6
{$IFDEF VER140}
{$DEFINE DELPHI6}
{$UNDEF DELPHI_XX}
{$ENDIF}
// Delphi 7
{$IFDEF VER150}
{$DEFINE DELPHI7}
{$UNDEF DELPHI_XX}
{$ENDIF}
// Delphi 8 for .Net
{$IFDEF VER160}
{$DEFINE DELPHI8}
{$UNDEF DELPHI_XX}
{$ENDIF}
// Delphi 2005 (Win32/.Net)
{$IFDEF VER170}
{$DEFINE DELPHI9}
{$DEFINE DELPHI2005}
{$UNDEF DELPHI_XX}
{$ENDIF}
// Delphi 2007
// Delphi 2006 (Win32/.Net)
{$IFDEF VER180}
{$IFDEF VER185}
{$DEFINE DELPHI11}
{$DEFINE DELPHI2007}
{$ELSE}
{$DEFINE DELPHI10}
{$DEFINE DELPHI2006}
{$ENDIF}
{$UNDEF DELPHI_XX}
{$ENDIF}
// Delphi 2007 for .Net *
{$IFDEF VER190}
{$DEFINE DELPHI11}
{$DEFINE DELPHI2007}
{$UNDEF DELPHI_XX}
{$ENDIF VER190}
// Delphi 2009
{$IFDEF VER200}
{$DEFINE DELPHI12}
{$DEFINE DELPHI2009}
{$UNDEF DELPHI_XX}
{$ENDIF VER200}
// Delphi 2010
{$IFDEF VER210}
{$DEFINE DELPHI14}
{$DEFINE DELPHI2010}
{$UNDEF DELPHI_XX}
{$ENDIF VER210}
// Delphi XE
{$IFDEF VER220}
{$DEFINE DELPHI15}
{$DEFINE DELPHI_XE}
{$UNDEF DELPHI_XX}
{$ENDIF VER220}
// Delphi XE2 (Win32/Win64/OSX)
{$IFDEF VER230}
{$DEFINE DELPHI16}
{$DEFINE DELPHI_XE2}
{$UNDEF DELPHI_XX}
{$ENDIF VER220}
// Delphi XE3 (Win32/Win64/OSX)
{$IFDEF VER240}
{$DEFINE DELPHI17}
{$DEFINE DELPHI_XE3}
{$UNDEF DELPHI_XX}
{$ENDIF}
// Delphi XE4 (Win32/Win64/OSX/iOS)
{$IFDEF VER250}
{$DEFINE DELPHI18}
{$DEFINE DELPHI_XE4}
{$UNDEF DELPHI_XX}
{$ENDIF}
// Delphi XE5 (Win32/Win64/OSX/iOS/Android)
{$IFDEF VER260}
{$DEFINE DELPHI19}
{$DEFINE DELPHI_XE5}
{$UNDEF DELPHI_XX}
{$ENDIF}
// Delphi XE6 (Win32/Win64/OSX/iOS/Android)
{$IFDEF VER270}
{$DEFINE DELPHI20}
{$DEFINE DELPHI_XE6}
{$UNDEF DELPHI_XX}
{$ENDIF}
// Delphi XE7 (Win32/Win64/OSX/iOS/Android)
{$IFDEF VER280}
{$DEFINE DELPHI21}
{$DEFINE DELPHI_XE7}
{$UNDEF DELPHI_XX}
{$ENDIF}
// Delphi XE8 (Win32/Win64/OSX/iOS32/iOS64/Android)
{$IFDEF VER290}
{$DEFINE DELPHI22}
{$DEFINE DELPHI_XE8}
{$UNDEF DELPHI_XX}
{$ENDIF}
// Delphi Seattle (Win32/Win64/OSX/iOS32/iOS64/Android)
{$IFDEF VER300}
{$DEFINE DELPHI23}
{$DEFINE DELPHI_10_0}
{$DEFINE DELPHI_SEATTLE}
{$UNDEF DELPHI_XX}
{$ENDIF}
// Delphi Berlin (Win32/Win64/OSX/iOS32/iOS64/Android)
{$IFDEF VER310}
{$DEFINE DELPHI24}
{$DEFINE DELPHI_10_1}
{$DEFINE DELPHI_BERLIN}
{$UNDEF DELPHI_XX}
{$ENDIF}
// Delphi Tokyo (Win32/Win64/OSX/iOS32/iOS64/Android/Linux64)
{$IFDEF VER320}
{$DEFINE DELPHI25}
{$DEFINE DELPHI_10_2}
{$DEFINE DELPHI_TOKYO}
{$UNDEF DELPHI_XX}
{$ENDIF}
// Delphi Rio (Win32/Win64/OSX/iOS32/iOS64/Android/Android64/Linux64)
{$IFDEF VER330}
{$DEFINE DELPHI26}
{$DEFINE DELPHI_10_3}
{$DEFINE DELPHI_RIO}
{$UNDEF DELPHI_XX}
{$ENDIF}
// Delphi Sydney (Win32/Win64/OSX64/iOS32/iOS64/Android/Android64/Linux64)
{$IFDEF VER340}
{$DEFINE DELPHI27}
{$DEFINE DELPHI_10_4}
{$DEFINE DELPHI_SYDNEY}
{$UNDEF DELPHI_XX}
{$ENDIF}
// Delphi Alexandria (Win32/Win64/OSX64/iOS64/Android/Android64/Linux64)
{$IFDEF VER350}
{$DEFINE DELPHI28}
{$DEFINE DELPHI_11}
{$DEFINE DELPHI_ALEXANDRIA}
{$UNDEF DELPHI_XX}
{$ENDIF}
{$IFDEF DELPHI_XX}
ERROR: Unknown compiler please update compiler.inc file
{$ENDIF}
{$IFDEF DELPHI28} {$DEFINE DELPHI28_UP} {$ENDIF}
{$IFDEF DELPHI27} {$DEFINE DELPHI27_UP} {$ENDIF}
{$IFDEF DELPHI26} {$DEFINE DELPHI26_UP} {$ENDIF}
{$IFDEF DELPHI25} {$DEFINE DELPHI25_UP} {$ENDIF}
{$IFDEF DELPHI24} {$DEFINE DELPHI24_UP} {$ENDIF}
{$IFDEF DELPHI23} {$DEFINE DELPHI23_UP} {$ENDIF}
{$IFDEF DELPHI22} {$DEFINE DELPHI22_UP} {$ENDIF}
{$IFDEF DELPHI21} {$DEFINE DELPHI21_UP} {$ENDIF}
{$IFDEF DELPHI20} {$DEFINE DELPHI20_UP} {$ENDIF}
{$IFDEF DELPHI19} {$DEFINE DELPHI19_UP} {$ENDIF}
{$IFDEF DELPHI18} {$DEFINE DELPHI18_UP} {$ENDIF}
{$IFDEF DELPHI17} {$DEFINE DELPHI17_UP} {$ENDIF}
{$IFDEF DELPHI16} {$DEFINE DELPHI16_UP} {$ENDIF}
{$IFDEF DELPHI15} {$DEFINE DELPHI15_UP} {$ENDIF}
{$IFDEF DELPHI14} {$DEFINE DELPHI14_UP} {$ENDIF}
{$IFDEF DELPHI12} {$DEFINE DELPHI12_UP} {$ENDIF}
{$IFDEF DELPHI11} {$DEFINE DELPHI11_UP} {$ENDIF}
{$IFDEF DELPHI10} {$DEFINE DELPHI10_UP} {$ENDIF}
{$IFDEF DELPHI9} {$DEFINE DELPHI9_UP} {$ENDIF}
{$IFDEF DELPHI8} {$DEFINE DELPHI8_UP} {$ENDIF}
{$IFDEF DELPHI7} {$DEFINE DELPHI7_UP} {$ENDIF}
{$IFDEF DELPHI6} {$DEFINE DELPHI6_UP} {$ENDIF}
{$IFDEF DELPHI5} {$DEFINE DELPHI5_UP} {$ENDIF}
{$IFDEF DELPHI4} {$DEFINE DELPHI4_UP} {$ENDIF}
{$IFDEF DELPHI3} {$DEFINE DELPHI3_UP} {$ENDIF}
{$IFDEF DELPHI2} {$DEFINE DELPHI2_UP} {$ENDIF}
{$IFDEF DELPHI1} {$DEFINE DELPHI1_UP} {$ENDIF}
{$IFDEF DELPHI28_UP} {$DEFINE DELPHI27_UP} {$ENDIF}
{$IFDEF DELPHI27_UP} {$DEFINE DELPHI26_UP} {$ENDIF}
{$IFDEF DELPHI26_UP} {$DEFINE DELPHI25_UP} {$ENDIF}
{$IFDEF DELPHI25_UP} {$DEFINE DELPHI24_UP} {$ENDIF}
{$IFDEF DELPHI24_UP} {$DEFINE DELPHI23_UP} {$ENDIF}
{$IFDEF DELPHI23_UP} {$DEFINE DELPHI22_UP} {$ENDIF}
{$IFDEF DELPHI22_UP} {$DEFINE DELPHI21_UP} {$ENDIF}
{$IFDEF DELPHI21_UP} {$DEFINE DELPHI20_UP} {$ENDIF}
{$IFDEF DELPHI20_UP} {$DEFINE DELPHI19_UP} {$ENDIF}
{$IFDEF DELPHI19_UP} {$DEFINE DELPHI18_UP} {$ENDIF}
{$IFDEF DELPHI18_UP} {$DEFINE DELPHI17_UP} {$ENDIF}
{$IFDEF DELPHI17_UP} {$DEFINE DELPHI16_UP} {$ENDIF}
{$IFDEF DELPHI16_UP} {$DEFINE DELPHI15_UP} {$ENDIF}
{$IFDEF DELPHI15_UP} {$DEFINE DELPHI14_UP} {$ENDIF}
{$IFDEF DELPHI14_UP} {$DEFINE DELPHI13_UP} {$ENDIF}
{$IFDEF DELPHI13_UP} {$DEFINE DELPHI12_UP} {$ENDIF}
{$IFDEF DELPHI12_UP} {$DEFINE DELPHI11_UP} {$ENDIF}
{$IFDEF DELPHI11_UP} {$DEFINE DELPHI10_UP} {$ENDIF}
{$IFDEF DELPHI10_UP} {$DEFINE DELPHI9_UP} {$ENDIF}
{$IFDEF DELPHI9_UP} {$DEFINE DELPHI8_UP} {$ENDIF}
{$IFDEF DELPHI8_UP} {$DEFINE DELPHI7_UP} {$ENDIF}
{$IFDEF DELPHI7_UP} {$DEFINE DELPHI6_UP} {$ENDIF}
{$IFDEF DELPHI6_UP} {$DEFINE DELPHI5_UP} {$ENDIF}
{$IFDEF DELPHI5_UP} {$DEFINE DELPHI4_UP} {$ENDIF}
{$IFDEF DELPHI4_UP} {$DEFINE DELPHI3_UP} {$ENDIF}
{$IFDEF DELPHI3_UP} {$DEFINE DELPHI2_UP} {$ENDIF}
{$IFDEF DELPHI2_UP} {$DEFINE DELPHI1_UP} {$ENDIF}
{$IFDEF DELPHI28_UP} {$DEFINE DELPHI_11_UP} {$DEFINE DELPHI_ALEXANDRIA_UP} {$ENDIF}
{$IFDEF DELPHI27_UP} {$DEFINE DELPHI_10_4_UP} {$DEFINE DELPHI_SYDNEY_UP} {$ENDIF}
{$IFDEF DELPHI26_UP} {$DEFINE DELPHI_10_3_UP} {$DEFINE DELPHI_RIO_UP} {$ENDIF}
{$IFDEF DELPHI25_UP} {$DEFINE DELPHI_10_2_UP} {$DEFINE DELPHI_TOKYO_UP} {$ENDIF}
{$IFDEF DELPHI24_UP} {$DEFINE DELPHI_10_1_UP} {$DEFINE DELPHI_BERLIN_UP} {$ENDIF}
{$IFDEF DELPHI23_UP} {$DEFINE DELPHI_10_0_UP} {$DEFINE DELPHI_SEATTLE_UP} {$ENDIF}
{$IFDEF DELPHI22_UP} {$DEFINE DELPHI_XE8_UP} {$ENDIF}
{$IFDEF DELPHI21_UP} {$DEFINE DELPHI_XE7_UP} {$ENDIF}
{$IFDEF DELPHI20_UP} {$DEFINE DELPHI_XE6_UP} {$ENDIF}
{$IFDEF DELPHI19_UP} {$DEFINE DELPHI_XE5_UP} {$ENDIF}
{$IFDEF DELPHI18_UP} {$DEFINE DELPHI_XE4_UP} {$ENDIF}
{$IFDEF DELPHI17_UP} {$DEFINE DELPHI_XE3_UP} {$ENDIF}
{$IFDEF DELPHI16_UP} {$DEFINE DELPHI_XE2_UP} {$ENDIF}
{$IFDEF DELPHI15_UP} {$DEFINE DELPHI_XE_UP} {$ENDIF}
{$IFDEF DELPHI14_UP} {$DEFINE DELPHI2010_UP} {$ENDIF}
{$IFDEF DELPHI12_UP} {$DEFINE DELPHI2009_UP} {$ENDIF}
{$IFDEF DELPHI11_UP} {$DEFINE DELPHI2007_UP} {$ENDIF}
{$IFDEF DELPHI10_UP} {$DEFINE DELPHI2006_UP} {$ENDIF}
{$IFDEF DELPHI9_UP} {$DEFINE DELPHI2005_UP} {$ENDIF}
{$IFDEF DELPHI2_UP} {$DEFINE SUPPORTS_WIDECHAR} {$ENDIF}
{$IFDEF DELPHI3_UP} {$DEFINE SUPPORTS_WIDESTRING} {$ENDIF}
{$IFDEF DELPHI12_UP} {$DEFINE SUPPORTS_UNICODE} {$ENDIF}
{$IFDEF FPC}
{$DEFINE HAS_ENUM_ORDINALITY}
{$ENDIF}
{$IFDEF DELPHI7_UP}
{$DEFINE HAS_ENUM_ORDINALITY}
{$IFNDEF FPC}
{$DEFINE HAS_ParentBackground}
{$ENDIF}
{$ENDIF}
{$IFDEF DELPHI6_UP}
{$DEFINE HAS_A4}
{$DEFINE HAS_Z4}
{$DEFINE HAS_PATH_DELIM}
{$DEFINE HAS_PPANSICHAR}
{$DEFINE HAS_UTF8_ENCODE_DECODE}
{$DEFINE HAS_WS_EX_TRANSPARENT}
{$DEFINE HAS_OnContextPopup}
{$DEFINE HAS_THANDLE}
{$DEFINE HAS_FILE_EXISTS}
{$DEFINE HAS_DIRECTORY_EXISTS}
{$DEFINE HAS_SYNCOBJS}
{$DEFINE HAS_EXCEPTION_MASK}
{$ENDIF}
{$IFDEF MACOS}
{$ELSE}
{$IFDEF UNIX}
{$ELSE}
{$IFNDEF MSWINDOWS}
{$IFDEF WIN32}
{$DEFINE MSWINDOWS}
{$ENDIF}
{$ENDIF}
{$ENDIF}
{$ENDIF}
// now FPC not have CPUX64 and CPUX32, but have CPU64 and CPU32
{$IFDEF FPC}
{$IFDEF CPU64}{$IFNDEF CPUX64}{$DEFINE CPUX64}{$ENDIF}{$ENDIF}
{$IFDEF CPU32}{$IFNDEF CPUX32}{$DEFINE CPUX32}{$ENDIF}{$ENDIF}
{$ENDIF}
// old versions of delphi not have CPUX32
{$IFDEF WIN32}
{$IFNDEF CPUX64}
{$IFNDEF CPUX32}{$DEFINE CPUX32}{$ENDIF}
{$ENDIF}
{$ENDIF}
{$IFDEF CPUX64}
{$A8}
{$ELSE}
{$IFDEF HAS_A4}
{$A4}
{$ELSE}
{$A+}
{$ENDIF}
{$ENDIF}
{$IFDEF HAS_Z4}{$Z4}{$ELSE}{$Z+}{$ENDIF}