UPXDUMP version 19-NOV-2017 available (Announce)
> Even ppcross8086 (in default Small model) doesn't like this (where "buf:
> Pointer"):
>
> > upxdump.pas(126,7) Warning: Conversion between ordinals and pointers is
> not portable
> > upxdump.pas(126,22) Error: Can't take the address of constant
> expressions
> >
> > Inc(Longint(buf), 4); { 4 }
There is an identifier for that:
- ptrint is the integer equivalent of pointer for all FPC2+ versions.
- intptr is the same, but Delphi XE2+ (and added as alias in FPC 2.6.0 or so)
So probably it is a matter of putting
{$ifndef fpc}
type ptrint = longint;
{$endif}
somewhere central and then doing
inc(ptrint(buf),4);
The situation to support both Delphi 64-bit AND to support old FPC (2.4) versions is more complicated, as well as TP3 that iirc could do small mm?
Complete thread:
- UPXDUMP version 19-NOV-2017 available - rr, 20.11.2017, 00:23 (Announce)
- UPXDUMP version 19-NOV-2017 available - Rugxulo, 21.11.2017, 01:38
- UPXDUMP version 19-NOV-2017 available - rr, 21.11.2017, 23:44
- UPXDUMP version 19-NOV-2017 available - Rugxulo, 22.11.2017, 07:23
- UPXDUMP version 19-NOV-2017 available - marcov, 22.11.2017, 11:29
- UPXDUMP version 19-NOV-2017 available - Rugxulo, 22.11.2017, 07:23
- UPXDUMP version 19-NOV-2017 available - rr, 21.11.2017, 23:44
- UPXDUMP version 19-NOV-2017 available - Rugxulo, 21.11.2017, 01:38