(Trivial) Testing _MSC_FULL_VER can be done at compile time.
authorBill Meier <wmeier@newsguy.com>
Mon, 23 May 2011 16:09:09 +0000 (16:09 -0000)
committerBill Meier <wmeier@newsguy.com>
Mon, 23 May 2011 16:09:09 +0000 (16:09 -0000)
svn path=/trunk/; revision=37366

version_info.c

index 1ebe551ecae10db276fd970221f4713a10416c3c..8435bb019d75417de49ebbfb8ee173dfa7a91e84 100644 (file)
@@ -543,21 +543,23 @@ get_runtime_version_info(GString *str, void (*additional_info)(GString *))
 #endif /* __INTEL_COMPILER_BUILD_DATE */
        g_string_append_printf(str, "\n");
 #elif defined(_MSC_FULL_VER)
-       if (_MSC_FULL_VER > 99999999) {
-               g_string_append_printf(str, "\n\nBuilt using Microsoft Visual C++ %d.%d",
-                   (_MSC_FULL_VER / 10000000) - 6,
-                   (_MSC_FULL_VER / 100000) % 100);
-               if ((_MSC_FULL_VER % 100000) != 0)
-                       g_string_append_printf(str, " build %d",
-                           _MSC_FULL_VER % 100000);
-       } else {
-               g_string_append_printf(str, "\n\nBuilt using Microsoft Visual C++ %d.%d",
-                   (_MSC_FULL_VER / 1000000) - 6,
-                   (_MSC_FULL_VER / 10000) % 100);
-               if ((_MSC_FULL_VER % 10000) != 0)
-                       g_string_append_printf(str, " build %d",
-                           _MSC_FULL_VER % 10000);
-       }
+# if _MSC_FULL_VER > 99999999
+       g_string_append_printf(str, "\n\nBuilt using Microsoft Visual C++ %d.%d",
+                              (_MSC_FULL_VER / 10000000) - 6,
+                              (_MSC_FULL_VER / 100000) % 100);
+#  if (_MSC_FULL_VER % 100000) != 0
+       g_string_append_printf(str, " build %d",
+                              _MSC_FULL_VER % 100000);
+#  endif
+# else
+       g_string_append_printf(str, "\n\nBuilt using Microsoft Visual C++ %d.%d",
+                              (_MSC_FULL_VER / 1000000) - 6,
+                              (_MSC_FULL_VER / 10000) % 100);
+#  if (_MSC_FULL_VER % 10000) != 0
+       g_string_append_printf(str, " build %d",
+                              _MSC_FULL_VER % 10000);
+#  endif
+# endif
        g_string_append_printf(str, "\n");
 #elif defined(_MSC_VER)
        /* _MSC_FULL_VER not defined, but _MSC_VER defined */