convert change for PR#2212 from BSD to POSIX
This commit is contained in:
parent
3780fa036e
commit
3f497748c6
|
@ -1,4 +1,4 @@
|
|||
# $NetBSD: Makefile,v 1.18 1998/06/07 02:30:12 enami Exp $
|
||||
# $NetBSD: Makefile,v 1.19 1998/07/21 08:06:55 fair Exp $
|
||||
|
||||
.include <bsd.own.mk>
|
||||
|
||||
|
@ -11,6 +11,7 @@ CPPFLAGS+= -DHAVE_GETGRGID=1 -DHAVE_GETPWUID=1 -DHAVE_STRING_H=1
|
|||
CPPFLAGS+= -DHAVE_LIMITS_H=1 -DHAVE_STRSTR=1 -DHAVE_VALLOC=1 -DHAVE_MKDIR=1
|
||||
CPPFLAGS+= -DHAVE_MKNOD=1 -DHAVE_RENAME=1 -DHAVE_FTRUNCATE=1 -DHAVE_GETCWD=1
|
||||
CPPFLAGS+= -DHAVE_VPRINTF=1 -DNEEDPAD -I${.CURDIR}
|
||||
CPPFLAGS+= -DHAVE_TERMIOS_H=1
|
||||
CPPFLAGS+= -DDEF_AR_FILE=\"/dev/rst0\" -DDEFBLOCKING=20
|
||||
CPPFLAGS+= -DSTDC_HEADERS -DENABLE_SPARSE
|
||||
|
||||
|
|
|
@ -18,7 +18,7 @@ along with GNU Tar; see the file COPYING. If not, write to
|
|||
the Free Software Foundation, 675 Mass Ave, Cambridge, MA 02139, USA. */
|
||||
|
||||
#ifndef lint
|
||||
static char rcsid[] = "$Id: buffer.c,v 1.4 1998/07/06 07:50:27 fair Exp $";
|
||||
static char rcsid[] = "$Id: buffer.c,v 1.5 1998/07/21 08:06:56 fair Exp $";
|
||||
#endif /* not lint */
|
||||
|
||||
/*
|
||||
|
@ -58,6 +58,10 @@ time_t time ();
|
|||
#include <sys/inode.h>
|
||||
#endif
|
||||
|
||||
#ifdef HAVE_TERMIOS_H
|
||||
#include <termios.h>
|
||||
#endif
|
||||
|
||||
#include "tar.h"
|
||||
#include "port.h"
|
||||
#include "rmt.h"
|
||||
|
@ -1453,13 +1457,13 @@ tryagain:
|
|||
/*
|
||||
** Avoid bogons from the tty
|
||||
*/
|
||||
#if defined(TIOCDRAIN) && defined(TIOCFLUSH)
|
||||
#ifdef HAVE_TERMIOS_H
|
||||
if (flushinput) {
|
||||
int what = FREAD;
|
||||
(void) ioctl(fileno(read_file), TIOCDRAIN, (void *)NULL);
|
||||
(void) ioctl(fileno(read_file), TIOCFLUSH, &what);
|
||||
(void) tcdrain(fileno(read_file));
|
||||
(void) tcflush(fileno(read_file), TCIFLUSH);
|
||||
}
|
||||
#endif /* TIOCDRAIN && TIOCFLUSH */
|
||||
#endif
|
||||
|
||||
if (fgets (inbuf, sizeof (inbuf), read_file) == 0)
|
||||
{
|
||||
|
|
Loading…
Reference in New Issue