From ed@hoeg.nl  Fri Dec 28 19:16:32 2007
Return-Path: <ed@hoeg.nl>
Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34])
	by hub.freebsd.org (Postfix) with ESMTP id EE48016A420
	for <FreeBSD-gnats-submit@freebsd.org>; Fri, 28 Dec 2007 19:16:32 +0000 (UTC)
	(envelope-from ed@hoeg.nl)
Received: from palm.hoeg.nl (mx0.hoeg.nl [IPv6:2001:610:652::211])
	by mx1.freebsd.org (Postfix) with ESMTP id 7EE2813C465
	for <FreeBSD-gnats-submit@freebsd.org>; Fri, 28 Dec 2007 19:16:32 +0000 (UTC)
	(envelope-from ed@hoeg.nl)
Received: by palm.hoeg.nl (Postfix, from userid 1000)
	id 54D5F1CCD9; Fri, 28 Dec 2007 20:14:18 +0100 (CET)
Message-Id: <20071228191418.54D5F1CCD9@palm.hoeg.nl>
Date: Fri, 28 Dec 2007 20:14:18 +0100 (CET)
From: Ed Schouten <ed@fxq.nl>
Reply-To: Ed Schouten <ed@fxq.nl>
To: FreeBSD-gnats-submit@freebsd.org
Cc:
Subject: [Patch] chinese/ve: use termios, not sgtty
X-Send-Pr-Version: 3.113
X-GNATS-Notify:

>Number:         119115
>Category:       ports
>Synopsis:       [Patch] chinese/ve: use termios, not sgtty
>Confidential:   no
>Severity:       non-critical
>Priority:       medium
>Responsible:    chinsan
>State:          closed
>Quarter:        
>Keywords:       
>Date-Required:  
>Class:          sw-bug
>Submitter-Id:   current-users
>Arrival-Date:   Fri Dec 28 19:20:00 UTC 2007
>Closed-Date:    Thu May 01 14:09:02 UTC 2008
>Last-Modified:  Thu May  1 14:10:04 UTC 2008
>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@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:
Responsible-Changed-From-To: freebsd-ports-bugs->chinsan 
Responsible-Changed-By: edwin 
Responsible-Changed-When: Fri Dec 28 19:20:07 UTC 2007 
Responsible-Changed-Why:  
Over to maintainer (via the GNATS Auto Assign Tool) 

http://www.freebsd.org/cgi/query-pr.cgi?pr=119115 
State-Changed-From-To: open->closed 
State-Changed-By: chinsan 
State-Changed-When: Thu May 1 14:09:00 UTC 2008 
State-Changed-Why:  
Committed with some modification, thanks. 

http://www.freebsd.org/cgi/query-pr.cgi?pr=119115 

From: dfilter@FreeBSD.ORG (dfilter service)
To: bug-followup@FreeBSD.org
Cc:  
Subject: Re: ports/119115: commit references a PR
Date: Thu,  1 May 2008 14:08:24 +0000 (UTC)

 chinsan     2008-05-01 14:08:18 UTC
 
   FreeBSD ports repository
 
   Modified files:
     chinese/ve           Makefile 
   Added files:
     chinese/ve/files     patch-bbs.h patch-term.c 
   Log:
   - Use termios instead of sgtty.
   
   PR:             ports/119115, ports/122889
   Submitted by:   Ed Schouten <ed@80386 dot nl>
   
   Revision  Changes    Path
   1.15      +1 -0      ports/chinese/ve/Makefile
   1.1       +17 -0     ports/chinese/ve/files/patch-bbs.h (new)
   1.1       +95 -0     ports/chinese/ve/files/patch-term.c (new)
 _______________________________________________
 cvs-all@freebsd.org mailing list
 http://lists.freebsd.org/mailman/listinfo/cvs-all
 To unsubscribe, send any mail to "cvs-all-unsubscribe@freebsd.org"
 
>Unformatted:
