From 3d5ec94e7deac9a019efb77a4a3206e50a83361e Mon Sep 17 00:00:00 2001 From: Martin Wilke Date: Wed, 21 Mar 2007 12:32:53 +0000 Subject: - Use termios.h PR: 110439 Submitted by: Ed Schouten --- cad/spice/files/patch-src_include_os_bsd_h | 6 +++++- cad/spice/files/patch-src_lib_cp_complete.c | 20 ++++++++++++++++++++ 2 files changed, 25 insertions(+), 1 deletion(-) create mode 100644 cad/spice/files/patch-src_lib_cp_complete.c (limited to 'cad') diff --git a/cad/spice/files/patch-src_include_os_bsd_h b/cad/spice/files/patch-src_include_os_bsd_h index 0d783698ceef..f34c75b3bd6f 100644 --- a/cad/spice/files/patch-src_include_os_bsd_h +++ b/cad/spice/files/patch-src_include_os_bsd_h @@ -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 diff --git a/cad/spice/files/patch-src_lib_cp_complete.c b/cad/spice/files/patch-src_lib_cp_complete.c new file mode 100644 index 000000000000..d5bed9295ba7 --- /dev/null +++ b/cad/spice/files/patch-src_lib_cp_complete.c @@ -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 -- cgit v1.2.3