diff --git a/unix/unix.h b/unix/unix.h index adaebea6..3831f9b6 100644 --- a/unix/unix.h +++ b/unix/unix.h @@ -101,18 +101,6 @@ unsigned long getticks(void); #define WCHAR wchar_t #define BYTE unsigned char -/* - * Unix-specific global flag - * - * FLAG_STDERR_TTY indicates that standard error might be a terminal and - * might get its configuration munged, so anything trying to output plain - * text (i.e. with newlines in it) will need to put it back into cooked - * mode first. Applications setting this flag should also call - * stderr_tty_init() before messing with any terminal modes, and can call - * premsg() before outputting text to stderr and postmsg() afterwards. - */ -#define FLAG_STDERR_TTY 0x1000 - #define PLATFORM_CLIPBOARDS(X) \ X(CLIP_PRIMARY, "X11 primary selection") \ X(CLIP_CLIPBOARD, "XDG clipboard") \ @@ -305,7 +293,7 @@ extern char *pty_osx_envrestore_prefix; /* Things provided by uxcons.c */ struct termios; -void stderr_tty_init(void); +void stderr_tty_init(void); /* call at startup if stderr might be a tty */ void premsg(struct termios *); void postmsg(struct termios *); diff --git a/unix/uxcons.c b/unix/uxcons.c index e3a57493..27bd5050 100644 --- a/unix/uxcons.c +++ b/unix/uxcons.c @@ -26,7 +26,7 @@ static bool stderr_is_a_tty; void stderr_tty_init() { /* Ensure that if stderr is a tty, we can get it back to a sane state. */ - if ((flags & FLAG_STDERR_TTY) && isatty(STDERR_FILENO)) { + if (isatty(STDERR_FILENO)) { stderr_is_a_tty = true; tcgetattr(STDERR_FILENO, &orig_termios_stderr); } diff --git a/unix/uxplink.c b/unix/uxplink.c index c42037cc..41875e43 100644 --- a/unix/uxplink.c +++ b/unix/uxplink.c @@ -603,7 +603,7 @@ int main(int argc, char **argv) stderr_bs = BinarySink_UPCAST(&stderr_bcs); outgoingeof = EOF_NO; - flags = FLAG_STDERR_TTY; + flags = 0; cmdline_tooltype |= (TOOLTYPE_HOST_ARG | TOOLTYPE_HOST_ARG_CAN_BE_SESSION |