Skip to content

Commit

Permalink
Fixed Delphi 2009-XE compilation
Browse files Browse the repository at this point in the history
  • Loading branch information
ahausladen committed Jul 9, 2019
1 parent 99239cd commit da46ad2
Showing 1 changed file with 5 additions and 0 deletions.
5 changes: 5 additions & 0 deletions jcl/source/common/JclBase.pas
Original file line number Diff line number Diff line change
Expand Up @@ -161,6 +161,11 @@ ULARGE_INTEGER = record
TJclULargeInteger = ULARGE_INTEGER;
PJclULargeInteger = PULARGE_INTEGER;

{$IFNDEF COMPILER16_UP}
LONG = Longint;
{$EXTERNALSYM LONG}
{$ENDIF ~COMPILER16_UP}

// Dynamic Array support
type
TDynByteArray = array of Byte;
Expand Down

2 comments on commit da46ad2

@obones
Copy link
Member

@obones obones commented on da46ad2 Jul 10, 2019

Choose a reason for hiding this comment

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

I'm surprised this is not already defined in Winapi.Windows. Or maybe you did not want to depend on it?

@ahausladen
Copy link
Contributor Author

Choose a reason for hiding this comment

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

It is defined in Winapi.Windows starting with XE2. Older Delphi versions are missing the LONG declaration. All WinAPI LONG usages are written as Longint in the older Windows.pas files.
I could have changed the JclDotNet.pas that now uses LONG, but in the long run having LONG in all Delphi versions may be the better choice.

Please sign in to comment.