From: Ezra Peisach Date: Thu, 21 Jun 2001 18:28:32 +0000 (+0000) Subject: * configure.in: Test for parsetos() prototype and presence of X-Git-Tag: krb5-1.3-alpha1~1324 X-Git-Url: http://git.tremily.us/?a=commitdiff_plain;h=4b1e8f14babc74c45b332a4d2ff018b0903ce0a0;p=krb5.git * 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 --- 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 + + * 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 * 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 +#include ],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 +#endif + +#ifdef HAVE_TERM_H +#include +#endif + #include #include