mirror of
https://gitlab.com/freepascal.org/fpc/source.git
synced 2025-11-25 20:57:17 +01:00
+ Fixes for 1.1 - revised from Marcos stuff
This commit is contained in:
parent
cfd870ed59
commit
852b31002d
@ -190,7 +190,7 @@ uses
|
|||||||
{$IFDEF VER1_0}
|
{$IFDEF VER1_0}
|
||||||
Linux;
|
Linux;
|
||||||
{$ELSE}
|
{$ELSE}
|
||||||
Baseunix,Unix;
|
baseunix,Unix;
|
||||||
{$ENDIF}
|
{$ENDIF}
|
||||||
|
|
||||||
resourcestring
|
resourcestring
|
||||||
@ -202,7 +202,11 @@ resourcestring
|
|||||||
SSocketAcceptError = 'Connection accept failed: %s';
|
SSocketAcceptError = 'Connection accept failed: %s';
|
||||||
SSocketIsActive = 'Cannot change parameters while active';
|
SSocketIsActive = 'Cannot change parameters while active';
|
||||||
|
|
||||||
|
{$ifndef VER1_0}
|
||||||
|
Const
|
||||||
|
Sys_EAGAIN = ESYSEAGAIN;
|
||||||
|
Sys_EINPROGRESS = ESYSEINPROGRESS;
|
||||||
|
{$endif}
|
||||||
|
|
||||||
|
|
||||||
// TSocketStream
|
// TSocketStream
|
||||||
@ -219,7 +223,7 @@ begin
|
|||||||
if Result = -1 then
|
if Result = -1 then
|
||||||
begin
|
begin
|
||||||
Result := 0;
|
Result := 0;
|
||||||
if SocketError <> {$ifdef ver1_0}Sys_EAGAIN{$else}ESysEAgain{$endif} then
|
if SocketError <> Sys_EAGAIN then
|
||||||
Disconnected;
|
Disconnected;
|
||||||
end;
|
end;
|
||||||
end;
|
end;
|
||||||
@ -230,7 +234,7 @@ begin
|
|||||||
if Result = -1 then
|
if Result = -1 then
|
||||||
begin
|
begin
|
||||||
Result := 0;
|
Result := 0;
|
||||||
if SocketError <> {$ifdef ver1_0}Sys_EAGAIN{$else}ESysEAgain{$endif} then
|
if SocketError <> Sys_EAGAIN then
|
||||||
Disconnected;
|
Disconnected;
|
||||||
end;
|
end;
|
||||||
end;
|
end;
|
||||||
@ -516,7 +520,7 @@ begin
|
|||||||
SockAddr.Port := ShortHostToNet(Port);
|
SockAddr.Port := ShortHostToNet(Port);
|
||||||
SockAddr.Addr := Cardinal(HostAddr);
|
SockAddr.Addr := Cardinal(HostAddr);
|
||||||
Sockets.Connect(Stream.Handle, SockAddr, SizeOf(SockAddr));
|
Sockets.Connect(Stream.Handle, SockAddr, SizeOf(SockAddr));
|
||||||
if (SocketError <> {$ifdef ver1_0}sys_EINPROGRESS{$else}ESysEInProgress{$endif}) and (SocketError <> 0) then
|
if (SocketError <> sys_EINPROGRESS) and (SocketError <> 0) then
|
||||||
raise ESocketError.CreateFmt(SSocketConnectFailed,
|
raise ESocketError.CreateFmt(SSocketConnectFailed,
|
||||||
[GetPeerName, StrError(SocketError)]);
|
[GetPeerName, StrError(SocketError)]);
|
||||||
end;
|
end;
|
||||||
@ -581,7 +585,10 @@ end.
|
|||||||
|
|
||||||
{
|
{
|
||||||
$Log$
|
$Log$
|
||||||
Revision 1.3 2004-02-02 14:39:48 marco
|
Revision 1.4 2004-02-20 20:46:21 michael
|
||||||
|
+ Fixes for 1.1 - revised from Marcos stuff
|
||||||
|
|
||||||
|
Revision 1.3 2004/02/02 14:39:48 marco
|
||||||
* 1.0.x problems fixed
|
* 1.0.x problems fixed
|
||||||
|
|
||||||
Revision 1.2 2004/01/31 19:13:14 sg
|
Revision 1.2 2004/01/31 19:13:14 sg
|
||||||
|
|||||||
Loading…
Reference in New Issue
Block a user