ports/119115: [Patch] chinese/ve: use termios, not sgtty

Ed Schouten ed at fxq.nl
Fri Dec 28 19:20:01 UTC 2007


>Number:         119115
>Category:       ports
>Synopsis:       [Patch] chinese/ve: use 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:   Fri Dec 28 19:20:00 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:
The port chinese/ve uses sgtty, but it has termios bits in the source
code. We'd better port it to termios, because this will make it work
with COMPAT_43TTY-less kernels.
>How-To-Repeat:
>Fix:
The following patch makes the application use termios. For some reason,
the termios code contains the RAW flag, but that's a sgtty flag as far
as I know.

--- chinese/ve/files/patch-Makefile	2006-03-20 22:58:01.000000000 +0100
+++ chinese/ve/files/patch-Makefile	2007-12-28 20:13:13.000000000 +0100
@@ -10,7 +10,7 @@
  #----------------------------------------------------------
 -CFLAGS = -DVEDITOR
 +CFLAGS ?= -O -pipe
-+CFLAGS += -DVEDITOR
++CFLAGS += -DVEDITOR -DLINUX
  LIBS = -ltermcap -lcompat
  
  #----------------------------------------------------------
--- chinese/ve/files/patch-bbs.h	1970-01-01 01:00:00.000000000 +0100
+++ chinese/ve/files/patch-bbs.h	2007-12-28 20:13:13.000000000 +0100
@@ -0,0 +1,13 @@
+--- bbs.h	1996-07-26 14:37:02.000000000 +0200
++++ bbs.h	2007-12-28 20:09:00.000000000 +0100
+@@ -26,9 +26,7 @@
+ #include <sys/file.h>
+ 
+ 
+-#ifdef	LINUX
+-#include <bsd/sgtty.h>
+-#else
++#ifndef	LINUX
+ #include <sgtty.h>
+ #endif
+ 
--- chinese/ve/files/patch-term.c	1970-01-01 01:00:00.000000000 +0100
+++ chinese/ve/files/patch-term.c	2007-12-28 20:13:13.000000000 +0100
@@ -0,0 +1,20 @@
+--- term.c	1997-01-24 17:36:57.000000000 +0100
++++ term.c	2007-12-28 20:12:09.000000000 +0100
+@@ -16,7 +16,7 @@
+ #endif
+ 
+ #ifdef LINUX
+-#include <linux/termios.h>
++#include <termios.h>
+ #define stty(fd, data) tcsetattr( fd, TCSETS, data )
+ #define gtty(fd, data) tcgetattr( fd, data )
+ #endif
+@@ -64,7 +64,7 @@
+ 
+ #ifdef  LINUX
+ 
+-  tty_new.c_lflag &= ~(ICANON | ECHO | RAW | ISIG);
++  tty_new.c_lflag &= ~(ICANON | ECHO | ISIG);
+   tcsetattr(1, TCSANOW, &tty_new);
+   restore_tty();
+ 
>Release-Note:
>Audit-Trail:
>Unformatted:



More information about the freebsd-ports-bugs mailing list