mirror of
https://gitlab.com/freepascal.org/fpc/source.git
synced 2025-12-10 10:47:21 +01:00
* updates for zlib compatibility
- testz.exe datafile which is obsolete
This commit is contained in:
parent
762742960e
commit
11f1196877
@ -5,11 +5,15 @@ interface
|
||||
uses
|
||||
zbase;
|
||||
|
||||
const
|
||||
ZLIB_VERSION = '1.1.2';
|
||||
|
||||
type
|
||||
{ Compatibility types }
|
||||
Uint = cardinal;
|
||||
Ulong = Cardinal;
|
||||
Ulongf = Cardinal;
|
||||
PByte = ^Byte;
|
||||
Uint = Cardinal;
|
||||
Ulong = Longint;
|
||||
Ulongf = ULong;
|
||||
Pulongf = ^Ulongf;
|
||||
z_off_t = longint;
|
||||
|
||||
@ -325,4 +329,4 @@ begin
|
||||
get_crc_table:=crc.get_crc_table;
|
||||
end;
|
||||
|
||||
end.
|
||||
end.
|
||||
|
||||
Binary file not shown.
@ -27,16 +27,18 @@ type
|
||||
uInt = Word;
|
||||
{$ELSE}
|
||||
{$IFDEF FPC}
|
||||
uInt = longint; { 16 bits or more }
|
||||
{$INFO Cardinal}
|
||||
{$ELSE}
|
||||
uInt = cardinal; { 16 bits or more }
|
||||
uInt = Longint; { 16 bits or more }
|
||||
{ Should be cardinal, but that crashes }
|
||||
{$ENDIF}
|
||||
{$ENDIF}
|
||||
uIntf = uInt;
|
||||
|
||||
Long = longint;
|
||||
{$ifdef FPC}
|
||||
uLong = Longint;
|
||||
{$else}
|
||||
uLong = LongInt; { 32 bits or more }
|
||||
{$endif}
|
||||
uLongf = uLong;
|
||||
|
||||
voidp = pointer;
|
||||
@ -405,10 +407,6 @@ procedure zcfree(opaque : voidpf; ptr : voidpf);
|
||||
var
|
||||
Handle : THandle;
|
||||
{$endif}
|
||||
{$IFDEF FPC}
|
||||
var
|
||||
memsize : uint;
|
||||
{$ENDIF}
|
||||
begin
|
||||
{$IFDEF DPMI}
|
||||
{h :=} GlobalFreePtr(ptr);
|
||||
@ -424,18 +422,7 @@ begin
|
||||
GlobalUnLock(Handle);
|
||||
GlobalFree(Handle);
|
||||
{$else}
|
||||
{$IFDEF FPC}
|
||||
ASM
|
||||
mov ptr,%edi
|
||||
subl $4,%edi
|
||||
mov (%edi),%eax
|
||||
mov %eax,memsize
|
||||
mov %edi,ptr
|
||||
END ['EAX','EDI'];
|
||||
FreeMem(ptr,memsize); { Delphi 2,3,4 }
|
||||
{$ELSE}
|
||||
FreeMem(ptr); { Delphi 2,3,4 }
|
||||
{$ENDIF}
|
||||
{$endif}
|
||||
{$endif}
|
||||
{$ENDIF}
|
||||
@ -464,18 +451,7 @@ begin
|
||||
Handle := GlobalAlloc(HeapAllocFlags, memsize);
|
||||
p := GlobalLock(Handle);
|
||||
{$else}
|
||||
{$IFDEF FPC}
|
||||
inc(memsize,4);
|
||||
GetMem(p, memsize); { Delphi: p := AllocMem(memsize); }
|
||||
ASM
|
||||
mov memsize,%eax
|
||||
mov p,%edi
|
||||
stosl
|
||||
mov %edi,p
|
||||
END ['EAX','EDI'];
|
||||
{$ELSE}
|
||||
GetMem(p, memsize); { Delphi: p := AllocMem(memsize); }
|
||||
{$ENDIF}
|
||||
{$endif}
|
||||
{$endif}
|
||||
{$ENDIF}
|
||||
|
||||
Loading…
Reference in New Issue
Block a user