1
0
mirror of https://git.tartarus.org/simon/putty.git synced 2025-01-09 01:18:00 +00:00

Translate more _MSC_VER values in build info.

Thanks to Sean Kain for pointing out MS's web page listing all the
known _MSC_VER values and their translations.

To make it an easier and more mechanical process to update the list in
future, I've completely replaced our previous text for each version
with a straight paste of the exact string translations from that web
page (plus Sean Kain's extra value for VS2019, which isn't listed on
that page yet). That changes the exact wording of all the previous
translations, mostly cosmetically (although it also fixes the version
number for _MSC_VER=1912).

Since many of the new translations end with a version number in
parentheses, I've removed the parens around the following explicit
statement of _MSC_VER, so they don't look silly next to each other.
This commit is contained in:
Simon Tatham 2019-03-22 07:04:57 +00:00
parent 1d8b48fd22
commit f433c82cc2

51
misc.c
View File

@ -238,28 +238,57 @@ char *buildinfo(const char *newline)
strbuf_catf(buf, ", emulating ");
#endif
strbuf_catf(buf, "Visual Studio", newline);
#if _MSC_VER == 1900
strbuf_catf(buf, " 2015 / MSVC++ 14.0");
#if 0
/*
* List of _MSC_VER values and their translations taken from
* https://docs.microsoft.com/en-us/cpp/preprocessor/predefined-macros
* except for 1920, which is not yet listed on that page as of
* 2019-03-22, and was determined experimentally by Sean Kain.
*
* The pointless #if 0 branch containing this comment is there so
* that every real clause can start with #elif and there's no
* anomalous first clause. That way the patch looks nicer when you
* add extra ones.
*/
#elif _MSC_VER == 1920
strbuf_catf(buf, " 2019 (16.x)");
#elif _MSC_VER == 1916
strbuf_catf(buf, " 2017 version 15.9");
#elif _MSC_VER == 1915
strbuf_catf(buf, " 2017 version 15.8");
#elif _MSC_VER == 1914
strbuf_catf(buf, " 2017 version 15.7");
#elif _MSC_VER == 1913
strbuf_catf(buf, " 2017 version 15.6");
#elif _MSC_VER == 1912
strbuf_catf(buf, " 2017 / MSVC++ 14.12");
strbuf_catf(buf, " 2017 version 15.5");
#elif _MSC_VER == 1911
strbuf_catf(buf, " 2017 version 15.3");
#elif _MSC_VER == 1910
strbuf_catf(buf, " 2017 RTW (15.0)");
#elif _MSC_VER == 1900
strbuf_catf(buf, " 2015 (14.0)");
#elif _MSC_VER == 1800
strbuf_catf(buf, " 2013 / MSVC++ 12.0");
strbuf_catf(buf, " 2013 (12.0)");
#elif _MSC_VER == 1700
strbuf_catf(buf, " 2012 / MSVC++ 11.0");
strbuf_catf(buf, " 2012 (11.0)");
#elif _MSC_VER == 1600
strbuf_catf(buf, " 2010 / MSVC++ 10.0");
strbuf_catf(buf, " 2010 (10.0)");
#elif _MSC_VER == 1500
strbuf_catf(buf, " 2008 / MSVC++ 9.0");
strbuf_catf(buf, " 2008 (9.0)");
#elif _MSC_VER == 1400
strbuf_catf(buf, " 2005 / MSVC++ 8.0");
strbuf_catf(buf, " 2005 (8.0)");
#elif _MSC_VER == 1310
strbuf_catf(buf, " 2003 / MSVC++ 7.1");
strbuf_catf(buf, " .NET 2003 (7.1)");
#elif _MSC_VER == 1300
strbuf_catf(buf, " 2003 / MSVC++ 7.0");
strbuf_catf(buf, " .NET 2002 (7.0)");
#elif _MSC_VER == 1200
strbuf_catf(buf, " 6.0");
#else
strbuf_catf(buf, ", unrecognised version");
#endif
strbuf_catf(buf, " (_MSC_VER=%d)", (int)_MSC_VER);
strbuf_catf(buf, ", _MSC_VER=%d", (int)_MSC_VER);
#endif
#ifdef BUILDINFO_GTK