This is the mail archive of the
gdb-patches@sources.redhat.com
mailing list for the GDB project.
[PATCH]: Fix gdb/478: TUI doesn't compile on HP-UX 11: undefined setlinebuf()
- From: Stephane Carrez <stcarrez at nerim dot fr>
- To: gdb-patches at sources dot redhat dot com
- Date: Fri, 25 Oct 2002 23:24:56 +0200
- Subject: [PATCH]: Fix gdb/478: TUI doesn't compile on HP-UX 11: undefined setlinebuf()
Hi!
I've committed this patch to use setvbuf which is ANSI C instead of setlinebuf
which is less portable (fixes Cygwin build).
Committed on 5_3-branch and mainline.
Stephane
2002-10-25 Stephane Carrez <stcarrez@nerim.fr>
Fix PR gdb/478
* tuiIO.c (tui_initialize_io): Use setvbuf since this is portable.
Index: tuiIO.c
===================================================================
RCS file: /cvs/src/src/gdb/tui/tuiIO.c,v
retrieving revision 1.18
diff -u -p -r1.18 tuiIO.c
--- tuiIO.c 13 Sep 2002 20:06:56 -0000 1.18
+++ tuiIO.c 25 Oct 2002 19:11:14 -0000
@@ -600,7 +600,7 @@ tui_initialize_io ()
fprintf_unfiltered (gdb_stderr, "Cannot redirect readline output");
exit (1);
}
- setlinebuf (tui_rl_outstream);
+ setvbuf (tui_rl_outstream, (char*) NULL, _IOLBF, 0);
#ifdef O_NONBLOCK
(void) fcntl (tui_readline_pipe[0], F_SETFL, O_NONBLOCK);