BBS:      TELESC.NET.BR
Assunto:  src/syncterm/GNUmakefile sftp_queue.c sftp_session.h wren_bind.c
De:       Deuc¨
Data:     Sun, 26 Apr 2026 21:00:47 -0700
-----------------------------------------------------------
https://gitlab.synchro.net/main/sbbs/-/commit/c79f715cac550caf058ec4f1
Modified Files:
	src/syncterm/GNUmakefile sftp_queue.c sftp_session.h wren_bind.c
Log Message:
SyncTERM: portability fixes shaken out by post-Wren CI

Four follow-ups to the Wren scripting host merge, surfaced by the
gmake (macOS) and MSVC (Windows) CI runs.

GNUmakefile: the Wren VM rules wrote .o files into per-subdir output
trees ($(MTOBJODIR)/wren/vm/...) gated by an explicit mkdir -p.  The
project's convention is flat MTOBJODIR with vpath search, and that's
what every other build-system step (rules.mk's mkdir, the clean rule's
shallow rm) assumes.  Switched to vpath %.c wren/vm wren/optional and
flat $(MTOBJODIR)/wren_*.o output.  Basenames are already prefixed
with wren_ across both subdirs so there's no collision.  Wren-private
include paths (-Iwren/vm -Iwren/optional -UPREFIX) move to a target-
specific CFLAGS rule covering the VM, wren_host.o, and wren_bind.o.

wren_bind.c: replaced  with xpdev/dirwrap.h, which falls
through to  on POSIX and provides its own opendir / readdir
/ closedir / struct dirent on MSVC.  Added an S_ISREG shim for older
Windows SDKs that ship only the _S_IF* constants.

sftp_queue.c: dropped the direct  and  includes
in favour of xpdev/filewrap.h (covers unlink and the read / write /
close family) and the already-included xpdev/genwrap.h (which
selects between  and ).

sftp_session.h: added the same #undef __STDC_NO_ATOMICS__ trick conn.h
already uses for MSVC.  Even with /std:c17 + /experimental:c11atomics
the macro stays defined because MSVC's atomic support is incomplete
(no generic _Atomic with locks), and  refuses to expand
otherwise.  Without this every TU including sftp_session.h tripped
"C atomic support is not enabled" on the Windows build.

Co-Authored-By: Claude Opus 4.7 (1M context) 
n
---
  mSynchronetn  hgVertrauen n hHome of Synchronet n gh[vert/cvs/bbs].synchro.net

-----------------------------------------------------------
[Voltar]