ports/120062: [Patch] chinese/hztty: migrate to termios, not sgtty
Ed Schouten
ed at fxq.nl
Sun Jan 27 21:40:03 UTC 2008
>Number: 120062
>Category: ports
>Synopsis: [Patch] chinese/hztty: migrate to termios, not sgtty
>Confidential: no
>Severity: non-critical
>Priority: medium
>Responsible: freebsd-ports-bugs
>State: open
>Quarter:
>Keywords:
>Date-Required:
>Class: sw-bug
>Submitter-Id: current-users
>Arrival-Date: Sun Jan 27 21:40:03 UTC 2008
>Closed-Date:
>Last-Modified:
>Originator: Ed Schouten
>Release: FreeBSD 6.3-PRERELEASE i386
>Organization:
>Environment:
System: FreeBSD palm.hoeg.nl 6.3-PRERELEASE FreeBSD 6.3-PRERELEASE #0: Wed Dec 19 16:07:46 CET 2007 ed at palm.hoeg.nl:/usr/obj/usr/src/sys/PALM i386
>Description:
hztty is one of the last applications in ports that still uses sgtty,
while it could perfectly use termios, making the application work on
systems that don't have COMPAT_43TTY defined in the kernel. We'd better
migrate it.
>How-To-Repeat:
>Fix:
The following patch adjusts two existing patchfiles to change the
application to use termios.
--- chinese/hztty/files/patch-aa 2000-04-02 06:50:09.000000000 +0200
+++ chinese/hztty/files/patch-aa 2008-01-27 22:35:58.000000000 +0100
@@ -17,12 +17,14 @@
PROG = hztty
LIBS=
-@@ -132,7 +131,7 @@
+@@ -132,8 +131,8 @@
bsd:
- miniconf.sh $(CPP)
+- ${MAKE} ${MFLAGS} DEFINES='-DBSD' ${PROG}
+ ./miniconf.sh $(CPP)
- ${MAKE} ${MFLAGS} DEFINES='-DBSD' ${PROG}
++ ${MAKE} ${MFLAGS} DEFINES='-DPOSIX' ${PROG}
posix:
+ miniconf.sh $(CPP)
--- chinese/hztty/files/patch-ab 1997-10-07 09:03:41.000000000 +0200
+++ chinese/hztty/files/patch-ab 2008-01-27 22:35:58.000000000 +0100
@@ -9,3 +9,25 @@
# define PTYDEV "/dev/ptyxx"
# define TTYDEV "/dev/ttyxx"
#endif /* !hpux */
+@@ -320,7 +320,9 @@
+ #ifdef TIOCLSET
+ (void) ioctl (tty, TIOCLGET, (char *)&(termptr->lmode));
+ #endif
+-#ifdef USE_SYSV_TERMIO
++#ifdef USE_TERMIOS
++ tcgetattr(tty, (char *)&(termptr->tio));
++#elif defined(USE_SYSV_TERMIO)
+ (void) ioctl (tty, TCGETA, (char *)&(termptr->tio));
+ #else /* USE_SYSV_TERMIO */
+ (void) ioctl (tty, TIOCGETP, (char *)&(termptr->sb));
+@@ -339,7 +341,9 @@
+ #ifdef TIOCLSET
+ (void) ioctl (tty, TIOCLSET, (char *)&(termptr->lmode));
+ #endif
+-#ifdef USE_SYSV_TERMIO
++#ifdef USE_TERMIOS
++ tcsetattr(tty, TCSANOW, (char *)&(termptr->tio));
++#elif defined(USE_SYSV_TERMIO)
+ (void) ioctl (tty, TCSETA, (char *)&(termptr->tio));
+ #else /* USE_SYSV_TERMIO */
+ (void) ioctl (tty, TIOCSETP, (char *)&(termptr->sb));
>Release-Note:
>Audit-Trail:
>Unformatted:
More information about the freebsd-ports-bugs
mailing list