From f1267e770d66655be94fce64175cafa63d945c6a Mon Sep 17 00:00:00 2001 From: Dirk Jansen Date: Sat, 25 Jul 2026 08:49:10 +0200 Subject: [PATCH] Rename EOF property fixing C++ compile error When compiling with C++ Builder the property EOF collides with the EOF constant of the C library. The generated blcksock.hpp file produces an error with the EOF property declaration. The reason is the EOF macro of the C Library which expands the EOF property name to the integer value -1. Renaming the property EOF to EOFsignaled solves this issue. --- blcksock.pas | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/blcksock.pas b/blcksock.pas index 4e6248b..6c3b8f8 100644 --- a/blcksock.pas +++ b/blcksock.pas @@ -1462,7 +1462,7 @@ TCustomSSL = class(TObject) property SNIHost: string read FSNIHost write FSNIHost; {:Flag to signalize closed stream after read or write operation. Used internally to signalise WSAECONNRESET.} - property EOF: boolean read FEOF write FEOF; + property EOFsignaled: boolean read FEOF write FEOF; end; {:@abstract(Default SSL plugin with no SSL support.) @@ -4099,7 +4099,7 @@ function TTCPBlockSocket.RecvBuffer(Buffer: TMemory; Len: Integer): Integer; ResetLastError; LimitBandwidth(Len, FMaxRecvBandwidth, FNextRecv); Result := FSSL.RecvBuffer(Buffer, Len); - if FSSL.EOF then + if FSSL.EOFsignaled then FLastError := WSAECONNRESET else if FSSL.LastError <> 0 then @@ -4187,7 +4187,7 @@ function TTCPBlockSocket.SendBuffer(const Buffer: TMemory; Length: Integer): Int DoMonitor(True, Buffer, Length); {$IFDEF CIL} Result := FSSL.SendBuffer(Buffer, Length); - if FSSL.EOF then + if FSSL.EOFsignaled then FLastError := WSAECONNRESET else if FSSL.LastError <> 0 then @@ -4207,7 +4207,7 @@ function TTCPBlockSocket.SendBuffer(const Buffer: TMemory; Length: Integer): Int LimitBandwidth(y, FMaxSendBandwidth, FNextsend); p := IncPoint(Buffer, x); r := FSSL.SendBuffer(p, y); - if FSSL.EOF then + if FSSL.EOFsignaled then FLastError := WSAECONNRESET else if FSSL.LastError <> 0 then