[prev in list] [next in list] [prev in thread] [next in thread]
List: gdb-patches
Subject: [PATCH]: ser-tcp.c: Use `localhost' as default hostname
From: vinschen () redhat ! com (Corinna Vinschen)
Date: 2001-07-31 12:07:00
Message-ID: 20010731210714.A3717 () cygbert ! vinschen ! de
[Download RAW message or body]
Hi,
I don't like to type
target remote localhost:1234
all the time. It"s possible to abbreviate it to
ta r localhost:1234
but I don't see a need to type `localhost'. I would like to have
`localhost' as default if no hostname is given like in:
ta r :1234
The following tiny patch handles that.
Corinna
ChangeLog:
==========
2001-07-31 Corinna Vinschen <vinschen@redhat.com>
ser-tcp.c (tcp_open): Use `localhost' as default host if no
hostname is given.
Index: ser-tcp.c
===================================================================
RCS file: /cvs/src/src/gdb/ser-tcp.c,v
retrieving revision 1.6
diff -u -p -r1.6 ser-tcp.c
--- ser-tcp.c 2001/07/11 17:52:32 1.6
+++ ser-tcp.c 2001/07/31 19:00:30
@@ -63,6 +63,9 @@ tcp_open (struct serial *scb, const char
hostname[tmp] = '\000'; /* Tie off host name */
port = atoi (port_str + 1);
+ if (!hostname[0])
+ strcpy (hostname, "localhost");
+
hostent = gethostbyname (hostname);
if (!hostent)
--
Corinna Vinschen
Cygwin Developer
Red Hat, Inc.
mailto:vinschen@redhat.com
[prev in list] [next in list] [prev in thread] [next in thread]
Configure |
About |
News |
Add a list |
Sponsored by KoreLogic