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
|
$NetBSD: patch-ai,v 1.1 2006/01/24 22:27:07 joerg Exp $
--- shell.c.orig 2006-01-24 22:00:03.000000000 +0000
+++ shell.c
@@ -1,6 +1,6 @@
/* ---- shell functs, stolen from TNT / Mark Wahl, DL4YBG ----- */
-#if defined(__linux__) || defined(__NetBSD__)
+#if defined(__linux__) || defined(__NetBSD__) || defined(__DragonFly__)
#include <unistd.h>
#include <stdio.h>
#include <stdlib.h>
@@ -231,7 +231,7 @@ boolean close_shell(short unr)
trans_show_puffer(unr,user[unr]->ptybuffer,user[unr]->ptybuflen);
}
if (user[unr]->pty >= minhandle) {
-#ifdef __NetBSD__
+#if defined(__NetBSD__) || defined(__DragonFly__)
ioctl(user[unr]->pty, TCIOFLUSH, 2);
#else
ioctl(user[unr]->pty, TCFLSH, 2);
@@ -415,7 +415,7 @@ boolean cmd_shell(short unr, boolean tra
if (user[unr]->ptylfcrconv) {
memset((char *) &termios, 0, sizeof(termios));
termios.c_iflag = ICRNL | IXOFF;
-#ifdef __NetBSD__
+#if defined(__NetBSD__) || defined(__DragonFly__)
termios.c_oflag = OPOST | OXTABS | ONLRET;
#else
termios.c_oflag = OPOST | TAB3 | ONLRET;
@@ -485,7 +485,7 @@ boolean cmd_run(short unr, boolean trans
if (user[unr]->ptylfcrconv) {
memset((char *) &termios, 0, sizeof(termios));
termios.c_iflag = ICRNL | IXOFF;
-#ifdef __NetBSD__
+#if defined(__NetBSD__) || defined(__DragonFly__)
termios.c_oflag = OPOST | OXTABS | ONLRET;
#else
termios.c_oflag = OPOST | TAB3 | ONLRET;
|