mirror of
https://gitlab.com/freepascal.org/lazarus/lazarus.git
synced 2025-12-03 03:58:16 +01:00
IDE: fixed compilation
git-svn-id: trunk@49921 -
This commit is contained in:
parent
a8ac9b0c60
commit
3c7b17daff
@ -224,7 +224,7 @@ begin
|
||||
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;
|
||||
|
||||
@ -501,7 +501,7 @@ var
|
||||
{$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
|
||||
|
||||
Loading…
Reference in New Issue
Block a user