Make metamail compile after the sgtty removal.

The metamail port was patched to use termios a long time ago.
Unforunately, the patch left some calls to stty() and gtty(). Change
these calls to tcgetattr() and tcsetattr().

PR:		124462
Approved by:	philip (mentor)
This commit is contained in:
Ed Schouten 2008-06-19 08:43:39 +00:00
parent 672ff8e562
commit b8705d21af
Notes: svn2git 2021-03-31 03:12:20 +00:00
svn path=/head/; revision=215245
2 changed files with 28 additions and 1 deletions

View file

@ -7,7 +7,7 @@
PORTNAME= metamail
PORTVERSION= 2.7
PORTREVISION= 6
PORTREVISION= 7
CATEGORIES= mail
MASTER_SITES= http://ftp.funet.fi/pub/unix/mail/metamail/ \
ftp://ftp.research.telcordia.com/pub/nsb/

View file

@ -138,6 +138,33 @@
#else
static struct sgttyb MyTtyStateIn, MyTtyStateOut;
#endif
@@ -2385,9 +2397,9 @@
SaveTtyState() {
/* Bogus -- would like a good portable way to reset the terminal state here */
#if !defined(AMIGA) && !defined(MSDOS)
-#ifdef SYSV
- ioctl(fileno(stdin), TCGETA, &MyTtyStateIn);
- ioctl(fileno(stdout), TCGETA, &MyTtyStateOut);
+#if 1
+ tcgetattr(fileno(stdin), &MyTtyStateIn);
+ tcgetattr(fileno(stdout), &MyTtyStateOut);
#else
gtty(fileno(stdin), &MyTtyStateIn);
gtty(fileno(stdout), &MyTtyStateOut);
@@ -2398,10 +2410,10 @@
RestoreTtyState() {
#if !defined(AMIGA) && !defined(MSDOS)
-#ifdef SYSV
+#if 1
if (HasSavedTtyState) {
- ioctl(fileno(stdout), TCSETA, &MyTtyStateOut);
- ioctl(fileno(stdin), TCSETA, &MyTtyStateIn);
+ tcsetattr(fileno(stdout), TCSANOW, &MyTtyStateOut);
+ tcsetattr(fileno(stdin), TCSANOW, &MyTtyStateIn);
}
#else
if (HasSavedTtyState) {
@@ -2681,15 +2693,15 @@
StartRawStdin() {