Windows 2000 has no support for getaddrinfo. Five years ago (Apr 5
2011), the addition of tracker support
(7f18afd5d7) brought a requirement for
getaddrinfo. Recently, someone with a working Windows 2000 system
reported that Rebirth no longer starts on Windows 2000. Although such
systems should not be connected to the Internet, they may still need
name resolution on a LAN. Add a configure test to probe for getaddrinfo
support and fall back to gethostbyname if needed.
Compiling a binary that works on Windows 2000 requires one of:
* using an ancient SDK that does not declare getaddrinfo
* defining _WIN32_WINNT to exclude Windows XP support
* overriding the SConf test to force failure
Fixes: 7f18afd5d7 ("Client-side implementation for Tracker support by Matt 1360 Vandermeulen including improvements in udp_dns_filladdr and IPv4/IPv6 compability; Very little adjustments by me, too including IPv6 support for Windows (untested); Actual tracker code will follow later as seperate branch when it's done")
Clang becomes confused trying to resolve X::a when:
- both `namespace ::X` and `class ::B::X` exist
- `using namespace B;` is active
even if class ::B::X is only a forward-declaration. Add an SConf test
to recognize when the compiler rejects this pattern and hide the safety
nets that are implemented using it.
Microsoft cmd.exe has strange quoting rules. Where other shells treat
single quote as a quote character, cmd.exe seems to pass it through to
the underlying process. This breaks the vers_id compilation with
strange error messages. In practice, SCons does not need the
no-interpolation semantics that single quote provides, so switch to
double quote for compatibility with Windows. This is probably slightly
less efficient on Bash, since it will now scan the value for expansions.
However, the efficiency loss is tiny compared to overhead elsewhere in
the build.
Per the documentation, on Linux, the default is true. On Windows,
setting it to true causes a Python exception because Windows relies on
disabling inheritance as a hack to close all descriptors, but
inheritance needs to be enabled to capture the output of the child
process.
Reported-by: Mako88 <https://github.com/dxx-rebirth/dxx-rebirth/issues/173>
Fixes: bb3f414128 ("Cache scons subprocess calls")
Move the boilerplate up onto the outer namespace line. Decorate each
collision with a comment stating its purpose, so that compiler error
output echoes the type of collision.
This started as a project to make SConstruct take less time on an empty
build. Unforunately, most of the major gains lie elsewhere and require
deeper changes to the build system. These changes do not help much, but
they are better than nothing.