diff --git a/rtl/unix/bunxh.inc b/rtl/unix/bunxh.inc index d8212ae855..bafd6b3738 100644 --- a/rtl/unix/bunxh.inc +++ b/rtl/unix/bunxh.inc @@ -86,6 +86,7 @@ Type TGrpArr = Array [0..0] of TGid; { C style array workarounds} Function FpLseek (fd : cInt; offset : TOff; whence : cInt): TOff; Function FpTime (var tloc : TTime): TTime; Function FpFtruncate (fd : cInt; flength : TOff): cInt; + Function FPSigaction (sig: cInt; act : pSigActionRec; oact : pSigActionRec): cint; Function FpGetEnv (name : pChar): pChar; Function FpGetEnv (name : String): pChar; @@ -106,7 +107,10 @@ Type TGrpArr = Array [0..0] of TGid; { C style array workarounds} { $Log$ - Revision 1.2 2003-01-05 19:11:32 marco + Revision 1.3 2003-06-01 16:28:41 marco + * Enhancements to make the compiler baseunix using. + + Revision 1.2 2003/01/05 19:11:32 marco * small changes originating from introduction of Baseunix to FreeBSD Revision 1.1 2002/12/18 16:49:02 marco diff --git a/rtl/unix/bunxovl.inc b/rtl/unix/bunxovl.inc index 5f5674bc49..bb226721a7 100644 --- a/rtl/unix/bunxovl.inc +++ b/rtl/unix/bunxovl.inc @@ -14,6 +14,8 @@ **********************************************************************} +{$I textrec.inc} +{$I filerec.inc} Function FpLink (existing : AnsiString; newone : AnsiString): cInt; Begin @@ -100,12 +102,51 @@ Begin FpAccess:=FpAccess(pchar(pathname),amode); End; +Function FPFStat(var F:Text;Var Info:stat):Boolean; +{ + Get all information on a text file, and return it in info. +} +begin + FPFStat:=FPFstat(TextRec(F).Handle,INfo)>0; +end; + +Function FPFStat(var F:File;Var Info:stat):Boolean; +{ + Get all information on a untyped file, and return it in info. +} +begin + FPFStat:=FPFstat(FileRec(F).Handle,Info)>0; +end; + +Function FpSignal(signum:longint;Handler:signalhandler):signalhandler; + +var sa,osa : sigactionrec; + +begin + sa.sa_handler:=handler; + FillChar(sa.sa_mask,sizeof(sigset),#0); + sa.sa_flags := 0; +{ if (sigintr and signum) =0 then + {restart behaviour needs libc} + sa.sa_flags :=sa.sa_flags or SA_RESTART; +} + FPSigaction(signum,@sa,@osa); + if getErrNo<>0 then + fpsignal:=NIL + else + fpsignal:=osa.sa_handler; +end; + + + { $Log$ - Revision 1.1 2002-12-18 16:49:02 marco + Revision 1.2 2003-06-01 16:28:41 marco + * Enhancements to make the compiler baseunix using. + + Revision 1.1 2002/12/18 16:49:02 marco * New RTL. Linux system unit and baseunix operational. } - \ No newline at end of file diff --git a/rtl/unix/bunxovlh.inc b/rtl/unix/bunxovlh.inc index 8cc38700bc..eeca5bb31c 100644 --- a/rtl/unix/bunxovlh.inc +++ b/rtl/unix/bunxovlh.inc @@ -32,9 +32,20 @@ Function FpRename (old : AnsiString;newpath: AnsiString): cInt; Function FpStat (path: AnsiString; var buf : stat): cInt; Function FpAccess (pathname : AnsiString; aMode : cInt): cInt; +Function FPFStat(var F:Text;Var Info:stat):Boolean; +Function FPFStat(var F:File;Var Info:stat):Boolean; + +// added. Is a depreciated POSIX function that can be considered alias to +// sigaction +Function FpSignal(signum:longint;Handler:signalhandler):signalhandler; + + { $Log$ - Revision 1.1 2002-12-18 16:49:02 marco + Revision 1.2 2003-06-01 16:28:41 marco + * Enhancements to make the compiler baseunix using. + + Revision 1.1 2002/12/18 16:49:02 marco * New RTL. Linux system unit and baseunix operational. diff --git a/rtl/unix/gensigset.inc b/rtl/unix/gensigset.inc index 82ea227217..8c2e77d6b5 100644 --- a/rtl/unix/gensigset.inc +++ b/rtl/unix/gensigset.inc @@ -15,7 +15,7 @@ **********************************************************************} -function fpsigaddset(var nset : sigset_t;signo:cint): cint; +function fpsigaddset(var nset : tsigset;signo:cint): cint; Begin if (signo<=0) or (signo > SIG_MAXSIG) Then @@ -27,7 +27,7 @@ Begin fpsigaddset:=0; End; -function fpsigdelset(var nset : sigset_t;signo:cint): cint; +function fpsigdelset(var nset : tsigset;signo:cint): cint; Begin if (signo<=0) or (signo > SIG_MAXSIG) Then @@ -39,7 +39,7 @@ Begin fpsigdelset:=0; End; -function fpsigemptyset(var nset : sigset_t):cint; +function fpsigemptyset(var nset : tsigset):cint; var i :longint; @@ -48,7 +48,7 @@ Begin fpsigemptyset:=0; End; -function fpsigfillset(var nset : sigset_t):cint; +function fpsigfillset(var nset : tsigset):cint; var i :longint; @@ -57,7 +57,7 @@ Begin fpsigfillset:=0; End; -function fpsigismember(const nset : sigset_t;signo:cint): cint; +function fpsigismember(const nset : tsigset;signo:cint): cint; Begin if (signo<=0) or (signo > SIG_MAXSIG) Then @@ -73,7 +73,10 @@ End; { $Log$ - Revision 1.2 2002-12-18 16:50:39 marco + Revision 1.3 2003-06-01 16:28:41 marco + * Enhancements to make the compiler baseunix using. + + Revision 1.2 2002/12/18 16:50:39 marco * Unix RTL generic parts. Linux working, *BSD will follow shortly Revision 1.1 2002/11/14 12:20:30 marco