Skip to content

Commit

Permalink
* use FPC_FULLVERSION if available (from 2.2.4 on) as the VERX, VERX_…
Browse files Browse the repository at this point in the history
…Y and VERX_Y_Z are only set for the specific version (e.g. VER2 is not set for FPC 3.0.0)
  • Loading branch information
pascaldragon committed Dec 24, 2019
1 parent 28cb9f4 commit 5821a78
Showing 1 changed file with 16 additions and 4 deletions.
20 changes: 16 additions & 4 deletions jedi.inc
Expand Up @@ -1544,6 +1544,8 @@
{$IFDEF VER1_0}
Please use FPC 2.0 or higher to compile this.
{$ELSE}
{ FPC_FULLVERSION is available from 2.2.4 on }

{$DEFINE SUPPORTS_OUTPARAMS}
{$DEFINE SUPPORTS_WIDECHAR}
{$DEFINE SUPPORTS_WIDESTRING}
Expand Down Expand Up @@ -1599,14 +1601,24 @@

{$DEFINE XPLATFORM_RTL}

{$IFDEF VER2_2}
{$IF DEFINED(FPC_FULLVERSION)}
{ 2.2.4 or newer }

{$DEFINE SUPPORTS_DISPINTERFACE}
{$DEFINE SUPPORTS_IMPLEMENTS}
{$DEFINE SUPPORTS_DISPID}
{$ENDIF}

{$IFDEF VER3}
{$DEFINE SUPPORTS_DEPRECATED_DETAILS}
{$IF FPC_FULLVERSION >= 30000}
{$DEFINE SUPPORTS_DEPRECATED_DETAILS}
{$ENDIF}
{$ELSE}
{ older than 2.2.4 }

{$IFDEF VER2_2}
{$DEFINE SUPPORTS_DISPINTERFACE}
{$DEFINE SUPPORTS_IMPLEMENTS}
{$DEFINE SUPPORTS_DISPID}
{$ENDIF}
{$ENDIF}
{$ENDIF}
{$ENDIF FPC}
Expand Down

4 comments on commit 5821a78

@JensMertelmeyer
Copy link

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Was this tested with Delphi or only with FPC? This new include file breaks compilation on Delphi Tokyo. As far as I see, the following is not valid:
{$IF DEFINED(FPC_FULLVERSION)} {$IF FPC_FULLVERSION >= 30000} (stuff) {$ENDIF} {$ENDIF}
Compilation will break on the second line with "E2026 Constant expression expected". Obviously, the compiler tries to evaluate the 2nd if-statement, although it shouldn't.

@pascaldragon
Copy link
Contributor Author

@pascaldragon pascaldragon commented on 5821a78 Jan 1, 2020 via email

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

@ahausladen
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This should be fixed with 7363fc4cd783ac760cd636cc4c0cbbfe487e3b39

@pascaldragon
Copy link
Contributor Author

@pascaldragon pascaldragon commented on 5821a78 Jan 1, 2020 via email

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Please sign in to comment.