mirror of
https://gitlab.com/freepascal.org/fpc/source.git
synced 2025-09-13 01:29:40 +02:00
* make it work on non-unix too...
git-svn-id: trunk@7315 -
This commit is contained in:
parent
2086107cf3
commit
fa232dd4ac
@ -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.}
|
||||
|
@ -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;
|
||||
|
Loading…
Reference in New Issue
Block a user