• src/syncterm/wren_bind_xfer.c

    From Deuc¨@VERT to Git commit to main/sbbs/master on Thursday, May 07, 2026 19:33:22
    https://gitlab.synchro.net/main/sbbs/-/commit/b0cb6a30bed31add37363abc
    Modified Files:
    src/syncterm/wren_bind_xfer.c
    Log Message:
    wren_bind_xfer: use _Atomic keyword instead of stdatomic.h typedefs

    MSVC's <stdatomic.h> doesn't typedef atomic_bool / atomic_uint to a
    real atomic type, so the clang frontend (under /experimental:c11atomics)
    errors with C7707 Ä atomic_load saw plain int instead of _Atomic int.

    Switch to the keyword form (static _Atomic bool ...), matching the
    pattern rlogin.c already uses for its rlogin_active / rlogin_input_paused flags.

    Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com>

    ---
    þ Synchronet þ Vertrauen þ Home of Synchronet þ [vert/cvs/bbs].synchro.net
  • From Deuc¨@VERT to Git commit to main/sbbs/master on Thursday, May 07, 2026 19:52:17
    https://gitlab.synchro.net/main/sbbs/-/commit/fbd93d2ad6badbd6f44cd7c0
    Modified Files:
    src/syncterm/wren_bind_xfer.c
    Log Message:
    wren_bind_xfer: undef __STDC_NO_ATOMICS__ before stdatomic.h on MSVC

    MSVC defensively defines __STDC_NO_ATOMICS__, which makes
    <stdatomic.h> expand to nothing Ä atomic_load/store/exchange fail
    to compile. conn.h already uses this dance; mirror it here.

    Also switch declarations to the _Atomic T form to match the
    codebase convention (rlogin.c, threadwrap.h).

    Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com>

    ---
    þ Synchronet þ Vertrauen þ Home of Synchronet þ [vert/cvs/bbs].synchro.net
  • From Deuc¨@VERT to Git commit to main/sbbs/master on Thursday, May 07, 2026 20:03:22
    https://gitlab.synchro.net/main/sbbs/-/commit/e9e8d92cee7a637af4a051c7
    Modified Files:
    src/syncterm/wren_bind_xfer.c
    Log Message:
    wren_bind_xfer: use plain access on _Atomic vars where it suffices

    For _Atomic-qualified lvalues, plain reads and assignments emit
    seq_cst atomic loads/stores Ä identical to atomic_load / atomic_store
    with default memory order. The function forms only earn their keep
    for atomic_exchange and atomic_compare_exchange_strong (no implicit equivalent), which stay.

    Also sidesteps an MSVC clang-cl issue where atomic_load(&x) used
    inline as a function argument expanded such that the address operator
    got lost, leaving the underlying type where a pointer-to-atomic was
    expected.

    Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com>

    ---
    þ Synchronet þ Vertrauen þ Home of Synchronet þ [vert/cvs/bbs].synchro.net