Thu Sep 28 14:32:11 1995 steve chamberlain <sac@slash.cygnus.com>
[deliverable/binutils-gdb.git] / gdb / ser-unix.c
index 093143cfdba8f002d4cfc91d1cb4d4a0faf69394..a4a00e5d559e40940e2bffa365f97ec2b999ad99 100644 (file)
@@ -21,14 +21,12 @@ Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA.  */
 #include "serial.h"
 #include <fcntl.h>
 #include <sys/types.h>
-
-#if !defined (HAVE_TERMIOS) && !defined (HAVE_TERMIO) && !defined (HAVE_SGTTY)
-#define HAVE_SGTTY
+#include "terminal.h"
+#ifdef HAVE_UNISTD_H
+#include <unistd.h>
 #endif
 
 #ifdef HAVE_TERMIOS
-#include <termios.h>
-#include <unistd.h>
 
 struct hardwire_ttystate
 {
@@ -37,7 +35,6 @@ struct hardwire_ttystate
 #endif /* termios */
 
 #ifdef HAVE_TERMIO
-#include <termio.h>
 
 /* It is believed that all systems which have added job control to SVR3
    (e.g. sco) have also added termios.  Even if not, trying to figure out
@@ -55,8 +52,6 @@ struct hardwire_ttystate
    too if it existed on all systems.  */
 #include <sys/time.h>
 
-#include <sgtty.h>
-
 struct hardwire_ttystate
 {
   struct sgttyb sgttyb;
@@ -296,6 +291,9 @@ static int
 hardwire_flush_input (scb)
      serial_t scb;
 {
+  scb->bufcnt = 0;
+  scb->bufp = scb->buf;
+
 #ifdef HAVE_TERMIOS
   return tcflush (scb->fd, TCIFLUSH);
 #endif
This page took 0.022863 seconds and 4 git commands to generate.