diff options
author | Theodore Tso <tytso@mit.edu> | 1998-05-14 04:47:22 +0000 |
---|---|---|
committer | Theodore Tso <tytso@mit.edu> | 1998-05-14 04:47:22 +0000 |
commit | e714fd71f74884f93463820d73a7edd9fba6eba6 (patch) | |
tree | 715573e1980641bf38c7df8d3df3559521f89112 /src/appl/telnet | |
parent | 4bdbf5904b2e38318b1e6f4d8b9aa4b4bebb214a (diff) | |
download | krb5-e714fd71f74884f93463820d73a7edd9fba6eba6.zip krb5-e714fd71f74884f93463820d73a7edd9fba6eba6.tar.gz krb5-e714fd71f74884f93463820d73a7edd9fba6eba6.tar.bz2 |
main.c (main): POSIX states that getopt returns -1 when it is done
parsing options, not EOF.
configure.in: Use standard autoconf test names. Change tests to define
standard autoconf CPP macro names, not the non-standard HAS_GETTOS,
etc.
main.c, commands.c: Use HAVE_GETTOSBYNAME instead of HAS_GETTOS
ring.c, externs.h: Use HAVE_SYS_FILIO_H instead of FILIO_H
git-svn-id: svn://anonsvn.mit.edu/krb5/trunk@10570 dc483132-0cff-0310-8789-dd5450dbe970
Diffstat (limited to 'src/appl/telnet')
-rw-r--r-- | src/appl/telnet/telnet/ChangeLog | 13 | ||||
-rw-r--r-- | src/appl/telnet/telnet/commands.c | 2 | ||||
-rw-r--r-- | src/appl/telnet/telnet/configure.in | 11 | ||||
-rw-r--r-- | src/appl/telnet/telnet/externs.h | 2 | ||||
-rw-r--r-- | src/appl/telnet/telnet/main.c | 4 | ||||
-rw-r--r-- | src/appl/telnet/telnet/ring.c | 2 |
6 files changed, 20 insertions, 14 deletions
diff --git a/src/appl/telnet/telnet/ChangeLog b/src/appl/telnet/telnet/ChangeLog index b9ed696..8bb990c 100644 --- a/src/appl/telnet/telnet/ChangeLog +++ b/src/appl/telnet/telnet/ChangeLog @@ -1,3 +1,16 @@ +1998-05-06 Theodore Ts'o <tytso@rsts-11.mit.edu> + + * main.c (main): POSIX states that getopt returns -1 when it + is done parsing options, not EOF. + + * configure.in: Use standard autoconf test names. Change tests + to define standard autoconf CPP macro names, not the + non-standard HAS_GETTOS, etc. + + * main.c, commands.c: Use HAVE_GETTOSBYNAME instead of HAS_GETTOS + + * ring.c, externs.h: Use HAVE_SYS_FILIO_H instead of FILIO_H + Wed Feb 18 15:38:05 1998 Tom Yu <tlyu@mit.edu> * Makefile.in: Remove trailing slash from thisconfigdir. Fix up diff --git a/src/appl/telnet/telnet/commands.c b/src/appl/telnet/telnet/commands.c index 0b42efe..5c8ae3c 100644 --- a/src/appl/telnet/telnet/commands.c +++ b/src/appl/telnet/telnet/commands.c @@ -2521,7 +2521,7 @@ tn(argc, argv) #endif #if defined(IPPROTO_IP) && defined(IP_TOS) { -# if defined(HAS_GETTOS) +# if defined(HAVE_GETTOSBYNAME) struct tosent *tp; if (tos < 0 && (tp = gettosbyname("telnet", "tcp"))) tos = tp->t_tos; diff --git a/src/appl/telnet/telnet/configure.in b/src/appl/telnet/telnet/configure.in index e45c069..38e06cd 100644 --- a/src/appl/telnet/telnet/configure.in +++ b/src/appl/telnet/telnet/configure.in @@ -2,14 +2,12 @@ AC_INIT(telnet.c) CONFIG_RULES AC_PROG_INSTALL AC_VFORK -AC_CHECK_HEADERS(string.h arpa/nameser.h) -AC_HAVE_HEADERS(unistd.h sys/select.h stdlib.h arpa/inet.h) +AC_CHECK_HEADERS(string.h arpa/nameser.h unistd.h sys/select.h stdlib.h arpa/inet.h sys/filio.h) +AC_CHECK_FUNCS(gettosbyname setupterm) AC_CHECK_LIB(termcap,main,AC_DEFINE(TERMCAP) LIBS="$LIBS -ltermcap", AC_CHECK_LIB(curses,setupterm,LIBS="$LIBS -lcurses") ) -AC_CHECK_FUNCS(setupterm) dnl If we have it, use it so we don't get -dnl endless loop with tcgetent AC_HEADER_CHECK(termios.h,AC_DEFINE(USE_TERMIO) ac_termio=1) if test -z "$ac_termio"; then AC_HEADER_CHECK(termio.h,AC_DEFINE(SYSV_TERMIO),ac_sysv_termio=1) @@ -24,11 +22,6 @@ if test -z "$ac_sysv_termio"; then fi fi fi -AC_FUNC_CHECK(gettosbyname,AC_DEFINE(HAS_GETTOS)) -AC_HEADER_CHECK(sys/filio.h,AC_DEFINE(FILIO_H)) -AC_HEADER_CHECK(sys/stream.h,AC_DEFINE(STREAMS)) -AC_FUNC_CHECK(cgetent,AC_DEFINE(HAS_CGETENT)) -AC_FUNC_CHECK(setupterm,AC_DEFINE(HAS_SETUPTERM)) CHECK_SIGNALS if test "$KRB4_LIB" = ''; then AC_MSG_RESULT(No Kerberos 4 authentication) diff --git a/src/appl/telnet/telnet/externs.h b/src/appl/telnet/telnet/externs.h index c09527f..e993986 100644 --- a/src/appl/telnet/telnet/externs.h +++ b/src/appl/telnet/telnet/externs.h @@ -57,7 +57,7 @@ #if defined(CRAY) && !defined(NO_BSD_SETJMP) #include <bsdsetjmp.h> #endif -#ifndef FILIO_H +#ifndef HAVE_SYS_FILIO_H #include <sys/ioctl.h> #else #include <sys/filio.h> diff --git a/src/appl/telnet/telnet/main.c b/src/appl/telnet/telnet/main.c index c87d941..1666308 100644 --- a/src/appl/telnet/telnet/main.c +++ b/src/appl/telnet/telnet/main.c @@ -142,7 +142,7 @@ main(argc, argv) rlogin = (strncmp(prompt, "rlog", 4) == 0) ? '~' : _POSIX_VDISABLE; autologin = -1; - while ((ch = getopt(argc, argv, "8EKLS:X:acde:fFk:l:n:rt:x")) != EOF) { + while ((ch = getopt(argc, argv, "8EKLS:X:acde:fFk:l:n:rt:x")) != -1) { switch(ch) { case '8': eight = 3; /* binary output and input */ @@ -160,7 +160,7 @@ main(argc, argv) break; case 'S': { -#if defined(HAS_GETTOS) || (defined(IPPROTO_IP) && defined(IP_TOS)) +#if defined(HAVE_GETTOSBYNAME) || (defined(IPPROTO_IP) && defined(IP_TOS)) extern int tos; if ((tos = parsetos(optarg, "tcp")) < 0) diff --git a/src/appl/telnet/telnet/ring.c b/src/appl/telnet/telnet/ring.c index 59fae9e..a1d62f1 100644 --- a/src/appl/telnet/telnet/ring.c +++ b/src/appl/telnet/telnet/ring.c @@ -52,7 +52,7 @@ #endif #include <sys/types.h> -#ifndef FILIO_H +#ifndef HAVE_SYS_FILIO_H #include <sys/ioctl.h> #endif #include <sys/socket.h> |