From owner-freebsd-ports-bugs@FreeBSD.ORG Fri Dec 28 16:00:06 2007 Return-Path: Delivered-To: freebsd-ports-bugs@hub.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id 9B7C716A418 for ; Fri, 28 Dec 2007 16:00:06 +0000 (UTC) (envelope-from gnats@FreeBSD.org) Received: from freefall.freebsd.org (freefall.freebsd.org [IPv6:2001:4f8:fff6::28]) by mx1.freebsd.org (Postfix) with ESMTP id 67BF013C45A for ; Fri, 28 Dec 2007 16:00:06 +0000 (UTC) (envelope-from gnats@FreeBSD.org) Received: from freefall.freebsd.org (gnats@localhost [127.0.0.1]) by freefall.freebsd.org (8.14.2/8.14.2) with ESMTP id lBSG06bK056569 for ; Fri, 28 Dec 2007 16:00:06 GMT (envelope-from gnats@freefall.freebsd.org) Received: (from gnats@localhost) by freefall.freebsd.org (8.14.2/8.14.1/Submit) id lBSG06MS056568; Fri, 28 Dec 2007 16:00:06 GMT (envelope-from gnats) Resent-Date: Fri, 28 Dec 2007 16:00:06 GMT Resent-Message-Id: <200712281600.lBSG06MS056568@freefall.freebsd.org> Resent-From: FreeBSD-gnats-submit@FreeBSD.org (GNATS Filer) Resent-To: freebsd-ports-bugs@FreeBSD.org Resent-Reply-To: FreeBSD-gnats-submit@FreeBSD.org, Ed Schouten Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id EB74816A419 for ; Fri, 28 Dec 2007 15:55:03 +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 814B113C465 for ; Fri, 28 Dec 2007 15:55:03 +0000 (UTC) (envelope-from ed@hoeg.nl) Received: by palm.hoeg.nl (Postfix, from userid 1000) id DF7C61CCD9; Fri, 28 Dec 2007 16:52:55 +0100 (CET) Message-Id: <20071228155255.DF7C61CCD9@palm.hoeg.nl> Date: Fri, 28 Dec 2007 16:52:55 +0100 (CET) From: Ed Schouten To: FreeBSD-gnats-submit@FreeBSD.org X-Send-Pr-Version: 3.113 Cc: Subject: ports/119107: [Patch] vietnamese/vnless: use termios instead of sgtty X-BeenThere: freebsd-ports-bugs@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list Reply-To: Ed Schouten List-Id: Ports bug reports List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Fri, 28 Dec 2007 16:00:06 -0000 >Number: 119107 >Category: ports >Synopsis: [Patch] vietnamese/vnless: 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 16:00:06 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@palm.hoeg.nl:/usr/obj/usr/src/sys/PALM i386 >Description: The port vietnamese/vnless still uses the sgtty interface, which is a bad thing, because this will break when using a COMPAT_43TTY-less kernel. We'd better change it to use termios. >How-To-Repeat: >Fix: The following patch changes the existing patches to change the existing termio interface to termios. --- vietnamese/vnless/files/patch-03 1996-12-06 13:38:53.000000000 +0100 +++ vietnamese/vnless/files/patch-03 2007-12-28 16:52:10.000000000 +0100 @@ -1,6 +1,14 @@ --- defines.h.orig Mon Feb 24 12:45:37 1992 +++ defines.h Wed Dec 4 02:33:51 1996 -@@ -47,7 +47,7 @@ +@@ -40,14 +40,14 @@ + * If TERMIO is 0 your system must have /usr/include/sgtty.h. + * This is normally the case for BSD. + */ +-/*#define TERMIO 1*/ ++#define TERMIO 1 + + /* + * SIGSETMASK is 1 if your system has the sigsetmask() call. * This is normally the case only for BSD 4.2, * not for BSD 4.1 or System 5. */ --- vietnamese/vnless/files/patch-screen.c 2000-11-03 12:02:31.000000000 +0100 +++ vietnamese/vnless/files/patch-screen.c 2007-12-28 16:52:10.000000000 +0100 @@ -1,9 +1,64 @@ --- screen.c.orig Mon Feb 24 12:45:41 1992 +++ screen.c Sat May 20 01:40:56 2000 -@@ -481,5 +481,5 @@ +@@ -12,7 +12,7 @@ + #endif + + #if TERMIO +-#include ++#include + #else + #include + #endif +@@ -92,21 +92,21 @@ + int on; + { + #if TERMIO +- struct termio s; +- static struct termio save_term; ++ struct termios s; ++ static struct termios save_term; + + if (on) + { + /* + * Get terminal modes. + */ +- ioctl(2, TCGETA, &s); ++ tcgetattr(2, &s); + + /* + * Save modes and set certain variables dependent on modes. + */ + save_term = s; +- ospeed = s.c_cflag & CBAUD; ++ ospeed = cfgetospeed(&s); + erase_char = s.c_cc[VERASE]; + kill_char = s.c_cc[VKILL]; + +@@ -114,7 +114,7 @@ + * Set the modes to the way we want them. + */ + s.c_lflag &= ~(ICANON|ECHO|ECHOE|ECHOK|ECHONL); +- s.c_oflag |= (OPOST|ONLCR|TAB3); ++ s.c_oflag |= (OPOST|ONLCR|OXTABS); + s.c_oflag &= ~(OCRNL|ONOCR|ONLRET); + s.c_cc[VMIN] = 1; + s.c_cc[VTIME] = 0; +@@ -125,7 +125,7 @@ + */ + s = save_term; + } +- ioctl(2, TCSETAW, &s); ++ tcsetattr(2, TCSANOW, &s); + #else + struct sgttyb s; + static struct sgttyb save_term; +@@ -480,7 +480,7 @@ + * Clear the screen. */ public void -clear() +clearscr() { tputs(sc_clear, sc_height, putchr); + } >Release-Note: >Audit-Trail: >Unformatted: