1570af302Sopenharmony_cistruct termios {
2570af302Sopenharmony_ci	tcflag_t c_iflag;
3570af302Sopenharmony_ci	tcflag_t c_oflag;
4570af302Sopenharmony_ci	tcflag_t c_cflag;
5570af302Sopenharmony_ci	tcflag_t c_lflag;
6570af302Sopenharmony_ci	cc_t c_line;
7570af302Sopenharmony_ci	cc_t c_cc[NCCS];
8570af302Sopenharmony_ci	speed_t __c_ispeed;
9570af302Sopenharmony_ci	speed_t __c_ospeed;
10570af302Sopenharmony_ci};
11570af302Sopenharmony_ci
12570af302Sopenharmony_ci#define VINTR     0
13570af302Sopenharmony_ci#define VQUIT     1
14570af302Sopenharmony_ci#define VERASE    2
15570af302Sopenharmony_ci#define VKILL     3
16570af302Sopenharmony_ci#define VEOF      4
17570af302Sopenharmony_ci#define VTIME     5
18570af302Sopenharmony_ci#define VMIN      6
19570af302Sopenharmony_ci#define VSWTC     7
20570af302Sopenharmony_ci#define VSTART    8
21570af302Sopenharmony_ci#define VSTOP     9
22570af302Sopenharmony_ci#define VSUSP    10
23570af302Sopenharmony_ci#define VEOL     11
24570af302Sopenharmony_ci#define VREPRINT 12
25570af302Sopenharmony_ci#define VDISCARD 13
26570af302Sopenharmony_ci#define VWERASE  14
27570af302Sopenharmony_ci#define VLNEXT   15
28570af302Sopenharmony_ci#define VEOL2    16
29570af302Sopenharmony_ci
30570af302Sopenharmony_ci#define IGNBRK  0000001
31570af302Sopenharmony_ci#define BRKINT  0000002
32570af302Sopenharmony_ci#define IGNPAR  0000004
33570af302Sopenharmony_ci#define PARMRK  0000010
34570af302Sopenharmony_ci#define INPCK   0000020
35570af302Sopenharmony_ci#define ISTRIP  0000040
36570af302Sopenharmony_ci#define INLCR   0000100
37570af302Sopenharmony_ci#define IGNCR   0000200
38570af302Sopenharmony_ci#define ICRNL   0000400
39570af302Sopenharmony_ci#define IUCLC   0001000
40570af302Sopenharmony_ci#define IXON    0002000
41570af302Sopenharmony_ci#define IXANY   0004000
42570af302Sopenharmony_ci#define IXOFF   0010000
43570af302Sopenharmony_ci#define IMAXBEL 0020000
44570af302Sopenharmony_ci#define IUTF8   0040000
45570af302Sopenharmony_ci
46570af302Sopenharmony_ci#define OPOST  0000001
47570af302Sopenharmony_ci#define OLCUC  0000002
48570af302Sopenharmony_ci#define ONLCR  0000004
49570af302Sopenharmony_ci#define OCRNL  0000010
50570af302Sopenharmony_ci#define ONOCR  0000020
51570af302Sopenharmony_ci#define ONLRET 0000040
52570af302Sopenharmony_ci#define OFILL  0000100
53570af302Sopenharmony_ci#define OFDEL  0000200
54570af302Sopenharmony_ci#if defined(_GNU_SOURCE) || defined(_BSD_SOURCE) || defined(_XOPEN_SOURCE)
55570af302Sopenharmony_ci#define NLDLY  0000400
56570af302Sopenharmony_ci#define NL0    0000000
57570af302Sopenharmony_ci#define NL1    0000400
58570af302Sopenharmony_ci#define CRDLY  0003000
59570af302Sopenharmony_ci#define CR0    0000000
60570af302Sopenharmony_ci#define CR1    0001000
61570af302Sopenharmony_ci#define CR2    0002000
62570af302Sopenharmony_ci#define CR3    0003000
63570af302Sopenharmony_ci#define TABDLY 0014000
64570af302Sopenharmony_ci#define TAB0   0000000
65570af302Sopenharmony_ci#define TAB1   0004000
66570af302Sopenharmony_ci#define TAB2   0010000
67570af302Sopenharmony_ci#define TAB3   0014000
68570af302Sopenharmony_ci#define BSDLY  0020000
69570af302Sopenharmony_ci#define BS0    0000000
70570af302Sopenharmony_ci#define BS1    0020000
71570af302Sopenharmony_ci#define FFDLY  0100000
72570af302Sopenharmony_ci#define FF0    0000000
73570af302Sopenharmony_ci#define FF1    0100000
74570af302Sopenharmony_ci#endif
75570af302Sopenharmony_ci
76570af302Sopenharmony_ci#define VTDLY  0040000
77570af302Sopenharmony_ci#define VT0    0000000
78570af302Sopenharmony_ci#define VT1    0040000
79570af302Sopenharmony_ci
80570af302Sopenharmony_ci#define B0       0000000
81570af302Sopenharmony_ci#define B50      0000001
82570af302Sopenharmony_ci#define B75      0000002
83570af302Sopenharmony_ci#define B110     0000003
84570af302Sopenharmony_ci#define B134     0000004
85570af302Sopenharmony_ci#define B150     0000005
86570af302Sopenharmony_ci#define B200     0000006
87570af302Sopenharmony_ci#define B300     0000007
88570af302Sopenharmony_ci#define B600     0000010
89570af302Sopenharmony_ci#define B1200    0000011
90570af302Sopenharmony_ci#define B1800    0000012
91570af302Sopenharmony_ci#define B2400    0000013
92570af302Sopenharmony_ci#define B4800    0000014
93570af302Sopenharmony_ci#define B9600    0000015
94570af302Sopenharmony_ci#define B19200   0000016
95570af302Sopenharmony_ci#define B38400   0000017
96570af302Sopenharmony_ci
97570af302Sopenharmony_ci#define B57600   0010001
98570af302Sopenharmony_ci#define B115200  0010002
99570af302Sopenharmony_ci#define B230400  0010003
100570af302Sopenharmony_ci#define B460800  0010004
101570af302Sopenharmony_ci#define B500000  0010005
102570af302Sopenharmony_ci#define B576000  0010006
103570af302Sopenharmony_ci#define B921600  0010007
104570af302Sopenharmony_ci#define B1000000 0010010
105570af302Sopenharmony_ci#define B1152000 0010011
106570af302Sopenharmony_ci#define B1500000 0010012
107570af302Sopenharmony_ci#define B2000000 0010013
108570af302Sopenharmony_ci#define B2500000 0010014
109570af302Sopenharmony_ci#define B3000000 0010015
110570af302Sopenharmony_ci#define B3500000 0010016
111570af302Sopenharmony_ci#define B4000000 0010017
112570af302Sopenharmony_ci
113570af302Sopenharmony_ci#define CSIZE  0000060
114570af302Sopenharmony_ci#define CS5    0000000
115570af302Sopenharmony_ci#define CS6    0000020
116570af302Sopenharmony_ci#define CS7    0000040
117570af302Sopenharmony_ci#define CS8    0000060
118570af302Sopenharmony_ci#define CSTOPB 0000100
119570af302Sopenharmony_ci#define CREAD  0000200
120570af302Sopenharmony_ci#define PARENB 0000400
121570af302Sopenharmony_ci#define PARODD 0001000
122570af302Sopenharmony_ci#define HUPCL  0002000
123570af302Sopenharmony_ci#define CLOCAL 0004000
124570af302Sopenharmony_ci
125570af302Sopenharmony_ci#define ISIG   0000001
126570af302Sopenharmony_ci#define ICANON 0000002
127570af302Sopenharmony_ci#define ECHO   0000010
128570af302Sopenharmony_ci#define ECHOE  0000020
129570af302Sopenharmony_ci#define ECHOK  0000040
130570af302Sopenharmony_ci#define ECHONL 0000100
131570af302Sopenharmony_ci#define NOFLSH 0000200
132570af302Sopenharmony_ci#define TOSTOP 0000400
133570af302Sopenharmony_ci#define IEXTEN 0100000
134570af302Sopenharmony_ci
135570af302Sopenharmony_ci#define TCOOFF 0
136570af302Sopenharmony_ci#define TCOON  1
137570af302Sopenharmony_ci#define TCIOFF 2
138570af302Sopenharmony_ci#define TCION  3
139570af302Sopenharmony_ci
140570af302Sopenharmony_ci#define TCIFLUSH  0
141570af302Sopenharmony_ci#define TCOFLUSH  1
142570af302Sopenharmony_ci#define TCIOFLUSH 2
143570af302Sopenharmony_ci
144570af302Sopenharmony_ci#define TCSANOW   0
145570af302Sopenharmony_ci#define TCSADRAIN 1
146570af302Sopenharmony_ci#define TCSAFLUSH 2
147570af302Sopenharmony_ci
148570af302Sopenharmony_ci#if defined(_GNU_SOURCE) || defined(_BSD_SOURCE)
149570af302Sopenharmony_ci#define EXTA    0000016
150570af302Sopenharmony_ci#define EXTB    0000017
151570af302Sopenharmony_ci#define CBAUD   0010017
152570af302Sopenharmony_ci#define CBAUDEX 0010000
153570af302Sopenharmony_ci#define CIBAUD  002003600000
154570af302Sopenharmony_ci#define CMSPAR  010000000000
155570af302Sopenharmony_ci#define CRTSCTS 020000000000
156570af302Sopenharmony_ci
157570af302Sopenharmony_ci#define XCASE   0000004
158570af302Sopenharmony_ci#define ECHOCTL 0001000
159570af302Sopenharmony_ci#define ECHOPRT 0002000
160570af302Sopenharmony_ci#define ECHOKE  0004000
161570af302Sopenharmony_ci#define FLUSHO  0010000
162570af302Sopenharmony_ci#define PENDIN  0040000
163570af302Sopenharmony_ci#define EXTPROC 0200000
164570af302Sopenharmony_ci
165570af302Sopenharmony_ci#define XTABS  0014000
166570af302Sopenharmony_ci#endif
167