ports/110872: [mail/xmail] Switch to <termios.h>
Ed Schouten
ed at fxq.nl
Mon Mar 26 17:50:04 UTC 2007
>Number: 110872
>Category: ports
>Synopsis: [mail/xmail] Switch to <termios.h>
>Confidential: no
>Severity: non-critical
>Priority: low
>Responsible: freebsd-ports-bugs
>State: open
>Quarter:
>Keywords:
>Date-Required:
>Class: sw-bug
>Submitter-Id: current-users
>Arrival-Date: Mon Mar 26 17:50:01 GMT 2007
>Closed-Date:
>Last-Modified:
>Originator: Ed Schouten
>Release: FreeBSD 6.2-STABLE i386
>Organization:
>Environment:
System: FreeBSD palm.hoeg.nl 6.2-STABLE FreeBSD 6.2-STABLE #0: Sun Feb 11 22:32:09 CET 2007 root at palm.hoeg.nl:/usr/obj/usr/src/sys/PALM i386
>Description:
The mail/xmail package makes use of the sgtty.h terminal interface. On
FreeBSD, sgtty only works when a kernel with COMPAT_43/COMPAT_43TTY is
running. Because it isn't hard to migrate this application to use
termios, we'd be better off using that interface.
>How-To-Repeat:
>Fix:
The termio interface has a switch called TABDLY. The appropriate option
is called OXTABS in termios.
--- mail/xmail/files/patch-ad Thu Feb 5 08:33:20 1998
+++ mail/xmail/files/patch-ad Mon Mar 26 19:38:38 2007
@@ -1,6 +1,20 @@
--- callMail.c.orig Thu Jan 26 21:52:01 1995
+++ callMail.c Wed Feb 4 23:30:07 1998
-@@ -81,7 +81,7 @@
+@@ -38,11 +38,10 @@
+ #include <sys/select.h>
+ #endif
+
+-#if !(defined(SYSV) || defined(linux)) || defined(clipper)
++#if !(defined(SYSV) || defined(linux) || defined(__FreeBSD__)) || defined(clipper)
+ #include <sgtty.h>
+ #else
+-#include <sys/termio.h>
+-#include <sys/sysmacros.h>
++#include <sys/termios.h>
+ #include <fcntl.h>
+ #if defined(att)
+ #include <sys/stropts.h>
+@@ -81,7 +80,7 @@
#ifdef hpux
#define PTYCHAR2 "fedcba9876543210"
#else /* !hpux */
@@ -9,3 +23,33 @@
#endif /* !hpux */
#endif /* !PTYCHAR2 */
+@@ -207,8 +206,8 @@
+ callMail(argv)
+ char *argv[];
+ {
+-#if defined(linux) || (defined(SYSV) && !defined(clipper))
+- struct termio tio;
++#if defined(linux) || defined(__FreeBSD__) || (defined(SYSV) && !defined(clipper))
++ struct termios tio;
+ #else
+ struct sgttyb Sgtty;
+ #endif
+@@ -223,14 +222,14 @@
+ /*
+ ** Set minimal requirements for slave connection (no echo, no NL->CR, keep TABS)
+ */
+-#if defined(linux) || (defined(SYSV) && !defined(clipper))
+- (void) ioctl(slave, TCGETA, &tio);
+- tio.c_oflag &= ~(OCRNL|ONLCR|ONLRET|TABDLY);
++#if defined(linux) || defined(__FreeBSD__) || (defined(SYSV) && !defined(clipper))
++ tcgetattr(slave, &tio);
++ tio.c_oflag &= ~(OCRNL|ONLCR|ONLRET|OXTABS);
+ tio.c_iflag &= ~IXOFF;
+ tio.c_iflag |= ICRNL;
+ tio.c_lflag &= ~(ISIG|ECHO);
+ tio.c_lflag |= ICANON;
+- (void) ioctl(slave, TCSETA, &tio);
++ tcsetattr(slave, TCSANOW, &tio);
+ #else
+ (void) ioctl(slave, TIOCGETP, &Sgtty);
+ Sgtty.sg_flags &= ~(ECHO|CRMOD|XTABS);
>Release-Note:
>Audit-Trail:
>Unformatted:
More information about the freebsd-ports-bugs
mailing list