* fixed StrLen double definition when compiling WASI with -dFULL_RTL

git-svn-id: branches/wasm@47960 -
This commit is contained in:
nickysn 2021-01-02 09:02:32 +00:00
parent 80fd387a51
commit 1911fcd8ce

View File

@ -28,13 +28,6 @@ procedure DebugWriteHexByte(b: Byte);
implementation
{$ifdef FULL_RTL}
{$else FULL_RTL}
procedure fpc_lib_exit; compilerproc;
begin
end;
{$endif FULL_RTL}
type
P__wasi_size_t = ^__wasi_size_t;
__wasi_size_t = longint;
@ -48,10 +41,11 @@ type
buf_len: __wasi_size_t;
end;
function fd_write(fd: __wasi_fd_t;
iovs: P__wasi_ciovec_t;
iovs_len: size_t;
nwritten: P__wasi_size_t): __wasi_errno_t; external 'wasi_unstable';
{$ifdef FULL_RTL}
{$else FULL_RTL}
procedure fpc_lib_exit; compilerproc;
begin
end;
function StrLen(P: PChar): size_t;
var
@ -62,6 +56,12 @@ begin
Inc(i);
StrLen := i;
end;
{$endif FULL_RTL}
function fd_write(fd: __wasi_fd_t;
iovs: P__wasi_ciovec_t;
iovs_len: size_t;
nwritten: P__wasi_size_t): __wasi_errno_t; external 'wasi_unstable';
procedure DebugWrite(const P: PChar);
var