From owner-freebsd-ports-bugs@FreeBSD.ORG Sun Jan 27 21:40:03 2008 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 C870E16A419 for ; Sun, 27 Jan 2008 21:40:03 +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 AD39913C45B for ; Sun, 27 Jan 2008 21:40:03 +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 m0RLe3LD045335 for ; Sun, 27 Jan 2008 21:40:03 GMT (envelope-from gnats@freefall.freebsd.org) Received: (from gnats@localhost) by freefall.freebsd.org (8.14.2/8.14.1/Submit) id m0RLe3F1045334; Sun, 27 Jan 2008 21:40:03 GMT (envelope-from gnats) Resent-Date: Sun, 27 Jan 2008 21:40:03 GMT Resent-Message-Id: <200801272140.m0RLe3F1045334@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 7DB0016A41A for ; Sun, 27 Jan 2008 21:38:43 +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 488B213C448 for ; Sun, 27 Jan 2008 21:38:43 +0000 (UTC) (envelope-from ed@hoeg.nl) Received: by palm.hoeg.nl (Postfix, from userid 1000) id 79E9D1CD9D; Sun, 27 Jan 2008 22:38:42 +0100 (CET) Message-Id: <20080127213842.79E9D1CD9D@palm.hoeg.nl> Date: Sun, 27 Jan 2008 22:38:42 +0100 (CET) From: Ed Schouten To: FreeBSD-gnats-submit@FreeBSD.org X-Send-Pr-Version: 3.113 Cc: Subject: ports/120062: [Patch] chinese/hztty: migrate to termios, not 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: Sun, 27 Jan 2008 21:40:03 -0000 >Number: 120062 >Category: ports >Synopsis: [Patch] chinese/hztty: migrate to 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: Sun Jan 27 21:40:03 UTC 2008 >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: hztty is one of the last applications in ports that still uses sgtty, while it could perfectly use termios, making the application work on systems that don't have COMPAT_43TTY defined in the kernel. We'd better migrate it. >How-To-Repeat: >Fix: The following patch adjusts two existing patchfiles to change the application to use termios. --- chinese/hztty/files/patch-aa 2000-04-02 06:50:09.000000000 +0200 +++ chinese/hztty/files/patch-aa 2008-01-27 22:35:58.000000000 +0100 @@ -17,12 +17,14 @@ PROG = hztty LIBS= -@@ -132,7 +131,7 @@ +@@ -132,8 +131,8 @@ bsd: - miniconf.sh $(CPP) +- ${MAKE} ${MFLAGS} DEFINES='-DBSD' ${PROG} + ./miniconf.sh $(CPP) - ${MAKE} ${MFLAGS} DEFINES='-DBSD' ${PROG} ++ ${MAKE} ${MFLAGS} DEFINES='-DPOSIX' ${PROG} posix: + miniconf.sh $(CPP) --- chinese/hztty/files/patch-ab 1997-10-07 09:03:41.000000000 +0200 +++ chinese/hztty/files/patch-ab 2008-01-27 22:35:58.000000000 +0100 @@ -9,3 +9,25 @@ # define PTYDEV "/dev/ptyxx" # define TTYDEV "/dev/ttyxx" #endif /* !hpux */ +@@ -320,7 +320,9 @@ + #ifdef TIOCLSET + (void) ioctl (tty, TIOCLGET, (char *)&(termptr->lmode)); + #endif +-#ifdef USE_SYSV_TERMIO ++#ifdef USE_TERMIOS ++ tcgetattr(tty, (char *)&(termptr->tio)); ++#elif defined(USE_SYSV_TERMIO) + (void) ioctl (tty, TCGETA, (char *)&(termptr->tio)); + #else /* USE_SYSV_TERMIO */ + (void) ioctl (tty, TIOCGETP, (char *)&(termptr->sb)); +@@ -339,7 +341,9 @@ + #ifdef TIOCLSET + (void) ioctl (tty, TIOCLSET, (char *)&(termptr->lmode)); + #endif +-#ifdef USE_SYSV_TERMIO ++#ifdef USE_TERMIOS ++ tcsetattr(tty, TCSANOW, (char *)&(termptr->tio)); ++#elif defined(USE_SYSV_TERMIO) + (void) ioctl (tty, TCSETA, (char *)&(termptr->tio)); + #else /* USE_SYSV_TERMIO */ + (void) ioctl (tty, TIOCSETP, (char *)&(termptr->sb)); >Release-Note: >Audit-Trail: >Unformatted: