diff --git a/dlls/msvcrt/file.c b/dlls/msvcrt/file.c index 3de12d1087f..4fa56384cd5 100644 --- a/dlls/msvcrt/file.c +++ b/dlls/msvcrt/file.c @@ -845,9 +845,15 @@ int CDECL _isatty(int fd) /* INTERNAL: Allocate stdio file buffer */ static BOOL msvcrt_alloc_buffer(FILE* file) { +#if _MSVCR_VER >= 140 + if((file->_file==STDOUT_FILENO && _isatty(file->_file)) + || file->_file == STDERR_FILENO) + return FALSE; +#else if((file->_file==STDOUT_FILENO || file->_file==STDERR_FILENO) && _isatty(file->_file)) return FALSE; +#endif file->_base = calloc(1, MSVCRT_INTERNAL_BUFSIZ); if(file->_base) { diff --git a/dlls/ucrtbase/tests/file.c b/dlls/ucrtbase/tests/file.c index 4671e641dbe..76233be3fa7 100644 --- a/dlls/ucrtbase/tests/file.c +++ b/dlls/ucrtbase/tests/file.c @@ -55,7 +55,6 @@ static void test_std_stream_buffering(void) if (broken(!GetProcAddress(GetModuleHandleA("ucrtbase"), "__CxxFrameHandler4") && !pos)) trace("stderr is buffered\n"); else - todo_wine ok(pos == 4, "expected stderr to be unbuffered (%d)\n", pos); fflush(stderr);