* configure.in: Test for parsetos() prototype and presence of
authorEzra Peisach <epeisach@mit.edu>
Thu, 21 Jun 2001 18:28:32 +0000 (18:28 +0000)
committerEzra Peisach <epeisach@mit.edu>
Thu, 21 Jun 2001 18:28:32 +0000 (18:28 +0000)
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

src/appl/telnet/telnet/ChangeLog
src/appl/telnet/telnet/configure.in
src/appl/telnet/telnet/main.c
src/appl/telnet/telnet/telnet.c

index 34e97546eba0dd40db06272fb7c6cf4d74e87936..cb41b6600d728f074f8782e84e7ce1eead946d0e 100644 (file)
@@ -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.
index ea5230a34e8b87771860ae635a66d2d6175d3387..346436154ff832010cf65c4045a478cf9c308c4d 100644 (file)
@@ -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)
index 80a80848e1574703a47def2f0b25fcf9d9426a16..5ca592ad686578d6c4768127a5e08042fe18130e 100644 (file)
@@ -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
index 869d3e402de2e9508a31e35a0e30c1c6f45ddc4a..04df686c56accb29cf6abb8fcaf44babbd2a0b28 100644 (file)
  */
 #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>