Browse Source

* some changes to ftruncate based procs. Added a "0" as extra parameter

marco 25 years ago
parent
commit
92eee6e7f2
3 changed files with 18 additions and 8 deletions
  1. 5 2
      rtl/bsd/linux.pp
  2. 5 2
      rtl/bsd/syslinux.pp
  3. 8 4
      rtl/bsd/systypes.inc

+ 5 - 2
rtl/bsd/linux.pp

@@ -1438,7 +1438,7 @@ end;
 Function fdTruncate(fd,size:longint):boolean;
 Function fdTruncate(fd,size:longint):boolean;
 
 
 begin
 begin
- fdtruncate:=do_syscall(201,fd,size)=0;
+ fdtruncate:=do_syscall(201,fd,size,0)=0;
  LinuxError:=Errno;
  LinuxError:=Errno;
 end;
 end;
 
 
@@ -3645,7 +3645,10 @@ End.
 
 
 {
 {
   $Log$
   $Log$
-  Revision 1.7  2000-03-16 16:19:28  marco
+  Revision 1.8  2000-03-17 12:58:57  marco
+   * some changes to ftruncate based procs. Added a "0" as extra parameter
+
+  Revision 1.7  2000/03/16 16:19:28  marco
    * fixes that made ppc386 -h working
    * fixes that made ppc386 -h working
 
 
   Revision 1.6  2000/03/02 15:33:20  marco
   Revision 1.6  2000/03/02 15:33:20  marco

+ 5 - 2
rtl/bsd/syslinux.pp

@@ -338,7 +338,7 @@ Procedure Do_Truncate(Handle,Pos:longint);
 
 
 begin
 begin
 {$ifndef crtlib}
 {$ifndef crtlib}
-  do_syscall(201,handle,pos);
+  do_syscall(201,handle,pos,0);
   Errno2Inoutres;
   Errno2Inoutres;
 {$endif}
 {$endif}
 end;
 end;
@@ -689,7 +689,10 @@ End.
 
 
 {
 {
   $Log$
   $Log$
-  Revision 1.2  2000-03-16 16:21:10  marco
+  Revision 1.3  2000-03-17 12:58:57  marco
+   * some changes to ftruncate based procs. Added a "0" as extra parameter
+
+  Revision 1.2  2000/03/16 16:21:10  marco
    * changes to get ppc386 -h working
    * changes to get ppc386 -h working
 
 
   Revision 1.1  2000/03/01 20:23:07  marco
   Revision 1.1  2000/03/01 20:23:07  marco

+ 8 - 4
rtl/bsd/systypes.inc

@@ -38,7 +38,7 @@ type
 
 
 { The following are records for system calls BSD updated }
 { The following are records for system calls BSD updated }
   dirent = packed record
   dirent = packed record
-    ino    : cardinal;		{ This is not inode number, but "a number 
+    ino    : cardinal;		{ This is not inode number, but "a number
 				  unique for each file on a filesystem"}
 				  unique for each file on a filesystem"}
     reclen : word;
     reclen : word;
     d_type,
     d_type,
@@ -58,11 +58,12 @@ type
     nextoff: longint;
     nextoff: longint;
     dd_max : integer; {size of buf. Irrelevant, as buf is of type dirent}
     dd_max : integer; {size of buf. Irrelevant, as buf is of type dirent}
     lock   : pointer;
     lock   : pointer;
+    dummy  : array[0..1023] of char;
   end;
   end;
   PDir =^TDir;
   PDir =^TDir;
 
 
 {$packrecords C}
 {$packrecords C}
- Stat =record {BSD version} 
+ Stat =record {BSD version}
         dev,                            { inode's device }
         dev,                            { inode's device }
         ino        :  cardinal;         { inode's number }
         ino        :  cardinal;         { inode's number }
         mode, 				{ inode protection mode }
         mode, 				{ inode protection mode }
@@ -138,7 +139,10 @@ type
 
 
 {
 {
   $Log$
   $Log$
-  Revision 1.4  2000-02-04 16:55:47  marco
+  Revision 1.5  2000-03-17 12:58:57  marco
+   * some changes to ftruncate based procs. Added a "0" as extra parameter
+
+  Revision 1.4  2000/02/04 16:55:47  marco
    * Fixed tdir, some params need to be 32-bit
    * Fixed tdir, some params need to be 32-bit
 
 
   Revision 1.3  2000/02/03 17:05:55  marco
   Revision 1.3  2000/02/03 17:05:55  marco
@@ -151,4 +155,4 @@ type
   Revision 1.1  2000/02/02 16:36:09  marco
   Revision 1.1  2000/02/02 16:36:09  marco
    * Initial version. Copy of linux version, with BSD stat.
    * Initial version. Copy of linux version, with BSD stat.
 
 
-}
+}