atexit (reset_stdin_termios);
}
+#ifndef _MSC_VER
+ // Disabling stdin buffering with MSVC's 2015 CRT exposes a bug in fgets
+ // which causes it to miss newlines depending on whether there have been an
+ // odd or even number of characters. Bug has been reported to MS via Connect.
::setbuf (stdin, NULL);
+#endif
::setbuf (stdout, NULL);
m_debugger.SetErrorFileHandle (stderr, false);
main(int argc, char const *argv[])
#endif
{
-#ifdef _MSC_VER
- // disable buffering on windows
- setvbuf(stdout, NULL, _IONBF, 0);
- setvbuf(stdin , NULL, _IONBF, 0);
-#endif
-
#ifdef _WIN32
// Convert wide arguments to UTF-8
std::vector<std::string> argvStrings(argc);