mirror of
https://gitlab.com/freepascal.org/fpc/source.git
synced 2025-08-27 17:10:16 +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}
|
{$endif}
|
||||||
begin
|
begin
|
||||||
{$ifdef WINDOWS}
|
{$ifdef WINDOWS}
|
||||||
|
{$ifdef wince}
|
||||||
|
FUserName:='cedevice';
|
||||||
|
FUserNameLen:=Length(FUserName);
|
||||||
|
{$else}
|
||||||
FUserNameLen := MAX_COMPUTERNAME_LENGTH+1;
|
FUserNameLen := MAX_COMPUTERNAME_LENGTH+1;
|
||||||
SetLength(FUserName, FUserNameLen);
|
SetLength(FUserName, FUserNameLen);
|
||||||
Windows.GetComputerName(PChar(FUserName),
|
Windows.GetComputerName(PChar(FUserName),
|
||||||
@ -2728,7 +2732,8 @@ begin
|
|||||||
{$ifdef DELPHI_3}){$endif}
|
{$ifdef DELPHI_3}){$endif}
|
||||||
);
|
);
|
||||||
SetLength(FUserName, FUserNameLen);
|
SetLength(FUserName, FUserNameLen);
|
||||||
{$else}
|
{$endif wince}
|
||||||
|
{$else}
|
||||||
{$ifdef FPC}
|
{$ifdef FPC}
|
||||||
FpUname(TempName);
|
FpUname(TempName);
|
||||||
FUserName := TempName.machine;
|
FUserName := TempName.machine;
|
||||||
|
@ -785,10 +785,15 @@ const
|
|||||||
LockStart = LockOffset - 1000000000;
|
LockStart = LockOffset - 1000000000;
|
||||||
|
|
||||||
function TPagedFile.LockSection(const Offset, Length: Cardinal; const Wait: Boolean): Boolean;
|
function TPagedFile.LockSection(const Offset, Length: Cardinal; const Wait: Boolean): Boolean;
|
||||||
|
{$ifndef wince}
|
||||||
// assumes FNeedLock = true
|
// assumes FNeedLock = true
|
||||||
var
|
var
|
||||||
Failed: Boolean;
|
Failed: Boolean;
|
||||||
|
{$endif wince}
|
||||||
begin
|
begin
|
||||||
|
{$ifdef wince}
|
||||||
|
Result := True;
|
||||||
|
{$else}
|
||||||
// FNeedLocks => FStream is of type TFileStream
|
// FNeedLocks => FStream is of type TFileStream
|
||||||
Failed := false;
|
Failed := false;
|
||||||
repeat
|
repeat
|
||||||
@ -802,11 +807,16 @@ begin
|
|||||||
Failed := true;
|
Failed := true;
|
||||||
end;
|
end;
|
||||||
until Result or not Wait or Failed;
|
until Result or not Wait or Failed;
|
||||||
|
{$endif wince}
|
||||||
end;
|
end;
|
||||||
|
|
||||||
function TPagedFile.UnlockSection(const Offset, Length: Cardinal): Boolean;
|
function TPagedFile.UnlockSection(const Offset, Length: Cardinal): Boolean;
|
||||||
begin
|
begin
|
||||||
|
{$ifdef wince}
|
||||||
|
Result := True;
|
||||||
|
{$else}
|
||||||
Result := UnlockFile(TFileStream(FStream).Handle, Offset, 0, Length, 0);
|
Result := UnlockFile(TFileStream(FStream).Handle, Offset, 0, Length, 0);
|
||||||
|
{$endif wince}
|
||||||
end;
|
end;
|
||||||
|
|
||||||
function TPagedFile.LockAllPages(const Wait: Boolean): Boolean;
|
function TPagedFile.LockAllPages(const Wait: Boolean): Boolean;
|
||||||
|
Loading…
Reference in New Issue
Block a user