include/ttyutils: define values if missing.
Upstreamed from pkgsrc. Addresses: https://github.com/karelzak/util-linux/pull/695 Signed-off-by: Karel Zak <kzak@redhat.com>
This commit is contained in:
parent
7d5976f89a
commit
671295131e
|
@ -33,6 +33,34 @@
|
||||||
#define DEF_EOL 0
|
#define DEF_EOL 0
|
||||||
#define DEF_SWITCH 0 /* default switch char */
|
#define DEF_SWITCH 0 /* default switch char */
|
||||||
|
|
||||||
|
/* Fallback for termios->c_cc[] */
|
||||||
|
#ifndef CREPRINT
|
||||||
|
# define CREPRINT ('r' & 037)
|
||||||
|
#endif
|
||||||
|
#ifndef CDISCARD
|
||||||
|
# define CDISCARD ('o' & 037)
|
||||||
|
#endif
|
||||||
|
|
||||||
|
/* Default termios->iflag */
|
||||||
|
#ifndef TTYDEF_IFLAG
|
||||||
|
# define TTYDEF_IFLAG (BRKINT | ICRNL | IMAXBEL | IXON | IXANY)
|
||||||
|
#endif
|
||||||
|
|
||||||
|
/* Default termios->oflag */
|
||||||
|
#ifndef TTYDEF_OFLAG
|
||||||
|
# define TTYDEF_OFLAG (OPOST | ONLCR /*| OXTABS*/)
|
||||||
|
#endif
|
||||||
|
|
||||||
|
/* Default termios->lflag */
|
||||||
|
#ifndef TTYDEF_LFLAG
|
||||||
|
# define TTYDEF_LFLAG (ECHO | ICANON | ISIG | IEXTEN | ECHOE|ECHOKE|ECHOCTL)
|
||||||
|
#endif
|
||||||
|
|
||||||
|
/* Default termios->cflag */
|
||||||
|
#ifndef TTYDEF_CFLAG
|
||||||
|
# define TTYDEF_CFLAG (CREAD | CS8 | HUPCL)
|
||||||
|
#endif
|
||||||
|
|
||||||
/* Storage for things detected while the login name was read. */
|
/* Storage for things detected while the login name was read. */
|
||||||
struct chardata {
|
struct chardata {
|
||||||
int erase; /* erase character */
|
int erase; /* erase character */
|
||||||
|
@ -114,6 +142,12 @@ static inline void reset_virtual_console(struct termios *tp, int flags)
|
||||||
#endif
|
#endif
|
||||||
#ifndef FFDLY
|
#ifndef FFDLY
|
||||||
# define FFDLY 0
|
# define FFDLY 0
|
||||||
|
#endif
|
||||||
|
#ifndef TAB0
|
||||||
|
# define TAB0 0
|
||||||
|
#endif
|
||||||
|
#ifndef TABDLY
|
||||||
|
# define TABDLY 0
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
tp->c_iflag |= (BRKINT | ICRNL | IMAXBEL);
|
tp->c_iflag |= (BRKINT | ICRNL | IMAXBEL);
|
||||||
|
|
Loading…
Reference in New Issue