Browse Source

+ added WASI sysdir.inc and sysfile.inc (functions not implemented yet)

git-svn-id: branches/wasm@48239 -
nickysn 4 years ago
parent
commit
6df4254c12
3 changed files with 95 additions and 0 deletions
  1. 2 0
      .gitattributes
  2. 35 0
      rtl/wasi/sysdir.inc
  3. 58 0
      rtl/wasi/sysfile.inc

+ 2 - 0
.gitattributes

@@ -12192,6 +12192,8 @@ rtl/unix/x86.pp svneol=native#text/plain
 rtl/wasi/Makefile svneol=native#text/plain
 rtl/wasi/Makefile.fpc svneol=native#text/plain
 rtl/wasi/rtldefs.inc svneol=native#text/plain
+rtl/wasi/sysdir.inc svneol=native#text/plain
+rtl/wasi/sysfile.inc svneol=native#text/plain
 rtl/wasi/sysheap.inc svneol=native#text/plain
 rtl/wasi/sysos.inc svneol=native#text/plain
 rtl/wasi/sysosh.inc svneol=native#text/plain

+ 35 - 0
rtl/wasi/sysdir.inc

@@ -0,0 +1,35 @@
+{
+    This file is part of the Free Pascal run time library.
+
+    Main OS dependant body of the system unit, loosely modelled
+    after POSIX.  *BSD version (Linux version is near identical)
+
+    See the file COPYING.FPC, included in this distribution,
+    for details about the copyright.
+
+    This program is distributed in the hope that it will be useful,
+    but WITHOUT ANY WARRANTY; without even the implied warranty of
+    MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.
+
+ **********************************************************************}
+
+
+{*****************************************************************************
+                           Directory Handling
+*****************************************************************************}
+
+procedure Do_MkDir(s: rawbytestring);
+begin
+end;
+
+procedure Do_RmDir(s: rawbytestring);
+begin
+end;
+
+procedure do_ChDir(s: rawbytestring);
+begin
+end;
+
+procedure do_getdir(drivenr : byte;var dir : rawbytestring);
+begin
+end;

+ 58 - 0
rtl/wasi/sysfile.inc

@@ -0,0 +1,58 @@
+{
+    This file is part of the Free Pascal run time library.
+
+    Main OS dependant body of the system unit, loosely modelled
+    after POSIX.  *BSD version (Linux version is near identical)
+
+    See the file COPYING.FPC, included in this distribution,
+    for details about the copyright.
+
+    This program is distributed in the hope that it will be useful,
+    but WITHOUT ANY WARRANTY; without even the implied warranty of
+    MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.
+
+ **********************************************************************}
+
+procedure Do_Close(Handle:thandle);
+begin
+end;
+
+procedure Do_Erase(p: pchar; pchangeable: boolean);
+begin
+end;
+
+procedure do_truncate (handle:thandle;fpos:int64);
+begin
+end;
+
+procedure Do_Rename(p1,p2:pchar; p1changeable, p2changeable: boolean);
+begin
+end;
+
+function Do_Write(Handle:thandle;Addr:Pointer;Len:Longint):longint;
+begin
+end;
+
+function Do_Read(Handle:thandle;Addr:Pointer;Len:Longint):Longint;
+begin
+end;
+
+function Do_FilePos(Handle: thandle):Int64;
+begin
+end;
+
+procedure Do_Seek(Handle:thandle;Pos:Int64);
+begin
+end;
+
+function Do_Seekend(Handle:thandle):Int64;
+begin
+end;
+
+function Do_FileSize(Handle:thandle):Int64;
+begin
+end;
+
+procedure Do_Open(var f; p: pchar; flags: longint; pchangeable: boolean);
+begin
+end;