--- a/configure.ac
+++ b/configure.ac
@@ -439,7 +439,7 @@
 		    [rb_cv_msvcrt=msvcrt])
 	test "$rb_cv_msvcrt" = "" && rb_cv_msvcrt=msvcrt])
 	RT_VER=`echo "$rb_cv_msvcrt" | tr -cd [0-9]`
-	test "$RT_VER" = "" && RT_VER=60
+	test "$RT_VER" = "" && RT_VER=140
 	AC_DEFINE_UNQUOTED(RUBY_MSVCRT_VERSION, $RT_VER)
 	sysconfdir=
     ])
--- a/win32/win32.c
+++ b/win32/win32.c
@@ -854,11 +854,9 @@
 rb_w32_sysinit(int *argc, char ***argv)
 {
 #if RUBY_MSVCRT_VERSION >= 80
-    static void set_pioinfo_extra(void);
+    void set_pioinfo_extra(void);
 
-    _CrtSetReportMode(_CRT_ASSERT, 0);
     _set_invalid_parameter_handler(invalid_parameter);
-    _RTC_SetErrorFunc(rtc_error_handler);
     set_pioinfo_extra();
 #endif
     SetErrorMode(SEM_FAILCRITICALERRORS|SEM_NOGPFAULTERRORBOX);
@@ -2506,7 +2504,7 @@
 static size_t pioinfo_extra = 0;	/* workaround for VC++8 SP1 */
 
 /* License: Ruby's */
-static void
+ void
 set_pioinfo_extra(void)
 {
 #if RUBY_MSVCRT_VERSION >= 140
