Merge branch 'master' into jgrpp

This commit is contained in:
Jonathan G Rennison
2016-01-01 13:11:26 +00:00
58 changed files with 1410 additions and 1326 deletions

View File

@@ -338,9 +338,16 @@ void CreateConsole()
return;
}
#if defined(_MSC_VER) && _MSC_VER >= 1900
freopen("CONOUT$", "a", stdout);
freopen("CONIN$", "r", stdin);
freopen("CONOUT$", "a", stderr);
#else
*stdout = *_fdopen(fd, "w");
*stdin = *_fdopen(_open_osfhandle((intptr_t)GetStdHandle(STD_INPUT_HANDLE), _O_TEXT), "r" );
*stderr = *_fdopen(_open_osfhandle((intptr_t)GetStdHandle(STD_ERROR_HANDLE), _O_TEXT), "w" );
#endif
#else
/* open_osfhandle is not in cygwin */
*stdout = *fdopen(1, "w" );