mirror of https://github.com/wolfSSL/wolfssh.git
fix for building with QNX
parent
903bc98c34
commit
ab45a98d18
|
@ -162,12 +162,26 @@ static void modes_clear(void)
|
|||
{
|
||||
WOLFSSH_TERMIOS term = oldTerm;
|
||||
|
||||
term.c_lflag &= ~(ICANON | ISIG | IEXTEN | ECHO | ECHOE | ECHOK
|
||||
| ECHONL | ECHOPRT | NOFLSH | TOSTOP | FLUSHO
|
||||
| PENDIN | EXTPROC);
|
||||
term.c_lflag &= ~(ICANON | ISIG | IEXTEN | ECHO | ECHOE
|
||||
| ECHOK | ECHONL | NOFLSH | TOSTOP);
|
||||
|
||||
term.c_iflag &= ~(ISTRIP | INLCR | ICRNL | IGNCR | IXON | IXOFF
|
||||
| IXANY | IGNBRK | INPCK | PARMRK);
|
||||
/* check macros set for some BSD dependent and missing on
|
||||
* QNX flags */
|
||||
#ifdef ECHOPRT
|
||||
term.c_lflag &= ~(ECHOPRT);
|
||||
#endif
|
||||
#ifdef FLUSHO
|
||||
term.c_lflag &= ~(FLUSHO);
|
||||
#endif
|
||||
#ifdef PENDIN
|
||||
term.c_lflag &= ~(PENDIN);
|
||||
#endif
|
||||
#ifdef EXTPROC
|
||||
term.c_lflag &= ~(EXTPROC);
|
||||
#endif
|
||||
|
||||
term.c_iflag &= ~(ISTRIP | INLCR | ICRNL | IGNCR | IXON
|
||||
| IXOFF | IXANY | IGNBRK | INPCK | PARMRK);
|
||||
#ifdef IUCLC
|
||||
term.c_iflag &= ~IUCLC;
|
||||
#endif
|
||||
|
@ -178,8 +192,10 @@ static void modes_clear(void)
|
|||
term.c_oflag &= ~OLCUC;
|
||||
#endif
|
||||
|
||||
term.c_cflag &= ~(CSTOPB | PARENB | PARODD | CLOCAL | CRTSCTS);
|
||||
|
||||
term.c_cflag &= ~(CSTOPB | PARENB | PARODD | CLOCAL);
|
||||
#ifdef CRTSCTS
|
||||
term.c_cflag &= ~(CRTSCTS);
|
||||
#endif
|
||||
tcsetattr(STDIN_FILENO, TCSANOW, &term);
|
||||
}
|
||||
|
||||
|
|
|
@ -556,8 +556,22 @@ int ClientSetEcho(int type)
|
|||
newTerm.c_lflag &= ~ECHO;
|
||||
if (type == 2) {
|
||||
newTerm.c_lflag &= ~(ICANON | ISIG | IEXTEN | ECHO | ECHOE
|
||||
| ECHOK | ECHONL | ECHOPRT | NOFLSH | TOSTOP | FLUSHO
|
||||
| PENDIN | EXTPROC);
|
||||
| ECHOK | ECHONL | NOFLSH | TOSTOP);
|
||||
|
||||
/* check macros set for some BSD dependent and not missing on
|
||||
* QNX flags */
|
||||
#ifdef ECHOPRT
|
||||
newTerm.c_lflag &= ~(ECHOPRT);
|
||||
#endif
|
||||
#ifdef FLUSHO
|
||||
newTerm.c_lflag &= ~(FLUSHO);
|
||||
#endif
|
||||
#ifdef PENDIN
|
||||
newTerm.c_lflag &= ~(PENDIN);
|
||||
#endif
|
||||
#ifdef EXTPROC
|
||||
newTerm.c_lflag &= ~(EXTPROC);
|
||||
#endif
|
||||
|
||||
newTerm.c_iflag &= ~(ISTRIP | INLCR | ICRNL | IGNCR | IXON
|
||||
| IXOFF | IXANY | IGNBRK | INPCK | PARMRK);
|
||||
|
@ -571,8 +585,10 @@ int ClientSetEcho(int type)
|
|||
newTerm.c_oflag &= ~OLCUC;
|
||||
#endif
|
||||
|
||||
newTerm.c_cflag &= ~(CSTOPB | PARENB | PARODD | CLOCAL
|
||||
| CRTSCTS);
|
||||
newTerm.c_cflag &= ~(CSTOPB | PARENB | PARODD | CLOCAL);
|
||||
#ifdef CRTSCTS
|
||||
newTerm.c_cflag &= ~(CRTSCTS);
|
||||
#endif
|
||||
}
|
||||
else {
|
||||
newTerm.c_lflag |= (ICANON | ECHONL);
|
||||
|
|
Loading…
Reference in New Issue