diff --git a/misc.c b/misc.c index 9aff234b..734ea8b1 100644 --- a/misc.c +++ b/misc.c @@ -1165,11 +1165,21 @@ char *buildinfo(const char *newline) BUILDINFO_PLATFORM); #ifdef __clang_version__ +#define FOUND_COMPILER strbuf_catf(buf, "%sCompiler: clang %s", newline, __clang_version__); #elif defined __GNUC__ && defined __VERSION__ +#define FOUND_COMPILER strbuf_catf(buf, "%sCompiler: gcc %s", newline, __VERSION__); -#elif defined _MSC_VER - strbuf_catf(buf, "%sCompiler: Visual Studio", newline); +#endif + +#if defined _MSC_VER +#ifndef FOUND_COMPILER +#define FOUND_COMPILER + strbuf_catf(buf, "%sCompiler: ", newline); +#else + strbuf_catf(buf, ", emulating "); +#endif + strbuf_catf(buf, "Visual Studio", newline); #if _MSC_VER == 1900 strbuf_catf(buf, " 2015 / MSVC++ 14.0"); #elif _MSC_VER == 1800 @@ -1178,12 +1188,14 @@ char *buildinfo(const char *newline) strbuf_catf(buf, " 2012 / MSVC++ 11.0"); #elif _MSC_VER == 1600 strbuf_catf(buf, " 2010 / MSVC++ 10.0"); -#elif _MSC_VER == 1500 +#elif _MSC_VER == 1500 strbuf_catf(buf, " 2008 / MSVC++ 9.0"); -#elif _MSC_VER == 1400 +#elif _MSC_VER == 1400 strbuf_catf(buf, " 2005 / MSVC++ 8.0"); -#elif _MSC_VER == 1310 +#elif _MSC_VER == 1310 strbuf_catf(buf, " 2003 / MSVC++ 7.1"); +#elif _MSC_VER == 1300 + strbuf_catf(buf, " 2003 / MSVC++ 7.0"); #else strbuf_catf(buf, ", unrecognised version"); #endif