* Correct fix for Debian bug #547073: use IUTF8 flag if defined
authorDr. Werner Fink <werner@suse.de>
Tue, 27 Apr 2010 12:32:52 +0000 (12:32 +0000)
committerDr. Werner Fink <werner@suse.de>
Tue, 27 Apr 2010 12:32:52 +0000 (12:32 +0000)
  and if already set to make sure the utf-8 flag is not cleared
  from the tty. Patch from Samuel Thibault.

git-svn-id: svn://svn.sv.gnu.org/sysvinit/sysvinit/trunk@69 456724a4-4300-0410-8514-c89748c515a2

doc/Changelog
src/init.c
src/sulogin.c

index 350258c31371d7112b2be3e038ba0974c4462021..da5d5fa2b986f7cce457eeaaf21622264ec181fe 100644 (file)
@@ -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 ]
index 27532aded6225f53c5bd71380413274413ac44f2..d7c509abf8e81f5ac81064aaa37e62b889010926 100644 (file)
@@ -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;
 
index 753765474c14e44de3474c331a2bdde439ab2066..cf69f2acfec82f306bd4ad9ca88fe18edeabbf52 100644 (file)
@@ -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 |\