blob: b070b139b49e0bb2f50121172a0f4bba44bf1285 (
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
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
|
Index: b/usr/src/head/termios.h
===================================================================
--- a/usr/src/head/termios.h
+++ b/usr/src/head/termios.h
@@ -28,6 +28,16 @@
#pragma ident "%Z%%M% %I% %E% SMI" /* SVr4.0 1.2 */
+#include <features.h>
+#include <sys/cdefs.h>
#include <sys/termios.h>
+__BEGIN_DECLS
+
+#if defined(_BSD_SOURCE) || defined(__EXTENSIONS__)
+void cfmakeraw (struct termios *);
+#endif
+
+__END_DECLS
+
#endif /* _TERMIOS_H */
Index: b/usr/src/lib/libc/port/gen/cfmakeraw.c
===================================================================
--- /dev/null
+++ b/usr/src/lib/libc/port/gen/cfmakeraw.c
@@ -0,0 +1,19 @@
+/*
+ * Public Domain.
+ */
+
+#include "termios.h"
+
+void
+cfmakeraw (struct termios *tio)
+{
+ tio->c_cflag &= ~(CSIZE | PARENB);
+ tio->c_cflag |= CS8;
+ tio->c_iflag &=
+ ~(IMAXBEL | IGNBRK | BRKINT | PARMRK | ISTRIP | INLCR | IGNCR | ICRNL |
+ IXON);
+ tio->c_lflag &= ~(ECHO | ECHONL | ICANON | ISIG | IEXTEN);
+ tio->c_oflag &= ~OPOST;
+ tio->c_cc[VMIN] = 1;
+ tio->c_cc[VTIME] = 0;
+}
Index: b/usr/src/lib/libc/amd64/Makefile
===================================================================
--- a/usr/src/lib/libc/amd64/Makefile
+++ b/usr/src/lib/libc/amd64/Makefile
@@ -359,6 +359,7 @@ PORTGEN= \
catopen.o \
cfgetispeed.o \
cfgetospeed.o \
+ cfmakeraw.o \
cfree.o \
cfsetispeed.o \
cfsetospeed.o \
Index: b/usr/src/lib/libc/i386/Makefile.com
===================================================================
--- a/usr/src/lib/libc/i386/Makefile.com
+++ b/usr/src/lib/libc/i386/Makefile.com
@@ -391,6 +391,7 @@ PORTGEN= \
catopen.o \
cfgetispeed.o \
cfgetospeed.o \
+ cfmakeraw.o \
cfree.o \
cfsetispeed.o \
cfsetospeed.o \
Index: b/usr/src/lib/libc/port/mapfile-vers
===================================================================
--- a/usr/src/lib/libc/port/mapfile-vers
+++ b/usr/src/lib/libc/port/mapfile-vers
@@ -269,6 +269,7 @@ $endif
SYMBOL_VERSION DYSON_1 {
global:
+ cfmakeraw;
error;
error_at_line;
error_message_count;
|