Date: Sat, 17 Mar 2007 12:25:02 +0100 (CET) From: Ed Schouten <ed@fxq.nl> To: FreeBSD-gnats-submit@FreeBSD.org Subject: ports/110439: [cad/spice] Use termios.h Message-ID: <20070317112502.283BE1CD33@palm.hoeg.nl> Resent-Message-ID: <200703171130.l2HBU1In029760@freefall.freebsd.org>
next in thread | raw e-mail | index | archive | help
>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 <sgtty.h> while it could perfectly use <termios.h>. When we use <termios.h>, 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 /* <termios.h> */ ++#else #define HAS_BSDTTY /* <sgtty.h> */ -#define HAS_BSDDIRS /* <sys/dir.h> */ ++#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:
Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?20070317112502.283BE1CD33>