version 1.18, 2002/02/16 21:27:50 |
version 1.19, 2002/02/19 18:38:02 |
|
|
char *cp; |
char *cp; |
static char line[NI_MAXHOST]; |
static char line[NI_MAXHOST]; |
struct hostent *hp; |
struct hostent *hp; |
static char domain[MAXHOSTNAMELEN + 1]; |
static char domain[MAXHOSTNAMELEN]; |
static int first = 1; |
static int first = 1; |
char hbuf[NI_MAXHOST]; |
char hbuf[NI_MAXHOST]; |
struct sockaddr_in6 sin6; |
struct sockaddr_in6 sin6; |
|
|
|
|
if (first && !nflag) { |
if (first && !nflag) { |
first = 0; |
first = 0; |
if (gethostname(domain, MAXHOSTNAMELEN) == 0 && |
if (gethostname(domain, sizeof(domain)) == 0 && |
(cp = index(domain, '.'))) |
(cp = index(domain, '.'))) |
(void) strcpy(domain, cp + 1); |
(void) strcpy(domain, cp + 1); |
else |
else |