fix col-EILSEQ.patch

This commit is contained in:
kzak 2006-02-21 21:28:13 +00:00
parent 066e7b4604
commit bfef844451
2 changed files with 11 additions and 7 deletions

View File

@ -1,5 +1,5 @@
--- util-linux-2.12p/text-utils/col.c.EILSEQ 2002-03-09 00:05:12.000000000 +0100
+++ util-linux-2.12p/text-utils/col.c 2006-01-02 18:00:06.000000000 +0100
--- util-linux-2.13-pre6/text-utils/col.c.kzak 2002-03-09 00:05:12.000000000 +0100
+++ util-linux-2.13-pre6/text-utils/col.c 2006-02-21 22:25:48.000000000 +0100
@@ -128,6 +128,7 @@
int this_line; /* line l points to */
int nflushd_lines; /* number of lines that were flushed */
@ -8,7 +8,7 @@
setlocale(LC_ALL, "");
bindtextdomain(PACKAGE, LOCALEDIR);
@@ -175,8 +176,15 @@
@@ -175,8 +176,16 @@
cur_line = max_line = nflushd_lines = this_line = 0;
cur_set = last_set = CS_NORMAL;
lines = l = alloc_line();
@ -18,15 +18,16 @@
+ while (feof(stdin)==0) {
+ errno = 0;
+ if ((ch = getwchar()) == WEOF) {
+ if (errno==EILSEQ)
+ if (errno==EILSEQ) {
+ perror("col");
+ ret = 1;
+ }
+ break;
+ }
if (!iswgraph(ch)) {
switch (ch) {
case BS: /* can't go back further */
@@ -332,7 +340,7 @@
@@ -332,7 +341,7 @@
flush_blanks();
if (ferror(stdout) || fclose(stdout))
return 1;

View File

@ -25,7 +25,7 @@ BuildRoot: %{_tmppath}/%{name}-root
Summary: A collection of basic system utilities.
Name: util-linux
Version: 2.13
Release: 0.15.1
Release: 0.16
License: distributable
Group: System Environment/Base
@ -627,6 +627,9 @@ fi
/sbin/losetup
%changelog
* Tue Feb 21 2006 Karel Zak <kzak@redhat.com> 2.13-0.16
- fix #180730 - col is exiting with 1 (fix util-linux-2.12p-col-EILSEQ.patch)
* Fri Feb 10 2006 Jesse Keating <jkeating@redhat.com> - 2.13-0.15.1
- bump again for double-long bug on ppc(64)