mirror of
https://gitlab.com/freepascal.org/fpc/source.git
synced 2025-04-07 22:47:59 +02:00
+ implemented Do_FilePos for the WASI target
git-svn-id: trunk@49529 -
This commit is contained in:
parent
5ee902800c
commit
5718b33dd8
@ -105,8 +105,21 @@ begin
|
||||
end;
|
||||
|
||||
function Do_FilePos(Handle: thandle):Int64;
|
||||
var
|
||||
res: __wasi_errno_t;
|
||||
fpos:__wasi_filesize_t;
|
||||
begin
|
||||
DebugWriteLn('Do_FilePos');
|
||||
res:=__wasi_fd_tell(Handle,@fpos);
|
||||
if res=__WASI_ERRNO_SUCCESS then
|
||||
begin
|
||||
InOutRes:=0;
|
||||
Do_FilePos:=fpos;
|
||||
end
|
||||
else
|
||||
begin
|
||||
InOutRes:=Errno2InoutRes(res);
|
||||
Do_FilePos:=-1;
|
||||
end;
|
||||
end;
|
||||
|
||||
procedure Do_Seek(Handle:thandle;Pos:Int64);
|
||||
|
Loading…
Reference in New Issue
Block a user