diff --git a/coreutils-i18n.patch b/coreutils-i18n.patch index 8a7cc1b..a661ea7 100644 --- a/coreutils-i18n.patch +++ b/coreutils-i18n.patch @@ -1933,7 +1933,7 @@ if (newlim) lim = newlim; } -@@ -1384,6 +1570,107 @@ +@@ -1384,6 +1570,113 @@ return ptr; } @@ -1946,6 +1946,9 @@ + int i; + size_t mblength; + mbstate_t state; ++ if (echar == 0) ++ eword++; /* skip all of end field. */ ++ + + memset (&state, '\0', sizeof(mbstate_t)); + @@ -2015,24 +2018,27 @@ + } +# endif + -+ /* If we're skipping leading blanks, don't start counting characters -+ * until after skipping past any leading blanks. */ -+ if (key->skipsblanks) -+ while (ptr < lim && ismbblank (ptr, lim - ptr, &mblength)) -+ ptr += mblength; ++ if (echar != 0) ++ { ++ /* If we're skipping leading blanks, don't start counting characters ++ * until after skipping past any leading blanks. */ ++ if (key->skipsblanks) ++ while (ptr < lim && ismbblank (ptr, lim - ptr, &mblength)) ++ ptr += mblength; + -+ memset (&state, '\0', sizeof(mbstate_t)); ++ memset (&state, '\0', sizeof(mbstate_t)); + -+ /* Advance PTR by ECHAR (if possible), but no further than LIM. */ -+ for (i = 0; i < echar; i++) -+ { -+ GET_BYTELEN_OF_CHAR (lim, ptr, mblength, state); ++ /* Advance PTR by ECHAR (if possible), but no further than LIM. */ ++ for (i = 0; i < echar; i++) ++ { ++ GET_BYTELEN_OF_CHAR (lim, ptr, mblength, state); + -+ if (ptr + mblength > lim) -+ break; -+ else -+ ptr += mblength; -+ } ++ if (ptr + mblength > lim) ++ break; ++ else ++ ptr += mblength; ++ } ++ } + + return ptr; +} diff --git a/coreutils.spec b/coreutils.spec index d332fde..cc260b5 100644 --- a/coreutils.spec +++ b/coreutils.spec @@ -1,7 +1,7 @@ Summary: The GNU core utilities: a set of tools commonly used in shell scripts Name: coreutils Version: 6.10 -Release: 34%{?dist} +Release: 35%{?dist} License: GPLv3+ Group: System Environment/Base Url: http://www.gnu.org/software/coreutils/ @@ -344,6 +344,10 @@ fi /sbin/runuser %changelog +* Mon Mar 02 2009 Ondrej Vasik 6.10-35 +- fix sort bugs (including #485715) for multibyte locales + as well + * Fri Feb 27 2009 Ondrej Vasik - 6.10-34 - fix showing ACL's for ls -Z (#487374), fix automatic column width for it as well