abis: Give termios.h the abi-bits treatment.
options/posix: Give termios.h the abi-bits treatment. Signed-off-by: Dennisbonke <admin@dennisbonke.com>
This commit is contained in:
parent
af4e0504fd
commit
08a588b448
35
abis/linux/x86_64/termios.h
Normal file
35
abis/linux/x86_64/termios.h
Normal file
|
@ -0,0 +1,35 @@
|
|||
#ifndef _ABIBITS_TERMIOS_H
|
||||
#define _ABIBITS_TERMIOS_H
|
||||
|
||||
// indices for the c_cc array in struct termios
|
||||
#define NCCS 32
|
||||
#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
|
||||
|
||||
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];
|
||||
speed_t ibaud;
|
||||
speed_t obaud;
|
||||
};
|
||||
|
||||
#endif
|
30
abis/mlibc/termios.h
Normal file
30
abis/mlibc/termios.h
Normal file
|
@ -0,0 +1,30 @@
|
|||
#ifndef _ABIBITS_TERMIOS_H
|
||||
#define _ABIBITS_TERMIOS_H
|
||||
|
||||
// indices for the c_cc array in struct termios
|
||||
#define NCCS 11
|
||||
#define VEOF 0
|
||||
#define VEOL 1
|
||||
#define VERASE 2
|
||||
#define VINTR 3
|
||||
#define VKILL 4
|
||||
#define VMIN 5
|
||||
#define VQUIT 6
|
||||
#define VSTART 7
|
||||
#define VSTOP 8
|
||||
#define VSUSP 9
|
||||
#define VTIME 10
|
||||
#define VLNEXT 15
|
||||
#define VEOL2 16
|
||||
|
||||
struct termios {
|
||||
tcflag_t c_iflag;
|
||||
tcflag_t c_oflag;
|
||||
tcflag_t c_cflag;
|
||||
tcflag_t c_lflag;
|
||||
cc_t c_cc[NCCS];
|
||||
speed_t ibaud;
|
||||
speed_t obaud;
|
||||
};
|
||||
|
||||
#endif
|
|
@ -3,6 +3,7 @@
|
|||
#define _TERMIOS_H
|
||||
|
||||
#include <bits/posix/pid_t.h>
|
||||
#include <abi-bits/termios.h>
|
||||
|
||||
#ifdef __cplusplus
|
||||
extern "C" {
|
||||
|
@ -12,22 +13,6 @@ typedef unsigned int cc_t;
|
|||
typedef unsigned int speed_t;
|
||||
typedef unsigned int tcflag_t;
|
||||
|
||||
// indices for the c_cc array in struct termios
|
||||
#define NCCS 11
|
||||
#define VEOF 0
|
||||
#define VEOL 1
|
||||
#define VERASE 2
|
||||
#define VINTR 3
|
||||
#define VKILL 4
|
||||
#define VMIN 5
|
||||
#define VQUIT 6
|
||||
#define VSTART 7
|
||||
#define VSTOP 8
|
||||
#define VSUSP 9
|
||||
#define VTIME 10
|
||||
#define VLNEXT 15
|
||||
#define VEOL2 16
|
||||
|
||||
// bitwise flags for c_iflag in struct termios
|
||||
#define BRKINT 0x0001
|
||||
#define ICRNL 0x0002
|
||||
|
@ -138,16 +123,6 @@ typedef unsigned int tcflag_t;
|
|||
#define TCOOFF 3
|
||||
#define TCOON 4
|
||||
|
||||
struct termios {
|
||||
tcflag_t c_iflag;
|
||||
tcflag_t c_oflag;
|
||||
tcflag_t c_cflag;
|
||||
tcflag_t c_lflag;
|
||||
cc_t c_cc[NCCS];
|
||||
speed_t ibaud;
|
||||
speed_t obaud;
|
||||
};
|
||||
|
||||
speed_t cfgetispeed(const struct termios *);
|
||||
speed_t cfgetospeed(const struct termios *);
|
||||
int cfsetispeed(struct termios *, speed_t);
|
||||
|
|
1
sysdeps/lemon/include/abi-bits/termios.h
Symbolic link
1
sysdeps/lemon/include/abi-bits/termios.h
Symbolic link
|
@ -0,0 +1 @@
|
|||
../../../../abis/mlibc/termios.h
|
1
sysdeps/linux/include/abi-bits/termios.h
Symbolic link
1
sysdeps/linux/include/abi-bits/termios.h
Symbolic link
|
@ -0,0 +1 @@
|
|||
../../../../abis/linux/x86_64/termios.h
|
1
sysdeps/managarm/include/abi-bits/termios.h
Symbolic link
1
sysdeps/managarm/include/abi-bits/termios.h
Symbolic link
|
@ -0,0 +1 @@
|
|||
../../../../abis/linux/x86_64/termios.h
|
1
sysdeps/qword/include/abi-bits/termios.h
Symbolic link
1
sysdeps/qword/include/abi-bits/termios.h
Symbolic link
|
@ -0,0 +1 @@
|
|||
../../../../abis/mlibc/termios.h
|
1
sysdeps/sigma/include/abi-bits/termios.h
Symbolic link
1
sysdeps/sigma/include/abi-bits/termios.h
Symbolic link
|
@ -0,0 +1 @@
|
|||
../../../../abis/mlibc/termios.h
|
Loading…
Reference in a new issue