ports/119099: [Patch] japanese/onew-freewnn: use termios instead of sgtty

Ed Schouten ed at fxq.nl
Fri Dec 28 13:40:01 UTC 2007


>Number:         119099
>Category:       ports
>Synopsis:       [Patch] japanese/onew-freewnn: use termios instead of 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:   Fri Dec 28 13:40:01 UTC 2007
>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:
All the japanese/onew-* ports make use of the sgtty interface, while
they can perfectly use the termios interface. The code is already
available, but needs some small patching, because the termios code still
calls in some termio code, which isn't available on FreeBSD.

When patched, all the onew-* ports can live without COMPAT_43TTY.
>How-To-Repeat:
>Fix:
Add the following patch to the files directory of the onew-freewnn port.

--- sys/sys.h	1995-06-30 06:56:38.000000000 +0200
+++ sys/sys.h	2007-12-28 14:24:01.000000000 +0100
@@ -29,12 +29,16 @@
  || defined(sony_news) \
  || defined(MACH) \
  || defined(NeXT) \
- || defined(bsdi) \
- || defined(__FreeBSD__)
+ || defined(bsdi)
 #define USE_SGTTY
 #define HAS_SELECT
 #endif
 
+#if defined(__FreeBSD__)
+#define USE_TERMIOS
+#define HAS_SELECT
+#endif
+
 #if defined(solaris) \
  || defined(sgi) \
  || defined(nec_ews) \
--- sys/tty.c	1994-02-09 08:45:24.000000000 +0100
+++ sys/tty.c	2007-12-28 14:31:11.000000000 +0100
@@ -76,8 +76,10 @@
 	if( on )
 		buf.c_lflag |= (ECHO|ICANON);
 	else	buf.c_lflag &= ~(ECHO|ICANON);
+	buf.c_cc[VMIN]  = 0;
+	buf.c_cc[VTIME] = ('D'-0x40);
+	buf.c_lflag |=  ICANON;
 	tcsetattr(fd, TCSADRAIN, &buf);
-	set_cbreak(fd,!on);
 	close(fd);
 }
 #endif
>Release-Note:
>Audit-Trail:
>Unformatted:



More information about the freebsd-ports-bugs mailing list