From owner-freebsd-ports-bugs@FreeBSD.ORG Fri Dec 28 13:50:01 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 52B5316A41B for ; Fri, 28 Dec 2007 13:50:01 +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 20CDA13C459 for ; Fri, 28 Dec 2007 13:50:01 +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 lBSDo12Y093697 for ; Fri, 28 Dec 2007 13:50:01 GMT (envelope-from gnats@freefall.freebsd.org) Received: (from gnats@localhost) by freefall.freebsd.org (8.14.2/8.14.1/Submit) id lBSDo1qX093696; Fri, 28 Dec 2007 13:50:01 GMT (envelope-from gnats) Resent-Date: Fri, 28 Dec 2007 13:50:01 GMT Resent-Message-Id: <200712281350.lBSDo1qX093696@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 050F516A419 for ; Fri, 28 Dec 2007 13:49:33 +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 969F813C455 for ; Fri, 28 Dec 2007 13:49:32 +0000 (UTC) (envelope-from ed@hoeg.nl) Received: by palm.hoeg.nl (Postfix, from userid 1000) id 8BAF01CCD9; Fri, 28 Dec 2007 14:47:29 +0100 (CET) Message-Id: <20071228134729.8BAF01CCD9@palm.hoeg.nl> Date: Fri, 28 Dec 2007 14:47:29 +0100 (CET) From: Ed Schouten To: FreeBSD-gnats-submit@FreeBSD.org X-Send-Pr-Version: 3.113 Cc: Subject: ports/119100: [Patch] lang/logo: switch from sgtty to termios 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 13:50:01 -0000 >Number: 119100 >Category: ports >Synopsis: [Patch] lang/logo: switch from sgtty to termios >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 13:50:00 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 lang/logo port makes use of the sgtty interface. We'd better let it use the termios interface, because the first one will not work on systems where COMPAT_43TTY is not present in the kernel. Because ucblogo also has termio code, it isn't hard to port it to termios. >How-To-Repeat: >Fix: The following patch extends the existing patch to term.c to use the existing termio code, ported to termios. Please notice that even though the port will now use termios, it will still give warnings during compilation about sgtty. Those warnings don't matter, because they include sgtty.h in almost every file, only if it exists (autoconf). --- lang/logo/files/patch-term.c 2007-12-04 18:58:23.000000000 +0100 +++ lang/logo/files/patch-term.c 2007-12-28 14:45:01.000000000 +0100 @@ -1,5 +1,27 @@ --- term.c.orig 2007-12-04 15:42:55.000000000 +0300 +++ term.c 2007-12-04 15:43:04.000000000 +0300 +@@ -30,8 +30,8 @@ + #include + #endif + +-#ifdef HAVE_TERMIO_H +-#include ++#if 1 ++#include + #else + #ifdef HAVE_SGTTY_H + #include +@@ -71,8 +71,8 @@ + char so_arr[40]; + char se_arr[40]; + +-#ifdef HAVE_TERMIO_H +-struct termio tty_cooked, tty_cbreak; ++#if 1 ++struct termios tty_cooked, tty_cbreak; + #else + #ifdef HAVE_SGTTY_H + struct sgttyb tty_cooked, tty_cbreak; @@ -85,7 +85,7 @@ char *termcap_ptr; @@ -9,3 +31,36 @@ *termcap_ptr++ = ch; return 0; } +@@ -125,8 +125,8 @@ + #endif /* WIN32 */ + #else + if (interactive) { +-#ifdef HAVE_TERMIO_H +- ioctl(0,TCGETA,(char *)(&tty_cooked)); ++#if 1 ++ tcgetattr(0, &tty_cooked); + tty_cbreak = tty_cooked; + tty_cbreak.c_cc[VMIN] = '\01'; + tty_cbreak.c_cc[VTIME] = '\0'; +@@ -181,8 +181,8 @@ + void charmode_on() { + #ifdef unix + if ((readstream == stdin) && interactive && !tty_charmode) { +-#ifdef HAVE_TERMIO_H +- ioctl(0,TCSETA,(char *)(&tty_cbreak)); ++#if 1 ++ tcsetattr(0, TCSANOW, &tty_cbreak); + #else /* !HAVE_TERMIO_H */ + ioctl(0,TIOCSETP,(char *)(&tty_cbreak)); + #endif /* HAVE_TERMIO_H */ +@@ -197,8 +197,8 @@ + void charmode_off() { + #ifdef unix + if (tty_charmode) { +-#ifdef HAVE_TERMIO_H +- ioctl(0,TCSETA,(char *)(&tty_cooked)); ++#if 1 ++ tcsetattr(0, TCSANOW, &tty_cooked); + #else /* !HAVE_TERMIO_H */ + ioctl(0,TIOCSETP,(char *)(&tty_cooked)); + #endif /* HAVE_TERMIO_H */ >Release-Note: >Audit-Trail: >Unformatted: