- Add wrappers for PHYSFS_read and its convenience functions. Poison
the memory before calling PHYSFS, so that any uninitialized bytes
(likely caused by a short read) are reported if the caller tries to
access the value anyway.
- Add SConstruct options to enable wrapping, so that users do not need
to enumerate the wrapped functions manually.
- Fix link failure when using LTO+wrappers.
Clang rejects a declared (but never defined and never used) `static`
function. Change the declaration to be the value of a macro that will
be expanded only when the function is both defined and used.
Reported-by: kreatordxx <https://github.com/dxx-rebirth/dxx-rebirth/issues/295>
Fixes: 55822d0b4d ("Add wrappers for more precise Valgrind physfs diagnostics")