Somehow, MSVC seems to synthesize a CompileFunc for std::string??
Atomic increments/decrements are part of C++11, so we don't need to use or implement InterlockedWhatever anymore.
People usually send the log file when something is wrong, so it's a good thing to actually have relevant information about the crash there.
Previously, the SReq packet would only be sent after receiving an ID from the netpuncher. Instead, we can send the request as soon as the C4NetIOUDP connection setup finishes.
Semantically, that makes sense, but I haven't taken a look at all the maps.
All of our headers are designed to be included *after* C4Include.h, which UnicodeHandlingTest.cpp didn't do, resulting in an ill-formed program on some implementations.
With the IPv6 support, hosts now often list around 20 addresses. However, most of these are local only and thus rarely result in a successful connection. With the introduction of address sorting in 7d5596220 ("Sort addresses used for initial host connection", 2017-02-26), the connection succeeds with the first few addresses most of the time. This commit changes the initial connection process to start with only the first four addresses. After 100 ms, it proceeds with the next four addresses and so on. This should reduce the packet volume significantly as the connection should be established after only one or two steps. We may want to tweak the parameters if this turns out to make joining slower in practise. In a "normal" setup, the first four addresses should be the IPv6 privacy and stable addresses, and the next four addresses should include the IPv4 addresses from masterserver and netpuncher. 100 ms are long enough to get an answer from the host and short enough to not bother the player too much.
MinGW uses an ancient version of the CRT, which doesn't support the z modifier for integer types in printf. Use %u instead and cast to unsigned.
They were introduced in c37bc586e9161f71d7920e14bbe87c3888b8d2e7
Instead of "Compiler" and "Decompiler", which make me look up what's even going on each time I see them, use the standard terms "serializer" and "deserializer".