[Lazarus] First fatal error on el capitan
Ondrej Pokorny
lazarus at kluug.net
Sat Oct 3 15:21:10 CEST 2015
On 03.10.2015 13:39, FreeMan wrote:
> Hello,
> svn fpc r31922 lazarus r49919 qtx64 osx 10.11(el capitan) xcode 7.0.1
>
> Copyright (c) 1993-2015 by Florian Klaempfl and others
> /opt/lazarus/ide/advancedipc.pp(227,49) Error: (3284) Operator is not
> overloaded: "Int64" xor "TThreadID"
> advancedipc.pp(688) Fatal: (10026) There were 1 errors compiling
> module, stopping
> Fatal: (1018) Compilation aborted
> make[2]: *** [lazarus] Error 1
> make[1]: *** [ide] Error 2
> make: *** [ide] Error 2
Please test the attached patch.
Ondrej
-------------- next part --------------
Index: ide/advancedipc.pp
===================================================================
--- ide/advancedipc.pp (revision 49918)
+++ ide/advancedipc.pp (working copy)
@@ -224,7 +224,7 @@
repeat
//if Randomize/Random is started from 2 processes at exactly same moment, it returns the same number! -> prevent duplicates by xor GetCurrentThreadId
//the result must be of range 0..$7FFFFFFF (High(Integer))
- Result := Integer((Int64(Random($7FFFFFFF)) xor GetCurrentThreadId) and $7FFFFFFF);
+ Result := Integer((PtrInt(Random($7FFFFFFF)) xor PtrInt(GetCurrentThreadId)) and $7FFFFFFF);
outFileName := GetRequestFileName(Result);
until not RequestExists(outFileName);
end;
Index: ide/ideinstances.pas
===================================================================
--- ide/ideinstances.pas (revision 49918)
+++ ide/ideinstances.pas (working copy)
@@ -501,7 +501,7 @@
{$IFNDEF MSWINDOWS}
//this code is not slowing up IDE start because if there was highest client found (the normal way), we close anyway
Randomize; //random sleep in order to prevent double file locks on unix
- Sleep(Random( PtrInt(($3F+GetCurrentThreadId) and $3F) ));
+ Sleep((PtrInt(Random($3F)) + PtrInt(GetCurrentThreadId)) and $3F);
{$ENDIF}
if not (xServer.StartServer(False) and (xServer.GetPendingRequestCount > 0)) then
Exit;//server is already running or there are no pending message -> close
More information about the Lazarus
mailing list