--- Configurations/10-main.conf
+++ Configurations/10-main.conf
@@ -1268,7 +1268,7 @@
         # prefer [non-debug] openssl.exe to be free from Micorosoft RTL
         # redistributable.
         bin_cflags       => add(picker(debug   => "/MDd",
-                                       release => sub { $disabled{shared} ? "/MT" : () },
+                                       release => "/MD",
                                       )),
         bin_lflags       => add("/subsystem:console /opt:ref"),
         ex_libs          => add(sub {
--- crypto/engine/eng_openssl.c
+++ crypto/engine/eng_openssl.c
@@ -9,6 +9,7 @@
  */
 
 #include <stdio.h>
+#include "e_os.h"
 #include <openssl/crypto.h>
 #include "internal/cryptlib.h"
 #include "internal/engine.h"
--- crypto/o_time.c
+++ crypto/o_time.c
@@ -41,10 +41,6 @@
     if (gmtime_r(timer, result) == NULL)
         return NULL;
     ts = result;
-#elif defined (OPENSSL_SYS_WINDOWS) && defined(_MSC_VER) && _MSC_VER >= 1400
-    if (gmtime_s(result, timer))
-        return NULL;
-    ts = result;
 #else
     ts = gmtime(timer);
     if (ts == NULL)
--- engines/e_capi.c
+++ engines/e_capi.c
@@ -15,6 +15,7 @@
 # include <wincrypt.h>
 
 # include <stdio.h>
+# include "e_os.h"
 # include <string.h>
 # include <stdlib.h>
 # include <malloc.h>
--- test/testutil/basic_output.c
+++ test/testutil/basic_output.c
@@ -10,6 +10,7 @@
 #include "../testutil.h"
 #include "output.h"
 #include "tu_local.h"
+#include "../../e_os.h"
 
 #include <openssl/crypto.h>
 #include <openssl/bio.h>
--- e_os.h
+++ e_os.h
@@ -149,7 +149,7 @@
 #   endif
 #   include <malloc.h>
 #   if defined(_MSC_VER) && !defined(_WIN32_WCE) && !defined(_DLL) && defined(stdin)
-#    if _MSC_VER>=1300 && _MSC_VER<1600
+#    ifdef _WIN64
 #     undef stdin
 #     undef stdout
 #     undef stderr
@@ -157,7 +157,7 @@
 #     define stdin  (&__iob_func()[0])
 #     define stdout (&__iob_func()[1])
 #     define stderr (&__iob_func()[2])
-#    elif _MSC_VER<1300 && defined(I_CAN_LIVE_WITH_LNK4049)
+#    else
 #     undef stdin
 #     undef stdout
 #     undef stderr
