From: Sam Hartman Date: Mon, 26 Feb 1996 08:35:56 +0000 (+0000) Subject: Use MAXDNAME for the maximum length of a domain, X-Git-Tag: krb5-1.0-beta6~450 X-Git-Url: http://git.tremily.us/?a=commitdiff_plain;h=c1b2f76b318c5e6483ae8d1e7752196006738d04;p=krb5.git Use MAXDNAME for the maximum length of a domain, *not* MAXHOSTNAMELEN, which is the maximum length of an argument to gethostname or sethostname. Look for arpa/nameser.h to find this constant, defining it to 256 inf not present in an included file. git-svn-id: svn://anonsvn.mit.edu/krb5/trunk@7548 dc483132-0cff-0310-8789-dd5450dbe970 --- diff --git a/src/appl/telnet/telnet/ChangeLog b/src/appl/telnet/telnet/ChangeLog index 2efc934db..314b22396 100644 --- a/src/appl/telnet/telnet/ChangeLog +++ b/src/appl/telnet/telnet/ChangeLog @@ -1,3 +1,9 @@ +Sun Feb 25 20:32:57 1996 Sam Hartman + + * configure.in: Check for arpa/nameser.h + + * commands.c : use MAXDNAME as maximum length of a domain. + Sun Nov 12 04:53:17 1995 Mark W. Eichin * main.c: initialize line (to avoid splitting up forward.c.) diff --git a/src/appl/telnet/telnet/commands.c b/src/appl/telnet/telnet/commands.c index e3d9fa0e7..dd00a7498 100644 --- a/src/appl/telnet/telnet/commands.c +++ b/src/appl/telnet/telnet/commands.c @@ -82,8 +82,12 @@ #include -#ifndef MAXHOSTNAMELEN -#define MAXHOSTNAMELEN 64 +#if HAVE_ARPA_NAMESER_H +#include +#endif + +#ifndef MAXDNAME +#define MAXDNAME 256 /*per the rfc*/ #endif #if defined(IPPROTO_IP) && defined(IP_TOS) @@ -91,7 +95,7 @@ int tos = -1; #endif /* defined(IPPROTO_IP) && defined(IP_TOS) */ char *hostname; -static char _hostname[MAXHOSTNAMELEN]; +static char _hostname[MAXDNAME]; extern char *getenv(); diff --git a/src/appl/telnet/telnet/configure.in b/src/appl/telnet/telnet/configure.in index 067a5d092..8492375ee 100644 --- a/src/appl/telnet/telnet/configure.in +++ b/src/appl/telnet/telnet/configure.in @@ -2,7 +2,7 @@ AC_INIT(telnet.c) CONFIG_RULES AC_PROG_INSTALL AC_VFORK -AC_CHECK_HEADERS(string.h) +AC_CHECK_HEADERS(string.h arpa/nameser.h) AC_HAVE_HEADERS(unistd.h sys/select.h stdlib.h) AC_CHECK_LIB(termcap,main,AC_DEFINE(TERMCAP) LIBS="$LIBS -ltermcap")