core: fixed compile errors when directive ONCEWINSOCK is not used

git-svn-id: https://svn.code.sf.net/p/synalist/code/trunk@135 7c85be65-684b-0410-a082-b2ed4fbef004
This commit is contained in:
geby 2011-01-20 13:35:20 +00:00
parent d628e558ef
commit 08164958e5

View File

@ -1,9 +1,9 @@
{==============================================================================|
| Project : Ararat Synapse | 009.008.003 |
| Project : Ararat Synapse | 009.008.004 |
|==============================================================================|
| Content: Library base |
|==============================================================================|
| Copyright (c)1999-2010, Lukas Gebauer |
| Copyright (c)1999-2011, Lukas Gebauer |
| All rights reserved. |
| |
| Redistribution and use in source and binary forms, with or without |
@ -33,7 +33,7 @@
| DAMAGE. |
|==============================================================================|
| The Initial Developer of the Original Code is Lukas Gebauer (Czech Republic).|
| Portions created by Lukas Gebauer are Copyright (c)1999-2010. |
| Portions created by Lukas Gebauer are Copyright (c)1999-2011. |
| All Rights Reserved. |
|==============================================================================|
| Contributor(s): |
@ -306,6 +306,9 @@ type
FStopFlag: Boolean;
FNonblockSendTimeout: Integer;
FHeartbeatRate: integer;
{$IFNDEF ONCEWINSOCK}
FWsaDataOnce: TWSADATA;
{$ENDIF}
function GetSizeRecvBuffer: Integer;
procedure SetSizeRecvBuffer(Size: Integer);
function GetSizeSendBuffer: Integer;
@ -2996,7 +2999,11 @@ end;
function TBlockSocket.GetWsaData: TWSAData;
begin
{$IFDEF ONCEWINSOCK}
Result := WsaDataOnce;
{$ELSE}
Result := FWsaDataOnce;
{$ENDIF}
end;
function TBlockSocket.GetSocketType: integer;
@ -4236,9 +4243,9 @@ end;
{======================================================================}
{$IFDEF ONCEWINSOCK}
initialization
begin
{$IFDEF ONCEWINSOCK}
if not InitSocketInterface(DLLStackName) then
begin
e := ESynapseError.Create('Error loading Socket interface (' + DLLStackName + ')!');
@ -4247,8 +4254,8 @@ begin
raise e;
end;
synsock.WSAStartup(WinsockLevel, WsaDataOnce);
end;
{$ENDIF}
end;
finalization
begin