mirror of
https://github.com/PowerShell/openssh-portable.git
synced 2025-07-31 01:35:11 +02:00
If we don't have TCSASOFT, define it to zero.
This makes it a no-op when we use it below, which allows us to re-sync those lines with the upstream and make future updates easier.
This commit is contained in:
parent
aae4dbd4c0
commit
7508d83eff
@ -35,10 +35,9 @@
|
|||||||
#include <string.h>
|
#include <string.h>
|
||||||
#include <unistd.h>
|
#include <unistd.h>
|
||||||
|
|
||||||
#ifdef TCSASOFT
|
#ifndef TCSASOFT
|
||||||
# define _T_FLUSH (TCSAFLUSH|TCSASOFT)
|
/* If we don't have TCSASOFT define it so that ORing it it below is a no-op. */
|
||||||
#else
|
# define TCSASOFT 0
|
||||||
# define _T_FLUSH (TCSAFLUSH)
|
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
/* SunOS 4.x which lacks _POSIX_VDISABLE, but has VDISABLE */
|
/* SunOS 4.x which lacks _POSIX_VDISABLE, but has VDISABLE */
|
||||||
@ -121,7 +120,7 @@ restart:
|
|||||||
if (term.c_cc[VSTATUS] != _POSIX_VDISABLE)
|
if (term.c_cc[VSTATUS] != _POSIX_VDISABLE)
|
||||||
term.c_cc[VSTATUS] = _POSIX_VDISABLE;
|
term.c_cc[VSTATUS] = _POSIX_VDISABLE;
|
||||||
#endif
|
#endif
|
||||||
(void)tcsetattr(input, _T_FLUSH, &term);
|
(void)tcsetattr(input, TCSAFLUSH|TCSASOFT, &term);
|
||||||
} else {
|
} else {
|
||||||
memset(&term, 0, sizeof(term));
|
memset(&term, 0, sizeof(term));
|
||||||
term.c_lflag |= ECHO;
|
term.c_lflag |= ECHO;
|
||||||
@ -156,7 +155,7 @@ restart:
|
|||||||
|
|
||||||
/* Restore old terminal settings and signals. */
|
/* Restore old terminal settings and signals. */
|
||||||
if (memcmp(&term, &oterm, sizeof(term)) != 0) {
|
if (memcmp(&term, &oterm, sizeof(term)) != 0) {
|
||||||
while (tcsetattr(input, _T_FLUSH, &oterm) == -1 &&
|
while (tcsetattr(input, TCSAFLUSH|TCSASOFT, &oterm) == -1 &&
|
||||||
errno == EINTR)
|
errno == EINTR)
|
||||||
continue;
|
continue;
|
||||||
}
|
}
|
||||||
|
Loading…
x
Reference in New Issue
Block a user