Browse Source

* fixed StrLen double definition when compiling WASI with -dFULL_RTL

git-svn-id: branches/wasm@47960 -
nickysn 4 years ago
parent
commit
1911fcd8ce
1 changed files with 11 additions and 11 deletions
  1. 11 11
      rtl/wasi/system.pp

+ 11 - 11
rtl/wasi/system.pp

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