mirror of
https://git.hardenedbsd.org/hardenedbsd/HardenedBSD.git
synced 2024-11-29 12:44:53 +01:00
Use tcflush(), eliminate libcompat.
This commit is contained in:
parent
508504ecff
commit
27a28f2789
@ -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 <bsd.prog.mk>
|
||||
|
@ -75,7 +75,7 @@ static char sccsid[] = "@(#)msgs.c 8.1 (Berkeley) 6/6/93";
|
||||
#include <errno.h>
|
||||
#include <pwd.h>
|
||||
#include <setjmp.h>
|
||||
#include <sgtty.h>
|
||||
#include <termios.h>
|
||||
#include <signal.h>
|
||||
#include <stdio.h>
|
||||
#include <stdlib.h>
|
||||
@ -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
|
||||
|
Loading…
Reference in New Issue
Block a user