Fix #13210. Port the Windows build from VS2008 to VS2010.
diff --git a/PC/msvcrtmodule.c b/PC/msvcrtmodule.c
index f277b0a..04d2088 100755
--- a/PC/msvcrtmodule.c
+++ b/PC/msvcrtmodule.c
@@ -27,6 +27,8 @@
 #ifdef _MSC_VER
 #if _MSC_VER >= 1500 && _MSC_VER < 1600
 #include <crtassem.h>
+#elif _MSC_VER >= 1600
+#include <crtversion.h>
 #endif
 #endif
 
@@ -464,7 +466,7 @@
 PyInit_msvcrt(void)
 {
     int st;
-    PyObject *d;
+    PyObject *d, *version;
     PyObject *m = PyModule_Create(&msvcrtmodule);
     if (m == NULL)
         return NULL;
@@ -494,6 +496,7 @@
 #endif
 
     /* constants for the crt versions */
+    (void)st;
 #ifdef _VC_ASSEMBLY_PUBLICKEYTOKEN
     st = PyModule_AddStringConstant(m, "VC_ASSEMBLY_PUBLICKEYTOKEN",
                                     _VC_ASSEMBLY_PUBLICKEYTOKEN);
@@ -510,5 +513,15 @@
     if (st < 0) return NULL;
 #endif
 
+    /* constants for the 2010 crt versions */
+#if defined(_VC_CRT_MAJOR_VERSION) && defined (_VC_CRT_MINOR_VERSION) && defined(_VC_CRT_BUILD_VERSION) && defined(_VC_CRT_RBUILD_VERSION)
+    version = PyUnicode_FromFormat("%d.%d.%d.%d", _VC_CRT_MAJOR_VERSION,
+                                                  _VC_CRT_MINOR_VERSION,
+                                                  _VC_CRT_BUILD_VERSION,
+                                                  _VC_CRT_RBUILD_VERSION);
+    st = PyModule_AddObject(m, "CRT_ASSEMBLY_VERSION", version);
+    if (st < 0) return NULL;
+#endif
+
     return m;
 }