diff --git a/Source/PascalScript.inc b/Source/PascalScript.inc index 776886e..b28c9ad 100644 --- a/Source/PascalScript.inc +++ b/Source/PascalScript.inc @@ -61,14 +61,14 @@ Defines: {$DEFINE PS_HAVEVARIANT} {$DEFINE PS_DYNARRAY} {$DEFINE PS_NOIDISPATCH} -{$if (fpc_version=2) and (fpc_release>=3) and (fpc_patch>=1)} - {$UNDEF FPC_OLD_FIX} - {$UNDEF PS_FPCSTRINGWORKAROUND} + {$if defined(fpc_version) and defined(fpc_patch) and defined(fpc_release) and (fpc_version=2) and (fpc_release>=3) and (fpc_patch>=1)} + {$UNDEF FPC_OLD_FIX} + {$UNDEF PS_FPCSTRINGWORKAROUND} {FreePascal 2.3.1 and above has much Delphi compatibility bugs fixed} -{$else} - {$DEFINE FPC_OLD_FIX} - {$DEFINE PS_FPCSTRINGWORKAROUND} -{$endif} + {$else} + {$DEFINE FPC_OLD_FIX} + {$DEFINE PS_FPCSTRINGWORKAROUND} + {$ifend} {$DEFINE DELPHI3UP} {$DEFINE DELPHI6UP} {$ENDIF}