Skip to content

Platform: fix Delphi/POSIX backend against the real Posix.* declarations - #228

Merged
FMXExpress merged 1 commit into
mainfrom
claude/platform-delphi-posix-fixes
Jun 11, 2026
Merged

FMXExpress merged 1 commit into
mainfrom
claude/platform-delphi-posix-fixes

Conversation

@FMXExpress

Copy link
Copy Markdown
Owner

Fixes the nine dcc64-Linux errors in PasClaw.Platform.pas's Delphi/POSIX backend (the {$ELSE} of MSWINDOWS for non-FPC builds). The block was written with FPC-flavoured names that don't exist in Delphi's Posix.* units. All fixes follow from the actual RTL declarations:

Summary

  • Lines 719/748, E2010 "Pointer and untyped parameter" — Delphi's Posix.Unistd declares __write/__read with Buf: Pointer, and an untyped param doesn't implicitly convert. Pass @Buf from WriteBytes/ReadAvailable's untyped params.
  • Line 733, E2003 TFDSet — that's FPC's name; Delphi's Posix.SysSelect keeps the C type name fd_set.
  • Line 734, E2003 timeval — lives in Posix.SysTime, which wasn't in the uses clause (Posix.SysSelect does not re-export it). Added.
  • Line 742, E2029 "')' expected but ',' found" — the interesting one: Delphi's FD helpers are __-prefixed (__FD_SET) because the bare name would collide case-insensitively with the fd_set type. dcc64 therefore parsed FD_SET(fd, set) as a typecast of fd_set and choked on the second argument. The 745/746/756 errors were cascades of this.
  • Lines 763/812, E2010 "PInteger and Integer" — Delphi's waitpid takes stat_loc: PInteger (FPC's fpWaitPid uses a var param); pass @Status.

Also swept the rest of the Delphi-POSIX block for latent issues the compiler hadn't reached: fork/dup2/__close/kill/_exit/WIFEXITED/WEXITSTATUS/select(@TimeoutFd, ..., @Tv) all match their Delphi RTL declarations, and FPid: Integer ↔ pid_t converts implicitly.

Test plan

  • FPC make smoke clean (FPC uses the fcl-process backend; this block isn't compiled there).
  • Full make test green.
  • dcc64 Linux: all nine reported errors should clear.
  • Delphi Linux runtime: shell_exec / MCP stdio spawn paths exercise Spawn/ReadAvailable/Running end-to-end.

https://claude.ai/code/session_01TBcLtmpj7dqA5tyFbGnQon


Generated by Claude Code

The Delphi-POSIX branch of PasClaw.Platform.pas (the {$ELSE} of
MSWINDOWS for non-FPC builds) was written with FPC-flavoured names
that don't exist in Delphi's Posix.* units; dcc64 on Linux rejected
nine sites. All fixes follow from the actual RTL declarations:

  - __write / __read take Buf: Pointer, not an untyped param.
    Pass @buf from the untyped const/var params of WriteBytes /
    ReadAvailable (E2010 "Pointer and untyped parameter" at 719/748).

  - TFDSet is FPC's name; Delphi's Posix.SysSelect keeps the C
    type name fd_set (E2003 at 733).

  - timeval lives in Posix.SysTime, which wasn't in the uses
    clause -- Posix.SysSelect does not re-export it (E2003 at 734).

  - Delphi's FD_* helpers are __-prefixed (__FD_SET) because the
    bare name would collide case-insensitively with the fd_set
    type. That collision is also why the old call drew E2029
    "')' expected but ',' found": dcc64 parsed FD_SET(fd, set) as
    a TYPECAST of the fd_set type and choked on the second
    argument (742; the 745/746/756 errors were cascade).

  - waitpid takes stat_loc: PInteger (not var Integer like FPC's
    fpWaitPid); pass @Status (E2010 at 763/812).

FPC build untouched (it uses the fcl-process backend); make smoke +
full make test green.

https://claude.ai/code/session_01TBcLtmpj7dqA5tyFbGnQon
@FMXExpress
FMXExpress merged commit 412e01f into main Jun 11, 2026
FMXExpress pushed a commit that referenced this pull request Jun 13, 2026
Both changelog files were stuck at the 2026-06-10 TUI / background-
subagent / session_search / tool-RPC entries. ~7 weeks of merged
PRs (#214 through #244) had landed without a corresponding entry in
either file -- the git log was the only record of features like the
knowledgebase, inbound MCP server mode, checkpoints + /undo,
heartbeat daemon, shell backends (local | docker), send_message,
promptware defense, Windows shell-output encoding fixes, fs_grep
ripgrep optimisations, OpenTelemetry traces, and `pasclaw agent
--quiet`.

Added (newest first):

  2026-06-13
    #244  agent --quiet log-level clamp

  2026-06-12
    #243  dcc64 search path + agent --quiet / -q
    #242  OpenTelemetry traces (OTLP/HTTP+JSON)
    #241  fs_grep tier 5+6 (byte walker + Boyer-Moore-Horspool)
    #240  fs_grep tier 1-4 (deferred hash + skip-dirs + binary
          sniff + size cap)

  2026-06-11
    #239  Windows shell output: auto-detect UTF-8 vs OEM
    #238  Hashline fs_read header mojibake fix (¶ vs ¶)
    #237  Windows shell output: OEM codepage decode

  2026-06-10
    #233  Shell backends (local | docker via IShellBackend)
    #232  Heartbeat daemon + reversible condensation (CCR)
    #230  send_message tool + condenser families + promptware
          defense + task-aware MEMORY.md slicing

  2026-06-09
    #223  /goal Ralph loop + judge model + JSON-aware condenser
    #222  /undo wired into agent + sample dprojs
    #221  Checkpoints (auto-snapshot + TUI /undo)
    #220  mcp catalog: lenient hub projector
    #219  mcp: SSE / Streamable HTTP / stdio hub transports
    #218  Inbound MCP server mode
    #217  onboard: offer to index docs into the knowledgebase
    #214  Knowledgebase (RAG over operator-curated docs)

Skipped from this changelog (build-system / Delphi-fix / FPC-fix
PRs visible in the git log but not user-facing features):
#215, #216, #224, #225, #226, #227, #228, #229, #231, #234, #236.

Both files (README.md and docs/changelog.md) updated with the same
entries -- intentional mirror so a reader on either surface sees
the same history. Same prose in both; same footnote refs at the
bottom.

Validated: every [#N] reference in both files has a matching [#N]:
URL footnote (no broken links).
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants