telnetd-ktd.c (main): POSIX states that getopt returns -1 when it
is done parsing options, not EOF.
configure.in: Rename HAS_* to HAVE_* for the following tests: sac.h,
sys/ptyvar.h, sys/filio.h, sys/stream.h, gettosbyname(), and make
appropriate adjustments in the rest of the .c files. Remove tests
which aren't being used anymore: vhangup, utmpx.h, utmp.h, etc.
defs.h: Use HAVE_SYS_FILIO_H instead of FILIO_H
sys_term.c: Use HAVE_SAC_H and HAVE_SYS_STREAM_H instead of
HAS_SAC and STREAMS.
telnetd.c, telnetd-ktd.c: Use HAVE_GETTOSBYNAME instead of
HAS_GETTOS
telnetd.c: Use HAVE_SYS_PTYVAR_H instead of HAS_PTYVAR.
git-svn-id: svn://anonsvn.mit.edu/krb5/trunk@10571
dc483132-0cff-0310-8789-
dd5450dbe970
+1998-05-06 Theodore Ts'o <tytso@rsts-11.mit.edu>
+
+ * telnetd.c (main):
+ * telnetd-ktd.c (main): POSIX states that getopt returns -1 when it
+ is done parsing options, not EOF.
+
+Tue Mar 3 14:26:04 1998 Theodore Ts'o <tytso@rsts-11.mit.edu>
+
+ * configure.in: Rename HAS_* to HAVE_* for the following tests:
+ sac.h, sys/ptyvar.h, sys/filio.h, sys/stream.h,
+ gettosbyname(), and make appropriate adjustments in the
+ rest of the .c files. Remove tests which aren't being
+ used anymore: vhangup, utmpx.h, utmp.h, etc.
+
+ * defs.h: Use HAVE_SYS_FILIO_H instead of FILIO_H
+
+ * sys_term.c: Use HAVE_SAC_H and HAVE_SYS_STREAM_H instead of
+ HAS_SAC and STREAMS.
+
+ * telnetd.c, telnetd-ktd.c: Use HAVE_GETTOSBYNAME instead of
+ HAS_GETTOS
+
+ * telnetd.c: Use HAVE_SYS_PTYVAR_H instead of HAS_PTYVAR.
+
Mon Feb 23 22:58:22 1998 Tom Yu <tlyu@mit.edu>
* utility.c (ptyflush, netflush): Explicitly reset SIGCHLD handler
fi
fi
AC_HEADER_TIME
-AC_CHECK_HEADERS(string.h arpa/nameser.h)
-AC_CHECK_HEADERS(sys/time.h sys/tty.h)
-AC_HAVE_FUNCS(vhangup)
+AC_CHECK_HEADERS(string.h arpa/nameser.h sys/time.h sys/tty.h sac.h sys/ptyvar.h sys/filio.h sys/stream.h)
+AC_CHECK_FUNCS(gettosbyname)
dnl Make our operating system-specific security checks and definitions for
dnl login.
dnl
if test -z "$broken_streams" ; then
AC_FUNC_CHECK(grantpt,AC_DEFINE(STREAMSPTY))
fi
-AC_HEADER_CHECK(sac.h,AC_DEFINE(HAS_SAC))
-AC_HEADER_CHECK(sys/ptyvar.h,AC_DEFINE(HAS_PTYVAR))
-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_HEADER_CHECK(utmpx.h,
- AC_DEFINE(UTMPX)
- AC_DEFINE(HAVE_UTMPX_H)
- ac_utmp_h=1)
-if test -z "$ac_utmp_h" ; then
-AC_CHECK_HEADERS(utmp.h)
-fi
-AC_FUNC_CHECK(cgetent,AC_DEFINE(HAS_CGETENT))
AC_MSG_CHECKING([if setpgrp takes two arguments])
dnl
AC_CACHE_VAL(krb5_cv_sys_setpgrp_two,
# endif
#endif
-#ifndef FILIO_H
+#ifndef HAVE_SYS_FILIO_H
#include <sys/ioctl.h>
#else
#include <sys/filio.h>
#endif /* NEWINIT */
#ifdef STREAMSPTY
-#ifdef HAS_SAC
+#ifdef HAVE_SAC_H
#include <sac.h>
#endif
#include <sys/stropts.h>
#define SCPYN(a, b) (void) strncpy(a, b, sizeof(a))
#define SCMPN(a, b) strncmp(a, b, sizeof(a))
-#ifdef STREAMS
+#ifdef HAVE_SYS_STREAM_H
#include <sys/stream.h>
#endif
#ifdef __hpux
highpty = getnpty();
#endif /* CRAY */
- while ((ch = getopt(argc, argv, "d:a:e:klhnr:u:UI:D:B:sS:a:X:")) != EOF) {
+ while ((ch = getopt(argc, argv, "d:a:e:klhnr:u:UI:D:B:sS:a:X:")) != -1) {
switch(ch) {
#ifdef AUTHENTICATION
break;
#endif /* SecurID */
case 'S':
-#ifdef HAS_GETTOS
+#ifdef HAVE_GETTOSBYNAME
if ((tos = parsetos(optarg, "tcp")) < 0)
fprintf(stderr, "%s%s%s\n",
"telnetd: Bad TOS argument '", optarg,
#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;
#ifdef HAVE_SYS_TTY_H
# include "/usr/include/sys/tty.h"
#endif
-#ifdef HAS_PTYVAR
+#ifdef HAVE_SYS_PTYVAR_H
# include <sys/ptyvar.h>
#endif
highpty = getnpty();
#endif /* CRAY */
- while ((ch = getopt(argc, argv, valid_opts)) != EOF) {
+ while ((ch = getopt(argc, argv, valid_opts)) != -1) {
switch(ch) {
#ifdef AUTHENTICATION
break;
#endif /* SecurID */
case 'S':
-#ifdef HAS_GETTOS
+#ifdef HAVE_GETTOSBYNAME
if ((tos = parsetos(optarg, "tcp")) < 0)
fprintf(stderr, "%s%s%s\n",
"telnetd: Bad TOS argument '", optarg,
#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;
#ifdef SecurID
fprintf(stderr, " [-s]");
#endif
-#ifdef HAS_GETTOS
+#ifdef HAVE_GETTOSBYNAME
fprintf(stderr, " [-S tos]");
#endif
#ifdef AUTHENTICATION