X-Git-Url: http://git.efficios.com/?a=blobdiff_plain;f=gdb%2Fser-pipe.c;h=bdc6b054c5d0d0a1ba70fab2be98b91d1755536e;hb=bb1183e25ae74ba21500fb4e39bc1ca9822e3086;hp=9c5b99b45c980d00a46842994470d18106076392;hpb=ecd75fc8eed3bde86036141228074a20e55dcfc9;p=deliverable%2Fbinutils-gdb.git diff --git a/gdb/ser-pipe.c b/gdb/ser-pipe.c index 9c5b99b45c..bdc6b054c5 100644 --- a/gdb/ser-pipe.c +++ b/gdb/ser-pipe.c @@ -1,5 +1,5 @@ /* Serial interface for a pipe to a separate program - Copyright (C) 1999-2014 Free Software Foundation, Inc. + Copyright (C) 1999-2020 Free Software Foundation, Inc. Contributed by Cygnus Solutions. @@ -27,18 +27,15 @@ #include #include -#include +#include "gdbsupport/gdb_sys_time.h" #include -#include -#include "filestuff.h" +#include "gdbsupport/filestuff.h" #include static int pipe_open (struct serial *scb, const char *name); static void pipe_close (struct serial *scb); -extern void _initialize_ser_pipe (void); - struct pipe_state { int pid; @@ -134,7 +131,7 @@ pipe_open (struct serial *scb, const char *name) if (err_pdes[1] != -1) close (err_pdes[1]); /* :end chunk */ - state = XMALLOC (struct pipe_state); + state = XNEW (struct pipe_state); state->pid = pid; scb->fd = pdes[0]; scb->error_fd = err_pdes[0]; @@ -149,7 +146,7 @@ pipe_open (struct serial *scb, const char *name) static void pipe_close (struct serial *scb) { - struct pipe_state *state = scb->state; + struct pipe_state *state = (struct pipe_state *) scb->state; close (scb->fd); scb->fd = -1; @@ -222,9 +219,9 @@ static const struct serial_ops pipe_ops = ser_base_copy_tty_state, ser_base_set_tty_state, ser_base_print_tty_state, - ser_base_noflush_set_tty_state, ser_base_setbaudrate, ser_base_setstopbits, + ser_base_setparity, ser_base_drain_output, ser_base_async, ser_unix_read_prim,