Next fixes for FPC...

git-svn-id: https://svn.code.sf.net/p/synalist/code/trunk@102 7c85be65-684b-0410-a082-b2ed4fbef004
This commit is contained in:
geby 2009-09-30 07:34:42 +00:00
parent d36aba9935
commit 604d1b18aa

View File

@ -523,7 +523,7 @@ end;
function Connect(s: TSocket; const name: TVarSin): Integer; function Connect(s: TSocket; const name: TVarSin): Integer;
begin begin
if fpConnect(s, @name, SizeOfVarSin(name)) then if fpConnect(s, @name, SizeOfVarSin(name)) = 0 then
Result := 0 Result := 0
else else
Result := SOCKET_ERROR; Result := SOCKET_ERROR;
@ -535,7 +535,7 @@ var
begin begin
len := SizeOf(name); len := SizeOf(name);
FillChar(name, len, 0); FillChar(name, len, 0);
Result := fpGetSocketName(s, @name, @Len); Result := fpGetSockName(s, @name, @Len);
end; end;
function GetPeerName(s: TSocket; var name: TVarSin): Integer; function GetPeerName(s: TSocket; var name: TVarSin): Integer;
@ -572,7 +572,7 @@ var
x: integer; x: integer;
begin begin
x := SizeOf(from); x := SizeOf(from);
Result := sockets.RecvFrom(s, pointer(Buf), len, flags, @from, @x); Result := fpRecvFrom(s, pointer(Buf), len, flags, @from, @x);
end; end;
function Accept(s: TSocket; var addr: TVarSin): TSocket; function Accept(s: TSocket; var addr: TVarSin): TSocket;
@ -612,7 +612,7 @@ end;
function Listen(s: TSocket; backlog: Integer): Integer; function Listen(s: TSocket; backlog: Integer): Integer;
begin begin
if fpListen(s, backlog) then if fpListen(s, backlog) = 0 then
Result := 0 Result := 0
else else
Result := SOCKET_ERROR; Result := SOCKET_ERROR;