https://gitlab.synchro.net/main/sbbs/-/commit/c859df99b430a757673daae8
Modified Files:
src/syncterm/wren_bind.c
Log Message:
SyncTERM: fix MSVC build — drop direct S_ISDIR use in wren_bind
MSVC's <sys/stat.h> doesn't define the POSIX S_ISDIR macro, so
referring to it from wren_bind.c made the linker treat it as a
function and fail with LNK2019. S_ISREG already had a local
polyfill at the top of the file; the two S_ISDIR sites just
predated it.
Replace both with the xpdev wrappers — isdir() for the directory
test, fexist() for "exists as a non-directory" (regular file,
symlink, device on POSIX). Each call is one extra stat compared
to the prior single-stat-then-check, but neither site is hot:
dir_list_impl runs once per readdir entry on browse, and
dir_delete_impl runs once per Directory.delete().
Co-Authored-By: Claude Opus 4.7 (1M context) <
noreply@anthropic.com>
---
■ Synchronet ■ Vertrauen ■ Home of Synchronet ■ [vert/cvs/bbs].synchro.net