mirror of
https://gitlab.com/freepascal.org/fpc/source.git
synced 2025-04-16 05:59:28 +02:00
* Fixed compilation for wince.
git-svn-id: trunk@9478 -
This commit is contained in:
parent
10d32696df
commit
6a7ad3568a
@ -2720,6 +2720,10 @@ var
|
||||
{$endif}
|
||||
begin
|
||||
{$ifdef WINDOWS}
|
||||
{$ifdef wince}
|
||||
FUserName:='cedevice';
|
||||
FUserNameLen:=Length(FUserName);
|
||||
{$else}
|
||||
FUserNameLen := MAX_COMPUTERNAME_LENGTH+1;
|
||||
SetLength(FUserName, FUserNameLen);
|
||||
Windows.GetComputerName(PChar(FUserName),
|
||||
@ -2728,7 +2732,8 @@ begin
|
||||
{$ifdef DELPHI_3}){$endif}
|
||||
);
|
||||
SetLength(FUserName, FUserNameLen);
|
||||
{$else}
|
||||
{$endif wince}
|
||||
{$else}
|
||||
{$ifdef FPC}
|
||||
FpUname(TempName);
|
||||
FUserName := TempName.machine;
|
||||
|
@ -785,10 +785,15 @@ const
|
||||
LockStart = LockOffset - 1000000000;
|
||||
|
||||
function TPagedFile.LockSection(const Offset, Length: Cardinal; const Wait: Boolean): Boolean;
|
||||
{$ifndef wince}
|
||||
// assumes FNeedLock = true
|
||||
var
|
||||
Failed: Boolean;
|
||||
{$endif wince}
|
||||
begin
|
||||
{$ifdef wince}
|
||||
Result := True;
|
||||
{$else}
|
||||
// FNeedLocks => FStream is of type TFileStream
|
||||
Failed := false;
|
||||
repeat
|
||||
@ -802,11 +807,16 @@ begin
|
||||
Failed := true;
|
||||
end;
|
||||
until Result or not Wait or Failed;
|
||||
{$endif wince}
|
||||
end;
|
||||
|
||||
function TPagedFile.UnlockSection(const Offset, Length: Cardinal): Boolean;
|
||||
begin
|
||||
{$ifdef wince}
|
||||
Result := True;
|
||||
{$else}
|
||||
Result := UnlockFile(TFileStream(FStream).Handle, Offset, 0, Length, 0);
|
||||
{$endif wince}
|
||||
end;
|
||||
|
||||
function TPagedFile.LockAllPages(const Wait: Boolean): Boolean;
|
||||
|
Loading…
Reference in New Issue
Block a user