Skip to content
Permalink
Browse files

Fix compilation of Alpine Linux.

  • Loading branch information
LongDirtyAnimAlf committed Jan 25, 2020
1 parent 2a4d93e commit 8df292bf6ae621214875ffe022122082e93b7d7c
Showing with 25 additions and 0 deletions.
  1. +25 −0 SynLizard.pas
@@ -173,6 +173,13 @@ interface
/// maximum compression level for TSynLizard.compress
LIZARD_MAX_CLEVEL = 49;


{$ifndef LIZARD_EXTERNALONLY}
{$ifndef MSWINDOWS}
function __printf_chk(Flag:integer; Format: PChar; Arguments: array of TVarRec):longint;
{$endif MSWINDOWS}
{$endif LIZARD_EXTERNALONLY}

{$ifdef LIZARD_STANDALONE}

function Lizard_versionNumber: integer; cdecl;
@@ -317,6 +324,24 @@ implementation


{$ifndef LIZARD_EXTERNALONLY}
{$ifndef MSWINDOWS}
function vprintf_mormot(f,a:pansichar):longint; cdecl; external name 'vprintf';
function __printf_chk(Flag:integer; Format: PChar; Arguments: array of TVarRec):longint; alias: '__printf_chk';
var
arg: PIntegerArray;
i: integer;
begin
GetMem(arg, Length(Arguments) * sizeof(Integer));
try
Assert(Low(Arguments) = 0);
for i := Low(Arguments) to High(Arguments) do
arg[i] := Arguments[i].VInteger;
result:=vprintf_mormot(Format, PChar(arg));
finally
FreeMem(arg);
end;
end;
{$endif MSWINDOWS}

function Lizard_versionNumber: integer; cdecl; external;
function Lizard_compressBound(inputSize: integer): integer; cdecl; external;

0 comments on commit 8df292b

Please sign in to comment.
You can’t perform that action at this time.