|
16 | 16 | {.$IFDEF IdIPv6} // use IPv6 by default |
17 | 17 |
|
18 | 18 | {$DEFINE INDY100} |
19 | | -{$DEFINE 10_6_2} //so developers can IFDEF for this specific version |
| 19 | +{$DEFINE 10_7_0} //so developers can IFDEF for this product version |
| 20 | +{$DEFINE 10_7_0_0} //so developers can IFDEF for this specific version |
20 | 21 |
|
21 | 22 | // When generating C++Builder output files, certain workarounds to compiler |
22 | 23 | // problems need to be enabled! When invoking DCC on the command-line, use |
|
36 | 37 |
|
37 | 38 | // $DEFINE the following if the global objects in the IdStack and IdThread |
38 | 39 | // units should be freed on finalization |
39 | | -{.$DEFINE FREE_ON_FINAL} |
| 40 | +{$IFDEF FPC} |
| 41 | +{$DEFINE FREE_ON_FINAL} |
| 42 | +{$ELSE} |
40 | 43 | {$UNDEF FREE_ON_FINAL} |
| 44 | +{$ENDIF} |
41 | 45 |
|
42 | 46 | // Make sure the following is $DEFINE'd only for suitable environments |
43 | 47 | // as specified further below. This works in conjunction with the |
|
440 | 444 | {$ENDIF} |
441 | 445 | {$ENDIF} |
442 | 446 |
|
| 447 | + //Delphi & CBuilder 12.0 Athens (Yukon) |
| 448 | + {$IFDEF VER360} |
| 449 | + {$DEFINE VCL_12} |
| 450 | + {$IFDEF CBUILDER} |
| 451 | + {$DEFINE CBUILDER_12} |
| 452 | + {$ELSE} |
| 453 | + {$DEFINE DELPHI_12} |
| 454 | + {$ENDIF} |
| 455 | + {$ENDIF} |
| 456 | + |
| 457 | + //Delphi & CBuilder 13.0+ (?) |
| 458 | + {$IFDEF CONDITIONALEXPRESSIONS} |
| 459 | + {$IF CompilerVersion >= 37} |
| 460 | + {$MESSAGE WARN 'Unknown compiler version detected! Assuming >= 13.x '} |
| 461 | + {$DEFINE VCL_UNKNOWN_VERSION} |
| 462 | + {$DEFINE VCL_13} |
| 463 | + {$IFDEF CBUILDER} |
| 464 | + {$DEFINE CBUILDER_13} |
| 465 | + {$ELSE} |
| 466 | + {$DEFINE DELPHI_13} |
| 467 | + {$ENDIF} |
| 468 | + {$IFEND} |
| 469 | + {$ENDIF} |
| 470 | + |
443 | 471 | // Kylix |
444 | 472 | // |
445 | 473 | //Important: Don't use CompilerVersion here as IF's are evaluated before |
|
526 | 554 | // {$MODE DelphiUnicode} anyway, and then deal with any RTL function issues |
527 | 555 | // on an as-needed basis... |
528 | 556 | {$MODE Delphi} |
529 | | - {$IFDEF FPC_2_7_1_OR_ABOVE} |
530 | | - {.$MODE DelphiUnicode} |
531 | | - {.$MODESWITCH UnicodeStrings} |
532 | | - {.$CODEPAGE UTF8} // needed for Unicode string literals to work properly |
533 | | - {$ENDIF} |
534 | 557 | //note that we may need further defines for widget types depending on |
535 | 558 | //what we do and what platforms we support in FPC. |
536 | 559 | //I'll let Marco think about that one. |
|
729 | 752 |
|
730 | 753 | {.$IFDEF FPC_2_7_1_OR_ABOVE} |
731 | 754 | // support for RawByteString and UnicodeString |
| 755 | + {.$MODE DelphiUnicode} |
| 756 | + {.$MODESWITCH UnicodeStrings} |
| 757 | + {.$CODEPAGE UTF8} // needed for Unicode string literals to work properly |
732 | 758 | {.$DEFINE VCL_2009} |
733 | 759 | {.$DEFINE DELPHI_2009} |
734 | 760 | {.$ELSE} |
|
739 | 765 |
|
740 | 766 | // end FPC |
741 | 767 |
|
742 | | -{$IFDEF VCL_11} |
| 768 | +{$IFDEF VCL_13} |
| 769 | + {$DEFINE VCL_13_OR_ABOVE} |
| 770 | +{$ENDIF} |
| 771 | + |
| 772 | +{$IFDEF VCL_13_OR_ABOVE} |
| 773 | + {$DEFINE VCL_12_OR_ABOVE} |
| 774 | +{$ELSE} |
| 775 | + {$IFDEF VCL_12} |
| 776 | + {$DEFINE VCL_12_OR_ABOVE} |
| 777 | + {$ENDIF} |
| 778 | +{$ENDIF} |
| 779 | + |
| 780 | +{$IFDEF VCL_12_OR_ABOVE} |
743 | 781 | {$DEFINE VCL_11_OR_ABOVE} |
| 782 | +{$ELSE} |
| 783 | + {$IFDEF VCL_11} |
| 784 | + {$DEFINE VCL_11_OR_ABOVE} |
| 785 | + {$ENDIF} |
744 | 786 | {$ENDIF} |
745 | 787 |
|
746 | 788 | {$IFDEF VCL_11_OR_ABOVE} |
|
982 | 1024 | {$DEFINE ENDIAN_LITTLE} |
983 | 1025 | {$IFNDEF VCL_6_OR_ABOVE} |
984 | 1026 | {$IFNDEF POSIX} |
985 | | - {$DEFINE MSWINDOWS} |
| 1027 | + {$DEFINE MSWINDOWS} |
986 | 1028 | {$ENDIF} |
987 | 1029 | {$ENDIF} |
988 | 1030 | {$IFDEF MSWINDOWS} |
|
1064 | 1106 | {$ENDIF} |
1065 | 1107 | {$DEFINE HAS_GetObjectProp} |
1066 | 1108 | {$DEFINE HAS_TObjectList} |
| 1109 | + {$DEFINE HAS_StrToInt64Def} |
1067 | 1110 | {$ENDIF} |
1068 | 1111 |
|
1069 | 1112 | {$IFDEF VCL_6_OR_ABOVE} |
|
1115 | 1158 | {$DEFINE HAS_NAMED_THREADS} |
1116 | 1159 | {$DEFINE HAS_TStrings_NameValueSeparator} |
1117 | 1160 | {$DEFINE HAS_TStrings_ValueFromIndex} |
| 1161 | + // Note: there is a ZLib unit available, but it doesn't have everything |
| 1162 | + // that is available in the System.ZLib unit in Delphi XE2+, so we are |
| 1163 | + // not going to use this ZLib unit yet... |
| 1164 | + {.$DEFINE HAS_UNIT_ZLib} |
1118 | 1165 | {$ENDIF} |
1119 | 1166 | {$DEFINE HAS_TFormatSettings} |
1120 | 1167 | {$DEFINE HAS_PosEx} |
|
1134 | 1181 | {$ENDIF} |
1135 | 1182 | {$ENDIF} |
1136 | 1183 |
|
1137 | | -{$IFNDEF VCL_2005_OR_ABOVE} |
| 1184 | +{$IFDEF VCL_2005_OR_ABOVE} |
| 1185 | + {$IFDEF DCC} |
| 1186 | + // class helpers were first introduced in D2005, but were buggy and not |
| 1187 | + // officially supported until D2006... |
| 1188 | + {.$DEFINE HAS_CLASS_HELPER} |
| 1189 | + {$ENDIF} |
| 1190 | +{$ELSE} |
1138 | 1191 | {$IFDEF DCC} |
1139 | 1192 | // InterlockedCompareExchange() was declared in the Windows unit using Pointer |
1140 | 1193 | // parameters until Delphi 2005, when it was switched to Longint parameters |
|
1146 | 1199 | {$IFDEF VCL_2006_OR_ABOVE} |
1147 | 1200 | {$DEFINE USE_INLINE} |
1148 | 1201 | {$DEFINE HAS_2PARAM_FileAge} |
| 1202 | + {$DEFINE HAS_TStrings_LineBreak} // TODO: when was LineBreak introduced? |
| 1203 | + {$DEFINE HAS_CLASS_HELPER} |
1149 | 1204 | {$IFDEF WINDOWS} |
1150 | 1205 | // System.RegisterExpectedMemoryLeak() is only available on Windows at this time |
1151 | 1206 | {$DEFINE HAS_System_RegisterExpectedMemoryLeak} |
|
1166 | 1221 | // Native(U)Int exist but are buggy, so do not use them yet |
1167 | 1222 | {.$DEFINE HAS_NativeInt} |
1168 | 1223 | {.$DEFINE HAS_NativeUInt} |
1169 | | - {$DEFINE HAS_StrToInt64Def} |
1170 | 1224 | {$DEFINE HAS_DWORD_PTR} |
1171 | 1225 | {$DEFINE HAS_ULONG_PTR} |
1172 | 1226 | {$DEFINE HAS_ULONGLONG} |
|
1205 | 1259 | {$DEFINE HAS_UInt16} |
1206 | 1260 | {$DEFINE HAS_Int32} |
1207 | 1261 | {$DEFINE HAS_UInt32} |
| 1262 | + {$DEFINE HAS_UIntToStr} |
1208 | 1263 | // UInt64 is now emitted as unsigned __int64 in HPP files |
1209 | 1264 | {$IFDEF CBUILDER} |
1210 | 1265 | {$UNDEF BROKEN_UINT64_HPPEMIT} |
|
1263 | 1318 | {$DEFINE HAS_ComponentPlatformsAttribute_OSX32} |
1264 | 1319 | {$DEFINE HAS_System_ReturnAddress} |
1265 | 1320 | {$DEFINE HAS_DIRECTIVE_WARN_DEFAULT} |
| 1321 | + {$DEFINE HAS_UNIT_System_ZLib} |
1266 | 1322 | {$ENDIF} |
1267 | 1323 |
|
1268 | 1324 | {$IFDEF VCL_XE3_OR_ABOVE} |
|
1456 | 1512 | {$ENDIF} |
1457 | 1513 | {$DEFINE HAS_UNIT_ctypes} |
1458 | 1514 | {$DEFINE HAS_sLineBreak} |
| 1515 | + {$DEFINE HAS_TStrings_LineBreak} // TODO: when was LineBreak introduced? |
1459 | 1516 | {$IFDEF FPC_HAS_UNICODESTRING} |
1460 | 1517 | {$DEFINE HAS_UnicodeString} |
1461 | 1518 | {$ELSE} |
|
1475 | 1532 | {$IFDEF FPC_2_6_0_OR_ABOVE} |
1476 | 1533 | {$DEFINE HAS_NativeInt} |
1477 | 1534 | {$DEFINE HAS_NativeUInt} |
| 1535 | + {$DEFINE HAS_CLASS_HELPER} |
1478 | 1536 | {$ENDIF} |
1479 | 1537 | {$IFDEF FPC_2_6_2_OR_ABOVE} |
1480 | 1538 | {$DEFINE HAS_Int8} |
|
1505 | 1563 | {$IFDEF FPC_3_1_1_OR_ABOVE} |
1506 | 1564 | {$DEFINE HAS_STATIC_TThread_ForceQueue} // requires rev 37359+ |
1507 | 1565 | {$DEFINE HAS_PRawByteString} |
| 1566 | + {$DEFINE HAS_UIntToStr} // requires rev 40529+ |
1508 | 1567 | {$ENDIF} |
1509 | 1568 | {$ENDIF} |
1510 | 1569 |
|
|
1599 | 1658 | {$IFDEF WIN32_OR_WIN64} |
1600 | 1659 | {$DEFINE USE_ZLIB_UNIT} |
1601 | 1660 | {$IFNDEF DCC_NEXTGEN} |
1602 | | - {$DEFINE USE_OPENSSL} // !!!·MOVED·HERE·BY·EMBT |
| 1661 | + {$DEFINE USE_OPENSSL} // !!! MOVED HERE BY EMBT |
1603 | 1662 | {$DEFINE USE_SSPI} |
1604 | 1663 | {$IFDEF STRING_IS_UNICODE} |
1605 | 1664 | {$DEFINE SSPI_UNICODE} |
|
1627 | 1686 | {$IFDEF UNIX} |
1628 | 1687 | {$DEFINE USE_OPENSSL} |
1629 | 1688 | {$DEFINE USE_ZLIB_UNIT} |
1630 | | - {$DEFINE HAS_getifaddrs} |
| 1689 | + {$DEFINE HAS_getifaddrs} |
1631 | 1690 | {$ENDIF} |
1632 | 1691 |
|
1633 | 1692 | {$IFDEF MACOS} |
|
1665 | 1724 | {$DEFINE HAS_getifaddrs} |
1666 | 1725 | {$ENDIF} |
1667 | 1726 |
|
| 1727 | +{$IFDEF ANDROID} |
| 1728 | + {$UNDEF HAS_getifaddrs} |
| 1729 | +{$ENDIF} |
| 1730 | + |
1668 | 1731 | {$IFDEF FPC_REQUIRES_PROPER_ALIGNMENT} |
1669 | 1732 | {$DEFINE REQUIRES_PROPER_ALIGNMENT} |
1670 | 1733 | {$ENDIF} |
|
0 commit comments