From d886c94c9f7b4b4f2f5ae25043a39f18c4aecac4 Mon Sep 17 00:00:00 2001 From: Werner Fink Date: Tue, 27 Apr 2010 12:32:52 +0000 Subject: [PATCH] * Correct fix for Debian bug #547073: use IUTF8 flag if defined and if already set to make sure the utf-8 flag is not cleared from the tty. Patch from Samuel Thibault. --- doc/Changelog | 5 +++++ src/init.c | 7 ++++--- src/sulogin.c | 3 --- 3 files changed, 9 insertions(+), 6 deletions(-) diff --git a/doc/Changelog b/doc/Changelog index 350258c..da5d5fa 100644 --- a/doc/Changelog +++ b/doc/Changelog @@ -1,3 +1,8 @@ + [ Werner Fink ] + * Correct fix for Debian bug #547073: use IUTF8 flag if defined + and if already set to make sure the utf-8 flag is not cleared + from the tty. Patch from Samuel Thibault. + sysvinit (2.88dsf) UNRELEASED; urgency=low [ Petter Reinholdtsen ] diff --git a/src/init.c b/src/init.c index 27532ad..d7c509a 100644 --- a/src/init.c +++ b/src/init.c @@ -784,10 +784,11 @@ void console_stty(void) /* * Set pre and post processing */ - tty.c_iflag = IGNPAR|ICRNL|IXON|IXANY; -#ifdef IUTF8 /* Not defined on FreeBSD */ - tty.c_iflag |= IUTF8; + tty.c_iflag = IGNPAR|ICRNL|IXON|IXANY +#ifdef IUTF8 /* Not defined on FreeBSD */ + | (tty.c_iflag & IUTF8) #endif /* IUTF8 */ + ; tty.c_oflag = OPOST|ONLCR; tty.c_lflag = ISIG|ICANON|ECHO|ECHOCTL|ECHOPRT|ECHOKE; diff --git a/src/sulogin.c b/src/sulogin.c index 7537654..cf69f2a 100644 --- a/src/sulogin.c +++ b/src/sulogin.c @@ -101,9 +101,6 @@ void fixtty(void) * the same result as `stty sane cr0 pass8' */ tty.c_iflag |= (BRKINT | ICRNL | IMAXBEL); -#ifdef IUTF8 /* Not defined on FreeBSD */ - tty.c_iflag |= IUTF8; -#endif /* IUTF8 */ tty.c_iflag &= ~(IGNBRK | INLCR | IGNCR | IXOFF | IUCLC | IXANY | ISTRIP); tty.c_oflag |= (OPOST | ONLCR | NL0 | CR0 | TAB0 | BS0 | VT0 | FF0); tty.c_oflag &= ~(OLCUC | OCRNL | ONOCR | ONLRET | OFILL | OFDEL |\