From 912fae0d76a25760aec67071be36e8d369e4864b Mon Sep 17 00:00:00 2001 From: marco Date: Mon, 16 Jul 2001 19:51:36 +0000 Subject: [PATCH] * A small note, copied from the Solaris patch. Do_close needs errnotoiores? --- rtl/unix/sysunix.inc | 19 ++++++++++++++----- 1 file changed, 14 insertions(+), 5 deletions(-) diff --git a/rtl/unix/sysunix.inc b/rtl/unix/sysunix.inc index 7c280c00e8..23e0f204e3 100644 --- a/rtl/unix/sysunix.inc +++ b/rtl/unix/sysunix.inc @@ -38,6 +38,7 @@ var {$i signal.inc} {$i syscalls.inc } + {***************************************************************************** Misc. System Dependent Functions *****************************************************************************} @@ -65,7 +66,11 @@ begin if l=0 then begin str(sys_getpid,hs); - hs:='/proc/'+hs+'/exe'#0; + {$ifdef FreeBSD} + hs:='/proc/'+hs+'/file'#0; + {$else} + hs:='/proc/'+hs+'/exe'#0; + {$endif} i:=Sys_readlink(@hs[1],@link[1],high(link)); { it must also be an absolute filename, linux 2.0 points to a memory location so this will skip that } @@ -196,6 +201,7 @@ end; Procedure Do_Close(Handle:Longint); Begin sys_close(Handle); + {Errno2Inoutres;} End; @@ -212,7 +218,6 @@ Begin Errno2Inoutres; End; - Function Do_Write(Handle,Addr,Len:Longint):longint; Begin repeat @@ -284,6 +289,7 @@ Procedure Do_Open(var f;p:pchar;flags:longint); } var oflags : longint; + Begin { close first if opened } if ((flags and $10000)=0) then @@ -555,7 +561,7 @@ begin {$ifdef I386} fpustate:=0; res:=200; - {$ifndef BSD} + {$ifndef FreeBSD} if assigned(SigContext.fpstate) then fpuState:=SigContext.fpstate^.sw; {$else} @@ -597,7 +603,7 @@ begin if res<>0 then begin {$ifdef I386} - {$ifdef BSD} + {$ifdef FreeBSD} HandleErrorAddrFrame(res,SigContext.sc_eip,SigContext.sc_ebp); {$else} HandleErrorAddrFrame(res,SigContext.eip,SigContext.ebp); @@ -712,7 +718,10 @@ End. { $Log$ - Revision 1.14 2001-07-15 11:57:16 peter + Revision 1.15 2001-07-16 19:51:36 marco + * A small note, copied from the Solaris patch. Do_close needs errnotoiores? + + Revision 1.14 2001/07/15 11:57:16 peter * merged m68k updates Revision 1.13 2001/07/13 22:05:09 peter