ports/110884: games/tads: use <termios.h> instead of <sgtty.h>
Ed Schouten
ed at fxq.nl
Mon Mar 26 21:20:03 UTC 2007
>Number: 110884
>Category: ports
>Synopsis: games/tads: use <termios.h> instead of <sgtty.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 21:20:02 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:
One of the last remaining ports on my list that isn't hard to port to
<termios.h>, is TADS. Using <termios.h> instead of <sgtty.h> will make
the application work on kernels that aren't compiled with
COMPAT_43/COMPAT_43TTY.
>How-To-Repeat:
>Fix:
Place the following patch in the `files/' directory. The unportable
`t.c_cflag & CBAUD' line has been replaced with cfgetospeed(). This
looks like the right thing to do, because on Linux, cfgetospeed() is a
macro to exactly the same thing.
--- osunixt.c Wed Dec 15 03:06:26 2004
+++ osunixt.c Mon Mar 26 23:07:34 2007
@@ -960,7 +960,7 @@
t.c_cc[VMIN] = 1;
t.c_cc[VTIME] = 0;
#if !defined(SGI_IRIX)
- t.c_oflag &= (~XTABS);
+ t.c_oflag &= (~OXTABS);
#else
t.c_oflag &= (~TAB3);
#endif
@@ -984,7 +984,7 @@
#ifdef USE_SGTTY
ospeed = t.sg_ospeed;
#else
- ospeed = t.c_cflag & CBAUD;
+ ospeed = cfgetospeed(&t);
#endif
if (ospeed == 0)
ospeed = 11;
--- osunixt.h Tue Feb 17 03:20:41 2004
+++ osunixt.h Mon Mar 26 23:07:34 2007
@@ -84,7 +84,7 @@
* Define the following to use sgtty.h instead of termios or direct
* ioctl hacking.
*/
-#if defined(NEXT) || defined(IBM_RT) || defined(FREEBSD_386) || defined(IBM_AIX) || defined(NETBSD) || defined(OPENBSD) || defined(DARWIN)
+#if defined(NEXT) || defined(IBM_RT) || defined(IBM_AIX) || defined(NETBSD) || defined(OPENBSD) || defined(DARWIN)
#define USE_IOCTL_INSTEAD_OF_TERMIOS
#define USE_SGTTY
#endif
>Release-Note:
>Audit-Trail:
>Unformatted:
More information about the freebsd-ports-bugs
mailing list