From 35cd7e61c981ce473c2c7042d315371eb491ea48 Mon Sep 17 00:00:00 2001 From: marco Date: Wed, 17 Sep 2003 11:24:46 +0000 Subject: [PATCH] * fixes for new macro's --- rtl/linux/bunxfunc.inc | 7 +++++-- rtl/linux/bunxmacr.inc | 27 +++++++++++++++++++++------ rtl/linux/ostypes.inc | 21 +++++++++++++-------- rtl/unix/bunxh.inc | 7 +++++-- 4 files changed, 44 insertions(+), 18 deletions(-) diff --git a/rtl/linux/bunxfunc.inc b/rtl/linux/bunxfunc.inc index 9600a2cd5a..64f3c85bb2 100644 --- a/rtl/linux/bunxfunc.inc +++ b/rtl/linux/bunxfunc.inc @@ -345,7 +345,7 @@ Function fpmkfifo(path:pchar;mode:mode_t):cint; begin -fpmkfifo:=do_syscall(syscall_nr_mknod,TSysParam(path),TSysParam(mode or _S_IFIFO),TSysParam(0)); +fpmkfifo:=do_syscall(syscall_nr_mknod,TSysParam(path),TSysParam(mode or S_IFIFO),TSysParam(0)); end; Function fpchmod(path:pchar;mode:mode_t):cint; @@ -433,7 +433,10 @@ end; { $Log$ - Revision 1.3 2003-09-14 20:15:01 marco + Revision 1.4 2003-09-17 11:24:46 marco + * fixes for new macro's + + Revision 1.3 2003/09/14 20:15:01 marco * Unix reform stage two. Remove all calls from Unix that exist in Baseunix. Revision 1.2 2003/01/05 19:16:45 marco diff --git a/rtl/linux/bunxmacr.inc b/rtl/linux/bunxmacr.inc index 0d50dc452c..2022eadbbd 100644 --- a/rtl/linux/bunxmacr.inc +++ b/rtl/linux/bunxmacr.inc @@ -26,27 +26,39 @@ function FpISDIR(m : TMode): boolean; begin - FpISDIR:=((m and _S_IFMT) = _S_IFDIR); + FpISDIR:=((m and S_IFMT) = S_IFDIR); end; function FpISCHR(m : TMode): boolean; begin - FpISCHR:=((m and _S_IFMT) = _S_IFCHR); + FpISCHR:=((m and S_IFMT) = S_IFCHR); end; function FpISBLK(m : TMode): boolean; begin - FpISBLK:=((m and _S_IFMT) = _S_IFBLK); + FpISBLK:=((m and S_IFMT) = S_IFBLK); end; function FpISREG(m : TMode): boolean; begin - FpISREG:=((m and _S_IFMT) = _S_IFREG); + FpISREG:=((m and S_IFMT) = S_IFREG); end; function FpISFIFO(m : TMode): boolean; begin - FpISFIFO:=((m and _S_IFMT) = _S_IFIFO); + FpISFIFO:=((m and S_IFMT) = S_IFIFO); +end; + +Function FPISLNK(m:TMode):boolean; + +begin + FPISLNK:=((m and S_IFMT) = S_IFLNK); +end; + +Function FPISSOCK(m:TMode):boolean; + +begin + FPISSOCK:=((m and S_IFMT) = S_IFSOCK); end; function wifexited(status : cint): cint; @@ -79,7 +91,10 @@ end; { $Log$ - Revision 1.1 2002-12-18 16:43:26 marco + Revision 1.2 2003-09-17 11:24:46 marco + * fixes for new macro's + + Revision 1.1 2002/12/18 16:43:26 marco * new unix rtl, linux part..... Revision 1.2 2002/11/12 15:31:33 marco diff --git a/rtl/linux/ostypes.inc b/rtl/linux/ostypes.inc index b7c7a1c46a..bcc6d110fc 100644 --- a/rtl/linux/ostypes.inc +++ b/rtl/linux/ostypes.inc @@ -57,17 +57,22 @@ Type ptimezone =^timezone; TTimeZone = timezone; -CONST - _S_IFDIR = $4000; - _S_IFCHR = $2000; - _S_IFBLK = $6000; - _S_IFREG = $8000; - _S_IFMT = $f000; - _S_IFIFO = $1000; +Const // generated by statmacr.c + S_IFMT = 61440; { type of file mask} + S_IFIFO = 4096; { named pipe (fifo)} + S_IFCHR = 8192; { character special} + S_IFDIR = 16384; { directory } + S_IFBLK = 24576; { block special} + S_IFREG = 32768; { regular } + S_IFLNK = 40960; { symbolic link } + S_IFSOCK= 49152; { socket } { $Log$ - Revision 1.3 2003-09-14 20:15:01 marco + Revision 1.4 2003-09-17 11:24:46 marco + * fixes for new macro's + + Revision 1.3 2003/09/14 20:15:01 marco * Unix reform stage two. Remove all calls from Unix that exist in Baseunix. Revision 1.2 2002/12/18 16:43:26 marco diff --git a/rtl/unix/bunxh.inc b/rtl/unix/bunxh.inc index 927a20db18..d3337ca750 100644 --- a/rtl/unix/bunxh.inc +++ b/rtl/unix/bunxh.inc @@ -110,7 +110,7 @@ Type TGrpArr = Array [0..0] of TGid; { C style array workarounds} // The following two are very common, but not POSIX. Function FPISLNK (m:TMode) : Boolean; - Function FPISSOCK (m:TMode : Boolean; + Function FPISSOCK (m:TMode) : Boolean; Function wifexited (Status : cInt): cInt; Function wexitStatus (Status : cInt): cInt; @@ -122,7 +122,10 @@ Type TGrpArr = Array [0..0] of TGid; { C style array workarounds} { $Log$ - Revision 1.6 2003-09-17 11:14:25 marco + Revision 1.7 2003-09-17 11:24:46 marco + * fixes for new macro's + + Revision 1.6 2003/09/17 11:14:25 marco * two extra FPIS added Revision 1.5 2003/09/16 16:13:56 marco