From dbe013f8473a042b5ff4f8e7242dc0f20dee8507 Mon Sep 17 00:00:00 2001 From: marco Date: Tue, 19 Jun 2001 08:34:16 +0000 Subject: [PATCH] * Peter didn't merge the FreeBSD directory when he merged the Unix one. Fixed --- rtl/freebsd/syscalls.inc | 38 +++++++++++++++++++++++++++++++++++++- rtl/freebsd/sysconst.inc | 13 ++++++++++++- rtl/freebsd/systypes.inc | 9 ++++++--- 3 files changed, 55 insertions(+), 5 deletions(-) diff --git a/rtl/freebsd/syscalls.inc b/rtl/freebsd/syscalls.inc index bfad62ab0b..9f71330a6f 100644 --- a/rtl/freebsd/syscalls.inc +++ b/rtl/freebsd/syscalls.inc @@ -454,10 +454,46 @@ begin {$endif} end; +(*=================== MOVED from syslinux.inc ========================*) +Function Sys_FTruncate(Handle,Pos:longint):longint; //moved from sysunix.inc Do_Truncate +begin + Sys_FTruncate:=do_syscall(syscall_nr_ftruncate,handle,pos,0); +end; + +Function Sys_fstat(fd : longint;var Info:stat):Longint; // This was missing here, instead an fstat call was included in Do_FileSize +begin + Sys_FStat:=do_SysCall(syscall_nr_fstat,fd,longint(@info)); +end; + +{$ifdef NewReaddir} +{$I readdir.inc} +{$endif} + + +{ + Interface to Unix ioctl call. + Performs various operations on the filedescriptor Handle. + Ndx describes the operation to perform. + Data points to data needed for the Ndx function. The structure of this + data is function-dependent. +} +Function Sys_IOCtl(Handle,Ndx: Longint;Data: Pointer):LongInt; // This was missing here, instead hardcoded in Do_IsDevice +begin + Sys_IOCtl:=do_SysCall(syscall_nr_ioctl,handle,Ndx,longint(data)); +end; + +Function Sys_mmap(adr,len,prot,flags,fdes,off:longint):longint; // moved from sysunix.inc, used in sbrk +begin + Sys_mmap:=do_syscall(syscall_nr_mmap,Adr,Len,Prot,Flags,fdes,off,0); +end; + { $Log$ - Revision 1.5 2001-04-23 11:38:30 marco + Revision 1.6 2001-06-19 08:34:16 marco + * Peter didn't merge the FreeBSD directory when he merged the Unix one. Fixed + + Revision 1.5 2001/04/23 11:38:30 marco * Small readdir fix from fixes branch. Revision 1.4 2000/09/19 09:57:35 marco diff --git a/rtl/freebsd/sysconst.inc b/rtl/freebsd/sysconst.inc index ccd046eee1..086cc72417 100644 --- a/rtl/freebsd/sysconst.inc +++ b/rtl/freebsd/sysconst.inc @@ -85,9 +85,20 @@ Const fs_proc = $9fa0; fs_xia = $012FD16D; + { Constansts for MMAP } + MAP_PRIVATE =2; + MAP_ANONYMOUS =$1000; + + {Constansts Termios/Ioctl (used in Do_IsDevice) } + IOCtl_TCGETS=$5401; // TCGETS is also in termios.inc, but the sysunix needs only this + + { $Log$ - Revision 1.3 2001-01-23 20:37:14 marco + Revision 1.4 2001-06-19 08:34:16 marco + * Peter didn't merge the FreeBSD directory when he merged the Unix one. Fixed + + Revision 1.3 2001/01/23 20:37:14 marco * Serial.pp in makefile, Open_Noccty added to sysconst.inc Revision 1.2 2000/09/18 13:42:35 marco diff --git a/rtl/freebsd/systypes.inc b/rtl/freebsd/systypes.inc index 27736e5252..63c5f5dba8 100644 --- a/rtl/freebsd/systypes.inc +++ b/rtl/freebsd/systypes.inc @@ -74,10 +74,10 @@ type end;} PDir =^TDir; - + dev_t = CARDINAL; {$packrecords C} Stat =record {BSD version} - dev, { inode's device } + dev : dev_t; { inode's device } ino : cardinal; { inode's number } mode, { inode protection mode } nlink : word; { number of hard links } @@ -156,7 +156,10 @@ type { $Log$ - Revision 1.5 2001-01-20 16:52:37 marco + Revision 1.6 2001-06-19 08:34:16 marco + * Peter didn't merge the FreeBSD directory when he merged the Unix one. Fixed + + Revision 1.5 2001/01/20 16:52:37 marco * Grr, timeval and timespec were both wrong, and I fixed only one. Now done.