From owner-freebsd-ports-bugs@FreeBSD.ORG Fri Dec 28 18:40:02 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 E441A16A41B for ; Fri, 28 Dec 2007 18:40:02 +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 AE97213C44B for ; Fri, 28 Dec 2007 18:40:02 +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 lBSIe2eO082028 for ; Fri, 28 Dec 2007 18:40:02 GMT (envelope-from gnats@freefall.freebsd.org) Received: (from gnats@localhost) by freefall.freebsd.org (8.14.2/8.14.1/Submit) id lBSIe2Qo082027; Fri, 28 Dec 2007 18:40:02 GMT (envelope-from gnats) Resent-Date: Fri, 28 Dec 2007 18:40:02 GMT Resent-Message-Id: <200712281840.lBSIe2Qo082027@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 B5C6516A41B for ; Fri, 28 Dec 2007 18:35:46 +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 614F413C458 for ; Fri, 28 Dec 2007 18:35:45 +0000 (UTC) (envelope-from ed@hoeg.nl) Received: by palm.hoeg.nl (Postfix, from userid 1000) id 930281CCD9; Fri, 28 Dec 2007 19:33:32 +0100 (CET) Message-Id: <20071228183332.930281CCD9@palm.hoeg.nl> Date: Fri, 28 Dec 2007 19:33:32 +0100 (CET) From: Ed Schouten To: FreeBSD-gnats-submit@FreeBSD.org X-Send-Pr-Version: 3.113 Cc: Subject: ports/119113: [Patch] japanese/rogue_s: Don't use 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 18:40:03 -0000 >Number: 119113 >Category: ports >Synopsis: [Patch] japanese/rogue_s: Don't use 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 18:40:02 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 japanese/rogue_s port still uses sgtty, while there is some termio code in there that we can easily hack to termios. This makes rogue_s work with kernels that don't have COMPAT_43TTY. >How-To-Repeat: >Fix: Apply the following patch: --- japanese/rogue_s/files/patch-aa 2000-07-18 19:38:04.000000000 +0200 +++ japanese/rogue_s/files/patch-aa 2007-12-28 19:32:57.000000000 +0100 @@ -16,7 +16,7 @@ -#CFLAGS = -O -g -DUNIX -DUNIX_BSD4_2 -DUNIX_386BSD -DCURSES -DJAPAN -DEUC -DTOPSCO -#LIBS = +CC = cc -+CFLAGS += -DUNIX -DUNIX_BSD4_2 -DUNIX_386BSD -DCURSES -DJAPAN -DEUC -DTOPSCO -DCOLOR -DMESG_DIR=\"${PREFIX}/share/rogue\" -DLIST_MESSAGES ++CFLAGS += -DUNIX -DUNIX_SYSV -DUNIX_386BSD -DCURSES -DJAPAN -DEUC -DTOPSCO -DCOLOR -DMESG_DIR=\"${PREFIX}/share/rogue\" -DLIST_MESSAGES +LIBS = # for NeXT (Japanese, using jcurses of NeXT) by Yasha --- japanese/rogue_s/files/patch-ac 2000-07-18 19:38:04.000000000 +0200 +++ japanese/rogue_s/files/patch-ac 2007-12-28 19:32:57.000000000 +0100 @@ -1,5 +1,61 @@ --- machdep.c.orig Mon Sep 14 14:40:12 1992 +++ machdep.c Fri Dec 4 00:22:26 1998 +@@ -56,7 +56,7 @@ + # include + # ifdef UNIX_SYSV + # include +-# include ++# include + # endif /* UNIX_SYSV */ + # ifdef UNIX_BSD4_2 + # include +@@ -272,7 +272,7 @@ + ioctl(0, FIONREAD, &ln); + #endif /* UNIX_BSD4_2 */ + #ifdef UNIX_SYSV +- ioctl(0, TCFLSH, &ln); ++ ioctl(0, TIOCFLUSH, &ln); + ln = 0; + #endif /* UNIX_SYSV */ + #ifdef UNIX_386BSD +@@ -334,8 +334,8 @@ + struct tchars tc_temp; + #endif /* UNIX_BSD4_2 */ + #ifdef UNIX_SYSV +- static struct termio _oldtty; +- struct termio _tty; ++ static struct termios _oldtty; ++ struct termios _tty; + #endif /* UNIX_SYSV */ + + if (!called_before) { +@@ -345,7 +345,7 @@ + ioctl(0, TIOCGLTC, <c_orig); + #endif /* UNIX_BSD4_2 */ + #ifdef UNIX_SYSV +- ioctl(0, TCGETA, &_oldtty); ++ tcgetattr(0, &_oldtty); + #endif /* UNIX_SYSV */ + } + #ifdef UNIX_BSD4_2 +@@ -364,7 +364,7 @@ + tc_temp.t_startc = tc_temp.t_stopc = -1; + #endif /* UNIX_BSD4_2 */ + #ifdef UNIX_SYSV +- _tty.c_cc[VSWTCH] = CNSWTCH; ++ _tty.c_cc[VSUSP] = 0; + #endif /* UNIX_SYSV */ + } + #ifdef UNIX_BSD4_2 +@@ -372,7 +372,7 @@ + ioctl(0, TIOCSLTC, <c_temp); + #endif /* UNIX_BSD4_2 */ + #ifdef UNIX_SYSV +- ioctl(0, TCSETA, &_tty); ++ tcsetattr(0, TCSANOW, &_tty); + #endif /* UNIX_SYSV */ + #endif /* UNIX */ + } @@ -397,9 +397,9 @@ md_heed_signals() { @@ -13,3 +69,28 @@ #endif /* UNIX */ #ifdef HUMAN +@@ -907,19 +907,19 @@ + } + #endif /* UNIX_BSD4_2 */ + #ifdef UNIX_SYSV +- struct termio tty_buf; +- static struct termio tty_save; ++ struct termios tty_buf; ++ static struct termios tty_save; + + if (on) { +- ioctl(0, TCGETA, &tty_buf); ++ tcgetattr(0, &tty_buf); + tty_save = tty_buf; + tty_buf.c_lflag &= ~(ICANON | ECHO); + tty_buf.c_oflag &= ~ONLCR; + tty_buf.c_cc[4] = 1; /* MIN */ + tty_buf.c_cc[5] = 2; /* TIME */ +- ioctl(0, TCSETAF, &tty_buf); ++ tcsetattr(0, TCSANOW, &tty_buf); + } else { +- ioctl(0, TCSETAF, &tty_save); ++ tcsetattr(0, TCSANOW, &tty_save); + } + #endif /* UNIX_SYSV */ + #endif /* UNIX */ >Release-Note: >Audit-Trail: >Unformatted: