* make it work on non-unix too...

git-svn-id: trunk@7315 -
This commit is contained in:
Almindor 2007-05-12 10:30:45 +00:00
parent 2086107cf3
commit fa232dd4ac
2 changed files with 5 additions and 5 deletions

View File

@ -48,7 +48,7 @@ begin
{$else}
r:=send(handle,bufptr^,bufpos,0);
{$endif}
until (r<>-1) or (fpGetErrno <> EsockEINTR);
until (r<>-1) or (SocketError <> EsockEINTR);
bufend:=r;
def_error:=101; {File write error.}
end;
@ -60,13 +60,13 @@ begin
{$else}
r:=recv(handle,bufptr^,bufsize,0);
{$endif}
until (r<>-1) or (fpGetErrno <> EsockEINTR);
until (r<>-1) or (SocketError <> EsockEINTR);
bufend:=r;
def_error:=100; {File read error.}
end;
end;
if r=-1 then
case fpGetErrno of
case SocketError of
EsockEBADF:
{ EsysENOTSOCK:} {Why is this constant not defined? (DM)}
inoutres:=6; {Invalid file handle.}

View File

@ -160,7 +160,7 @@ type
Tsocket=longint; {To easy porting code from Kylix libc unit to sockets unit.}
(*{$ifdef Unix}
{$ifdef Unix}
{$define socketerror_defined}
property socketerror : cint read fpgeterrno;
{$endif}
@ -173,7 +173,7 @@ type
{$ifndef socketerror_defined}
Var
SocketError:cint;
{$endif}*)
{$endif}
function fpsocket (domain:cint; xtype:cint; protocol: cint):cint;
function fprecv (s:cint; buf: pointer; len: size_t; flags: cint):ssize_t;