summaryrefslogtreecommitdiff
path: root/x11/xview-lib/patches/patch-ch
blob: bc69b7f885923297f281a10ed9fd4c0d7af584cf (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
$NetBSD: patch-ch,v 1.2 2009/12/10 20:35:57 abs Exp $

--- lib/libxview/ttysw/tty_gtty.c.orig	1993-06-29 05:17:20.000000000 +0000
+++ lib/libxview/ttysw/tty_gtty.c
@@ -14,6 +14,7 @@ static  char sccsid[] = "@(#)tty_gtty.c 
  * Ttysw parameter retrieval mechanism to get original tty settings to pty.
  */
 
+#include <sys/param.h>
 #include <sys/types.h>
 #include <stdio.h>
 #include <xview_private/portable.h>	/* for tty_mode_t and XV* defines */
@@ -34,6 +35,7 @@ static  char sccsid[] = "@(#)tty_gtty.c 
  */
 #ifdef	XV_USE_TERMIOS
 
+#if !(defined(BSD) && (BSD >= 199103))
 static struct termios	default_modes = {
 	BRKINT|ICRNL|IXON|IGNPAR|IMAXBEL,	    	/* input modes */
 	OPOST|ONLCR,				    	/* output modes */
@@ -57,6 +59,20 @@ static struct termios	default_modes = {
 	CWERASE,	/* VWERASE */
 	CLNEXT,		/* VLNEXT */
 };
+#else
+#include <sys/ttydefaults.h>
+static struct termios default_modes = {
+	TTYDEF_IFLAG,   /* input modes */
+	TTYDEF_OFLAG,   /* output modes */      
+	TTYDEF_CFLAG,   /* control modes */
+	TTYDEF_LFLAG,   /* local modes */
+	/* control characters */
+	{ CEOF,   CEOL,   CEOL,   CERASE, CWERASE, CKILL, CREPRINT,
+	_POSIX_VDISABLE, CINTR, CQUIT,  CSUSP,  CDSUSP, CSTART, CSTOP,  CLNEXT,
+	CDISCARD, CMIN, CTIME,  CSTATUS, _POSIX_VDISABLE },
+	TTYDEF_SPEED, TTYDEF_SPEED /* input and output speeds */
+};    
+#endif
 
 #else	/* XV_USE_TERMIOS */