Skip to content
Permalink
Browse files

fix libcurl compilation under Delphi

  • Loading branch information...
Arnaud Bouchez
Arnaud Bouchez committed Mar 9, 2019
1 parent 4c04d83 commit 4cb79e151cc2d036cd557f75fd1c4c7201a9b0c2
Showing with 6 additions and 4 deletions.
  1. +3 −1 SynCommons.pas
  2. +2 −2 SynCrtSock.pas
  3. +1 −1 SynopseCommit.inc
/// encode the stored date/time as text
function ToText(Expanded: boolean=true; FirstTimeChar: AnsiChar='T'; const TZD: RawUTF8=''): RawUTF8;
/// append the stored date and time, in a log-friendly format
// - e.g. append '20110325 19241502' - with no trailing space
// - e.g. append '20110325 19241502' - with no trailing space nor tab
// - as called by TTextWriter.AddCurrentLogTime()
procedure AddLogTime(WR: TTextWriter);
/// append the stored data and time, in apache-like format, to a TTextWriter
/// low-level structure used to compute process memory and CPU usage
{$ifdef UNICODE}TProcessInfo = record{$else}TProcessInfo = object{$endif}
private
{$ifdef MSWINDOWS}
fSysPrevIdle, fSysPrevKernel, fSysPrevUser,
fDiffIdle, fDiffKernel, fDiffUser, fDiffTotal: Int64;
{$endif}
public
/// initialize the system/process resource tracking
function Init: boolean;
@@ -11673,7 +11673,7 @@ procedure LibCurlInitialize;
begin
EnterCriticalSection(SynSockCS);
try
if curl.Module=0 then
if curl.Module=0 then // try to load libcurl once
try
curl.Module := LoadLibrary(LIBCURL_DLL);
{$ifdef Darwin}
@@ -11716,7 +11716,7 @@ procedure LibCurlInitialize;
on E: Exception do begin
if curl.Module<>0 then
FreeLibrary(curl.Module);
curl.Module := {$ifdef KYLIX3}THandle{$endif}(-1); // don't try to load any more
PtrInt(curl.Module) := -1; // <>0 so that won't try to load any more
raise;
end;
end;
@@ -1 +1 @@
'1.18.5092'
'1.18.5093'

0 comments on commit 4cb79e1

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