IDE: fixed compilation

git-svn-id: trunk@49921 -
This commit is contained in:
mattias 2015-10-03 15:18:53 +00:00
parent a8ac9b0c60
commit 3c7b17daff
2 changed files with 2 additions and 2 deletions

View File

@ -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;

View File

@ -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