From 9a41f8d3877bc717e3eec330637122c390dc4240 Mon Sep 17 00:00:00 2001 From: simon Date: Tue, 3 Oct 2006 17:16:26 +0000 Subject: [PATCH] Disable a bunch of undesirable termios flags. ICRNL, in particular, is liable to have been set on serial ports previously used as terminal devices, and definitely wants not to be set on serial ports being used for callout. git-svn-id: svn://svn.tartarus.org/sgt/putty@6865 cda61777-01e9-0310-a592-d414129be87e --- unix/uxser.c | 11 ++++++++++- 1 file changed, 10 insertions(+), 1 deletion(-) diff --git a/unix/uxser.c b/unix/uxser.c index 463f4c43..d6471084 100644 --- a/unix/uxser.c +++ b/unix/uxser.c @@ -205,7 +205,16 @@ static const char *serial_configure(Serial serial, Config *cfg) options.c_cflag |= CLOCAL | CREAD; options.c_lflag &= ~(ICANON | ECHO | ECHOE | ISIG); - options.c_oflag &= ~OPOST; + options.c_iflag &= ~(ISTRIP | IGNCR | INLCR | ICRNL +#ifdef IUCLC + | IUCLC +#endif + ); + options.c_oflag &= ~(OPOST +#ifdef ONLCR + | ONLCR +#endif + | OCRNL | ONOCR | ONLRET); options.c_cc[VMIN] = 1; options.c_cc[VTIME] = 0; -- 2.11.0