mirror of git://git.musl-libc.org/musl
fix powerpc termios.h and ioctl.h
This commit is contained in:
parent
91738d0241
commit
3bb6bd8580
|
@ -27,84 +27,127 @@
|
|||
#define _IOR(a,b,c) _IOC(_IOC_READ ,(a),(b),sizeof(c))
|
||||
#define _IOWR(a,b,c) _IOC(_IOC_READ | _IOC_WRITE,(a),(b),sizeof(c))
|
||||
|
||||
#define TCGETS 0x5401
|
||||
#define TCSETS 0x5402
|
||||
#define TCSETSW 0x5403
|
||||
#define TCSETSF 0x5404
|
||||
#define TCGETA 0x5405
|
||||
#define TCSETA 0x5406
|
||||
#define TCSETAW 0x5407
|
||||
#define TCSETAF 0x5408
|
||||
#define TCSBRK 0x5409
|
||||
#define TCXONC 0x540A
|
||||
#define TCFLSH 0x540B
|
||||
#define FIONCLEX _IO('f', 2)
|
||||
#define FIOCLEX _IO('f', 1)
|
||||
#define FIOASYNC _IOW('f', 125, int)
|
||||
#define FIONBIO _IOW('f', 126, int)
|
||||
#define FIONREAD _IOR('f', 127, int)
|
||||
#define TIOCINQ FIONREAD
|
||||
#define FIOQSIZE _IOR('f', 128, char[8])
|
||||
#define TIOCGETP _IOR('t', 8, char[6])
|
||||
#define TIOCSETP _IOW('t', 9, char[6])
|
||||
#define TIOCSETN _IOW('t', 10, char[6])
|
||||
|
||||
#define TIOCSETC _IOW('t', 17, char[6])
|
||||
#define TIOCGETC _IOR('t', 18, char[6])
|
||||
#define TCGETS _IOR('t', 19, char[44])
|
||||
#define TCSETS _IOW('t', 20, char[44])
|
||||
#define TCSETSW _IOW('t', 21, char[44])
|
||||
#define TCSETSF _IOW('t', 22, char[44])
|
||||
|
||||
#define TCGETA _IOR('t', 23, char[20])
|
||||
#define TCSETA _IOW('t', 24, char[20])
|
||||
#define TCSETAW _IOW('t', 25, char[20])
|
||||
#define TCSETAF _IOW('t', 28, char[20])
|
||||
|
||||
#define TCSBRK _IO('t', 29)
|
||||
#define TCXONC _IO('t', 30)
|
||||
#define TCFLSH _IO('t', 31)
|
||||
|
||||
#define TIOCSWINSZ _IOW('t', 103, char[8])
|
||||
#define TIOCGWINSZ _IOR('t', 104, char[8])
|
||||
#define TIOCSTART _IO('t', 110)
|
||||
#define TIOCSTOP _IO('t', 111)
|
||||
|
||||
#define TIOCOUTQ _IOR('t', 115, int)
|
||||
|
||||
#define TIOCGLTC _IOR('t', 116, char[6])
|
||||
#define TIOCSLTC _IOW('t', 117, char[6])
|
||||
#define TIOCSPGRP _IOW('t', 118, int)
|
||||
#define TIOCGPGRP _IOR('t', 119, int)
|
||||
|
||||
#define TIOCEXCL 0x540C
|
||||
#define TIOCNXCL 0x540D
|
||||
#define TIOCSCTTY 0x540E
|
||||
#define TIOCGPGRP 0x540F
|
||||
#define TIOCSPGRP 0x5410
|
||||
#define TIOCOUTQ 0x5411
|
||||
|
||||
#define TIOCSTI 0x5412
|
||||
#define TIOCGWINSZ 0x5413
|
||||
#define TIOCSWINSZ 0x5414
|
||||
#define TIOCMGET 0x5415
|
||||
#define TIOCMBIS 0x5416
|
||||
#define TIOCMBIC 0x5417
|
||||
#define TIOCMSET 0x5418
|
||||
#define TIOCM_LE 0x001
|
||||
#define TIOCM_DTR 0x002
|
||||
#define TIOCM_RTS 0x004
|
||||
#define TIOCM_ST 0x008
|
||||
#define TIOCM_SR 0x010
|
||||
#define TIOCM_CTS 0x020
|
||||
#define TIOCM_CAR 0x040
|
||||
#define TIOCM_RNG 0x080
|
||||
#define TIOCM_DSR 0x100
|
||||
#define TIOCM_CD TIOCM_CAR
|
||||
#define TIOCM_RI TIOCM_RNG
|
||||
#define TIOCM_OUT1 0x2000
|
||||
#define TIOCM_OUT2 0x4000
|
||||
#define TIOCM_LOOP 0x8000
|
||||
|
||||
#define TIOCGSOFTCAR 0x5419
|
||||
#define TIOCSSOFTCAR 0x541A
|
||||
#define FIONREAD 0x541B
|
||||
#define TIOCINQ FIONREAD
|
||||
#define TIOCLINUX 0x541C
|
||||
#define TIOCCONS 0x541D
|
||||
#define TIOCGSERIAL 0x541E
|
||||
#define TIOCSSERIAL 0x541F
|
||||
#define TIOCPKT 0x5420
|
||||
#define FIONBIO 0x5421
|
||||
#define TIOCPKT 0x5420
|
||||
#define TIOCPKT_DATA 0
|
||||
#define TIOCPKT_FLUSHREAD 1
|
||||
#define TIOCPKT_FLUSHWRITE 2
|
||||
#define TIOCPKT_STOP 4
|
||||
#define TIOCPKT_START 8
|
||||
#define TIOCPKT_NOSTOP 16
|
||||
#define TIOCPKT_DOSTOP 32
|
||||
#define TIOCPKT_IOCTL 64
|
||||
|
||||
#define TIOCNOTTY 0x5422
|
||||
#define TIOCSETD 0x5423
|
||||
#define TIOCGETD 0x5424
|
||||
#define TCSBRKP 0x5425
|
||||
#define TIOCTTYGSTRUCT 0x5426
|
||||
#define TIOCSBRK 0x5427
|
||||
#define TIOCCBRK 0x5428
|
||||
#define TIOCGSID 0x5429
|
||||
#define TIOCGPTN 0x80045430
|
||||
#define TIOCSPTLCK 0x40045431
|
||||
#define TCGETX 0x5432
|
||||
#define TCSETX 0x5433
|
||||
#define TCSETXF 0x5434
|
||||
#define TCSETXW 0x5435
|
||||
#define TIOCGRS485 0x542e
|
||||
#define TIOCSRS485 0x542f
|
||||
#define TIOCGPTN _IOR('T',0x30, unsigned int)
|
||||
#define TIOCSPTLCK _IOW('T',0x31, int)
|
||||
#define TIOCGDEV _IOR('T',0x32, unsigned int)
|
||||
#define TIOCSIG _IOW('T',0x36, int)
|
||||
#define TIOCVHANGUP 0x5437
|
||||
|
||||
#define FIONCLEX 0x5450
|
||||
#define FIOCLEX 0x5451
|
||||
#define FIOASYNC 0x5452
|
||||
#define TIOCSERCONFIG 0x5453
|
||||
#define TIOCSERGWILD 0x5454
|
||||
#define TIOCSERSWILD 0x5455
|
||||
#define TIOCGLCKTRMIOS 0x5456
|
||||
#define TIOCSLCKTRMIOS 0x5457
|
||||
#define TIOCSERGSTRUCT 0x5458
|
||||
#define TIOCSERGETLSR 0x5459
|
||||
#define TIOCSERGETMULTI 0x545A
|
||||
#define TIOCSERSETMULTI 0x545B
|
||||
#define TIOCSERGETLSR 0x5459
|
||||
#define TIOCSER_TEMT 0x01
|
||||
#define TIOCSERGETMULTI 0x545A
|
||||
#define TIOCSERSETMULTI 0x545B
|
||||
|
||||
#define TIOCMIWAIT 0x545C
|
||||
#define TIOCGICOUNT 0x545D
|
||||
|
||||
|
||||
/* end kernel header ioctls.h */
|
||||
|
||||
|
||||
#define TIOCTTYGSTRUCT 0x5426
|
||||
|
||||
#define TCGETX 0x5432
|
||||
#define TCSETX 0x5433
|
||||
#define TCSETXF 0x5434
|
||||
#define TCSETXW 0x5435
|
||||
|
||||
#define TIOCGHAYESESP 0x545E
|
||||
#define TIOCSHAYESESP 0x545F
|
||||
#define FIOQSIZE 0x5460
|
||||
|
||||
#define TIOCPKT_DATA 0
|
||||
#define TIOCPKT_FLUSHREAD 1
|
||||
#define TIOCPKT_FLUSHWRITE 2
|
||||
#define TIOCPKT_STOP 4
|
||||
#define TIOCPKT_START 8
|
||||
#define TIOCPKT_NOSTOP 16
|
||||
#define TIOCPKT_DOSTOP 32
|
||||
#define TIOCPKT_IOCTL 64
|
||||
|
||||
#define TIOCSER_TEMT 0x01
|
||||
|
||||
struct winsize {
|
||||
unsigned short ws_row;
|
||||
|
@ -113,20 +156,6 @@ struct winsize {
|
|||
unsigned short ws_ypixel;
|
||||
};
|
||||
|
||||
#define TIOCM_LE 0x001
|
||||
#define TIOCM_DTR 0x002
|
||||
#define TIOCM_RTS 0x004
|
||||
#define TIOCM_ST 0x008
|
||||
#define TIOCM_SR 0x010
|
||||
#define TIOCM_CTS 0x020
|
||||
#define TIOCM_CAR 0x040
|
||||
#define TIOCM_RNG 0x080
|
||||
#define TIOCM_DSR 0x100
|
||||
#define TIOCM_CD TIOCM_CAR
|
||||
#define TIOCM_RI TIOCM_RNG
|
||||
#define TIOCM_OUT1 0x2000
|
||||
#define TIOCM_OUT2 0x4000
|
||||
#define TIOCM_LOOP 0x8000
|
||||
#define TIOCM_MODEM_BITS TIOCM_OUT2
|
||||
|
||||
#define N_TTY 0
|
||||
|
|
|
@ -1,159 +1,170 @@
|
|||
#undef NCCS
|
||||
#define NCCS 19
|
||||
struct termios
|
||||
{
|
||||
tcflag_t c_iflag;
|
||||
tcflag_t c_oflag;
|
||||
tcflag_t c_cflag;
|
||||
tcflag_t c_lflag;
|
||||
cc_t c_line;
|
||||
cc_t c_cc[NCCS];
|
||||
cc_t c_line;
|
||||
speed_t __c_ispeed;
|
||||
speed_t __c_ospeed;
|
||||
};
|
||||
|
||||
#define VINTR 0
|
||||
#define VQUIT 1
|
||||
#define VERASE 2
|
||||
#define VKILL 3
|
||||
#define VEOF 4
|
||||
#define VTIME 5
|
||||
#define VMIN 6
|
||||
#define VSWTC 7
|
||||
#define VSTART 8
|
||||
#define VSTOP 9
|
||||
#define VSUSP 10
|
||||
#define VEOL 11
|
||||
#define VREPRINT 12
|
||||
#define VDISCARD 13
|
||||
#define VWERASE 14
|
||||
#define VLNEXT 15
|
||||
#define VEOL2 16
|
||||
#define VINTR 0
|
||||
#define VQUIT 1
|
||||
#define VERASE 2
|
||||
#define VKILL 3
|
||||
#define VEOF 4
|
||||
#define VMIN 5
|
||||
#define VEOL 6
|
||||
#define VTIME 7
|
||||
#define VEOL2 8
|
||||
#define VSWTC 9
|
||||
#define VWERASE 10
|
||||
#define VREPRINT 11
|
||||
#define VSUSP 12
|
||||
#define VSTART 13
|
||||
#define VSTOP 14
|
||||
#define VLNEXT 15
|
||||
#define VDISCARD 16
|
||||
|
||||
#define IGNBRK 0000001
|
||||
#define BRKINT 0000002
|
||||
#define IGNPAR 0000004
|
||||
#define PARMRK 0000010
|
||||
#define INPCK 0000020
|
||||
#define ISTRIP 0000040
|
||||
#define INLCR 0000100
|
||||
#define IGNCR 0000200
|
||||
#define ICRNL 0000400
|
||||
#define IUCLC 0001000
|
||||
#define IXON 0002000
|
||||
#define IXANY 0004000
|
||||
#define IXOFF 0010000
|
||||
#define IGNBRK 0000001
|
||||
#define BRKINT 0000002
|
||||
#define IGNPAR 0000004
|
||||
#define PARMRK 0000010
|
||||
#define INPCK 0000020
|
||||
#define ISTRIP 0000040
|
||||
#define INLCR 0000100
|
||||
#define IGNCR 0000200
|
||||
#define ICRNL 0000400
|
||||
#define IXON 0001000
|
||||
#define IXOFF 0002000
|
||||
#define IXANY 0004000
|
||||
#define IUCLC 0010000
|
||||
#define IMAXBEL 0020000
|
||||
#define IUTF8 0040000
|
||||
|
||||
#define OPOST 0000001
|
||||
#define OLCUC 0000002
|
||||
#define ONLCR 0000004
|
||||
#define OCRNL 0000010
|
||||
#define ONOCR 0000020
|
||||
#define ONLRET 0000040
|
||||
#define OFILL 0000100
|
||||
#define OFDEL 0000200
|
||||
#define NLDLY 0000400
|
||||
#define NL0 0000000
|
||||
#define NL1 0000400
|
||||
#define CRDLY 0003000
|
||||
#define CR0 0000000
|
||||
#define CR1 0001000
|
||||
#define CR2 0002000
|
||||
#define CR3 0003000
|
||||
#define TABDLY 0014000
|
||||
#define TAB0 0000000
|
||||
#define TAB1 0004000
|
||||
#define TAB2 0010000
|
||||
#define TAB3 0014000
|
||||
#define BSDLY 0020000
|
||||
#define BS0 0000000
|
||||
#define BS1 0020000
|
||||
#define FFDLY 0100000
|
||||
#define FF0 0000000
|
||||
#define FF1 0100000
|
||||
#define OPOST 0000001
|
||||
#define ONLCR 0000002
|
||||
#define OLCUC 0000004
|
||||
|
||||
#define VTDLY 0040000
|
||||
#define VT0 0000000
|
||||
#define VT1 0040000
|
||||
#define OCRNL 0000010
|
||||
#define ONOCR 0000020
|
||||
#define ONLRET 0000040
|
||||
|
||||
/* ?? */
|
||||
#define XTABS 0014000
|
||||
#define OFILL 00000100
|
||||
#define OFDEL 00000200
|
||||
#define NLDLY 00001400
|
||||
#define NL0 00000000
|
||||
#define NL1 00000400
|
||||
#define NL2 00001000
|
||||
#define NL3 00001400
|
||||
#define TABDLY 00006000
|
||||
#define TAB0 00000000
|
||||
#define TAB1 00002000
|
||||
#define TAB2 00004000
|
||||
#define TAB3 00006000
|
||||
#define XTABS 00006000
|
||||
#define CRDLY 00030000
|
||||
#define CR0 00000000
|
||||
#define CR1 00010000
|
||||
#define CR2 00020000
|
||||
#define CR3 00030000
|
||||
#define FFDLY 00040000
|
||||
#define FF0 00000000
|
||||
#define FF1 00040000
|
||||
#define BSDLY 00100000
|
||||
#define BS0 00000000
|
||||
#define BS1 00100000
|
||||
#define VTDLY 00200000
|
||||
#define VT0 00000000
|
||||
#define VT1 00200000
|
||||
|
||||
#define B0 0000000
|
||||
#define B50 0000001
|
||||
#define B75 0000002
|
||||
#define B110 0000003
|
||||
#define B134 0000004
|
||||
#define B150 0000005
|
||||
#define B200 0000006
|
||||
#define B300 0000007
|
||||
#define B600 0000010
|
||||
#define B1200 0000011
|
||||
#define B1800 0000012
|
||||
#define B2400 0000013
|
||||
#define B4800 0000014
|
||||
#define B9600 0000015
|
||||
#define B19200 0000016
|
||||
#define B38400 0000017
|
||||
#define CBAUD 0000377
|
||||
#define B0 0000000
|
||||
#define B50 0000001
|
||||
#define B75 0000002
|
||||
#define B110 0000003
|
||||
#define B134 0000004
|
||||
#define B150 0000005
|
||||
#define B200 0000006
|
||||
#define B300 0000007
|
||||
#define B600 0000010
|
||||
#define B1200 0000011
|
||||
#define B1800 0000012
|
||||
#define B2400 0000013
|
||||
#define B4800 0000014
|
||||
#define B9600 0000015
|
||||
#define B19200 0000016
|
||||
#define B38400 0000017
|
||||
#define EXTA B19200
|
||||
#define EXTB B38400
|
||||
#define CBAUDEX 0000000
|
||||
#define B57600 00020
|
||||
#define B115200 00021
|
||||
#define B230400 00022
|
||||
#define B460800 00023
|
||||
#define B500000 00024
|
||||
#define B576000 00025
|
||||
#define B921600 00026
|
||||
|
||||
#define B57600 0010001
|
||||
#define B115200 0010002
|
||||
#define B230400 0010003
|
||||
#define B460800 0010004
|
||||
#define B500000 0010005
|
||||
#define B576000 0010006
|
||||
#define B921600 0010007
|
||||
#define B1000000 0010010
|
||||
#define B1152000 0010011
|
||||
#define B1500000 0010012
|
||||
#define B2000000 0010013
|
||||
#define B2500000 0010014
|
||||
#define B3000000 0010015
|
||||
#define B3500000 0010016
|
||||
#define B4000000 0010017
|
||||
#define B1000000 00027
|
||||
#define B1152000 00030
|
||||
#define B1500000 00031
|
||||
#define B2000000 00032
|
||||
#define B2500000 00033
|
||||
#define B3000000 00034
|
||||
#define B3500000 00035
|
||||
#define B4000000 00036
|
||||
#define BOTHER 00037
|
||||
|
||||
#define CBAUD 0010017
|
||||
#define CIBAUD 077600000
|
||||
#define IBSHIFT 16
|
||||
|
||||
#define CSIZE 0000060
|
||||
#define CS5 0000000
|
||||
#define CS6 0000020
|
||||
#define CS7 0000040
|
||||
#define CS8 0000060
|
||||
#define CSTOPB 0000100
|
||||
#define CREAD 0000200
|
||||
#define PARENB 0000400
|
||||
#define PARODD 0001000
|
||||
#define HUPCL 0002000
|
||||
#define CLOCAL 0004000
|
||||
#define CSIZE 00001400
|
||||
#define CS5 00000000
|
||||
#define CS6 00000400
|
||||
#define CS7 00001000
|
||||
#define CS8 00001400
|
||||
|
||||
#define CRTSCTS 020000000000
|
||||
#define CSTOPB 00002000
|
||||
#define CREAD 00004000
|
||||
#define PARENB 00010000
|
||||
#define PARODD 00020000
|
||||
#define HUPCL 00040000
|
||||
|
||||
#define ISIG 0000001
|
||||
#define ICANON 0000002
|
||||
#define ECHO 0000010
|
||||
#define ECHOE 0000020
|
||||
#define ECHOK 0000040
|
||||
#define ECHONL 0000100
|
||||
#define NOFLSH 0000200
|
||||
#define TOSTOP 0000400
|
||||
#define IEXTEN 0100000
|
||||
#define CLOCAL 00100000
|
||||
#define CMSPAR 010000000000
|
||||
#define CRTSCTS 020000000000
|
||||
|
||||
/* Extensions? */
|
||||
#define CBAUDEX 0010000
|
||||
#define ECHOCTL 0001000
|
||||
#define ECHOPRT 0002000
|
||||
#define ECHOKE 0004000
|
||||
#define FLUSHO 0010000
|
||||
#define PENDIN 0040000
|
||||
#define ISIG 0x00000080
|
||||
#define ICANON 0x00000100
|
||||
#define XCASE 0x00004000
|
||||
#define ECHO 0x00000008
|
||||
#define ECHOE 0x00000002
|
||||
#define ECHOK 0x00000004
|
||||
#define ECHONL 0x00000010
|
||||
#define NOFLSH 0x80000000
|
||||
#define TOSTOP 0x00400000
|
||||
#define ECHOCTL 0x00000040
|
||||
#define ECHOPRT 0x00000020
|
||||
#define ECHOKE 0x00000001
|
||||
#define FLUSHO 0x00800000
|
||||
#define PENDIN 0x20000000
|
||||
#define IEXTEN 0x00000400
|
||||
#define EXTPROC 0x10000000
|
||||
|
||||
#define TCOOFF 0
|
||||
#define TCOON 1
|
||||
#define TCIOFF 2
|
||||
#define TCION 3
|
||||
#define TCOOFF 0
|
||||
#define TCOON 1
|
||||
#define TCIOFF 2
|
||||
#define TCION 3
|
||||
|
||||
#define TCIFLUSH 0
|
||||
#define TCOFLUSH 1
|
||||
#define TCIOFLUSH 2
|
||||
#define TCIFLUSH 0
|
||||
#define TCOFLUSH 1
|
||||
#define TCIOFLUSH 2
|
||||
|
||||
#define TCSANOW 0
|
||||
#define TCSADRAIN 1
|
||||
#define TCSAFLUSH 2
|
||||
#define TCSANOW 0
|
||||
#define TCSADRAIN 1
|
||||
#define TCSAFLUSH 2
|
||||
|
|
Loading…
Reference in New Issue