From owner-freebsd-ports-bugs@FreeBSD.ORG Fri Dec 28 19:10: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 B541E16A474 for ; Fri, 28 Dec 2007 19:10: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 7EE6A13C4E5 for ; Fri, 28 Dec 2007 19:10: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 lBSJA2EH041847 for ; Fri, 28 Dec 2007 19:10:02 GMT (envelope-from gnats@freefall.freebsd.org) Received: (from gnats@localhost) by freefall.freebsd.org (8.14.2/8.14.1/Submit) id lBSJA2IR041846; Fri, 28 Dec 2007 19:10:02 GMT (envelope-from gnats) Resent-Date: Fri, 28 Dec 2007 19:10:02 GMT Resent-Message-Id: <200712281910.lBSJA2IR041846@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 0089816A417 for ; Fri, 28 Dec 2007 19:04:29 +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 8258713C43E for ; Fri, 28 Dec 2007 19:04:28 +0000 (UTC) (envelope-from ed@hoeg.nl) Received: by palm.hoeg.nl (Postfix, from userid 1000) id B8A021CCD9; Fri, 28 Dec 2007 20:02:14 +0100 (CET) Message-Id: <20071228190214.B8A021CCD9@palm.hoeg.nl> Date: Fri, 28 Dec 2007 20:02:14 +0100 (CET) From: Ed Schouten To: FreeBSD-gnats-submit@FreeBSD.org X-Send-Pr-Version: 3.113 Cc: Subject: ports/119114: [Patch] japanese/edict: 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 19:10:02 -0000 >Number: 119114 >Category: ports >Synopsis: [Patch] japanese/edict: 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 19:10: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/edict port uses sgtty, but we can make it use termios. For some reason, the authors of edit attempted to implement termios, but didn't completely finish it. This patch adds the missing termios bits to xjdfrontend.c. >How-To-Repeat: >Fix: The following patch changes __STRICT_BSD__ to __POSIX__ and implements the missing termios bits in xjdfrontend.c. --- japanese/edict/files/patch-aa 1999-07-17 19:13:47.000000000 +0200 +++ japanese/edict/files/patch-aa 2007-12-28 19:58:22.000000000 +0100 @@ -14,7 +14,7 @@ SAOBJECTS = xjdsa.o xjdcomm_sa.o xjdservcomm_sa.o xjdfrontend_sa.o #SACFLAGS = -DXJDFRONTEND -DXJDDIC -DDEMAND_PAGING -SACFLAGS = -DXJDFRONTEND -DXJDDIC -DMMAP -+SACFLAGS = -D__STRICT_BSD__ -DXJDFRONTEND -DXJDDIC -DMMAP ${CFLAGS} ++SACFLAGS = -D__POSIX__ -DXJDFRONTEND -DXJDDIC -DMMAP ${CFLAGS} #SACFLAGS = -DXJDFRONTEND -DXJDDIC -DRAM_LOAD xjdic_sa: $(SAOBJECTS) $(CC) $(SAOBJECTS) -o xjdic_sa @@ -23,7 +23,7 @@ # CLOBJECTS = xjdclient.o xjdcomm_cl.o xjdfrontend_cl.o -CLCFLAGS = -DXJDFRONTEND -DXJDCLSERV -+CLCFLAGS = -D__STRICT_BSD__ -DXJDFRONTEND -DXJDCLSERV ${CFLAGS} ++CLCFLAGS = -D__POSIX__ -DXJDFRONTEND -DXJDCLSERV ${CFLAGS} xjdic_cl: $(CLOBJECTS) $(CC) $(CLOBJECTS) $(LIBS) -o xjdic_cl xjdclient.o: xjdclient.c --- japanese/edict/files/patch-xjdfrontend.c 1970-01-01 01:00:00.000000000 +0100 +++ japanese/edict/files/patch-xjdfrontend.c 2007-12-28 19:55:22.000000000 +0100 @@ -0,0 +1,32 @@ +--- xjdfrontend.c 1998-09-16 02:28:03.000000000 +0200 ++++ xjdfrontend.c 2007-12-28 19:54:07.000000000 +0100 +@@ -55,6 +55,8 @@ + + #ifdef __STRICT_BSD__ + static struct sgttyb orig,new; ++#elif defined(__POSIX__) ++static struct termios orig,new; + #else + static struct termio orig,new; + #endif +@@ -240,6 +242,11 @@ + ioctl(0, TIOCGETP, &orig); ioctl(0, TIOCGETP, &new); + new.sg_flags |= CBREAK; new.sg_flags &= ~ECHO; + ioctl(0, TIOCSETP, &new); ++#elif defined(__POSIX__) ++ tcgetattr(0, &orig); tcgetattr(0, &new); ++ new.c_lflag &= ~ICANON; new.c_lflag &= ~ISIG; new.c_lflag &= ~ECHO; ++ new.c_lflag &= ~IXON; ++ new.c_cc[4] = 1; new.c_cc[5] = 0; tcsetattr(0, TCSANOW, &new); + #else + ioctl(0, TCGETA, &orig); ioctl(0, TCGETA, &new); + new.c_lflag &= ~ICANON; new.c_lflag &= ~ISIG; new.c_lflag &= ~ECHO; +@@ -255,6 +262,8 @@ + { + #ifdef __STRICT_BSD__ + ioctl(0, TIOCSETP, &orig); ++#elif defined(__POSIX__) ++ tcsetattr(0, TCSANOW, &orig); + #else + ioctl(0, TCSETA, &orig); + #endif >Release-Note: >Audit-Trail: >Unformatted: