https://gitlab.synchro.net/main/sbbs/-/commit/da846f49fcf79e1f49de3344
Modified Files:
src/doors/timeport/GNUmakefile src/doors/top/main.c privchat.c system.c Log Message:
doors: fix the top and timeport builds on current toolchains
Neither door had compiled here for some time. Both failures are toolchain
drift rather than anything wrong with the game code.
top used CLK_TCK as the divisor for clock() ticks. That was the obsolete
XSI alias for CLOCKS_PER_SEC and glibc no longer defines it, so main.c
failed to compile and only topact was ever linked. Switch the six sites in main.c, privchat.c and system.c to CLOCKS_PER_SEC, which is standard C89
and so correct for the Borland and MSVC builds too. This is deliberately
not sysconf(_SC_CLK_TCK): that is the unit of times(), not of clock(), and top.h maps myclock() to clock().
timeport put $(LIBS) ahead of the source file on every link line. Modern
GNU ld defaults to --as-needed, which discards a shared library named
before anything that references it, so libtp.so was dropped and every
symbol it defines came back undefined. Move $(LIBS) after the source in
all seven link rules; library-after-object is right regardless of
--as-needed.
All three top binaries and all eight timeport binaries now build from a
clean tree, and the linked timeport binaries list libtp.so in DT_NEEDED
with no unresolved symbols.
Co-Authored-By: Claude Opus 4.8 (1M context) <
noreply@anthropic.com>
--- SBBSecho 3.37-Linux
* Origin: Vertrauen - [vert/cvs/bbs].synchro.net (1:103/705)