https://gitlab.synchro.net/main/sbbs/-/commit/90d5e11dafd04aa34b6a8eb7
Modified Files:
src/syncterm/term.c wren_bind_xfer.c wren_bind_xfer.h src/xptls/CMakeLists.txt
Log Message:
Wren transfer mailbox: portable threading + xptls Mac/Linux fixes
Replace POSIX-only primitives in wren_bind_xfer.c with the
threadwrap.h + eventwrap.h abstractions that the rest of SyncTERM
already uses:
- pthread_create/pthread_join -> _beginthread + xpevent_t worker_done
- pthread_cond_t -> xpevent_t dlg.evt (worker drops mutex,
WaitForEvent(100ms), reacquires; main SetEvent under lock)
- PTHREAD_*_INITIALIZER -> one-time runtime init via pthread_once
(Win32 mutex is CRITICAL_SECTION; no static init available)
- syslog.h -> xp_syslog.h for the LOG_* severity constants we use
as in-app LogView color tags (no actual syslog calls)
- worker fn signature changed to void(void *) for _beginthread
C11 atomics (atomic_bool / atomic_uint) kept Ä MSVC supports them.
xptls/CMakeLists.txt: mirror xpdev's platform compile_definitions
(__unix__ / __DARWIN__ on Mac, _GNU_SOURCE etc. on Linux, _WIN32
versions on Win32). xptls is structured to be standalone Ä it
borrows xpdev's headers without linking the target Ä so it didn't
inherit xpdev's PUBLIC defines, which broke macOS builds where
sockwrap.h gates its socket headers on __unix__.
Co-Authored-By: Claude Opus 4.7 (1M context) <
noreply@anthropic.com>
---
þ Synchronet þ Vertrauen þ Home of Synchronet þ [vert/cvs/bbs].synchro.net