main.c (main): POSIX states that getopt returns -1 when it is done
authorTheodore Tso <tytso@mit.edu>
Thu, 14 May 1998 04:47:22 +0000 (04:47 +0000)
committerTheodore Tso <tytso@mit.edu>
Thu, 14 May 1998 04:47:22 +0000 (04:47 +0000)
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

src/appl/telnet/telnet/ChangeLog
src/appl/telnet/telnet/commands.c
src/appl/telnet/telnet/configure.in
src/appl/telnet/telnet/externs.h
src/appl/telnet/telnet/main.c
src/appl/telnet/telnet/ring.c

index b9ed696f54647302f3ab95805e924bb38951043e..8bb990c7b1f31027339b59c31cb7afc9e60e4669 100644 (file)
@@ -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
index 0b42efe621dd757a251c009a350bc55db7ddba6f..5c8ae3cb725e95202b61d5cb82fdef70b03bcfbe 100644 (file)
@@ -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;
index e45c069c635006a96a02c7a145e62c9daf15d37f..38e06cd30576c10aba4c8630decf010dcf10a624 100644 (file)
@@ -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)
index c09527f6da6e1de6dd6c62c8d404dc0b558b2289..e9939865ef24ea9497e106aa84c9e49b6455f946 100644 (file)
@@ -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>
index c87d9410cb14dba27446cfc29c9b7ee2ee9a648e..16663089f0fa9c2617908c583c477453aa7d9670 100644 (file)
@@ -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)
index 59fae9eb8a1191dc71d7b2012ec4110dcfebb34d..a1d62f115854593876cd654d98b44ca4a7c87caa 100644 (file)
@@ -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>