summaryrefslogtreecommitdiffstats
path: root/winsup/cygwin/termios.cc
diff options
context:
space:
mode:
Diffstat (limited to 'winsup/cygwin/termios.cc')
-rw-r--r--winsup/cygwin/termios.cc11
1 files changed, 11 insertions, 0 deletions
diff --git a/winsup/cygwin/termios.cc b/winsup/cygwin/termios.cc
index fe6a1de3c..4476be17d 100644
--- a/winsup/cygwin/termios.cc
+++ b/winsup/cygwin/termios.cc
@@ -311,3 +311,14 @@ cfsetispeed (struct termios *in_tp, speed_t speed)
__toapp_termios (in_tp, tp);
return res;
}
+
+extern "C" void
+cfmakeraw(struct termios *tp)
+{
+ tp->c_iflag &= ~(IGNBRK | BRKINT | PARMRK | ISTRIP
+ | INLCR | IGNCR | ICRNL | IXON);
+ tp->c_oflag &= ~OPOST;
+ tp->c_lflag &= ~(ECHO | ECHONL | ICANON | ISIG | IEXTEN);
+ tp->c_cflag &= ~(CSIZE | PARENB);
+ tp->c_cflag |= CS8;
+}