From 2a2bc077e2543174ab3895bb2d13f3a76b444210 Mon Sep 17 00:00:00 2001 From: Mark Eichin Date: Mon, 8 Aug 1994 05:20:38 +0000 Subject: [PATCH] grab -nlsl, -lsocket; punt index/rindex git-svn-id: svn://anonsvn.mit.edu/krb5/trunk@4063 dc483132-0cff-0310-8789-dd5450dbe970 --- src/appl/telnet/telnetd/ChangeLog | 5 +++++ src/appl/telnet/telnetd/configure.in | 2 ++ src/appl/telnet/telnetd/utility.c | 9 ++------- 3 files changed, 9 insertions(+), 7 deletions(-) diff --git a/src/appl/telnet/telnetd/ChangeLog b/src/appl/telnet/telnetd/ChangeLog index 722b5e9c6..394cce67d 100644 --- a/src/appl/telnet/telnetd/ChangeLog +++ b/src/appl/telnet/telnetd/ChangeLog @@ -1,3 +1,8 @@ +Mon Aug 8 01:15:27 1994 Mark Eichin (eichin@cygnus.com) + + * utility.c (putf): don't misdeclare index/rindex, strings.h + already got included. Don't even use them -- use str*chr instead. + Thu Aug 4 03:37:26 1994 Tom Yu (tlyu@dragons-lair) * configure.in: pick up dbm libs diff --git a/src/appl/telnet/telnetd/configure.in b/src/appl/telnet/telnetd/configure.in index 47fbc2975..55d0fee76 100644 --- a/src/appl/telnet/telnetd/configure.in +++ b/src/appl/telnet/telnetd/configure.in @@ -9,6 +9,8 @@ AC_PROG_INSTALL KRB_INCLUDE ISODE_INCLUDE AC_HAVE_LIBRARY(ndbm) +AC_HAVE_LIBRARY(socket) +AC_HAVE_LIBRARY(nsl) AC_HAVE_LIBRARY(dbm) AC_HAVE_LIBRARY(termcap,AC_DEFINE(TERMCAP) LIBS="$LIBS -ltermcap") diff --git a/src/appl/telnet/telnetd/utility.c b/src/appl/telnet/telnetd/utility.c index 6fe838abe..5d9cf9b14 100644 --- a/src/appl/telnet/telnetd/utility.c +++ b/src/appl/telnet/telnetd/utility.c @@ -448,11 +448,6 @@ putf(cp, where) char *slash; time_t t; char db[100]; -#ifdef STREAMSPTY - extern char *index(); -#else - extern char *rindex(); -#endif putlocation = where; @@ -466,9 +461,9 @@ putf(cp, where) case 't': #ifdef STREAMSPTY /* names are like /dev/pts/2 -- we want pts/2 */ - slash = index(line+1, '/'); + slash = strchr(line+1, '/'); #else - slash = rindex(line, '/'); + slash = strrchr(line, '/'); #endif if (slash == (char *) 0) putstr(line); -- 2.26.2