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"
#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
{
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 */
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);
tcp_noflush_set_tty_state,
tcp_setbaudrate,
tcp_setstopbits,
+ tcp_return_0, /* wait for output to drain */
};
void