- options.c_cflag &= ~(IXON|IXOFF);
- if (cfg->serflow == SER_FLOW_XONXOFF) {
- options.c_cflag |= IXON | IXOFF;
+ options.c_iflag &= ~(IXON|IXOFF);
+#ifdef CRTSCTS
+ options.c_cflag &= ~CRTSCTS;
+#endif
+#ifdef CNEW_RTSCTS
+ options.c_cflag &= ~CNEW_RTSCTS;
+#endif
+ flow = conf_get_int(conf, CONF_serflow);
+ if (flow == SER_FLOW_XONXOFF) {
+ options.c_iflag |= IXON | IXOFF;