fix sort -h for multibyte locales (reported via
http://bugs.archlinux.org/task/16022)
This commit is contained in:
parent
2c2fd97500
commit
61fe33cb1c
@ -2204,7 +2204,7 @@ diff -urNp coreutils-6.11-orig/src/join.c coreutils-6.11/src/join.c
|
||||
{
|
||||
struct keyfield *key = keylist;
|
||||
|
||||
@@ -1875,6 +2265,181 @@
|
||||
@@ -1875,6 +2265,179 @@
|
||||
return key->reverse ? -diff : diff;
|
||||
}
|
||||
|
||||
@ -2232,7 +2232,7 @@ diff -urNp coreutils-6.11-orig/src/join.c coreutils-6.11/src/join.c
|
||||
+
|
||||
+ for (;;)
|
||||
+ {
|
||||
+ unsigned char *translate = (unsigned char *) key->translate;
|
||||
+ char const *translate = key->translate;
|
||||
+ bool const *ignore = key->ignore;
|
||||
+
|
||||
+ /* Find the lengths. */
|
||||
@ -2242,16 +2242,14 @@ diff -urNp coreutils-6.11-orig/src/join.c coreutils-6.11/src/join.c
|
||||
+ /* Actually compare the fields. */
|
||||
+ if (key->random)
|
||||
+ diff = compare_random (texta, lena, textb, lenb);
|
||||
+ else if (key->numeric | key->general_numeric)
|
||||
+ else if (key->numeric | key->general_numeric | key->human_numeric)
|
||||
+ {
|
||||
+ char savea = *lima, saveb = *limb;
|
||||
+
|
||||
+ *lima = *limb = '\0';
|
||||
+ if (force_general_numcompare)
|
||||
+ diff = general_numcompare (texta, textb);
|
||||
+ else
|
||||
+ diff = ((key->numeric ? numcompare : general_numcompare)
|
||||
+ (texta, textb));
|
||||
+ diff = (key->numeric ? numcompare (texta, textb)
|
||||
+ : key->general_numeric ? general_numcompare (texta, textb)
|
||||
+ : human_numcompare (texta, textb, key));
|
||||
+ *lima = savea, *limb = saveb;
|
||||
+ }
|
||||
+ else if (key->version)
|
||||
|
@ -1,7 +1,7 @@
|
||||
Summary: A set of basic GNU tools commonly used in shell scripts
|
||||
Name: coreutils
|
||||
Version: 7.5
|
||||
Release: 4%{?dist}
|
||||
Release: 5%{?dist}
|
||||
License: GPLv3+
|
||||
Group: System Environment/Base
|
||||
Url: http://www.gnu.org/software/coreutils/
|
||||
@ -333,6 +333,10 @@ fi
|
||||
%{_libdir}/coreutils
|
||||
|
||||
%changelog
|
||||
* Tue Sep 08 2009 Ondrej Vasik <ovasik@redhat.com> - 7.5-5
|
||||
- fix sort -h for multibyte locales (reported via
|
||||
http://bugs.archlinux.org/task/16022)
|
||||
|
||||
* Thu Sep 03 2009 Ondrej Vasik <ovasik@redhat.com> - 7.5-4
|
||||
- fixed regression where df -l <device> as regular user
|
||||
cause "Permission denied" (#520630, introduced by fix for
|
||||
|
Loading…
Reference in New Issue
Block a user