Increase minimum version of MSVC to one that we test in CI
We have a lot of things in our build that are being held back by "but what if MSVC doesn't support it?":
- making C99
va_copy
a hard requirement (this would let us drop the probes for whether we need__va_copy()
or an open-coded implementation for MSVC) - making C99
static inline
a hard requirement (this would let us drop the__inline
fallback) - making C99
snprintf()
a hard requirement (this would let us drop the_snprintf
fallback in CMake) - making C99
strtoll()
andstrtoull()
a hard requirement (this would let us droptools/strto*ll.c
and related fallbacks) - making a C99-compatible
<stdint.h>
a hard requirement (we can't necessarily redefinedbus_int32_t
etc. for API reasons as discussed on !283 (closed), but we could at least add static assertions that say they are interchangeable, and potentially start using them internally)
MSVC 2013+ support quite a large subset of C99, and MSVC 2015+ have a much larger subset.
Now that @elmarco has added a CI job that runs on MSVC 2015, I'd like to start documenting that we require a C99 compiler for Unix, or at least the subset of C99 supported by MSVC 2015 for Windows. This would let us drop a lot of these workarounds, many of which we have trouble actually testing in practice (which probably means a lot of them are already broken and we just don't know it).
Alternatively, if there are reasons why we need to continue to support an older version of MSVC (like 2013?), then we should have CI that routinely tests that version, to verify that we haven't regressed.
Prior art: GLib is in the same situation as dbus (it's written in C, and wants to be portable to most Unixes, plus Windows and macOS), and the GLib developers publish a set of toolchain requirements.