mirror of
https://github.com/doublecmd/doublecmd.git
synced 2026-06-28 10:02:14 +00:00
FIX: Compiling with Lazarus trunk.
This commit is contained in:
parent
135c8be963
commit
71c8131c8d
1 changed files with 12 additions and 7 deletions
|
|
@ -51,7 +51,7 @@ implementation
|
|||
uses
|
||||
LCLProc, syncobjs
|
||||
{$IF lcl_fullversion >= 093100}
|
||||
, LazLogger
|
||||
, LazLogger, LazLoggerBase, LazClasses
|
||||
{$ENDIF}
|
||||
;
|
||||
|
||||
|
|
@ -60,7 +60,7 @@ type
|
|||
{en
|
||||
Logger with thread-safe DebugLn and DbgOut.
|
||||
}
|
||||
TDCLogger = class(TLazLogger)
|
||||
TDCLogger = class(TLazLoggerFile)
|
||||
private
|
||||
DebugLnLock: TCriticalSection;
|
||||
protected
|
||||
|
|
@ -74,6 +74,12 @@ type
|
|||
var
|
||||
DCLogger: TDCLogger;
|
||||
|
||||
function CreateDCLogger: TRefCountedObject;
|
||||
begin
|
||||
Result := TDCLogger.Create;
|
||||
TDCLogger(Result).Assign(GetExistingDebugLogger);
|
||||
end;
|
||||
|
||||
{ TDCLogger }
|
||||
|
||||
procedure TDCLogger.DoDbgOut(const s: string);
|
||||
|
|
@ -236,17 +242,16 @@ end;
|
|||
|
||||
initialization
|
||||
{$IF lcl_fullversion >= 093100}
|
||||
DCLogger := TDCLogger.Create;
|
||||
LazLogger.SetDebugLogger(DCLogger);
|
||||
LazDebugLoggerCreator := @CreateDCLogger;
|
||||
RecreateDebugLogger;
|
||||
{$ELSE}
|
||||
DebugLnLock := TCriticalSection.Create;
|
||||
{$ENDIF}
|
||||
|
||||
{$IF lcl_fullversion < 093100}
|
||||
finalization
|
||||
{$IF lcl_fullversion >= 093100}
|
||||
{$ELSE}
|
||||
DebugLnLock.Free;
|
||||
{$ENDIF}
|
||||
{$ENDIF}
|
||||
|
||||
end.
|
||||
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue