v0.5.2: bump version (coordinated cross-repo release) + Win64 fix
All checks were successful
Build Fastway Client / build (push) Successful in 51s
All checks were successful
Build Fastway Client / build (push) Successful in 51s
fw_consts.pas is hardlinked across Server/Client/Doors/Common; all
three binaries now report v0.5.2 from a single source. Bundles the
prior cross-repo cleanup commit (Server-canonical shared units, mysql/
postgres Makefile paths, fw_filewatcher + fw_schema added).
Win64 cross-compile fix bundled in (re-issued v0.5.2 — original
v0.5.2 build failed at fm_net_socket.pas because IsPortInUse and
TFMSocket.WaitForData declared Unix-specific local vars (cint /
TFDSet / TTimeVal) outside the {\$IFDEF UNIX} guard. Wrapped each
function's var section AND body in {\$IFDEF UNIX} with a plain
Windows stub. Linux + FreeBSD + Win64 verified locally.
Client functional behavior unchanged on Linux/FreeBSD — thin client
still talks to primary server via REST/WS.
This commit is contained in:
@@ -92,6 +92,7 @@ const
|
||||
{$ENDIF}
|
||||
|
||||
function IsPortInUse(APort: Word): Boolean;
|
||||
{$IFDEF UNIX}
|
||||
var
|
||||
Sock: cint;
|
||||
Addr: TSockAddr;
|
||||
@@ -112,6 +113,13 @@ begin
|
||||
fpClose(Sock);
|
||||
end;
|
||||
end;
|
||||
{$ELSE}
|
||||
begin
|
||||
{ Best-effort: on non-Unix platforms we don't pre-check; the listener
|
||||
will fail fast on bind() if the port is genuinely in use. }
|
||||
Result := False;
|
||||
end;
|
||||
{$ENDIF}
|
||||
|
||||
{ TFMSocket }
|
||||
|
||||
@@ -291,6 +299,7 @@ begin
|
||||
end;
|
||||
|
||||
function TFMSocket.WaitForData(ATimeoutMS: Integer): Boolean;
|
||||
{$IFDEF UNIX}
|
||||
var
|
||||
FDS: TFDSet;
|
||||
TimeVal: TTimeVal;
|
||||
@@ -300,7 +309,6 @@ begin
|
||||
Result := False;
|
||||
if not FConnected then Exit;
|
||||
|
||||
{$IFDEF UNIX}
|
||||
if Assigned(FSocket) then
|
||||
Fd := FSocket.Handle
|
||||
else if Assigned(FStream) and (FStream is THandleStream) then
|
||||
@@ -314,10 +322,13 @@ begin
|
||||
TimeVal.tv_usec := (ATimeoutMS mod 1000) * 1000;
|
||||
Ret := fpSelect(Fd + 1, @FDS, nil, nil, @TimeVal);
|
||||
Result := Ret > 0;
|
||||
{$ELSE}
|
||||
Result := True;
|
||||
{$ENDIF}
|
||||
end;
|
||||
{$ELSE}
|
||||
begin
|
||||
{ Non-Unix: assume data is available; caller will handle EAGAIN. }
|
||||
Result := FConnected;
|
||||
end;
|
||||
{$ENDIF}
|
||||
|
||||
{ TFMListener }
|
||||
|
||||
|
||||
@@ -7,8 +7,8 @@ interface
|
||||
const
|
||||
FW_VERSION_MAJOR = 0;
|
||||
FW_VERSION_MINOR = 5;
|
||||
FW_VERSION_PATCH = 0;
|
||||
FW_VERSION_STRING = '0.5.0';
|
||||
FW_VERSION_PATCH = 2;
|
||||
FW_VERSION_STRING = '0.5.2';
|
||||
FW_PRODUCT_NAME = 'Fastway BBS';
|
||||
FW_PRODUCT_CODE = 'FWBBS';
|
||||
FW_SERVER_BANNER = FW_PRODUCT_NAME + ' v' + FW_VERSION_STRING;
|
||||
|
||||
Reference in New Issue
Block a user