From owner-freebsd-ports-bugs@FreeBSD.ORG Sat Mar 17 11:30:01 2007 Return-Path: X-Original-To: freebsd-ports-bugs@hub.freebsd.org Delivered-To: freebsd-ports-bugs@hub.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [69.147.83.52]) by hub.freebsd.org (Postfix) with ESMTP id 82AC116A401 for ; Sat, 17 Mar 2007 11:30:01 +0000 (UTC) (envelope-from gnats@FreeBSD.org) Received: from freefall.freebsd.org (freefall.freebsd.org [69.147.83.40]) by mx1.freebsd.org (Postfix) with ESMTP id 6375913C46E for ; Sat, 17 Mar 2007 11:30:01 +0000 (UTC) (envelope-from gnats@FreeBSD.org) Received: from freefall.freebsd.org (gnats@localhost [127.0.0.1]) by freefall.freebsd.org (8.13.4/8.13.4) with ESMTP id l2HBU1Fe029761 for ; Sat, 17 Mar 2007 11:30:01 GMT (envelope-from gnats@freefall.freebsd.org) Received: (from gnats@localhost) by freefall.freebsd.org (8.13.4/8.13.4/Submit) id l2HBU1In029760; Sat, 17 Mar 2007 11:30:01 GMT (envelope-from gnats) Resent-Date: Sat, 17 Mar 2007 11:30:01 GMT Resent-Message-Id: <200703171130.l2HBU1In029760@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 [69.147.83.52]) by hub.freebsd.org (Postfix) with ESMTP id 7B4A016A402 for ; Sat, 17 Mar 2007 11:25:03 +0000 (UTC) (envelope-from ed@hoeg.nl) Received: from palm.hoeg.nl (palm.hoeg.nl [83.98.131.212]) by mx1.freebsd.org (Postfix) with ESMTP id 480D313C44C for ; Sat, 17 Mar 2007 11:25:03 +0000 (UTC) (envelope-from ed@hoeg.nl) Received: by palm.hoeg.nl (Postfix, from userid 1000) id 283BE1CD33; Sat, 17 Mar 2007 12:25:02 +0100 (CET) Message-Id: <20070317112502.283BE1CD33@palm.hoeg.nl> Date: Sat, 17 Mar 2007 12:25:02 +0100 (CET) From: Ed Schouten To: FreeBSD-gnats-submit@FreeBSD.org X-Send-Pr-Version: 3.113 Cc: Subject: ports/110439: [cad/spice] Use termios.h 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: Sat, 17 Mar 2007 11:30:01 -0000 >Number: 110439 >Category: ports >Synopsis: [cad/spice] Use termios.h >Confidential: no >Severity: non-critical >Priority: low >Responsible: freebsd-ports-bugs >State: open >Quarter: >Keywords: >Date-Required: >Class: sw-bug >Submitter-Id: current-users >Arrival-Date: Sat Mar 17 11:30:00 GMT 2007 >Closed-Date: >Last-Modified: >Originator: Ed Schouten >Release: FreeBSD 6.2-STABLE i386 >Organization: >Environment: System: FreeBSD palm.hoeg.nl 6.2-STABLE FreeBSD 6.2-STABLE #0: Sun Feb 11 22:32:09 CET 2007 root@palm.hoeg.nl:/usr/obj/usr/src/sys/PALM i386 >Description: The cad/spice port is one of the ports that uses while it could perfectly use . When we use , compilation fails, because of some termio leftovers. >How-To-Repeat: >Fix: This patch changes os_bsd.h to use termios on FreeBSD. It also changes the sourcecode to use tcgetattr/tcsetattr instead of ioctl's. --- cad/spice/files/patch-src_include_os_bsd_h Wed Apr 5 22:51:27 2006 +++ cad/spice/files/patch-src_include_os_bsd_h Sat Mar 17 12:17:58 2007 @@ -1,6 +1,6 @@ --- src/include/os_bsd.h.orig Sat Apr 24 18:09:46 1993 +++ src/include/os_bsd.h Mon Apr 3 21:27:21 2006 -@@ -8,18 +8,32 @@ +@@ -8,18 +8,36 @@ #include "os_unix.h" @@ -24,8 +24,12 @@ -#define HAS_INDEX /* index( ) instead of strchr( ) */ #define HAS_BCOPY /* bcopy( ), bzero( ) */ #define HAS_BSDRANDOM /* srandom( ) and random( ) */ ++#ifdef __FreeBSD__ ++#define HAS_POSIXTTY /* */ ++#else #define HAS_BSDTTY /* */ -#define HAS_BSDDIRS /* */ ++#endif #define HAS_BSDRUSAGE /* getrusage( ) */ #define HAS_BSDRLIMIT /* getrlimit( ) */ #define HAS_DUP2 --- cad/spice/files/patch-src_lib_cp_complete.c Thu Jan 1 01:00:00 1970 +++ cad/spice/files/patch-src_lib_cp_complete.c Sat Mar 17 12:17:58 2007 @@ -0,0 +1,20 @@ +--- src/lib/cp/complete.c Wed Jun 19 05:55:38 1991 ++++ src/lib/cp/complete.c Sat Mar 17 11:51:56 2007 +@@ -445,14 +445,14 @@ + ison = on; + + if (ison == true) { +- (void) ioctl(fileno(cp_in), TERM_GET, (char *) &OS_Buf); ++ tcgetattr(fileno(cp_in), &OS_Buf); + sbuf = OS_Buf; + sbuf.c_cc[VEOF] = 0; + sbuf.c_cc[VEOL] = ESCAPE; + sbuf.c_cc[VEOL2] = CNTRL_D; +- (void) ioctl(fileno(cp_in), TERM_SET, (char *) &sbuf); ++ tcsetattr(fileno(cp_in), TCSANOW, &OS_Buf); + } else { +- (void) ioctl(fileno(cp_in), TERM_SET, (char *) &OS_Buf); ++ tcsetattr(fileno(cp_in), TCSANOW, &OS_Buf); + } + + # endif >Release-Note: >Audit-Trail: >Unformatted: