aboutsummaryrefslogtreecommitdiffstats
path: root/mail
diff options
context:
space:
mode:
authored <ed@FreeBSD.org>2008-06-19 16:43:39 +0800
committered <ed@FreeBSD.org>2008-06-19 16:43:39 +0800
commitfdf6c8815ba2672cb002777fa935abba89daff60 (patch)
treea876ebc6d41b46d59b4dda9dff31faf0202da153 /mail
parentaefe8320f40a6b7eeec2611708976b3b169f4578 (diff)
downloadfreebsd-ports-gnome-fdf6c8815ba2672cb002777fa935abba89daff60.tar.gz
freebsd-ports-gnome-fdf6c8815ba2672cb002777fa935abba89daff60.tar.zst
freebsd-ports-gnome-fdf6c8815ba2672cb002777fa935abba89daff60.zip
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)
Diffstat (limited to 'mail')
-rw-r--r--mail/metamail/Makefile2
-rw-r--r--mail/metamail/files/patch-metamail_metamail.c27
2 files changed, 28 insertions, 1 deletions
diff --git a/mail/metamail/Makefile b/mail/metamail/Makefile
index 294b929cfd05..19ba2225a1ac 100644
--- a/mail/metamail/Makefile
+++ b/mail/metamail/Makefile
@@ -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/
diff --git a/mail/metamail/files/patch-metamail_metamail.c b/mail/metamail/files/patch-metamail_metamail.c
index b03ae1b751a3..612e522c2e32 100644
--- a/mail/metamail/files/patch-metamail_metamail.c
+++ b/mail/metamail/files/patch-metamail_metamail.c
@@ -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() {