]> Git Repo - binutils.git/blobdiff - gdb/ser-tcp.c
* libhppa.h (bfd_hppa_insn2fmt, hppa_rebuild_insn): Make INLINE.
[binutils.git] / gdb / ser-tcp.c
index f492bc13ccd7987181ddc2ddb199659ddff11c6a..7e5735b53512dbd3086ca78a34d8e943f0b7945d 100644 (file)
@@ -39,7 +39,7 @@ static int wait_for PARAMS ((serial_t scb, int timeout));
 static int tcp_readchar PARAMS ((serial_t scb, int timeout));
 static int tcp_setbaudrate PARAMS ((serial_t scb, int rate));
 static int tcp_write PARAMS ((serial_t scb, const char *str, int len));
-static void tcp_restore PARAMS ((serial_t scb));
+/* FIXME: static void tcp_restore PARAMS ((serial_t scb)); */
 static void tcp_close PARAMS ((serial_t scb));
 static serial_ttystate tcp_get_tty_state PARAMS ((serial_t scb));
 static int tcp_set_tty_state PARAMS ((serial_t scb, serial_ttystate state));
@@ -73,7 +73,7 @@ tcp_open(scb, name)
 
   if (!hostent)
     {
-      fprintf (stderr, "%s: unknown host\n", hostname);
+      fprintf_unfiltered (gdb_stderr, "%s: unknown host\n", hostname);
       errno = ENOENT;
       return -1;
     }
@@ -218,7 +218,12 @@ tcp_readchar(scb, timeout)
   if (status < 0)
     return status;
 
-  scb->bufcnt = read(scb->fd, scb->buf, BUFSIZ);
+  while (1)
+    {
+      scb->bufcnt = read(scb->fd, scb->buf, BUFSIZ);
+      if (scb->bufcnt != -1 || errno != EINTR)
+       break;
+    }
 
   if (scb->bufcnt <= 0)
     if (scb->bufcnt == 0)
@@ -259,15 +264,6 @@ tcp_setbaudrate(scb, rate)
   return 0;                    /* Never fails! */
 }
 
-static int
-tcp_set_process_group (scb, ttystate, group)
-     serial_t scb;
-     serial_ttystate ttystate;
-     int group;
-{
-  return 0;
-}
-
 static int
 tcp_write(scb, str, len)
      serial_t scb;
@@ -316,7 +312,6 @@ static struct serial_ops tcp_ops =
   tcp_print_tty_state,
   tcp_noflush_set_tty_state,
   tcp_setbaudrate,
-  tcp_set_process_group
 };
 
 void
This page took 0.025507 seconds and 4 git commands to generate.