diff options
author | Igor Pashev <pashev.igor@gmail.com> | 2012-01-21 03:08:39 +0300 |
---|---|---|
committer | Igor Pashev <pashev.igor@gmail.com> | 2012-01-21 03:08:39 +0300 |
commit | ad6820fb04d5ed9ade265a7c5813e26c4fb762d5 (patch) | |
tree | 1866373eed9fe6de5d547331f68b20398c6eefa5 /misc-utils | |
parent | d2270b07f30fe0ffe22e11d40fb0de2a2bd32e97 (diff) | |
download | util-linux-old-ad6820fb04d5ed9ade265a7c5813e26c4fb762d5.tar.gz |
Use static cfmakeraw() if not system
Diffstat (limited to 'misc-utils')
-rw-r--r-- | misc-utils/script.c | 12 |
1 files changed, 12 insertions, 0 deletions
diff --git a/misc-utils/script.c b/misc-utils/script.c index 9367fafb..2c734c97 100644 --- a/misc-utils/script.c +++ b/misc-utils/script.c @@ -67,6 +67,18 @@ #include <utempter.h> #endif +#ifndef HAVE_CFMAKERAW +static void cfmakeraw(struct termios *t) { + if (t != NULL) { + t->c_iflag &= ~(IMAXBEL|IGNBRK|BRKINT|PARMRK|ISTRIP|INLCR|IGNCR|ICRNL|IXON); + t->c_oflag &= ~OPOST; + t->c_lflag &= ~(ECHO|ECHONL|ICANON|ISIG|IEXTEN); + t->c_cflag &= ~(CSIZE|PARENB); + t->c_cflag |= CS8; + } +} +#endif + void finish(int); void done(void); void fail(void); |