IdCompilerDefines.inc 28 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322323324325326327328329330331332333334335336337338339340341342343344345346347348349350351352353354355356357358359360361362363364365366367368369370371372373374375376377378379380381382383384385386387388389390391392393394395396397398399400401402403404405406407408409410411412413414415416417418419420421422423424425426427428429430431432433434435436437438439440441442443444445446447448449450451452453454455456457458459460461462463464465466467468469470471472473474475476477478479480481482483484485486487488489490491492493494495496497498499500501502503504505506507508509510511512513514515516517518519520521522523524525526527528529530531532533534535536537538539540541542543544545546547548549550551552553554555556557558559560561562563564565566567568569570571572573574575576577578579580581582583584585586587588589590591592593594595596597598599600601602603604605606607608609610611612613614615616617618619620621622623624625626627628629630631632633634635636637638639640641642643644645646647648649650651652653654655656657658659660661662663664665666667668669670671672673674675676677678679680681682683684685686687688689690691692693694695696697698699700701702703704705706707708709710711712713714715716717718719720721722723724725726727728729730731732733734735736737738739740741742743744745746747748749750751752753754755756757758759760761762763764765766767768769770771772773774775776777778779780781782783784785786787788789790791792793794795796797798799800801802803804805806807808809810811812813814815816817818819820821822823824825826827828829830831832833834835836837838839840841842843844845846847848849850851852853854855856857858859860861862863864865866867868869870871872873874875876877878879880881882883884885886887888889890891892893894895896897898899900901902903904905906907908909910911912913914915916917918919920921922923924925926927928929930931932933934935936937938939940941942943944945946947948949950951952953954955956957958959960961962963964965966967968969970971972973974975976977978979980981982983984985986987988989990991992993994995996997998999100010011002100310041005100610071008100910101011101210131014101510161017101810191020102110221023102410251026102710281029103010311032103310341035103610371038103910401041104210431044104510461047104810491050105110521053105410551056105710581059106010611062106310641065106610671068106910701071107210731074107510761077107810791080108110821083108410851086108710881089109010911092109310941095109610971098109911001101110211031104110511061107110811091110111111121113111411151116111711181119112011211122112311241125112611271128112911301131113211331134113511361137113811391140114111421143114411451146114711481149115011511152115311541155115611571158115911601161116211631164116511661167116811691170117111721173117411751176
  1. {$IFDEF CONDITIONALEXPRESSIONS}
  2. // Must be at the top...
  3. {$IF CompilerVersion >= 24.0}
  4. {$LEGACYIFEND ON}
  5. {$IFEND}
  6. {$ENDIF}
  7. // General
  8. // Make this $DEFINE to use the 16 color icons required by Borland
  9. // or DEFINE to use the 256 color Indy versions
  10. {.$DEFINE Borland}
  11. // When generating C++Builder output files, certain workarounds to compiler
  12. // problems need to be enabled! When invoking DCC on the command-line, use
  13. // the -DBCB parameter. When invoking MSBUILD, include the DCC_Define="BCB"
  14. // attribute in the /p parameter.
  15. {$IFDEF BCB}
  16. {$DEFINE CBUILDER}
  17. {$ELSE}
  18. {$DEFINE DELPHI}
  19. {$ENDIF}
  20. {$UNDEF STATICLOAD_OPENSSL}
  21. // Make sure the following are $DEFINE'd only for Delphi/C++Builder 2009 onwards
  22. // as specified further below. The VCL is fully Unicode, where the 'String'
  23. // type maps to System.UnicodeString, not System.AnsiString anymore
  24. {$UNDEF STRING_IS_UNICODE}
  25. {$UNDEF STRING_IS_ANSI}
  26. // Make sure the following are $DEFINE'd only for suitable environments
  27. // as specified further below. Delphi/C++Builder Mobile/NextGen compilers
  28. // do not support Ansi data types anymore, and is moving away from raw
  29. // pointers as well.
  30. //
  31. // UPDATE: in Delphi/C++Builder 10.4, all Ansi types are supported again on
  32. // all platforms, including the mobile compilers.
  33. {$DEFINE HAS_PAnsiChar}
  34. {$UNDEF NO_ANSI_TYPES}
  35. // Make sure the following are $DEFINE'd only for suitable environments
  36. // as specified further below. Delphi/C++Builder Mobile/NextGen compilers
  37. // use ARC for TObject life time management.
  38. //
  39. // UPDATE: ARC for TObject lifetime management has been removed in
  40. // Delphi/C++Builder 10.4 mobile compilers. All platforms now use a single
  41. // unified memory management model!
  42. {$UNDEF USE_MARSHALLED_PTRS}
  43. {$UNDEF USE_OBJECT_ARC}
  44. //Define for Delphi cross-compiler targetting Posix
  45. {$UNDEF USE_VCL_POSIX}
  46. // detect compiler versions
  47. {$IFNDEF FPC}
  48. // TODO: to detect features in Delphi/C++Builder v6 and later, use CompilerVersion
  49. // and RTLVersion constants instead of VERXXX defines. We still support v5, which
  50. // does not have such constants.
  51. // Delphi 4
  52. {$IFDEF VER120}
  53. {$DEFINE DCC}
  54. {$DEFINE VCL_40}
  55. {$DEFINE DELPHI_4}
  56. {$ENDIF}
  57. // C++Builder 4
  58. {$IFDEF VER125}
  59. {$DEFINE DCC}
  60. {$DEFINE VCL_40}
  61. {$DEFINE CBUILDER_4}
  62. {$ENDIF}
  63. // Delphi & C++Builder 5
  64. {$IFDEF VER130}
  65. {$DEFINE DCC}
  66. {$DEFINE VCL_50}
  67. {$IFDEF CBUILDER}
  68. {$DEFINE CBUILDER_5}
  69. {$ELSE}
  70. {$DEFINE DELPHI_5}
  71. {$ENDIF}
  72. {$ENDIF}
  73. //Delphi & C++Builder 6
  74. {$IFDEF VER140}
  75. {$DEFINE DCC}
  76. {$DEFINE VCL_60}
  77. {$IFDEF CBUILDER}
  78. {$DEFINE CBUILDER_6}
  79. {$ELSE}
  80. {$DEFINE DELPHI_6}
  81. {$ENDIF}
  82. {$ENDIF}
  83. //Delphi 7
  84. {$IFDEF VER150}
  85. {$DEFINE DCC}
  86. {$DEFINE VCL_70}
  87. {$DEFINE DELPHI_7} // there was no C++ Builder 7
  88. {$ENDIF}
  89. //Delphi 8
  90. {$IFDEF VER160}
  91. {$DEFINE DCC}
  92. {$DEFINE VCL_80}
  93. {$DEFINE DELPHI_8} // there was no C++ Builder 8
  94. {$ENDIF}
  95. //Delphi 2005
  96. {$IFDEF VER170}
  97. {$DEFINE DCC}
  98. {$DEFINE VCL_2005}
  99. {$DEFINE DELPHI_2005} // there was no C++Builder 2005
  100. {$ENDIF}
  101. // NOTE: CodeGear decided to make Highlander be a non-breaking release
  102. // (no interface changes, thus fully backwards compatible without any
  103. // end user code changes), so VER180 applies to both BDS 2006 and
  104. // Highlander prior to the release of RAD Studio 2007. Use VER185 to
  105. // identify Highlanger specifically.
  106. //Delphi & C++Builder 2006
  107. //Delphi & C++Builder 2007 (Highlander)
  108. {$IFDEF VER180}
  109. {$DEFINE DCC}
  110. {$DEFINE VCL_2006}
  111. {$IFDEF CBUILDER}
  112. {$DEFINE CBUILDER_2006}
  113. {$ELSE}
  114. {$DEFINE DELPHI_2006}
  115. {$ENDIF}
  116. {$ENDIF}
  117. //Delphi & C++Builder 2007 (Highlander)
  118. {$IFDEF VER185}
  119. {$DEFINE DCC}
  120. {$UNDEF VCL_2006}
  121. {$DEFINE VCL_2007}
  122. {$IFDEF CBUILDER}
  123. {$UNDEF CBUILDER_2006}
  124. {$DEFINE CBUILDER_2007}
  125. {$ELSE}
  126. {$UNDEF DELPHI_2006}
  127. {$DEFINE DELPHI_2007}
  128. {$ENDIF}
  129. {$ENDIF}
  130. // BDS 2007 NET personality uses VER190 instead of 185.
  131. //Delphi .NET 2007
  132. {$IFDEF VER190}
  133. {$DEFINE DCC}
  134. {$IFDEF CIL}
  135. //Delphi 2007
  136. {$DEFINE VCL_2007}
  137. {$DEFINE DELPHI_2007}
  138. {$ENDIF}
  139. {$ENDIF}
  140. //Delphi & C++Builder 2009 (Tiburon)
  141. {$IFDEF VER200}
  142. {$DEFINE DCC}
  143. {$DEFINE VCL_2009}
  144. {$IFDEF CBUILDER}
  145. {$DEFINE CBUILDER_2009}
  146. {$ELSE}
  147. {$DEFINE DELPHI_2009}
  148. {$ENDIF}
  149. {$ENDIF}
  150. //Delphi & C++Builder 2010 (Weaver)
  151. {$IFDEF VER210}
  152. {$DEFINE DCC}
  153. {$DEFINE VCL_2010}
  154. {$IFDEF CBUILDER}
  155. {$DEFINE CBUILDER_2010}
  156. {$ELSE}
  157. {$DEFINE DELPHI_2010}
  158. {$ENDIF}
  159. {$ENDIF}
  160. //Delphi & C++Builder XE (Fulcrum)
  161. {$IFDEF VER220}
  162. //REMOVE DCC DEFINE after the next Fulcrum beta.
  163. //It will be defined there.
  164. {$IFNDEF DCC}
  165. {$DEFINE DCC}
  166. {$ENDIF}
  167. {$DEFINE VCL_XE}
  168. {$IFDEF CBUILDER}
  169. {$DEFINE CBUILDER_XE}
  170. {$ELSE}
  171. {$DEFINE DELPHI_XE}
  172. {$ENDIF}
  173. {$ENDIF}
  174. // DCC is now defined by the Delphi compiler starting in XE2
  175. //Delphi & CBuilder XE2 (Pulsar)
  176. {$IFDEF VER230}
  177. {$DEFINE VCL_XE2}
  178. {$IFDEF CBUILDER}
  179. {$DEFINE CBUILDER_XE2}
  180. {$ELSE}
  181. {$DEFINE DELPHI_XE2}
  182. {$ENDIF}
  183. {$ENDIF}
  184. //Delphi & CBuilder XE3 (Waterdragon)
  185. //Delphi & CBuilder XE3.5 (Quintessence - early betas only)
  186. {$IFDEF VER240}
  187. {$DEFINE VCL_XE3}
  188. {$IFDEF CBUILDER}
  189. {$DEFINE CBUILDER_XE3}
  190. {$ELSE}
  191. {$DEFINE DELPHI_XE3}
  192. {$ENDIF}
  193. {$ENDIF}
  194. //Delphi & CBuilder XE4 (Quintessence)
  195. {$IFDEF VER250}
  196. {$UNDEF VCL_XE3}
  197. {$DEFINE VCL_XE4}
  198. {$IFDEF CBUILDER}
  199. {$UNDEF CBUILDER_XE3}
  200. {$DEFINE CBUILDER_XE4}
  201. {$ELSE}
  202. {$UNDEF DELPHI_XE3}
  203. {$DEFINE DELPHI_XE4}
  204. {$ENDIF}
  205. {$ENDIF}
  206. //Delphi & CBuilder XE5 (Zephyr)
  207. {$IFDEF VER260}
  208. {$DEFINE VCL_XE5}
  209. {$IFDEF CBUILDER}
  210. {$DEFINE CBUILDER_XE5}
  211. {$ELSE}
  212. {$DEFINE DELPHI_XE5}
  213. {$ENDIF}
  214. {$ENDIF}
  215. //Delphi & CBuilder AppMethod
  216. //AppMethod is just XE5 for mobile only, VCL is removed
  217. {$IFDEF VER265}
  218. {$DEFINE VCL_XE5}
  219. {$IFDEF CBUILDER}
  220. {$DEFINE CBUILDER_XE5}
  221. {$ELSE}
  222. {$DEFINE DELPHI_XE5}
  223. {$ENDIF}
  224. {$ENDIF}
  225. //Delphi & CBuilder XE6 (Proteus)
  226. {$IFDEF VER270}
  227. {$DEFINE VCL_XE6}
  228. {$IFDEF CBUILDER}
  229. {$DEFINE CBUILDER_XE6}
  230. {$ELSE}
  231. {$DEFINE DELPHI_XE6}
  232. {$ENDIF}
  233. {$ENDIF}
  234. //Delphi & CBuilder XE7 (Carpathia)
  235. {$IFDEF VER280}
  236. {$DEFINE VCL_XE7}
  237. {$IFDEF CBUILDER}
  238. {$DEFINE CBUILDER_XE7}
  239. {$ELSE}
  240. {$DEFINE DELPHI_XE7}
  241. {$ENDIF}
  242. {$ENDIF}
  243. //Delphi & CBuilder XE8 (Elbrus)
  244. {$IFDEF VER290}
  245. {$DEFINE VCL_XE8}
  246. {$IFDEF CBUILDER}
  247. {$DEFINE CBUILDER_XE8}
  248. {$ELSE}
  249. {$DEFINE DELPHI_XE8}
  250. {$ENDIF}
  251. {$ENDIF}
  252. //Delphi & CBuilder 10.0 Seattle (Aitana)
  253. {$IFDEF VER300}
  254. {$DEFINE VCL_10_0}
  255. {$IFDEF CBUILDER}
  256. {$DEFINE CBUILDER_VCL_10_0}
  257. {$ELSE}
  258. {$DEFINE DELPHI_VCL_10_0}
  259. {$ENDIF}
  260. {$ENDIF}
  261. //Delphi & CBuilder 10.1 Berlin (BigBen)
  262. {$IFDEF VER310}
  263. {$DEFINE VCL_10_1}
  264. {$IFDEF CBUILDER}
  265. {$DEFINE CBUILDER_10_1}
  266. {$ELSE}
  267. {$DEFINE DELPHI_10_1}
  268. {$ENDIF}
  269. {$ENDIF}
  270. //Delphi & CBuilder 10.2 Tokyo (Godzilla)
  271. {$IFDEF VER320}
  272. {$DEFINE VCL_10_2}
  273. {$IFDEF CBUILDER}
  274. {$DEFINE CBUILDER_10_2}
  275. {$ELSE}
  276. {$DEFINE DELPHI_10_2}
  277. {$ENDIF}
  278. {$ENDIF}
  279. //Delphi & CBuilder 10.3 Rio (Carnival)
  280. {$IFDEF VER330}
  281. {$DEFINE VCL_10_3}
  282. {$IFDEF CBUILDER}
  283. {$DEFINE CBUILDER_10_3}
  284. {$ELSE}
  285. {$DEFINE DELPHI_10_3}
  286. {$ENDIF}
  287. {$ENDIF}
  288. //Delphi & CBuilder 10.4 Sydney (Denali)
  289. {$IFDEF VER340}
  290. {$DEFINE VCL_10_4}
  291. {$IFDEF CBUILDER}
  292. {$DEFINE CBUILDER_10_4}
  293. {$ELSE}
  294. {$DEFINE DELPHI_10_4}
  295. {$ENDIF}
  296. {$ENDIF}
  297. //Delphi & CBuilder 11.0 Alexandria (Olympus)
  298. {$IFDEF VER350}
  299. {$DEFINE VCL_11}
  300. {$IFDEF CBUILDER}
  301. {$DEFINE CBUILDER_11}
  302. {$ELSE}
  303. {$DEFINE DELPHI_11}
  304. {$ENDIF}
  305. {$ENDIF}
  306. //Delphi & CBuilder 12.0 Athens (Yukon)
  307. {$IFDEF VER360}
  308. {$DEFINE VCL_12}
  309. {$IFDEF CBUILDER}
  310. {$DEFINE CBUILDER_12}
  311. {$ELSE}
  312. {$DEFINE DELPHI_12}
  313. {$ENDIF}
  314. {$ENDIF}
  315. //Delphi & CBuilder 13.0+ (?)
  316. {$IFDEF CONDITIONALEXPRESSIONS}
  317. {$IF CompilerVersion >= 37}
  318. {$MESSAGE WARN 'Unknown compiler version detected! Assuming >= 13.x '}
  319. {$DEFINE VCL_UNKNOWN_VERSION}
  320. {$DEFINE VCL_13}
  321. {$IFDEF CBUILDER}
  322. {$DEFINE CBUILDER_13}
  323. {$ELSE}
  324. {$DEFINE DELPHI_13}
  325. {$ENDIF}
  326. {$IFEND}
  327. {$ENDIF}
  328. // Kylix
  329. //
  330. //Important: Don't use CompilerVersion here as IF's are evaluated before
  331. //IFDEF's and Kylix 1 does not have CompilerVersion defined at all.
  332. {$IFDEF LINUX}
  333. {$DEFINE UNIX}
  334. {$IFDEF CONDITIONALEXPRESSIONS}
  335. {$IF (RTLVersion >= 14.0) and (RTLVersion <= 14.5) }
  336. {$DEFINE KYLIX}
  337. {$IF RTLVersion = 14.5}
  338. {$DEFINE KYLIX_3}
  339. {$ELSEIF RTLVersion >= 14.2}
  340. {$DEFINE KYLIX_2}
  341. {$ELSE}
  342. {$DEFINE KYLIX_1}
  343. {$IFEND}
  344. {$IFEND}
  345. {$ENDIF}
  346. {$ENDIF}
  347. {$ENDIF}
  348. // Delphi.NET
  349. // Covers D8+
  350. {$IFDEF CIL}
  351. // Platform specific conditional. Used for platform specific code.
  352. {$DEFINE DOTNET}
  353. {$DEFINE STRING_IS_UNICODE}
  354. {$ENDIF}
  355. {$IFDEF KYLIX}
  356. {$DEFINE VCL_60}
  357. {$DEFINE CPUI386}
  358. {$UNDEF USE_BASEUNIX}
  359. {$IFDEF KYLIX_3}
  360. {$DEFINE KYLIX_3_OR_ABOVE}
  361. {$ENDIF}
  362. {$IFDEF KYLIX_3_OR_ABOVE}
  363. {$DEFINE KYLIX_2_OR_ABOVE}
  364. {$ELSE}
  365. {$IFDEF KYLIX_2}
  366. {$DEFINE KYLIX_2_OR_ABOVE}
  367. {$ENDIF}
  368. {$ENDIF}
  369. {$IFDEF KYLIX_2_OR_ABOVE}
  370. {$DEFINE KYLIX_1_OR_ABOVE}
  371. {$ELSE}
  372. {$IFDEF KYLIX_1}
  373. {$DEFINE KYLIX_1_OR_ABOVE}
  374. {$ENDIF}
  375. {$ENDIF}
  376. {$IFNDEF KYLIX_3_OR_ABOVE}
  377. {$DEFINE KYLIXCOMPAT}
  378. {$ENDIF}
  379. {$ENDIF}
  380. // FPC (2+)
  381. {$IFDEF FPC}
  382. // TODO: In FreePascal 4.2.0+, a Delphi-like UnicodeString type is supported.
  383. // However, String/(P)Char do not map to UnicodeString/(P)WideChar unless
  384. // either {$MODE DelphiUnicode} or {$MODESWITCH UnicodeStrings} is used.
  385. // We should consider enabling one of them so Indy uses the same Unicode logic
  386. // in Delphi 2009+ and FreePascal 4.2.0+ and reduces IFDEFs (in particular,
  387. // STRING_UNICODE_MISMATCH, see further below). However, FreePascal's RTL
  388. // is largely not UnicodeString-enabled yet. Maybe we should enable
  389. // {$MODE DelphiUnicode} anyway, and then deal with any RTL function issues
  390. // on an as-needed basis...
  391. {$MODE Delphi}
  392. {$IFDEF FPC_2_7_1_OR_ABOVE}
  393. {.$MODE DelphiUnicode}
  394. {.$MODESWITCH UnicodeStrings}
  395. {.$CODEPAGE UTF8} // needed for Unicode string literals to work properly
  396. {$ENDIF}
  397. //note that we may need further defines for widget types depending on
  398. //what we do and what platforms we support in FPC.
  399. //I'll let Marco think about that one.
  400. {$IFDEF UNIX}
  401. {$DEFINE USE_BASEUNIX}
  402. {$IFDEF LINUX}
  403. //In Linux for I386, you can choose between a Kylix-libc API or
  404. //the standard RTL Unix API. Just pass -dKYLIXCOMPAT to the FPC compiler.
  405. //I will see what I can do about the Makefile.
  406. {$IFDEF KYLIXCOMPAT}
  407. {$IFDEF CPUI386}
  408. {$UNDEF USE_BASEUNIX}
  409. {$ENDIF}
  410. {$ENDIF}
  411. {$ENDIF}
  412. {$IFDEF USE_BASEUNIX}
  413. {$UNDEF KYLIXCOMPAT}
  414. {$ENDIF}
  415. {$ENDIF}
  416. // FPC_FULLVERSION was added in FPC 2.2.4
  417. // Have to use Defined() or else Delphi compiler chokes, since it
  418. // evaluates $IF statements before $IFDEF statements...
  419. {$MACRO ON} // must be on in order to use versioning macros
  420. {$IF DEFINED(FPC_FULLVERSION) AND (FPC_FULLVERSION >= 30101)}
  421. {$DEFINE FPC_3_1_1_OR_ABOVE}
  422. {$IFEND}
  423. {$IF DEFINED(FPC_FULLVERSION) AND (FPC_FULLVERSION >= 30000)}
  424. {$DEFINE FPC_3_0_0_OR_ABOVE}
  425. {$IFEND}
  426. {$IF DEFINED(FPC_FULLVERSION) AND (FPC_FULLVERSION >= 20701)}
  427. {$DEFINE FPC_2_7_1_OR_ABOVE}
  428. {$IFEND}
  429. {$IF DEFINED(FPC_FULLVERSION) AND (FPC_FULLVERSION >= 20604)}
  430. {$DEFINE FPC_2_6_4_OR_ABOVE}
  431. {$IFEND}
  432. {$IF DEFINED(FPC_FULLVERSION) AND (FPC_FULLVERSION >= 20602)}
  433. {$DEFINE FPC_2_6_2_OR_ABOVE}
  434. {$IFEND}
  435. {$IF DEFINED(FPC_FULLVERSION) AND (FPC_FULLVERSION >= 20600)}
  436. {$DEFINE FPC_2_6_0_OR_ABOVE}
  437. {$IFEND}
  438. {$IF DEFINED(FPC_FULLVERSION) AND (FPC_FULLVERSION >= 20404)}
  439. {$DEFINE FPC_2_4_4_OR_ABOVE}
  440. {$IFEND}
  441. {$IF DEFINED(FPC_FULLVERSION) AND (FPC_FULLVERSION >= 20402)}
  442. {$DEFINE FPC_2_4_2_OR_ABOVE}
  443. {$IFEND}
  444. {$IF DEFINED(FPC_FULLVERSION) AND (FPC_FULLVERSION >= 20400)}
  445. {$DEFINE FPC_2_4_0_OR_ABOVE}
  446. {$IFEND}
  447. {$IF DEFINED(FPC_FULLVERSION) AND (FPC_FULLVERSION >= 20204)}
  448. {$DEFINE FPC_2_2_4_OR_ABOVE}
  449. {$IFEND}
  450. {$IF DEFINED(FPC_FULLVERSION) AND (FPC_FULLVERSION >= 20202)}
  451. {$DEFINE FPC_2_2_2_OR_ABOVE}
  452. {$IFEND}
  453. {$IF DEFINED(FPC_FULLVERSION) AND (FPC_FULLVERSION >= 20105)}
  454. {$DEFINE FPC_2_1_5_OR_ABOVE}
  455. {$IFEND}
  456. // just in case
  457. {$IFDEF FPC_3_1_1}
  458. {$DEFINE FPC_3_1_1_OR_ABOVE}
  459. {$ENDIF}
  460. {$IFDEF FPC_3_0_0}
  461. {$DEFINE FPC_3_0_0_OR_ABOVE}
  462. {$ENDIF}
  463. {$IFDEF FPC_2_7_1}
  464. {$DEFINE FPC_2_7_1_OR_ABOVE}
  465. {$ENDIF}
  466. {$IFDEF FPC_2_6_4}
  467. {$DEFINE FPC_2_6_4_OR_ABOVE}
  468. {$ENDIF}
  469. {$IFDEF FPC_2_6_2}
  470. {$DEFINE FPC_2_6_2_OR_ABOVE}
  471. {$ENDIF}
  472. {$IFDEF FPC_2_6_0}
  473. {$DEFINE FPC_2_6_0_OR_ABOVE}
  474. {$ENDIF}
  475. {$IFDEF FPC_2_4_4}
  476. {$DEFINE FPC_2_4_4_OR_ABOVE}
  477. {$ENDIF}
  478. {$IFDEF FPC_2_4_2}
  479. {$DEFINE FPC_2_4_2_OR_ABOVE}
  480. {$ENDIF}
  481. {$IFDEF FPC_2_4_0}
  482. {$DEFINE FPC_2_4_0_OR_ABOVE}
  483. {$ENDIF}
  484. {$IFDEF FPC_2_2_4}
  485. {$DEFINE FPC_2_2_4_OR_ABOVE}
  486. {$ENDIF}
  487. {$IFDEF FPC_2_2_2}
  488. {$DEFINE FPC_2_2_2_OR_ABOVE}
  489. {$ENDIF}
  490. {$IFDEF FPC_2_1_5}
  491. {$DEFINE FPC_2_1_5_OR_ABOVE}
  492. {$ENDIF}
  493. {$IFDEF FPC_3_1_1_OR_ABOVE}
  494. {$DEFINE FPC_3_0_0_OR_ABOVE}
  495. {$ELSE}
  496. {$IFDEF FPC_3_0_0}
  497. {$DEFINE FPC_3_0_0_OR_ABOVE}
  498. {$ENDIF}
  499. {$ENDIF}
  500. {$IFDEF FPC_3_0_0_OR_ABOVE}
  501. {$DEFINE FPC_2_7_1_OR_ABOVE}
  502. {$ELSE}
  503. {$IFDEF FPC_2_7_1}
  504. {$DEFINE FPC_2_7_1_OR_ABOVE}
  505. {$ENDIF}
  506. {$ENDIF}
  507. {$IFDEF FPC_2_7_1_OR_ABOVE}
  508. {$DEFINE FPC_2_6_4_OR_ABOVE}
  509. {$ELSE}
  510. {$IFDEF FPC_2_6_4}
  511. {$DEFINE FPC_2_6_4_OR_ABOVE}
  512. {$ENDIF}
  513. {$ENDIF}
  514. {$IFDEF FPC_2_6_4_OR_ABOVE}
  515. {$DEFINE FPC_2_6_2_OR_ABOVE}
  516. {$ELSE}
  517. {$IFDEF FPC_2_6_2}
  518. {$DEFINE FPC_2_6_2_OR_ABOVE}
  519. {$ENDIF}
  520. {$ENDIF}
  521. {$IFDEF FPC_2_6_2_OR_ABOVE}
  522. {$DEFINE FPC_2_6_0_OR_ABOVE}
  523. {$ELSE}
  524. {$IFDEF FPC_2_6_0}
  525. {$DEFINE FPC_2_6_0_OR_ABOVE}
  526. {$ENDIF}
  527. {$ENDIF}
  528. {$IFDEF FPC_2_6_0_OR_ABOVE}
  529. {$DEFINE FPC_2_4_4_OR_ABOVE}
  530. {$ELSE}
  531. {$IFDEF FPC_2_4_4}
  532. {$DEFINE FPC_2_4_4_OR_ABOVE}
  533. {$ENDIF}
  534. {$ENDIF}
  535. {$IFDEF FPC_2_4_4_OR_ABOVE}
  536. {$DEFINE FPC_2_4_2_OR_ABOVE}
  537. {$ELSE}
  538. {$IFDEF FPC_2_4_2}
  539. {$DEFINE FPC_2_4_2_OR_ABOVE}
  540. {$ENDIF}
  541. {$ENDIF}
  542. {$IFDEF FPC_2_4_2_OR_ABOVE}
  543. {$DEFINE FPC_2_4_0_OR_ABOVE}
  544. {$ELSE}
  545. {$IFDEF FPC_2_4_0}
  546. {$DEFINE FPC_2_4_0_OR_ABOVE}
  547. {$ENDIF}
  548. {$ENDIF}
  549. {$IFDEF FPC_2_4_0_OR_ABOVE}
  550. {$DEFINE FPC_2_2_4_OR_ABOVE}
  551. {$ELSE}
  552. {$IFDEF FPC_2_2_4}
  553. {$DEFINE FPC_2_2_4_OR_ABOVE}
  554. {$ENDIF}
  555. {$ENDIF}
  556. {$IFDEF FPC_2_2_4_OR_ABOVE}
  557. {$DEFINE FPC_2_2_2_OR_ABOVE}
  558. {$ELSE}
  559. {$IFDEF FPC_2_2_2}
  560. {$DEFINE FPC_2_2_2_OR_ABOVE}
  561. {$ENDIF}
  562. {$ENDIF}
  563. {$IFDEF FPC_2_2_2_OR_ABOVE}
  564. {$DEFINE FPC_2_2_0_OR_ABOVE}
  565. {$ELSE}
  566. {$IFDEF VER2_2}
  567. {$DEFINE FPC_2_2_0_OR_ABOVE}
  568. {$ENDIF}
  569. {$ENDIF}
  570. {$IFDEF FPC_2_2_0_OR_ABOVE}
  571. {$DEFINE FPC_2_1_5_OR_ABOVE}
  572. {$ELSE}
  573. {$IFDEF FPC_2_1_5}
  574. {$DEFINE FPC_2_1_5_OR_ABOVE}
  575. {$ENDIF}
  576. {$ENDIF}
  577. {.$IFDEF FPC_2_7_1_OR_ABOVE}
  578. // support for RawByteString and UnicodeString
  579. {.$DEFINE VCL_2009}
  580. {.$DEFINE DELPHI_2009}
  581. {.$ELSE}
  582. {$DEFINE VCL_70}
  583. {$DEFINE DELPHI_7}
  584. {.$ENDIF}
  585. {$ENDIF}
  586. // end FPC
  587. {$IFDEF VCL_13}
  588. {$DEFINE VCL_13_OR_ABOVE}
  589. {$ENDIF}
  590. {$IFDEF VCL_13_OR_ABOVE}
  591. {$DEFINE VCL_12_OR_ABOVE}
  592. {$ELSE}
  593. {$IFDEF VCL_12}
  594. {$DEFINE VCL_12_OR_ABOVE}
  595. {$ENDIF}
  596. {$ENDIF}
  597. {$IFDEF VCL_12_OR_ABOVE}
  598. {$DEFINE VCL_11_OR_ABOVE}
  599. {$ELSE}
  600. {$IFDEF VCL_11}
  601. {$DEFINE VCL_11_OR_ABOVE}
  602. {$ENDIF}
  603. {$ENDIF}
  604. {$IFDEF VCL_11_OR_ABOVE}
  605. {$DEFINE VCL_10_4_OR_ABOVE}
  606. {$ELSE}
  607. {$IFDEF VCL_10_4}
  608. {$DEFINE VCL_10_4_OR_ABOVE}
  609. {$ENDIF}
  610. {$ENDIF}
  611. {$IFDEF VCL_10_4_OR_ABOVE}
  612. {$DEFINE VCL_10_3_OR_ABOVE}
  613. {$ELSE}
  614. {$IFDEF VCL_10_3}
  615. {$DEFINE VCL_10_3_OR_ABOVE}
  616. {$ENDIF}
  617. {$ENDIF}
  618. {$IFDEF VCL_10_3_OR_ABOVE}
  619. {$DEFINE VCL_10_2_OR_ABOVE}
  620. {$ELSE}
  621. {$IFDEF VCL_10_2}
  622. {$DEFINE VCL_10_2_OR_ABOVE}
  623. {$ENDIF}
  624. {$ENDIF}
  625. {$IFDEF VCL_10_2_OR_ABOVE}
  626. {$DEFINE VCL_10_1_OR_ABOVE}
  627. {$ELSE}
  628. {$IFDEF VCL_10_1}
  629. {$DEFINE VCL_10_1_OR_ABOVE}
  630. {$ENDIF}
  631. {$ENDIF}
  632. {$IFDEF VCL_10_1_OR_ABOVE}
  633. {$DEFINE VCL_10_0_OR_ABOVE}
  634. {$ELSE}
  635. {$IFDEF VCL_10_0}
  636. {$DEFINE VCL_10_0_OR_ABOVE}
  637. {$ENDIF}
  638. {$ENDIF}
  639. {$IFDEF VCL_10_0_OR_ABOVE}
  640. {$DEFINE VCL_XE8_OR_ABOVE}
  641. {$ELSE}
  642. {$IFDEF VCL_XE8}
  643. {$DEFINE VCL_XE8_OR_ABOVE}
  644. {$ENDIF}
  645. {$ENDIF}
  646. {$IFDEF VCL_XE8_OR_ABOVE}
  647. {$DEFINE VCL_XE7_OR_ABOVE}
  648. {$ELSE}
  649. {$IFDEF VCL_XE7}
  650. {$DEFINE VCL_XE7_OR_ABOVE}
  651. {$ENDIF}
  652. {$ENDIF}
  653. {$IFDEF VCL_XE7_OR_ABOVE}
  654. {$DEFINE VCL_XE6_OR_ABOVE}
  655. {$ELSE}
  656. {$IFDEF VCL_XE6}
  657. {$DEFINE VCL_XE6_OR_ABOVE}
  658. {$ENDIF}
  659. {$ENDIF}
  660. {$IFDEF VCL_XE6_OR_ABOVE}
  661. {$DEFINE VCL_XE5_OR_ABOVE}
  662. {$ELSE}
  663. {$IFDEF VCL_XE5}
  664. {$DEFINE VCL_XE5_OR_ABOVE}
  665. {$ENDIF}
  666. {$ENDIF}
  667. {$IFDEF VCL_XE5_OR_ABOVE}
  668. {$DEFINE VCL_XE4_OR_ABOVE}
  669. {$ELSE}
  670. {$IFDEF VCL_XE4}
  671. {$DEFINE VCL_XE4_OR_ABOVE}
  672. {$ENDIF}
  673. {$ENDIF}
  674. {$IFDEF VCL_XE4_OR_ABOVE}
  675. {$DEFINE VCL_XE3_OR_ABOVE}
  676. {$ELSE}
  677. {$IFDEF VCL_XE3}
  678. {$DEFINE VCL_XE3_OR_ABOVE}
  679. {$ENDIF}
  680. {$ENDIF}
  681. {$IFDEF VCL_XE3_OR_ABOVE}
  682. {$DEFINE VCL_XE2_OR_ABOVE}
  683. {$ELSE}
  684. {$IFDEF VCL_XE2}
  685. {$DEFINE VCL_XE2_OR_ABOVE}
  686. {$ENDIF}
  687. {$ENDIF}
  688. {$IFDEF VCL_XE2_OR_ABOVE}
  689. {$DEFINE VCL_XE_OR_ABOVE}
  690. {$ELSE}
  691. {$IFDEF VCL_XE}
  692. {$DEFINE VCL_XE_OR_ABOVE}
  693. {$ENDIF}
  694. {$ENDIF}
  695. {$IFDEF VCL_XE_OR_ABOVE}
  696. {$DEFINE VCL_2010_OR_ABOVE}
  697. {$ELSE}
  698. {$IFDEF VCL_2010}
  699. {$DEFINE VCL_2010_OR_ABOVE}
  700. {$ENDIF}
  701. {$ENDIF}
  702. {$IFDEF VCL_2010_OR_ABOVE}
  703. {$DEFINE VCL_2009_OR_ABOVE}
  704. {$ELSE}
  705. {$IFDEF VCL_2009}
  706. {$DEFINE VCL_2009_OR_ABOVE}
  707. {$ENDIF}
  708. {$ENDIF}
  709. {$IFDEF VCL_2009_OR_ABOVE}
  710. {$DEFINE VCL_2007_OR_ABOVE}
  711. {$ELSE}
  712. {$IFDEF VCL_2007}
  713. {$DEFINE VCL_2007_OR_ABOVE}
  714. {$ENDIF}
  715. {$ENDIF}
  716. {$IFDEF VCL_2007_OR_ABOVE}
  717. {$DEFINE VCL_2006_OR_ABOVE}
  718. {$ELSE}
  719. {$IFDEF VCL_2006}
  720. {$DEFINE VCL_2006_OR_ABOVE}
  721. {$ENDIF}
  722. {$ENDIF}
  723. {$IFDEF VCL_2006_OR_ABOVE}
  724. {$DEFINE VCL_2005_OR_ABOVE}
  725. {$ELSE}
  726. {$IFDEF VCL_2005}
  727. {$DEFINE VCL_2005_OR_ABOVE}
  728. {$ENDIF}
  729. {$ENDIF}
  730. {$IFDEF VCL_2005_OR_ABOVE}
  731. {$DEFINE VCL_8_OR_ABOVE}
  732. {$ELSE}
  733. {$IFDEF VCL_80}
  734. {$DEFINE VCL_8_OR_ABOVE}
  735. {$ENDIF}
  736. {$ENDIF}
  737. {$IFDEF VCL_8_OR_ABOVE}
  738. {$DEFINE VCL_7_OR_ABOVE}
  739. {$ELSE}
  740. {$IFDEF VCL_70}
  741. {$DEFINE VCL_7_OR_ABOVE}
  742. {$ENDIF}
  743. {$ENDIF}
  744. {$IFDEF VCL_7_OR_ABOVE}
  745. {$DEFINE VCL_6_OR_ABOVE}
  746. {$ELSE}
  747. {$IFDEF VCL_60}
  748. {$DEFINE VCL_6_OR_ABOVE}
  749. {$ENDIF}
  750. {$ENDIF}
  751. {$IFDEF VCL_6_OR_ABOVE}
  752. {$DEFINE VCL_5_OR_ABOVE}
  753. {$ELSE}
  754. {$IFDEF VCL_50}
  755. {$DEFINE VCL_5_OR_ABOVE}
  756. {$ENDIF}
  757. {$ENDIF}
  758. {$IFDEF VCL_5_OR_ABOVE}
  759. {$DEFINE VCL_4_OR_ABOVE}
  760. {$ELSE}
  761. {$IFDEF VCL_40}
  762. {$DEFINE VCL_4_OR_ABOVE}
  763. {$ENDIF}
  764. {$ENDIF}
  765. // Normalize Delphi compiler defines to match FPC for consistency:
  766. //
  767. // CPU32 - any 32-bit CPU
  768. // CPU64 - any 64-bit CPU
  769. // WINDOWS - any Windows platform (32-bit, 64-bit, CE)
  770. // WIN32 - Windows 32-bit
  771. // WIN64 - Windows 64-bit
  772. // WINCE - Windows CE
  773. //
  774. // Consult the "Free Pascal Programmer's Guide", Appendix G for the complete
  775. // list of defines that are used. Do not work on this unless you understand
  776. // what the FreePascal developers are doing. Not only do you have to
  777. // descriminate with operating systems, but also with chip architectures
  778. // are well.
  779. //
  780. // DCC Pulsar+ define the following values:
  781. // ASSEMBLER
  782. // DCC
  783. // CONDITIONALEXPRESSIONS
  784. // NATIVECODE
  785. // UNICODE
  786. // MACOS
  787. // MACOS32
  788. // MACOS64
  789. // MSWINDOWS
  790. // WIN32
  791. // WIN64
  792. // LINUX
  793. // POSIX
  794. // POSIX32
  795. // CPU386
  796. // CPUX86
  797. // CPUX64
  798. //
  799. // Kylix defines the following values:
  800. // LINUX
  801. // (others??)
  802. //
  803. {$IFNDEF FPC}
  804. // TODO: We need to use ENDIAN_BIG for big endian chip architectures,
  805. // such as 680x0, PowerPC, Sparc, and MIPS, once DCC supports them,
  806. // provided it does not already define its own ENDIAN values by then...
  807. {$DEFINE ENDIAN_LITTLE}
  808. {$IFNDEF VCL_6_OR_ABOVE}
  809. {$DEFINE MSWINDOWS}
  810. {$ENDIF}
  811. {$IFDEF MSWINDOWS}
  812. {$DEFINE WINDOWS}
  813. {$ENDIF}
  814. // TODO: map Pulsar's non-Windows platform defines...
  815. {$IFDEF VCL_XE2_OR_ABOVE}
  816. {$IFDEF VCL_XE8_OR_ABOVE}
  817. {$IFDEF CPU32BITS}
  818. //any 32-bit CPU
  819. {$DEFINE CPU32}
  820. {$ENDIF}
  821. {$IFDEF CPU64BITS}
  822. {$DEFINE CPU64}
  823. {$ENDIF}
  824. {$ELSE}
  825. {$IFDEF CPU386}
  826. //any 32-bit CPU
  827. {$DEFINE CPU32}
  828. //Intel 386 compatible chip architecture
  829. {$DEFINE CPUI386}
  830. {$ENDIF}
  831. {$IFDEF CPUX86}
  832. {$DEFINE CPU32}
  833. {$ENDIF}
  834. {$IFDEF CPUX64}
  835. //any 64-bit CPU
  836. {$DEFINE CPU64}
  837. //AMD64 compatible chip architecture
  838. {$DEFINE CPUX86_64} //historical name for AMD64
  839. {$DEFINE CPUAMD64}
  840. {$ENDIF}
  841. {$ENDIF}
  842. {$ELSE}
  843. {$IFNDEF DOTNET}
  844. {$IFNDEF KYLIX}
  845. {$DEFINE I386}
  846. {$ENDIF}
  847. {$ENDIF}
  848. {$DEFINE CPU32}
  849. {$ENDIF}
  850. {$ENDIF}
  851. {$IFDEF DOTNET}
  852. //differences in DotNET Framework versions.
  853. {$IFDEF VCL_2007_OR_ABOVE}
  854. {$DEFINE DOTNET_2}
  855. {$DEFINE DOTNET_2_OR_ABOVE}
  856. {$ELSE}
  857. {$DEFINE DOTNET_1_1}
  858. {$ENDIF}
  859. {$DEFINE DOTNET_1_1_OR_ABOVE}
  860. // Extra include used in D7 for testing. Remove later when all comps are
  861. // ported. Used to selectively exclude non ported parts. Allowed in places
  862. // IFDEFs are otherwise not permitted.
  863. {$DEFINE DOTNET_EXCLUDE}
  864. {$ENDIF}
  865. // Check for available features
  866. {$IFDEF VCL_6_OR_ABOVE}
  867. {$DEFINE HAS_PPointer}
  868. {$IFNDEF FPC}
  869. {$DEFINE HAS_TSelectionEditor}
  870. {$ENDIF}
  871. {$ENDIF}
  872. {$IFDEF VCL_2006_OR_ABOVE}
  873. {$DEFINE USE_INLINE}
  874. {$ENDIF}
  875. {$IFDEF VCL_2009_OR_ABOVE}
  876. {$IFNDEF DOTNET}
  877. {$DEFINE STRING_IS_UNICODE}
  878. {$ENDIF}
  879. {$ENDIF}
  880. {$IFDEF VCL_XE3_OR_ABOVE}
  881. {$DEFINE HAS_DIRECTIVE_ZEROBASEDSTRINGS}
  882. {$IFDEF NEXTGEN}
  883. {$DEFINE DCC_NEXTGEN}
  884. {$DEFINE USE_MARSHALLED_PTRS}
  885. {$IFDEF AUTOREFCOUNT}
  886. {$DEFINE USE_OBJECT_ARC}
  887. {$ENDIF}
  888. {$ENDIF}
  889. {$ENDIF}
  890. {$IFDEF VCL_XE5_UPDATE2_OR_ABOVE}
  891. {$DEFINE HAS_DIRECTIVE_HPPEMIT_LINKUNIT}
  892. {$DEFINE HAS_DIRECTIVE_HPPEMIT_NAMESPACE}
  893. {$ENDIF}
  894. {$IFDEF VCL_10_2_OR_ABOVE}
  895. {.$WARN IMPLICIT_INTEGER_CAST_LOSS OFF}
  896. {.$WARN IMPLICIT_CONVERSION_LOSS OFF}
  897. {.$WARN COMBINING_SIGNED_UNSIGNED64 OFF}
  898. {$ENDIF}
  899. {$IFDEF VCL_10_4_OR_ABOVE}
  900. // 0-based string indexing via '[]' is turned off by default in Delphi 10.4.
  901. // TStringHelper is always 0-indexed, flat RTL functions are always 1-indexed,
  902. // and now '[]' is 1-indexed again on all platforms - {$ZEROBASEDSTRINGS OFF}
  903. // is the default.
  904. {.$UNDEF HAS_DIRECTIVE_ZEROBASEDSTRINGS}
  905. {$ENDIF}
  906. // Delphi XE+ cross-compiling
  907. {$IFNDEF FPC}
  908. {$IFDEF POSIX}
  909. {$IF RTLVersion >= 22.0}
  910. {$DEFINE UNIX}
  911. {$UNDEF USE_BASEUNIX}
  912. {$DEFINE VCL_CROSS_COMPILE}
  913. {$DEFINE USE_VCL_POSIX}
  914. {$IFEND}
  915. {$ENDIF}
  916. {$IFDEF LINUX}
  917. {$IFDEF CONDITIONALEXPRESSIONS}
  918. {$IF RTLVersion >= 22.0}
  919. {$DEFINE VCL_CROSS_COMPILE}
  920. {$DEFINE USE_VCL_POSIX}
  921. {$IFEND}
  922. {$ENDIF}
  923. {$ENDIF}
  924. {$ENDIF}
  925. {$IFDEF VCL_CROSS_COMPILE}
  926. {$UNDEF KYLIXCOMPAT}
  927. {$ELSE}
  928. {$IFDEF KYLIXCOMPAT}
  929. {$linklib c}
  930. {$ENDIF}
  931. {$ENDIF}
  932. {$IFDEF FPC}
  933. {$DEFINE USE_INLINE}
  934. {$IFDEF FPC_UNICODESTRINGS}
  935. {$DEFINE STRING_IS_UNICODE}
  936. {$ENDIF}
  937. {$ENDIF}
  938. // .NET and Delphi 2009+ support UNICODE strings natively!
  939. //
  940. // NOTE: Do not define UNICODE here. The compiler defines
  941. // the symbol automatically.
  942. {$IFNDEF STRING_IS_UNICODE}
  943. {$DEFINE STRING_IS_ANSI}
  944. {$ENDIF}
  945. {$IFDEF DCC_NEXTGEN}
  946. {$DEFINE NO_ANSI_TYPES}
  947. {$IFDEF USE_OBJECT_ARC}
  948. // TODO: move these to an appropriate section. Not doing this yet because
  949. // it is a major interface change to switch to Generics and we should
  950. // maintain backwards compatibility with earlier compilers for the time
  951. // being. Defining them only here for now because the non-Generic versions
  952. // of these classes have become deprecated by ARC and so we need to start
  953. // taking advantage of the Generics versions...
  954. {$DEFINE HAS_UNIT_Generics_Collections}
  955. {$DEFINE HAS_GENERICS_TList}
  956. {$DEFINE HAS_GENERICS_TThreadList}
  957. {$ENDIF}
  958. {$ENDIF}
  959. // TODO: Ansi data types were disabled on mobile platforms in XE3, but
  960. // UTF8String and RawByteString were re-enabled in 10.1 Berlin! What else,
  961. // if anything, was re-enabled to facilitate that?
  962. //
  963. // UPDATE: In 10.4 Sydney, AnsiChar and AnsiString were re-enabled on
  964. // mobile platforms! NEXTGEN is no longer defined in the mobile compilers.
  965. {$IFDEF NO_ANSI_TYPES}
  966. {$UNDEF HAS_PAnsiChar}
  967. {$ENDIF}
  968. {$IFDEF WIN32}
  969. {$DEFINE WIN32_OR_WIN64}
  970. {$ENDIF}
  971. {$IFDEF WIN64}
  972. {$DEFINE WIN32_OR_WIN64}
  973. {$ENDIF}
  974. {$IFDEF IOS}
  975. // Support for 64-bit ARM iOS Simulator was added in Delphi 11.2
  976. // TODO: how to detect iOS Simulator in FPC? Does it support 64-bit ARM?
  977. {$IFDEF CPUARM}
  978. {$IFNDEF IOSSIMULATOR}
  979. // RLebeau: For iOS devices, OpenSSL cannot be used as an external library,
  980. // it must be statically linked into the app. For the iOS simulator, this
  981. // is not true. Users who want to use OpenSSL in iOS device apps will need
  982. // to add the static OpenSSL library to the project and then include the
  983. // IdSSLOpenSSLHeaders_static unit in their uses clause. It hooks up the
  984. // statically linked functions for the IdSSLOpenSSLHeaders unit to use...
  985. {$DEFINE STATICLOAD_OPENSSL}
  986. {$ENDIF}
  987. {$ENDIF}
  988. {$ENDIF}
  989. {$UNDEF USE_INVALIDATE_MOD_CACHE}
  990. //This must come after the iconv defines because this compiler targets a Unix-like
  991. //operating system. One key difference is that it does have a TEncoding class.
  992. //If this comes before the ICONV defines, it creates problems.
  993. //This also must go before the THandle size calculations.
  994. {$IFDEF VCL_CROSS_COMPILE}
  995. {$IFDEF POSIX}
  996. {$IFNDEF LINUX}
  997. {$DEFINE BSD}
  998. {$ENDIF}
  999. {$DEFINE USE_INVALIDATE_MOD_CACHE}
  1000. {$ENDIF}
  1001. {$ENDIF}
  1002. //IMPORTANT!!!!
  1003. //
  1004. //Do not remove this!!! This is to work around a conflict. In DCC, MACOS
  1005. //will mean OS X. In FreePascal, the DEFINE MACOS means MacIntosh System OS Classic.
  1006. {$IFDEF DCC}
  1007. // DCC defines MACOS for both iOS and OS X platforms, need to differentiate
  1008. {$IFDEF MACOS}
  1009. {$IFNDEF IOS}
  1010. {$DEFINE OSX}
  1011. {$DEFINE DARWIN}
  1012. {$ENDIF}
  1013. {$ENDIF}
  1014. {$ENDIF}
  1015. {$IFDEF FPC}
  1016. // FPC defines DARWIN for both OSX and iOS, need to differentiate
  1017. {$IFDEF DARWIN}
  1018. {$IFNDEF IOS}
  1019. {$DEFINE OSX}
  1020. {$ENDIF}
  1021. {$ENDIF}
  1022. {$IFDEF MACOS}
  1023. {$DEFINE MACOS_CLASSIC}
  1024. {$ENDIF}
  1025. {$ENDIF}
  1026. {$IFDEF BSD}
  1027. //I think BSD might handle FreeBSD, NetBSD, OpenBSD, and Darwin
  1028. {$IFDEF IOS}
  1029. {$IFDEF CPUARM64}
  1030. {$DEFINE CPU64}
  1031. {$ELSE}
  1032. {$IFDEF CPUARM32}
  1033. {$DEFINE CPU32}
  1034. {$ENDIF}
  1035. {$ENDIF}
  1036. {$ENDIF}
  1037. {$ENDIF}
  1038. {$IFDEF LINUX}
  1039. {$IFDEF LINUX64}
  1040. {$DEFINE CPU64}
  1041. {$ELSE}
  1042. {$IFDEF LINUX32}
  1043. {$DEFINE CPU32}
  1044. {$ENDIF}
  1045. {$ENDIF}
  1046. {$ENDIF}
  1047. {end Unix OS specific stuff}
  1048. {$IFDEF DEBUG}
  1049. {$UNDEF USE_INLINE}
  1050. {$ENDIF}
  1051. // RLebeau 9/5/2013: it would take a lot of work to re-write Indy to support
  1052. // both 0-based and 1-based string indexing, so we'll just turn off 0-based
  1053. // indexing for now...
  1054. {$IFDEF HAS_DIRECTIVE_ZEROBASEDSTRINGS}
  1055. {$ZEROBASEDSTRINGS OFF}
  1056. {$ENDIF}