summaryrefslogtreecommitdiffstats
path: root/src
diff options
context:
space:
mode:
authorEzra Peisach <epeisach@mit.edu>2001-06-21 18:28:32 +0000
committerEzra Peisach <epeisach@mit.edu>2001-06-21 18:28:32 +0000
commit4b1e8f14babc74c45b332a4d2ff018b0903ce0a0 (patch)
tree57db51ee74102853cbeffa52a32c339cf2dd74f4 /src
parentfad2ff7928b28751f89db0676c2dc24cde195611 (diff)
downloadkrb5-4b1e8f14babc74c45b332a4d2ff018b0903ce0a0.tar.gz
krb5-4b1e8f14babc74c45b332a4d2ff018b0903ce0a0.tar.xz
krb5-4b1e8f14babc74c45b332a4d2ff018b0903ce0a0.zip
* configure.in: Test for parsetos() prototype and presence of
curses.h and term.h header files. * telnet.c: Include term.h and curses.h if present for setupterm() prototype. * main.c: Declare prototype for parsetos() if needed. git-svn-id: svn://anonsvn.mit.edu/krb5/trunk@13462 dc483132-0cff-0310-8789-dd5450dbe970
Diffstat (limited to 'src')
-rw-r--r--src/appl/telnet/telnet/ChangeLog10
-rw-r--r--src/appl/telnet/telnet/configure.in4
-rw-r--r--src/appl/telnet/telnet/main.c4
-rw-r--r--src/appl/telnet/telnet/telnet.c8
4 files changed, 24 insertions, 2 deletions
diff --git a/src/appl/telnet/telnet/ChangeLog b/src/appl/telnet/telnet/ChangeLog
index 34e97546e..cb41b6600 100644
--- a/src/appl/telnet/telnet/ChangeLog
+++ b/src/appl/telnet/telnet/ChangeLog
@@ -1,3 +1,13 @@
+2001-06-21 Ezra Peisach <epeisach@mit.edu>
+
+ * configure.in: Test for parsetos() prototype and presence of
+ curses.h and term.h header files.
+
+ * telnet.c: Include term.h and curses.h if present for setupterm()
+ prototype.
+
+ * main.c: Declare prototype for parsetos() if needed.
+
2001-06-19 Ezra Peisach <epeisach@mit.edu>
* telnet.c (telrcv): Ensure variable set before use.
diff --git a/src/appl/telnet/telnet/configure.in b/src/appl/telnet/telnet/configure.in
index ea5230a34..346436154 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_FUNC_VFORK
-AC_CHECK_HEADERS(string.h arpa/nameser.h unistd.h sys/select.h stdlib.h arpa/inet.h sys/filio.h)
+AC_CHECK_HEADERS(string.h arpa/nameser.h unistd.h sys/select.h stdlib.h arpa/inet.h sys/filio.h curses.h term.h)
AC_CHECK_LIB(termcap,main,AC_DEFINE(TERMCAP)
LIBS="$LIBS -ltermcap",
AC_CHECK_LIB(curses,setupterm,LIBS="$LIBS -lcurses",
@@ -23,6 +23,8 @@ if test -z "$ac_sysv_termio"; then
fi
fi
fi
+KRB5_NEED_PROTO([#include <unistd.h>
+#include <stdlib.h>],parsetos,1)
CHECK_SIGNALS
if test "$KRB4_LIB" = ''; then
AC_MSG_RESULT(No Kerberos 4 authentication)
diff --git a/src/appl/telnet/telnet/main.c b/src/appl/telnet/telnet/main.c
index 80a80848e..5ca592ad6 100644
--- a/src/appl/telnet/telnet/main.c
+++ b/src/appl/telnet/telnet/main.c
@@ -54,7 +54,9 @@ char copyright[] =
#include "externs.h"
#include "defines.h"
-
+#ifdef NEED_PARSETOS_PROTO
+extern int parsetos(char *, char *);
+#endif
#if 0
#define FORWARD
diff --git a/src/appl/telnet/telnet/telnet.c b/src/appl/telnet/telnet/telnet.c
index 869d3e402..04df686c5 100644
--- a/src/appl/telnet/telnet/telnet.c
+++ b/src/appl/telnet/telnet/telnet.c
@@ -48,6 +48,14 @@
*/
#endif /* defined(unix) */
+#ifdef HAVE_CURSES_H
+#include <curses.h>
+#endif
+
+#ifdef HAVE_TERM_H
+#include <term.h>
+#endif
+
#include <arpa/telnet.h>
#include <ctype.h>