* First batch of fixes for sky PR 15853 (20-bit break/sdbbp)
[deliverable/binutils-gdb.git] / gdb / ser-tcp.c
index 288ccb7260185d752ffc1534cac54e681ec86ad7..279cbd0d718a6422e059eb94babb923c1a223eb1 100644 (file)
@@ -15,7 +15,7 @@ GNU General Public License for more details.
 
 You should have received a copy of the GNU General Public License
 along with this program; if not, write to the Free Software
-Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA.  */
+Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA.  */
 
 #include "defs.h"
 #include "serial.h"
@@ -25,8 +25,13 @@ Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA.  */
 #include <arpa/inet.h>
 #include <netdb.h>
 #include <sys/socket.h>
+
+#ifndef __CYGWIN32__
 #include <netinet/tcp.h>
+#endif
+
 #include "signals.h"
+#include "gdb_string.h"
 
 struct tcp_ttystate
 {
@@ -44,6 +49,10 @@ static int tcp_write PARAMS ((serial_t scb, const char *str, int len));
 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));
+static int tcp_return_0 PARAMS ((serial_t));
+static int tcp_noflush_set_tty_state PARAMS ((serial_t, serial_ttystate,
+                                             serial_ttystate));
+static void tcp_print_tty_state PARAMS ((serial_t, serial_ttystate));
 
 /* Open up a raw tcp socket */
 
@@ -59,13 +68,14 @@ tcp_open(scb, name)
   int tmp;
   char hostname[100];
   struct protoent *protoent;
+  int i;
 
   port_str = strchr (name, ':');
 
   if (!port_str)
     error ("tcp_open: No colon in host name!"); /* Shouldn't ever happen */
 
-  tmp = min (port_str - name, sizeof hostname - 1);
+  tmp = min (port_str - name, (int) sizeof hostname - 1);
   strncpy (hostname, name, tmp); /* Don't want colon */
   hostname[tmp] = '\000';      /* Tie off host name */
   port = atoi (port_str + 1);
@@ -332,6 +342,7 @@ static struct serial_ops tcp_ops =
   tcp_noflush_set_tty_state,
   tcp_setbaudrate,
   tcp_setstopbits,
+  tcp_return_0,        /* wait for output to drain */
 };
 
 void
This page took 0.023876 seconds and 4 git commands to generate.