← board

{$IF DECLARED(...)} conditional directive support

Problem

Synapse's Delphi-POSIX socket include probes platform constants with {$IF DECLARED(Qualified.Symbol)}:

{$IF DECLARED(Posix.StrOpts.FIONREAD)}
FIONREAD = Posix.StrOpts.FIONREAD;
{$ELSE}
FIONREAD = {$IFDEF ANDROID}$541B{$ELSE}$4004667F{$ENDIF};
{$ENDIF}

The pinned stable compiler currently fails the POSIX-profile Synapse smoke with:

pascal26:177: error: conditional directive: expected operator ()

This is a compiler feature gap. The library side should not edit Synapse or replace these probes with hand-written constants just to get past parsing.

Required behavior

Non-goals

Acceptance

Log