forked from Imagelibrary/binutils-gdb
gdb/
* event-top.c (gdb_setup_readline): Call stderr_fileopen instead of stdio_fileopen. * main.c (captured_main) [__MINGW32__]: Set stderr unbuffered. .Call stderr_fileopen instead of stdio_fileopen. * ui-file.c [__MINGW32__] (stderr_file_write): New function. [__MINGW32__] (stderr_file_fputs): New function. (stderr_fileopen): New function. * ui-file.h (stderr_fileopen): Declare.
This commit is contained in:
@@ -375,8 +375,15 @@ captured_main (void *data)
|
||||
saved_command_line[0] = '\0';
|
||||
instream = stdin;
|
||||
|
||||
#ifdef __MINGW32__
|
||||
/* Ensure stderr is unbuffered. A Cygwin pty or pipe is implemented
|
||||
as a Windows pipe, and Windows buffers on pipes. */
|
||||
setvbuf (stderr, NULL, _IONBF, BUFSIZ);
|
||||
#endif
|
||||
|
||||
gdb_stdout = stdio_fileopen (stdout);
|
||||
gdb_stderr = stdio_fileopen (stderr);
|
||||
gdb_stderr = stderr_fileopen ();
|
||||
|
||||
gdb_stdlog = gdb_stderr; /* for moment */
|
||||
gdb_stdtarg = gdb_stderr; /* for moment */
|
||||
gdb_stdin = stdio_fileopen (stdin);
|
||||
|
||||
Reference in New Issue
Block a user