diff --git a/usr.bin/msgs/Makefile b/usr.bin/msgs/Makefile index bcc230ed56c..8613f79cb5e 100644 --- a/usr.bin/msgs/Makefile +++ b/usr.bin/msgs/Makefile @@ -1,7 +1,8 @@ -# @(#)Makefile 8.1 (Berkeley) 6/6/93 +# From: @(#)Makefile 8.1 (Berkeley) 6/6/93 +# $Id$ PROG= msgs -DPADD= ${LIBTERMCAP} ${LIBCOMPAT} -LDADD= -ltermcap -lcompat +DPADD= ${LIBTERMCAP} +LDADD= -ltermcap .include diff --git a/usr.bin/msgs/msgs.c b/usr.bin/msgs/msgs.c index 9a5311aaa02..c7bde8a0967 100644 --- a/usr.bin/msgs/msgs.c +++ b/usr.bin/msgs/msgs.c @@ -75,7 +75,7 @@ static char sccsid[] = "@(#)msgs.c 8.1 (Berkeley) 6/6/93"; #include #include #include -#include +#include #include #include #include @@ -130,7 +130,6 @@ int nlines; int Lpp = 0; time_t t; time_t keep; -struct sgttyb otty; char *mktemp(); char *nxtfld(); @@ -162,7 +161,7 @@ int argc; char *argv[]; setbuf(stdout, NULL); #endif - gtty(fileno(stdout), &otty); + time(&t); setuid(uid = getuid()); ruptible = (signal(SIGINT, SIG_IGN) == SIG_DFL); @@ -632,8 +631,8 @@ int length; fflush(stdout); } - /* trick to force wait on output */ - stty(fileno(stdout), &otty); + /* force wait on output */ + tcdrain(fileno(stdout)); } void