Suppress PhysFS deprecation errors

PhysFS 2.0 only offers PHYSFS_read/PHYSFS_write for I/O.  PhysFS 3.0
deprecates PHYSFS_read / PHYSFS_write and offers PHYSFS_readBytes /
PHYSFS_writeBytes.  Converting Rebirth to use the new API is somewhat
invasive, and would require dropping support for PhysFS 2.0.

For now, for compatibility with PhysFS 2.0, disable the deprecation
errors and continue to use the older functions.

Reported-by: gabeotisbenson <https://github.com/dxx-rebirth/dxx-rebirth/issues/352>
This commit is contained in:
Kp 2017-10-22 04:20:35 +00:00
parent 8d80300e0a
commit 8838b46e65

View file

@ -3811,6 +3811,12 @@ class DXXCommon(LazyObjectConstructor):
CXXFLAGS = ['-funsigned-char'],
CPPPATH = ['common/include', 'common/main', '.'],
CPPFLAGS = SCons.Util.CLVar('-Wno-sign-compare'),
# PhysFS 2.1 and later deprecate functions PHYSFS_read,
# PHYSFS_write, which Rebirth uses extensively. PhysFS 2.0
# does not implement the new non-deprecated functions.
# Disable the deprecation error until PhysFS 2.0 support is
# removed.
CPPDEFINES = [('PHYSFS_DEPRECATED', '')],
)
add_flags = defaultdict(list)
if user_settings.builddir: