IdCompilerDefines.inc 27 KB

12345678910111213141516171819202122232425262728293031323334353637383940414243444546474849505152535455565758596061626364656667686970717273747576777879808182838485868788899091929394959697989910010110210310410510610710810911011111211311411511611711811912012112212312412512612712812913013113213313413513613713813914014114214314414514614714814915015115215315415515615715815916016116216316416516616716816917017117217317417517617717817918018118218318418518618718818919019119219319419519619719819920020120220320420520620720820921021121221321421521621721821922022122222322422522622722822923023123223323423523623723823924024124224324424524624724824925025125225325425525625725825926026126226326426526626726826927027127227327427527627727827928028128228328428528628728828929029129229329429529629729829930030130230330430530630730830931031131231331431531631731831932032132232332432532632732832933033133233333433533633733833934034134234334434534634734834935035135235335435535635735835936036136236336436536636736836937037137237337437537637737837938038138238338438538638738838939039139239339439539639739839940040140240340440540640740840941041141241341441541641741841942042142242342442542642742842943043143243343443543643743843944044144244344444544644744844945045145245345445545645745845946046146246346446546646746846947047147247347447547647747847948048148248348448548648748848949049149249349449549649749849950050150250350450550650750850951051151251351451551651751851952052152252352452552652752852953053153253353453553653753853954054154254354454554654754854955055155255355455555655755855956056156256356456556656756856957057157257357457557657757857958058158258358458558658758858959059159259359459559659759859960060160260360460560660760860961061161261361461561661761861962062162262362462562662762862963063163263363463563663763863964064164264364464564664764864965065165265365465565665765865966066166266366466566666766866967067167267367467567667767867968068168268368468568668768868969069169269369469569669769869970070170270370470570670770870971071171271371471571671771871972072172272372472572672772872973073173273373473573673773873974074174274374474574674774874975075175275375475575675775875976076176276376476576676776876977077177277377477577677777877978078178278378478578678778878979079179279379479579679779879980080180280380480580680780880981081181281381481581681781881982082182282382482582682782882983083183283383483583683783883984084184284384484584684784884985085185285385485585685785885986086186286386486586686786886987087187287387487587687787887988088188288388488588688788888989089189289389489589689789889990090190290390490590690790890991091191291391491591691791891992092192292392492592692792892993093193293393493593693793893994094194294394494594694794894995095195295395495595695795895996096196296396496596696796896997097197297397497597697797897998098198298398498598698798898999099199299399499599699799899910001001100210031004100510061007100810091010101110121013101410151016101710181019102010211022102310241025102610271028102910301031103210331034103510361037103810391040104110421043104410451046104710481049105010511052105310541055105610571058105910601061106210631064106510661067106810691070107110721073107410751076107710781079108010811082108310841085108610871088108910901091109210931094109510961097109810991100110111021103110411051106110711081109111011111112111311141115111611171118111911201121112211231124112511261127112811291130113111321133113411351136113711381139114011411142114311441145114611471148114911501151115211531154
  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. // Kylix
  316. //
  317. //Important: Don't use CompilerVersion here as IF's are evaluated before
  318. //IFDEF's and Kylix 1 does not have CompilerVersion defined at all.
  319. {$IFDEF LINUX}
  320. {$DEFINE UNIX}
  321. {$IFDEF CONDITIONALEXPRESSIONS}
  322. {$IF (RTLVersion >= 14.0) and (RTLVersion <= 14.5) }
  323. {$DEFINE KYLIX}
  324. {$IF RTLVersion = 14.5}
  325. {$DEFINE KYLIX_3}
  326. {$ELSEIF RTLVersion >= 14.2}
  327. {$DEFINE KYLIX_2}
  328. {$ELSE}
  329. {$DEFINE KYLIX_1}
  330. {$IFEND}
  331. {$IFEND}
  332. {$ENDIF}
  333. {$ENDIF}
  334. {$ENDIF}
  335. // Delphi.NET
  336. // Covers D8+
  337. {$IFDEF CIL}
  338. // Platform specific conditional. Used for platform specific code.
  339. {$DEFINE DOTNET}
  340. {$DEFINE STRING_IS_UNICODE}
  341. {$ENDIF}
  342. {$IFDEF KYLIX}
  343. {$DEFINE VCL_60}
  344. {$DEFINE CPUI386}
  345. {$UNDEF USE_BASEUNIX}
  346. {$IFDEF KYLIX_3}
  347. {$DEFINE KYLIX_3_OR_ABOVE}
  348. {$ENDIF}
  349. {$IFDEF KYLIX_3_OR_ABOVE}
  350. {$DEFINE KYLIX_2_OR_ABOVE}
  351. {$ELSE}
  352. {$IFDEF KYLIX_2}
  353. {$DEFINE KYLIX_2_OR_ABOVE}
  354. {$ENDIF}
  355. {$ENDIF}
  356. {$IFDEF KYLIX_2_OR_ABOVE}
  357. {$DEFINE KYLIX_1_OR_ABOVE}
  358. {$ELSE}
  359. {$IFDEF KYLIX_1}
  360. {$DEFINE KYLIX_1_OR_ABOVE}
  361. {$ENDIF}
  362. {$ENDIF}
  363. {$IFNDEF KYLIX_3_OR_ABOVE}
  364. {$DEFINE KYLIXCOMPAT}
  365. {$ENDIF}
  366. {$ENDIF}
  367. // FPC (2+)
  368. {$IFDEF FPC}
  369. // TODO: In FreePascal 4.2.0+, a Delphi-like UnicodeString type is supported.
  370. // However, String/(P)Char do not map to UnicodeString/(P)WideChar unless
  371. // either {$MODE DelphiUnicode} or {$MODESWITCH UnicodeStrings} is used.
  372. // We should consider enabling one of them so Indy uses the same Unicode logic
  373. // in Delphi 2009+ and FreePascal 4.2.0+ and reduces IFDEFs (in particular,
  374. // STRING_UNICODE_MISMATCH, see further below). However, FreePascal's RTL
  375. // is largely not UnicodeString-enabled yet. Maybe we should enable
  376. // {$MODE DelphiUnicode} anyway, and then deal with any RTL function issues
  377. // on an as-needed basis...
  378. {$MODE Delphi}
  379. {$IFDEF FPC_2_7_1_OR_ABOVE}
  380. {.$MODE DelphiUnicode}
  381. {.$MODESWITCH UnicodeStrings}
  382. {.$CODEPAGE UTF8} // needed for Unicode string literals to work properly
  383. {$ENDIF}
  384. //note that we may need further defines for widget types depending on
  385. //what we do and what platforms we support in FPC.
  386. //I'll let Marco think about that one.
  387. {$IFDEF UNIX}
  388. {$DEFINE USE_BASEUNIX}
  389. {$IFDEF LINUX}
  390. //In Linux for I386, you can choose between a Kylix-libc API or
  391. //the standard RTL Unix API. Just pass -dKYLIXCOMPAT to the FPC compiler.
  392. //I will see what I can do about the Makefile.
  393. {$IFDEF KYLIXCOMPAT}
  394. {$IFDEF CPUI386}
  395. {$UNDEF USE_BASEUNIX}
  396. {$ENDIF}
  397. {$ENDIF}
  398. {$ENDIF}
  399. {$IFDEF USE_BASEUNIX}
  400. {$UNDEF KYLIXCOMPAT}
  401. {$ENDIF}
  402. {$ENDIF}
  403. // FPC_FULLVERSION was added in FPC 2.2.4
  404. // Have to use Defined() or else Delphi compiler chokes, since it
  405. // evaluates $IF statements before $IFDEF statements...
  406. {$MACRO ON} // must be on in order to use versioning macros
  407. {$IF DEFINED(FPC_FULLVERSION) AND (FPC_FULLVERSION >= 30101)}
  408. {$DEFINE FPC_3_1_1_OR_ABOVE}
  409. {$IFEND}
  410. {$IF DEFINED(FPC_FULLVERSION) AND (FPC_FULLVERSION >= 30000)}
  411. {$DEFINE FPC_3_0_0_OR_ABOVE}
  412. {$IFEND}
  413. {$IF DEFINED(FPC_FULLVERSION) AND (FPC_FULLVERSION >= 20701)}
  414. {$DEFINE FPC_2_7_1_OR_ABOVE}
  415. {$IFEND}
  416. {$IF DEFINED(FPC_FULLVERSION) AND (FPC_FULLVERSION >= 20604)}
  417. {$DEFINE FPC_2_6_4_OR_ABOVE}
  418. {$IFEND}
  419. {$IF DEFINED(FPC_FULLVERSION) AND (FPC_FULLVERSION >= 20602)}
  420. {$DEFINE FPC_2_6_2_OR_ABOVE}
  421. {$IFEND}
  422. {$IF DEFINED(FPC_FULLVERSION) AND (FPC_FULLVERSION >= 20600)}
  423. {$DEFINE FPC_2_6_0_OR_ABOVE}
  424. {$IFEND}
  425. {$IF DEFINED(FPC_FULLVERSION) AND (FPC_FULLVERSION >= 20404)}
  426. {$DEFINE FPC_2_4_4_OR_ABOVE}
  427. {$IFEND}
  428. {$IF DEFINED(FPC_FULLVERSION) AND (FPC_FULLVERSION >= 20402)}
  429. {$DEFINE FPC_2_4_2_OR_ABOVE}
  430. {$IFEND}
  431. {$IF DEFINED(FPC_FULLVERSION) AND (FPC_FULLVERSION >= 20400)}
  432. {$DEFINE FPC_2_4_0_OR_ABOVE}
  433. {$IFEND}
  434. {$IF DEFINED(FPC_FULLVERSION) AND (FPC_FULLVERSION >= 20204)}
  435. {$DEFINE FPC_2_2_4_OR_ABOVE}
  436. {$IFEND}
  437. {$IF DEFINED(FPC_FULLVERSION) AND (FPC_FULLVERSION >= 20202)}
  438. {$DEFINE FPC_2_2_2_OR_ABOVE}
  439. {$IFEND}
  440. {$IF DEFINED(FPC_FULLVERSION) AND (FPC_FULLVERSION >= 20105)}
  441. {$DEFINE FPC_2_1_5_OR_ABOVE}
  442. {$IFEND}
  443. // just in case
  444. {$IFDEF FPC_3_1_1}
  445. {$DEFINE FPC_3_1_1_OR_ABOVE}
  446. {$ENDIF}
  447. {$IFDEF FPC_3_0_0}
  448. {$DEFINE FPC_3_0_0_OR_ABOVE}
  449. {$ENDIF}
  450. {$IFDEF FPC_2_7_1}
  451. {$DEFINE FPC_2_7_1_OR_ABOVE}
  452. {$ENDIF}
  453. {$IFDEF FPC_2_6_4}
  454. {$DEFINE FPC_2_6_4_OR_ABOVE}
  455. {$ENDIF}
  456. {$IFDEF FPC_2_6_2}
  457. {$DEFINE FPC_2_6_2_OR_ABOVE}
  458. {$ENDIF}
  459. {$IFDEF FPC_2_6_0}
  460. {$DEFINE FPC_2_6_0_OR_ABOVE}
  461. {$ENDIF}
  462. {$IFDEF FPC_2_4_4}
  463. {$DEFINE FPC_2_4_4_OR_ABOVE}
  464. {$ENDIF}
  465. {$IFDEF FPC_2_4_2}
  466. {$DEFINE FPC_2_4_2_OR_ABOVE}
  467. {$ENDIF}
  468. {$IFDEF FPC_2_4_0}
  469. {$DEFINE FPC_2_4_0_OR_ABOVE}
  470. {$ENDIF}
  471. {$IFDEF FPC_2_2_4}
  472. {$DEFINE FPC_2_2_4_OR_ABOVE}
  473. {$ENDIF}
  474. {$IFDEF FPC_2_2_2}
  475. {$DEFINE FPC_2_2_2_OR_ABOVE}
  476. {$ENDIF}
  477. {$IFDEF FPC_2_1_5}
  478. {$DEFINE FPC_2_1_5_OR_ABOVE}
  479. {$ENDIF}
  480. {$IFDEF FPC_3_1_1_OR_ABOVE}
  481. {$DEFINE FPC_3_0_0_OR_ABOVE}
  482. {$ELSE}
  483. {$IFDEF FPC_3_0_0}
  484. {$DEFINE FPC_3_0_0_OR_ABOVE}
  485. {$ENDIF}
  486. {$ENDIF}
  487. {$IFDEF FPC_3_0_0_OR_ABOVE}
  488. {$DEFINE FPC_2_7_1_OR_ABOVE}
  489. {$ELSE}
  490. {$IFDEF FPC_2_7_1}
  491. {$DEFINE FPC_2_7_1_OR_ABOVE}
  492. {$ENDIF}
  493. {$ENDIF}
  494. {$IFDEF FPC_2_7_1_OR_ABOVE}
  495. {$DEFINE FPC_2_6_4_OR_ABOVE}
  496. {$ELSE}
  497. {$IFDEF FPC_2_6_4}
  498. {$DEFINE FPC_2_6_4_OR_ABOVE}
  499. {$ENDIF}
  500. {$ENDIF}
  501. {$IFDEF FPC_2_6_4_OR_ABOVE}
  502. {$DEFINE FPC_2_6_2_OR_ABOVE}
  503. {$ELSE}
  504. {$IFDEF FPC_2_6_2}
  505. {$DEFINE FPC_2_6_2_OR_ABOVE}
  506. {$ENDIF}
  507. {$ENDIF}
  508. {$IFDEF FPC_2_6_2_OR_ABOVE}
  509. {$DEFINE FPC_2_6_0_OR_ABOVE}
  510. {$ELSE}
  511. {$IFDEF FPC_2_6_0}
  512. {$DEFINE FPC_2_6_0_OR_ABOVE}
  513. {$ENDIF}
  514. {$ENDIF}
  515. {$IFDEF FPC_2_6_0_OR_ABOVE}
  516. {$DEFINE FPC_2_4_4_OR_ABOVE}
  517. {$ELSE}
  518. {$IFDEF FPC_2_4_4}
  519. {$DEFINE FPC_2_4_4_OR_ABOVE}
  520. {$ENDIF}
  521. {$ENDIF}
  522. {$IFDEF FPC_2_4_4_OR_ABOVE}
  523. {$DEFINE FPC_2_4_2_OR_ABOVE}
  524. {$ELSE}
  525. {$IFDEF FPC_2_4_2}
  526. {$DEFINE FPC_2_4_2_OR_ABOVE}
  527. {$ENDIF}
  528. {$ENDIF}
  529. {$IFDEF FPC_2_4_2_OR_ABOVE}
  530. {$DEFINE FPC_2_4_0_OR_ABOVE}
  531. {$ELSE}
  532. {$IFDEF FPC_2_4_0}
  533. {$DEFINE FPC_2_4_0_OR_ABOVE}
  534. {$ENDIF}
  535. {$ENDIF}
  536. {$IFDEF FPC_2_4_0_OR_ABOVE}
  537. {$DEFINE FPC_2_2_4_OR_ABOVE}
  538. {$ELSE}
  539. {$IFDEF FPC_2_2_4}
  540. {$DEFINE FPC_2_2_4_OR_ABOVE}
  541. {$ENDIF}
  542. {$ENDIF}
  543. {$IFDEF FPC_2_2_4_OR_ABOVE}
  544. {$DEFINE FPC_2_2_2_OR_ABOVE}
  545. {$ELSE}
  546. {$IFDEF FPC_2_2_2}
  547. {$DEFINE FPC_2_2_2_OR_ABOVE}
  548. {$ENDIF}
  549. {$ENDIF}
  550. {$IFDEF FPC_2_2_2_OR_ABOVE}
  551. {$DEFINE FPC_2_2_0_OR_ABOVE}
  552. {$ELSE}
  553. {$IFDEF VER2_2}
  554. {$DEFINE FPC_2_2_0_OR_ABOVE}
  555. {$ENDIF}
  556. {$ENDIF}
  557. {$IFDEF FPC_2_2_0_OR_ABOVE}
  558. {$DEFINE FPC_2_1_5_OR_ABOVE}
  559. {$ELSE}
  560. {$IFDEF FPC_2_1_5}
  561. {$DEFINE FPC_2_1_5_OR_ABOVE}
  562. {$ENDIF}
  563. {$ENDIF}
  564. {.$IFDEF FPC_2_7_1_OR_ABOVE}
  565. // support for RawByteString and UnicodeString
  566. {.$DEFINE VCL_2009}
  567. {.$DEFINE DELPHI_2009}
  568. {.$ELSE}
  569. {$DEFINE VCL_70}
  570. {$DEFINE DELPHI_7}
  571. {.$ENDIF}
  572. {$ENDIF}
  573. // end FPC
  574. {$IFDEF VCL_12}
  575. {$DEFINE VCL_12_OR_ABOVE}
  576. {$ENDIF}
  577. {$IFDEF VCL_12_OR_ABOVE}
  578. {$DEFINE VCL_11_OR_ABOVE}
  579. {$ELSE}
  580. {$IFDEF VCL_11}
  581. {$DEFINE VCL_11_OR_ABOVE}
  582. {$ENDIF}
  583. {$ENDIF}
  584. {$IFDEF VCL_11_OR_ABOVE}
  585. {$DEFINE VCL_10_4_OR_ABOVE}
  586. {$ELSE}
  587. {$IFDEF VCL_10_4}
  588. {$DEFINE VCL_10_4_OR_ABOVE}
  589. {$ENDIF}
  590. {$ENDIF}
  591. {$IFDEF VCL_10_4_OR_ABOVE}
  592. {$DEFINE VCL_10_3_OR_ABOVE}
  593. {$ELSE}
  594. {$IFDEF VCL_10_3}
  595. {$DEFINE VCL_10_3_OR_ABOVE}
  596. {$ENDIF}
  597. {$ENDIF}
  598. {$IFDEF VCL_10_3_OR_ABOVE}
  599. {$DEFINE VCL_10_2_OR_ABOVE}
  600. {$ELSE}
  601. {$IFDEF VCL_10_2}
  602. {$DEFINE VCL_10_2_OR_ABOVE}
  603. {$ENDIF}
  604. {$ENDIF}
  605. {$IFDEF VCL_10_2_OR_ABOVE}
  606. {$DEFINE VCL_10_1_OR_ABOVE}
  607. {$ELSE}
  608. {$IFDEF VCL_10_1}
  609. {$DEFINE VCL_10_1_OR_ABOVE}
  610. {$ENDIF}
  611. {$ENDIF}
  612. {$IFDEF VCL_10_1_OR_ABOVE}
  613. {$DEFINE VCL_10_0_OR_ABOVE}
  614. {$ELSE}
  615. {$IFDEF VCL_10_0}
  616. {$DEFINE VCL_10_0_OR_ABOVE}
  617. {$ENDIF}
  618. {$ENDIF}
  619. {$IFDEF VCL_10_0_OR_ABOVE}
  620. {$DEFINE VCL_XE8_OR_ABOVE}
  621. {$ELSE}
  622. {$IFDEF VCL_XE8}
  623. {$DEFINE VCL_XE8_OR_ABOVE}
  624. {$ENDIF}
  625. {$ENDIF}
  626. {$IFDEF VCL_XE8_OR_ABOVE}
  627. {$DEFINE VCL_XE7_OR_ABOVE}
  628. {$ELSE}
  629. {$IFDEF VCL_XE7}
  630. {$DEFINE VCL_XE7_OR_ABOVE}
  631. {$ENDIF}
  632. {$ENDIF}
  633. {$IFDEF VCL_XE7_OR_ABOVE}
  634. {$DEFINE VCL_XE6_OR_ABOVE}
  635. {$ELSE}
  636. {$IFDEF VCL_XE6}
  637. {$DEFINE VCL_XE6_OR_ABOVE}
  638. {$ENDIF}
  639. {$ENDIF}
  640. {$IFDEF VCL_XE6_OR_ABOVE}
  641. {$DEFINE VCL_XE5_OR_ABOVE}
  642. {$ELSE}
  643. {$IFDEF VCL_XE5}
  644. {$DEFINE VCL_XE5_OR_ABOVE}
  645. {$ENDIF}
  646. {$ENDIF}
  647. {$IFDEF VCL_XE5_OR_ABOVE}
  648. {$DEFINE VCL_XE4_OR_ABOVE}
  649. {$ELSE}
  650. {$IFDEF VCL_XE4}
  651. {$DEFINE VCL_XE4_OR_ABOVE}
  652. {$ENDIF}
  653. {$ENDIF}
  654. {$IFDEF VCL_XE4_OR_ABOVE}
  655. {$DEFINE VCL_XE3_OR_ABOVE}
  656. {$ELSE}
  657. {$IFDEF VCL_XE3}
  658. {$DEFINE VCL_XE3_OR_ABOVE}
  659. {$ENDIF}
  660. {$ENDIF}
  661. {$IFDEF VCL_XE3_OR_ABOVE}
  662. {$DEFINE VCL_XE2_OR_ABOVE}
  663. {$ELSE}
  664. {$IFDEF VCL_XE2}
  665. {$DEFINE VCL_XE2_OR_ABOVE}
  666. {$ENDIF}
  667. {$ENDIF}
  668. {$IFDEF VCL_XE2_OR_ABOVE}
  669. {$DEFINE VCL_XE_OR_ABOVE}
  670. {$ELSE}
  671. {$IFDEF VCL_XE}
  672. {$DEFINE VCL_XE_OR_ABOVE}
  673. {$ENDIF}
  674. {$ENDIF}
  675. {$IFDEF VCL_XE_OR_ABOVE}
  676. {$DEFINE VCL_2010_OR_ABOVE}
  677. {$ELSE}
  678. {$IFDEF VCL_2010}
  679. {$DEFINE VCL_2010_OR_ABOVE}
  680. {$ENDIF}
  681. {$ENDIF}
  682. {$IFDEF VCL_2010_OR_ABOVE}
  683. {$DEFINE VCL_2009_OR_ABOVE}
  684. {$ELSE}
  685. {$IFDEF VCL_2009}
  686. {$DEFINE VCL_2009_OR_ABOVE}
  687. {$ENDIF}
  688. {$ENDIF}
  689. {$IFDEF VCL_2009_OR_ABOVE}
  690. {$DEFINE VCL_2007_OR_ABOVE}
  691. {$ELSE}
  692. {$IFDEF VCL_2007}
  693. {$DEFINE VCL_2007_OR_ABOVE}
  694. {$ENDIF}
  695. {$ENDIF}
  696. {$IFDEF VCL_2007_OR_ABOVE}
  697. {$DEFINE VCL_2006_OR_ABOVE}
  698. {$ELSE}
  699. {$IFDEF VCL_2006}
  700. {$DEFINE VCL_2006_OR_ABOVE}
  701. {$ENDIF}
  702. {$ENDIF}
  703. {$IFDEF VCL_2006_OR_ABOVE}
  704. {$DEFINE VCL_2005_OR_ABOVE}
  705. {$ELSE}
  706. {$IFDEF VCL_2005}
  707. {$DEFINE VCL_2005_OR_ABOVE}
  708. {$ENDIF}
  709. {$ENDIF}
  710. {$IFDEF VCL_2005_OR_ABOVE}
  711. {$DEFINE VCL_8_OR_ABOVE}
  712. {$ELSE}
  713. {$IFDEF VCL_80}
  714. {$DEFINE VCL_8_OR_ABOVE}
  715. {$ENDIF}
  716. {$ENDIF}
  717. {$IFDEF VCL_8_OR_ABOVE}
  718. {$DEFINE VCL_7_OR_ABOVE}
  719. {$ELSE}
  720. {$IFDEF VCL_70}
  721. {$DEFINE VCL_7_OR_ABOVE}
  722. {$ENDIF}
  723. {$ENDIF}
  724. {$IFDEF VCL_7_OR_ABOVE}
  725. {$DEFINE VCL_6_OR_ABOVE}
  726. {$ELSE}
  727. {$IFDEF VCL_60}
  728. {$DEFINE VCL_6_OR_ABOVE}
  729. {$ENDIF}
  730. {$ENDIF}
  731. {$IFDEF VCL_6_OR_ABOVE}
  732. {$DEFINE VCL_5_OR_ABOVE}
  733. {$ELSE}
  734. {$IFDEF VCL_50}
  735. {$DEFINE VCL_5_OR_ABOVE}
  736. {$ENDIF}
  737. {$ENDIF}
  738. {$IFDEF VCL_5_OR_ABOVE}
  739. {$DEFINE VCL_4_OR_ABOVE}
  740. {$ELSE}
  741. {$IFDEF VCL_40}
  742. {$DEFINE VCL_4_OR_ABOVE}
  743. {$ENDIF}
  744. {$ENDIF}
  745. // Normalize Delphi compiler defines to match FPC for consistency:
  746. //
  747. // CPU32 - any 32-bit CPU
  748. // CPU64 - any 64-bit CPU
  749. // WINDOWS - any Windows platform (32-bit, 64-bit, CE)
  750. // WIN32 - Windows 32-bit
  751. // WIN64 - Windows 64-bit
  752. // WINCE - Windows CE
  753. //
  754. // Consult the "Free Pascal Programmer's Guide", Appendix G for the complete
  755. // list of defines that are used. Do not work on this unless you understand
  756. // what the FreePascal developers are doing. Not only do you have to
  757. // descriminate with operating systems, but also with chip architectures
  758. // are well.
  759. //
  760. // DCC Pulsar+ define the following values:
  761. // ASSEMBLER
  762. // DCC
  763. // CONDITIONALEXPRESSIONS
  764. // NATIVECODE
  765. // UNICODE
  766. // MACOS
  767. // MACOS32
  768. // MACOS64
  769. // MSWINDOWS
  770. // WIN32
  771. // WIN64
  772. // LINUX
  773. // POSIX
  774. // POSIX32
  775. // CPU386
  776. // CPUX86
  777. // CPUX64
  778. //
  779. // Kylix defines the following values:
  780. // LINUX
  781. // (others??)
  782. //
  783. {$IFNDEF FPC}
  784. // TODO: We need to use ENDIAN_BIG for big endian chip architectures,
  785. // such as 680x0, PowerPC, Sparc, and MIPS, once DCC supports them,
  786. // provided it does not already define its own ENDIAN values by then...
  787. {$DEFINE ENDIAN_LITTLE}
  788. {$IFNDEF VCL_6_OR_ABOVE}
  789. {$DEFINE MSWINDOWS}
  790. {$ENDIF}
  791. {$IFDEF MSWINDOWS}
  792. {$DEFINE WINDOWS}
  793. {$ENDIF}
  794. // TODO: map Pulsar's non-Windows platform defines...
  795. {$IFDEF VCL_XE2_OR_ABOVE}
  796. {$IFDEF VCL_XE8_OR_ABOVE}
  797. {$IFDEF CPU32BITS}
  798. //any 32-bit CPU
  799. {$DEFINE CPU32}
  800. {$ENDIF}
  801. {$IFDEF CPU64BITS}
  802. {$DEFINE CPU64}
  803. {$ENDIF}
  804. {$ELSE}
  805. {$IFDEF CPU386}
  806. //any 32-bit CPU
  807. {$DEFINE CPU32}
  808. //Intel 386 compatible chip architecture
  809. {$DEFINE CPUI386}
  810. {$ENDIF}
  811. {$IFDEF CPUX86}
  812. {$DEFINE CPU32}
  813. {$ENDIF}
  814. {$IFDEF CPUX64}
  815. //any 64-bit CPU
  816. {$DEFINE CPU64}
  817. //AMD64 compatible chip architecture
  818. {$DEFINE CPUX86_64} //historical name for AMD64
  819. {$DEFINE CPUAMD64}
  820. {$ENDIF}
  821. {$ENDIF}
  822. {$ELSE}
  823. {$IFNDEF DOTNET}
  824. {$IFNDEF KYLIX}
  825. {$DEFINE I386}
  826. {$ENDIF}
  827. {$ENDIF}
  828. {$DEFINE CPU32}
  829. {$ENDIF}
  830. {$ENDIF}
  831. {$IFDEF DOTNET}
  832. //differences in DotNET Framework versions.
  833. {$IFDEF VCL_2007_OR_ABOVE}
  834. {$DEFINE DOTNET_2}
  835. {$DEFINE DOTNET_2_OR_ABOVE}
  836. {$ELSE}
  837. {$DEFINE DOTNET_1_1}
  838. {$ENDIF}
  839. {$DEFINE DOTNET_1_1_OR_ABOVE}
  840. // Extra include used in D7 for testing. Remove later when all comps are
  841. // ported. Used to selectively exclude non ported parts. Allowed in places
  842. // IFDEFs are otherwise not permitted.
  843. {$DEFINE DOTNET_EXCLUDE}
  844. {$ENDIF}
  845. // Check for available features
  846. {$IFDEF VCL_6_OR_ABOVE}
  847. {$DEFINE HAS_PPointer}
  848. {$IFNDEF FPC}
  849. {$DEFINE HAS_TSelectionEditor}
  850. {$ENDIF}
  851. {$ENDIF}
  852. {$IFDEF VCL_2006_OR_ABOVE}
  853. {$DEFINE USE_INLINE}
  854. {$ENDIF}
  855. {$IFDEF VCL_2009_OR_ABOVE}
  856. {$IFNDEF DOTNET}
  857. {$DEFINE STRING_IS_UNICODE}
  858. {$ENDIF}
  859. {$ENDIF}
  860. {$IFDEF VCL_XE3_OR_ABOVE}
  861. {$DEFINE HAS_DIRECTIVE_ZEROBASEDSTRINGS}
  862. {$IFDEF NEXTGEN}
  863. {$DEFINE DCC_NEXTGEN}
  864. {$DEFINE USE_MARSHALLED_PTRS}
  865. {$IFDEF AUTOREFCOUNT}
  866. {$DEFINE USE_OBJECT_ARC}
  867. {$ENDIF}
  868. {$ENDIF}
  869. {$ENDIF}
  870. {$IFDEF VCL_XE5_UPDATE2_OR_ABOVE}
  871. {$DEFINE HAS_DIRECTIVE_HPPEMIT_LINKUNIT}
  872. {$DEFINE HAS_DIRECTIVE_HPPEMIT_NAMESPACE}
  873. {$ENDIF}
  874. {$IFDEF VCL_10_2_OR_ABOVE}
  875. {.$WARN IMPLICIT_INTEGER_CAST_LOSS OFF}
  876. {.$WARN IMPLICIT_CONVERSION_LOSS OFF}
  877. {.$WARN COMBINING_SIGNED_UNSIGNED64 OFF}
  878. {$ENDIF}
  879. {$IFDEF VCL_10_4_OR_ABOVE}
  880. // 0-based string indexing via '[]' is turned off by default in Delphi 10.4.
  881. // TStringHelper is always 0-indexed, flat RTL functions are always 1-indexed,
  882. // and now '[]' is 1-indexed again on all platforms - {$ZEROBASEDSTRINGS OFF}
  883. // is the default.
  884. {.$UNDEF HAS_DIRECTIVE_ZEROBASEDSTRINGS}
  885. {$ENDIF}
  886. // Delphi XE+ cross-compiling
  887. {$IFNDEF FPC}
  888. {$IFDEF POSIX}
  889. {$IF RTLVersion >= 22.0}
  890. {$DEFINE UNIX}
  891. {$UNDEF USE_BASEUNIX}
  892. {$DEFINE VCL_CROSS_COMPILE}
  893. {$DEFINE USE_VCL_POSIX}
  894. {$IFEND}
  895. {$ENDIF}
  896. {$IFDEF LINUX}
  897. {$IFDEF CONDITIONALEXPRESSIONS}
  898. {$IF RTLVersion >= 22.0}
  899. {$DEFINE VCL_CROSS_COMPILE}
  900. {$DEFINE USE_VCL_POSIX}
  901. {$IFEND}
  902. {$ENDIF}
  903. {$ENDIF}
  904. {$ENDIF}
  905. {$IFDEF VCL_CROSS_COMPILE}
  906. {$UNDEF KYLIXCOMPAT}
  907. {$ELSE}
  908. {$IFDEF KYLIXCOMPAT}
  909. {$linklib c}
  910. {$ENDIF}
  911. {$ENDIF}
  912. {$IFDEF FPC}
  913. {$DEFINE USE_INLINE}
  914. {$IFDEF FPC_UNICODESTRINGS}
  915. {$DEFINE STRING_IS_UNICODE}
  916. {$ENDIF}
  917. {$ENDIF}
  918. // .NET and Delphi 2009+ support UNICODE strings natively!
  919. //
  920. // NOTE: Do not define UNICODE here. The compiler defines
  921. // the symbol automatically.
  922. {$IFNDEF STRING_IS_UNICODE}
  923. {$DEFINE STRING_IS_ANSI}
  924. {$ENDIF}
  925. {$IFDEF DCC_NEXTGEN}
  926. {$DEFINE NO_ANSI_TYPES}
  927. {$IFDEF USE_OBJECT_ARC}
  928. // TODO: move these to an appropriate section. Not doing this yet because
  929. // it is a major interface change to switch to Generics and we should
  930. // maintain backwards compatibility with earlier compilers for the time
  931. // being. Defining them only here for now because the non-Generic versions
  932. // of these classes have become deprecated by ARC and so we need to start
  933. // taking advantage of the Generics versions...
  934. {$DEFINE HAS_UNIT_Generics_Collections}
  935. {$DEFINE HAS_GENERICS_TList}
  936. {$DEFINE HAS_GENERICS_TThreadList}
  937. {$ENDIF}
  938. {$ENDIF}
  939. // TODO: Ansi data types were disabled on mobile platforms in XE3, but
  940. // UTF8String and RawByteString were re-enabled in 10.1 Berlin! What else,
  941. // if anything, was re-enabled to facilitate that?
  942. //
  943. // UPDATE: In 10.4 Sydney, AnsiChar and AnsiString were re-enabled on
  944. // mobile platforms! NEXTGEN is no longer defined in the mobile compilers.
  945. {$IFDEF NO_ANSI_TYPES}
  946. {$UNDEF HAS_PAnsiChar}
  947. {$ENDIF}
  948. {$IFDEF WIN32}
  949. {$DEFINE WIN32_OR_WIN64}
  950. {$ENDIF}
  951. {$IFDEF WIN64}
  952. {$DEFINE WIN32_OR_WIN64}
  953. {$ENDIF}
  954. {$IFDEF IOS}
  955. // Support for 64-bit ARM iOS Simulator was added in Delphi 11.2
  956. // TODO: how to detect iOS Simulator in FPC? Does it support 64-bit ARM?
  957. {$IFDEF CPUARM}
  958. {$IFNDEF IOSSIMULATOR}
  959. // RLebeau: For iOS devices, OpenSSL cannot be used as an external library,
  960. // it must be statically linked into the app. For the iOS simulator, this
  961. // is not true. Users who want to use OpenSSL in iOS device apps will need
  962. // to add the static OpenSSL library to the project and then include the
  963. // IdSSLOpenSSLHeaders_static unit in their uses clause. It hooks up the
  964. // statically linked functions for the IdSSLOpenSSLHeaders unit to use...
  965. {$DEFINE STATICLOAD_OPENSSL}
  966. {$ENDIF}
  967. {$ENDIF}
  968. {$ENDIF}
  969. {$UNDEF USE_INVALIDATE_MOD_CACHE}
  970. //This must come after the iconv defines because this compiler targets a Unix-like
  971. //operating system. One key difference is that it does have a TEncoding class.
  972. //If this comes before the ICONV defines, it creates problems.
  973. //This also must go before the THandle size calculations.
  974. {$IFDEF VCL_CROSS_COMPILE}
  975. {$IFDEF POSIX}
  976. {$IFNDEF LINUX}
  977. {$DEFINE BSD}
  978. {$ENDIF}
  979. {$DEFINE USE_INVALIDATE_MOD_CACHE}
  980. {$ENDIF}
  981. {$ENDIF}
  982. //IMPORTANT!!!!
  983. //
  984. //Do not remove this!!! This is to work around a conflict. In DCC, MACOS
  985. //will mean OS X. In FreePascal, the DEFINE MACOS means MacIntosh System OS Classic.
  986. {$IFDEF DCC}
  987. // DCC defines MACOS for both iOS and OS X platforms, need to differentiate
  988. {$IFDEF MACOS}
  989. {$IFNDEF IOS}
  990. {$DEFINE OSX}
  991. {$DEFINE DARWIN}
  992. {$ENDIF}
  993. {$ENDIF}
  994. {$ENDIF}
  995. {$IFDEF FPC}
  996. // FPC defines DARWIN for both OSX and iOS, need to differentiate
  997. {$IFDEF DARWIN}
  998. {$IFNDEF IOS}
  999. {$DEFINE OSX}
  1000. {$ENDIF}
  1001. {$ENDIF}
  1002. {$IFDEF MACOS}
  1003. {$DEFINE MACOS_CLASSIC}
  1004. {$ENDIF}
  1005. {$ENDIF}
  1006. {$IFDEF BSD}
  1007. //I think BSD might handle FreeBSD, NetBSD, OpenBSD, and Darwin
  1008. {$IFDEF IOS}
  1009. {$IFDEF CPUARM64}
  1010. {$DEFINE CPU64}
  1011. {$ELSE}
  1012. {$IFDEF CPUARM32}
  1013. {$DEFINE CPU32}
  1014. {$ENDIF}
  1015. {$ENDIF}
  1016. {$ENDIF}
  1017. {$ENDIF}
  1018. {$IFDEF LINUX}
  1019. {$IFDEF LINUX64}
  1020. {$DEFINE CPU64}
  1021. {$ELSE}
  1022. {$IFDEF LINUX32}
  1023. {$DEFINE CPU32}
  1024. {$ENDIF}
  1025. {$ENDIF}
  1026. {$ENDIF}
  1027. {end Unix OS specific stuff}
  1028. {$IFDEF DEBUG}
  1029. {$UNDEF USE_INLINE}
  1030. {$ENDIF}
  1031. // RLebeau 9/5/2013: it would take a lot of work to re-write Indy to support
  1032. // both 0-based and 1-based string indexing, so we'll just turn off 0-based
  1033. // indexing for now...
  1034. {$IFDEF HAS_DIRECTIVE_ZEROBASEDSTRINGS}
  1035. {$ZEROBASEDSTRINGS OFF}
  1036. {$ENDIF}