[arch-commits] Commit in coreutils/repos (6 files)
andyrtr at archlinux.org
andyrtr at archlinux.org
Sun Mar 8 00:13:33 UTC 2009
Date: Saturday, March 7, 2009 @ 19:13:33
Author: andyrtr
Revision: 29339
Merged revisions 27808,29338 via svnmerge from
svn+ssh://svn.archlinux.org/srv/svn-packages/coreutils/trunk
........
r27808 | andyrtr | 2009-02-26 04:45:46 +0000 (Do, 26 Feb 2009) | 1 line
run autoreconf after patching to avoid some warnings. fixes #13488
........
r29338 | andyrtr | 2009-03-08 00:12:57 +0000 (So, 08 M?\195?\164r 2009) | 2 lines
upgpkg: coreutils 7.1-2
updated the Fedora patches, added two fixes for sort and cp, disable smp build
........
Added:
coreutils/repos/testing-x86_64/coreutils-7.1-cp-recursiveinfloop.patch
(from rev 29338, coreutils/trunk/coreutils-7.1-cp-recursiveinfloop.patch)
coreutils/repos/testing-x86_64/coreutils-7.1-sort-endoffields.patch
(from rev 29338, coreutils/trunk/coreutils-7.1-sort-endoffields.patch)
Modified:
coreutils/repos/testing-x86_64/ (properties)
coreutils/repos/testing-x86_64/PKGBUILD
coreutils/repos/testing-x86_64/coreutils-6.10-configuration.patch
coreutils/repos/testing-x86_64/coreutils-i18n.patch
-----------------------------------------+
PKGBUILD | 28 +++--
coreutils-6.10-configuration.patch | 93 +++++++++++-------
coreutils-7.1-cp-recursiveinfloop.patch | 154 ++++++++++++++++++++++++++++++
coreutils-7.1-sort-endoffields.patch | 102 +++++++++++++++++++
coreutils-i18n.patch | 63 ++++++++----
5 files changed, 379 insertions(+), 61 deletions(-)
Property changes on: coreutils/repos/testing-x86_64
___________________________________________________________________
Modified: svnmerge-integrated
- /coreutils/trunk:1-27766
+ /coreutils/trunk:1-29338
Modified: testing-x86_64/PKGBUILD
===================================================================
--- testing-x86_64/PKGBUILD 2009-03-08 00:12:57 UTC (rev 29338)
+++ testing-x86_64/PKGBUILD 2009-03-08 00:13:33 UTC (rev 29339)
@@ -4,7 +4,7 @@
pkgname=coreutils
pkgver=7.1
-pkgrel=1.1
+pkgrel=2
pkgdesc="The basic file, shell and text manipulation utilities of the GNU operating system"
arch=(i686 x86_64)
license=('GPL3')
@@ -16,28 +16,27 @@
replaces=('sh-utils' 'fileutils' 'textutils' 'mktemp')
backup=('etc/pam.d/su')
install=${pkgname}.install
-options=('!emptydirs')
+options=('!emptydirs' '!makeflags')
source=(ftp://ftp.gnu.org/gnu/$pkgname/$pkgname-$pkgver.tar.gz
coreutils-i18n.patch
coreutils-uname.patch
coreutils-pam.patch
coreutils-6.10-configuration.patch
+ coreutils-7.1-sort-endoffields.patch
+ coreutils-7.1-cp-recursiveinfloop.patch
su)
md5sums=('cbb2b3d1718ee1237b808e00b5c11b1e'
- 'aa3b805025b4f0ce682db2fa2fae8ead'
+ 'e6270eca92e2f6d1b258e9930c6316c8'
'18d3ba178e2691242287b59bd81aedb9'
'51a063ea50e4a8a1be7fcf170c7e27e3'
- '92fefe96cfb43eb19e25fbbcd3b2d023'
+ 'f79b54afdecd38bcd9421db3d1f5c913'
+ 'ac21779cfc0f02e656614975633809b4'
+ '719d6e07176292628589188f84ffb5f1'
'fa85e5cce5d723275b14365ba71a8aad')
build() {
cd ${srcdir}/${pkgname}-${pkgver}
- # only needed if new autoconf 2.62 is used
- sed -i 's/1.10a/1.10.2/' configure.ac # aclocal fix
- sed -i 's/dist-xz/dist-lzma/' configure.ac
- autoreconf
-
# added pam patch and i18n patch from fedora cvs
patch -Np1 -i ../coreutils-pam.patch || return 1
patch -Np1 -i ../coreutils-i18n.patch || return 1
@@ -46,9 +45,18 @@
# from gentoo portage
patch -Np1 -i ../coreutils-uname.patch || return 1
+ # bugfix patches from fedora
+ patch -Np1 -i ../coreutils-7.1-sort-endoffields.patch || return 1
+ patch -Np1 -i ../coreutils-7.1-cp-recursiveinfloop.patch || return 1
+
+ # only needed if new autoconf 2.62 is used
+ sed -i 's/1.10a/1.10.2/' configure.ac || return 1 # aclocal fix
+ sed -i 's/dist-xz/dist-lzma/' configure.ac || return 1
+ autoreconf -v
+
./configure --prefix=/usr \
--enable-install-program=su \
- --enable-pam ac_cv_func_openat=no
+ --enable-pam ac_cv_func_openat=no || return 1
make || return 1
make DESTDIR=${pkgdir} install || return 1
Modified: testing-x86_64/coreutils-6.10-configuration.patch
===================================================================
--- testing-x86_64/coreutils-6.10-configuration.patch 2009-03-08 00:12:57 UTC (rev 29338)
+++ testing-x86_64/coreutils-6.10-configuration.patch 2009-03-08 00:13:33 UTC (rev 29339)
@@ -1,26 +1,3 @@
-diff -urN coreutils-6.12-orig/tests/misc/cut coreutils-6.12/tests/misc/cut
---- coreutils-6.12-orig/tests/misc/cut 2008-05-17 08:41:11.000000000 +0200
-+++ coreutils-6.12/tests/misc/cut 2008-06-02 11:13:08.000000000 +0200
-@@ -26,7 +26,7 @@
- my $prog = 'cut';
- my $try = "Try \`$prog --help' for more information.\n";
- my $from_1 = "$prog: fields and positions are numbered from 1\n$try";
--my $inval = "$prog: invalid byte or field list\n$try";
-+my $inval = "$prog: invalid byte, character or field list\n$try";
- my $no_endpoint = "$prog: invalid range with no endpoint: -\n$try";
-
- my @Tests =
-@@ -140,8 +140,8 @@
- ['od-overlap5', '-b1-3,1-4', '--output-d=:', {IN=>"abcde\n"}, {OUT=>"abcd\n"}],
-
- # None of the following invalid ranges provoked an error up to coreutils-6.9.
-- ['inval1', qw(-f 2-0), {IN=>''}, {OUT=>''}, {EXIT=>1},
-- {ERR=>"$prog: invalid decreasing range\n$try"}],
-+ ['inval1', qw(-f 2-0), {IN=>''}, {OUT=>''}, {EXIT=>1},
-+ {ERR=>"$prog: invalid byte, character or field list\n$try"}],
- ['inval2', qw(-f -), {IN=>''}, {OUT=>''}, {EXIT=>1}, {ERR=>$no_endpoint}],
- ['inval3', '-f', '4,-', {IN=>''}, {OUT=>''}, {EXIT=>1}, {ERR=>$no_endpoint}],
- ['inval4', '-f', '1-2,-', {IN=>''}, {OUT=>''}, {EXIT=>1}, {ERR=>$no_endpoint}],
diff -urN coreutils-6.11-orig/tests/mkdir/selinux coreutils-6.11/tests/mkdir/selinux
--- coreutils-6.11-orig/tests/mkdir/selinux 2008-04-19 23:34:23.000000000 +0200
+++ coreutils-6.11/tests/mkdir/selinux 2008-04-22 13:23:50.000000000 +0200
@@ -46,18 +23,66 @@
skip_test_ "this system (or maybe just" \
"the current file system) lacks SELinux support"
;;
-diff -urp coreutils-6.11-orig/gnulib-tests/test-getaddrinfo.c coreutils-6.11/gnulib-tests/test-getaddrinfo.c
---- coreutils-6.11-orig/gnulib-tests/test-getaddrinfo.c
-+++ coreutils-6.11/gnulib-tests/test-getaddrinfo.c
-@@ -70,6 +70,10 @@ int simple (char *host, char *service)
- if (res == EAI_NODATA)
- return 0;
+diff -urNp coreutils-7.1-orig/gnulib-tests/test-getaddrinfo.c coreutils-7.1/gnulib-tests/test-getaddrinfo.c
+--- coreutils-7.1-orig/gnulib-tests/test-getaddrinfo.c 2009-01-27 21:33:19.000000000 +0100
++++ coreutils-7.1/gnulib-tests/test-getaddrinfo.c 2009-02-25 13:52:59.000000000 +0100
+@@ -36,6 +36,8 @@
+ # define dbgprintf if (0) printf
+ #endif
-+ /* Do not fail this test for temporary name resolution errors. */
-+ if (res == EAI_AGAIN)
-+ return 0;
++static int skip = 0;
+
- return 1;
- }
+ /* BeOS does not have AF_UNSPEC. */
+ #ifndef AF_UNSPEC
+ # define AF_UNSPEC 0
+@@ -52,6 +54,9 @@ int simple (char *host, char *service)
+ struct addrinfo *ai0, *ai;
+ int res;
++ if (skip)
++ return 0;
++
+ dbgprintf ("Finding %s service %s...\n", host, service);
+
+ /* This initializes "hints" but does not use it. Is there a reason
+@@ -72,8 +77,12 @@ int simple (char *host, char *service)
+ in-law's farm. */
+ if (res == EAI_AGAIN)
+ {
+- fprintf (stderr, "skipping getaddrinfo test: no network?\n");
+- return 77;
++ if (!skip)
++ {
++ skip++;
++ fprintf (stderr, "skipping getaddrinfo test: no network?\n");
++ return 77;
++ }
+ }
+ /* IRIX reports EAI_NONAME for "https". Don't fail the test
+ merely because of this. */
+diff -urNp coreutils-7.1-orig/src/ls.c coreutils-7.1/src/ls.c
+--- coreutils-7.1-orig/src/ls.c 2009-02-25 13:23:59.000000000 +0100
++++ coreutils-7.1/src/ls.c 2009-02-25 13:25:20.000000000 +0100
+@@ -38,10 +38,6 @@
+ #include <config.h>
+ #include <sys/types.h>
+
+-#ifdef HAVE_CAP
+-# include <sys/capability.h>
+-#endif
+-
+ #if HAVE_TERMIOS_H
+ # include <termios.h>
+ #endif
+@@ -84,6 +80,10 @@
+ #include "system.h"
+ #include <fnmatch.h>
+
++#ifdef HAVE_CAP
++# include <sys/capability.h>
++#endif
++
+ #include "acl.h"
+ #include "argmatch.h"
+ #include "dev-ino.h"
Copied: coreutils/repos/testing-x86_64/coreutils-7.1-cp-recursiveinfloop.patch (from rev 29338, coreutils/trunk/coreutils-7.1-cp-recursiveinfloop.patch)
===================================================================
--- testing-x86_64/coreutils-7.1-cp-recursiveinfloop.patch (rev 0)
+++ testing-x86_64/coreutils-7.1-cp-recursiveinfloop.patch 2009-03-08 00:13:33 UTC (rev 29339)
@@ -0,0 +1,154 @@
+diff -urNp coreutils-7.1-orig/src/copy.c coreutils-7.1/src/copy.c
+--- coreutils-7.1-orig/src/copy.c 2009-02-27 12:07:29.000000000 +0100
++++ coreutils-7.1/src/copy.c 2009-02-27 12:14:29.000000000 +0100
+@@ -104,6 +104,7 @@ static bool copy_internal (char const *s
+ struct dir_list *ancestors,
+ const struct cp_options *x,
+ bool command_line_arg,
++ bool *first_dir_created_per_command_line_arg,
+ bool *copy_into_self,
+ bool *rename_succeeded);
+ static bool owner_failure_ok (struct cp_options const *x);
+@@ -201,13 +202,16 @@ copy_attr_by_name (char const *src_path,
+ DST_NAME_IN is a directory that was created previously in the
+ recursion. SRC_SB and ANCESTORS describe SRC_NAME_IN.
+ Set *COPY_INTO_SELF if SRC_NAME_IN is a parent of
++ FIRST_DIR_CREATED_PER_COMMAND_LINE_ARG FIXME
+ (or the same as) DST_NAME_IN; otherwise, clear it.
+ Return true if successful. */
+
+ static bool
+ copy_dir (char const *src_name_in, char const *dst_name_in, bool new_dst,
+ const struct stat *src_sb, struct dir_list *ancestors,
+- const struct cp_options *x, bool *copy_into_self)
++ const struct cp_options *x,
++ bool *first_dir_created_per_command_line_arg,
++ bool *copy_into_self)
+ {
+ char *name_space;
+ char *namep;
+@@ -237,12 +241,20 @@ copy_dir (char const *src_name_in, char
+
+ ok &= copy_internal (src_name, dst_name, new_dst, src_sb->st_dev,
+ ancestors, &non_command_line_options, false,
++ first_dir_created_per_command_line_arg,
+ &local_copy_into_self, NULL);
+ *copy_into_self |= local_copy_into_self;
+
+ free (dst_name);
+ free (src_name);
+
++ /* If we're copying into self, there's no point in continuing,
++ and in fact, that would even infloop, now that we record only
++ the first created directory per command line argument. */
++ if (local_copy_into_self)
++ break;
++
++
+ namep += strlen (namep) + 1;
+ }
+ free (name_space);
+@@ -1125,6 +1137,7 @@ restore_default_fscreatecon_or_die (void
+ not known. ANCESTORS points to a linked, null terminated list of
+ devices and inodes of parent directories of SRC_NAME. COMMAND_LINE_ARG
+ is true iff SRC_NAME was specified on the command line.
++ FIRST_DIR_CREATED_PER_COMMAND_LINE_ARG is both input and output.
+ Set *COPY_INTO_SELF if SRC_NAME is a parent of (or the
+ same as) DST_NAME; otherwise, clear it.
+ Return true if successful. */
+@@ -1135,6 +1148,7 @@ copy_internal (char const *src_name, cha
+ struct dir_list *ancestors,
+ const struct cp_options *x,
+ bool command_line_arg,
++ bool *first_dir_created_per_command_line_arg,
+ bool *copy_into_self,
+ bool *rename_succeeded)
+ {
+@@ -1815,11 +1829,15 @@ copy_internal (char const *src_name, cha
+ }
+ }
+
+- /* Insert the created directory's inode and device
+- numbers into the search structure, so that we can
+- avoid copying it again. */
+- if (!x->hard_link)
+- remember_copied (dst_name, dst_sb.st_ino, dst_sb.st_dev);
++ /* Record the created directory's inode and device numbers into
++ the search structure, so that we can avoid copying it again.
++ Do this only for the first directory that is created for each
++ source command line argument. */
++ if (!*first_dir_created_per_command_line_arg)
++ {
++ remember_copied (dst_name, dst_sb.st_ino, dst_sb.st_dev);
++ *first_dir_created_per_command_line_arg = true;
++ }
+
+ if (x->verbose)
+ emit_verbose (src_name, dst_name, NULL);
+@@ -1840,6 +1858,7 @@ copy_internal (char const *src_name, cha
+ in a source directory would cause the containing destination
+ directory not to have owner/perms set properly. */
+ delayed_ok = copy_dir (src_name, dst_name, new_dst, &src_sb, dir, x,
++ first_dir_created_per_command_line_arg,
+ copy_into_self);
+ }
+ }
+@@ -2187,8 +2206,11 @@ copy (char const *src_name, char const *
+ top_level_src_name = src_name;
+ top_level_dst_name = dst_name;
+
++ bool first_dir_created_per_command_line_arg = false;
+ return copy_internal (src_name, dst_name, nonexistent_dst, 0, NULL,
+- options, true, copy_into_self, rename_succeeded);
++ options, true,
++ &first_dir_created_per_command_line_arg,
++ copy_into_self, rename_succeeded);
+ }
+
+ /* Set *X to the default options for a value of type struct cp_options. */
+diff -urNp coreutils-7.1-orig/tests/cp/into-self coreutils-7.1/tests/cp/into-self
+--- coreutils-7.1-orig/tests/cp/into-self 2008-09-18 09:06:57.000000000 +0200
++++ coreutils-7.1/tests/cp/into-self 2009-02-27 12:16:21.000000000 +0100
+@@ -1,7 +1,7 @@
+ #!/bin/sh
+ # Confirm that copying a directory into itself gets a proper diagnostic.
+
+-# Copyright (C) 2001, 2002, 2004, 2006-2008 Free Software Foundation, Inc.
++# Copyright (C) 2001, 2002, 2004, 2006-2009 Free Software Foundation, Inc.
+
+ # This program is free software: you can redistribute it and/or modify
+ # it under the terms of the GNU General Public License as published by
+@@ -28,15 +28,32 @@ fi
+
+ . $srcdir/test-lib.sh
+
+-mkdir dir || framework_failure
++mkdir a dir || framework_failure
+
+ fail=0
+
+ # This command should exit nonzero.
+ cp -R dir dir 2> out && fail=1
++echo 1 >> out
++
++# This should, too. However, with coreutils-7.1 it would infloop.
++cp -rl dir dir 2>> out && fail=1
++echo 2 >> out
++
++cp -rl a dir dir 2>> out && fail=1
++echo 3 >> out
++cp -rl a dir dir 2>> out && fail=1
++echo 4 >> out
+
+ cat > exp <<\EOF
+ cp: cannot copy a directory, `dir', into itself, `dir/dir'
++1
++cp: cannot copy a directory, `dir', into itself, `dir/dir'
++2
++cp: cannot copy a directory, `dir', into itself, `dir/dir'
++3
++cp: cannot copy a directory, `dir', into itself, `dir/dir'
++4
+ EOF
+ #'
+
Copied: coreutils/repos/testing-x86_64/coreutils-7.1-sort-endoffields.patch (from rev 29338, coreutils/trunk/coreutils-7.1-sort-endoffields.patch)
===================================================================
--- testing-x86_64/coreutils-7.1-sort-endoffields.patch (rev 0)
+++ testing-x86_64/coreutils-7.1-sort-endoffields.patch 2009-03-08 00:13:33 UTC (rev 29339)
@@ -0,0 +1,102 @@
+diff -urNp coreutils-7.1-orig/src/sort.c coreutils-7.1/src/sort.c
+--- coreutils-7.1-orig/src/sort.c 2009-02-25 16:15:52.000000000 +0100
++++ coreutils-7.1/src/sort.c 2009-02-25 16:20:35.000000000 +0100
+@@ -1598,6 +1598,9 @@ limfield_uni (const struct line *line, c
+ size_t eword = key->eword, echar = key->echar;
+ size_t remaining_bytes;
+
++ if (echar == 0)
++ eword++; /* skip all of end field. */
++
+ /* Move PTR past EWORD fields or to one past the last byte on LINE,
+ whichever comes first. If there are more than EWORD fields, leave
+ PTR pointing at the beginning of the field having zero-based index,
+@@ -1673,19 +1676,22 @@ limfield_uni (const struct line *line, c
+ }
+ #endif
+
+- /* If we're ignoring leading blanks when computing the End
+- of the field, don't start counting bytes until after skipping
+- past any leading blanks. */
+- if (key->skipeblanks)
+- while (ptr < lim && blanks[to_uchar (*ptr)])
+- ++ptr;
+
+- /* Advance PTR by ECHAR (if possible), but no further than LIM. */
+- remaining_bytes = lim - ptr;
+- if (echar < remaining_bytes)
+- ptr += echar;
+- else
+- ptr = lim;
++ if (echar != 0) /* We need to skip over a portion of the end field. */
++ {
++ if (key->skipeblanks) /* blanks not counted in echar. */
++ {
++ while (ptr < lim && blanks[to_uchar (*ptr)])
++ ++ptr;
++ }
++
++ /* Advance PTR by ECHAR (if possible), but no further than LIM. */
++ remaining_bytes = lim - ptr;
++ if (echar < remaining_bytes)
++ ptr += echar;
++ else
++ ptr = lim;
++ }
+
+ return ptr;
+ }
+@@ -3736,12 +3742,9 @@ main (int argc, char **argv)
+ badfieldspec (optarg, N_("field number is zero"));
+ }
+ if (*s == '.')
+- s = parse_field_count (s + 1, &key->echar,
+- N_("invalid number after `.'"));
+- else
+ {
+- /* `-k 2,3' is equivalent to `+1 -3'. */
+- key->eword++;
++ s = parse_field_count (s + 1, &key->echar,
++ N_("invalid number after `.'"));
+ }
+ s = set_ordering (s, key, bl_end);
+ }
+diff -urNp coreutils-7.1-orig/tests/misc/sort coreutils-7.1/tests/misc/sort
+--- coreutils-7.1-orig/tests/misc/sort 2009-01-27 22:11:25.000000000 +0100
++++ coreutils-7.1/tests/misc/sort 2009-02-25 16:21:48.000000000 +0100
+@@ -24,6 +24,10 @@ my $prog = 'sort';
+ # Turn off localization of executable's output.
+ @ENV{qw(LANGUAGE LANG LC_ALL)} = ('C') x 3;
+
++my $mb_locale = $ENV{LOCALE_FR_UTF8};
++! defined $mb_locale || $mb_locale eq 'none'
++ and $mb_locale = 'C';
++
+ # Since each test is run with a file name and with redirected stdin,
+ # the name in the diagnostic is either the file name or "-".
+ # Normalize each diagnostic to use '-'.
+@@ -110,6 +114,8 @@ my @Tests =
+ ["07b", '-k 2,3', {IN=>"a a b\nz a a\n"}, {OUT=>"z a a\na a b\n"}],
+ ["07c", '-k 2,3', {IN=>"y k b\nz k a\n"}, {OUT=>"z k a\ny k b\n"}],
+ ["07d", '+1 -3', {IN=>"y k b\nz k a\n"}, {OUT=>"z k a\ny k b\n"}],
++["07e", '-k 2,3.0', {IN=>"a a b\nz a a\n"}, {OUT=>"z a a\na a b\n"}],
++
+ #
+ # report an error for `.' without following char spec
+ ["08a", '-k 2.,3', {EXIT=>2},
+@@ -210,6 +216,15 @@ my @Tests =
+ # key start and key end.
+ ["18e", '-nb -k1.1,1.2', {IN=>" 901\n100\n"}, {OUT=>"100\n 901\n"}],
+
++# When ignoring leading blanks for end position, ensure blanks from
++# next field are not included in the sort. I.E. order should not change here.
++["18f", '-k1,1b', {IN=>"a y\na z\n"}, {OUT=>"a y\na z\n"}],
++
++# When ignoring leading blanks for start position, ensure blanks from
++# next field are not included in the sort. I.E. order should not change here.
++# This was noticed as an issue on fedora 8 (only in multibyte locales).
++["18g", '-k1b,1', {IN=>"a y\na z\n"}, {OUT=>"a y\na z\n"},
++ {ENV => "LC_ALL=$mb_locale"}],
+ # This looks odd, but works properly -- 2nd keyspec is never
+ # used because all lines are different.
+ ["19a", '+0 +1nr', {IN=>"b 2\nb 1\nb 3\n"}, {OUT=>"b 1\nb 2\nb 3\n"}],
Modified: testing-x86_64/coreutils-i18n.patch
===================================================================
--- testing-x86_64/coreutils-i18n.patch 2009-03-08 00:12:57 UTC (rev 29338)
+++ testing-x86_64/coreutils-i18n.patch 2009-03-08 00:13:33 UTC (rev 29339)
@@ -1,3 +1,26 @@
+diff -urN coreutils-6.12-orig/tests/misc/cut coreutils-6.12/tests/misc/cut
+--- coreutils-6.12-orig/tests/misc/cut 2008-05-17 08:41:11.000000000 +0200
++++ coreutils-6.12/tests/misc/cut 2008-06-02 11:13:08.000000000 +0200
+@@ -26,7 +26,7 @@
+ my $prog = 'cut';
+ my $try = "Try \`$prog --help' for more information.\n";
+ my $from_1 = "$prog: fields and positions are numbered from 1\n$try";
+-my $inval = "$prog: invalid byte or field list\n$try";
++my $inval = "$prog: invalid byte, character or field list\n$try";
+ my $no_endpoint = "$prog: invalid range with no endpoint: -\n$try";
+
+ my @Tests =
+@@ -140,8 +140,8 @@
+ ['od-overlap5', '-b1-3,1-4', '--output-d=:', {IN=>"abcde\n"}, {OUT=>"abcd\n"}],
+
+ # None of the following invalid ranges provoked an error up to coreutils-6.9.
+- ['inval1', qw(-f 2-0), {IN=>''}, {OUT=>''}, {EXIT=>1},
+- {ERR=>"$prog: invalid decreasing range\n$try"}],
++ ['inval1', qw(-f 2-0), {IN=>''}, {OUT=>''}, {EXIT=>1},
++ {ERR=>"$prog: invalid byte, character or field list\n$try"}],
+ ['inval2', qw(-f -), {IN=>''}, {OUT=>''}, {EXIT=>1}, {ERR=>$no_endpoint}],
+ ['inval3', '-f', '4,-', {IN=>''}, {OUT=>''}, {EXIT=>1}, {ERR=>$no_endpoint}],
+ ['inval4', '-f', '1-2,-', {IN=>''}, {OUT=>''}, {EXIT=>1}, {ERR=>$no_endpoint}],
--- /dev/null 2007-03-01 09:16:39.219409909 +0000
+++ coreutils-6.8+/tests/misc/sort-mb-tests 2007-03-01 15:08:24.000000000 +0000
@@ -0,0 +1,58 @@
@@ -1915,7 +1938,7 @@
if (newlim)
lim = newlim;
}
-@@ -1384,6 +1570,107 @@
+@@ -1384,6 +1570,113 @@
return ptr;
}
@@ -1929,6 +1952,9 @@
+ size_t mblength;
+ mbstate_t state;
+
++ if (echar == 0)
++ eword++; /* skip all of end field. */
++
+ memset (&state, '\0', sizeof(mbstate_t));
+
+ if (tab_length)
@@ -1997,24 +2023,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;
+}
@@ -2735,7 +2764,7 @@
+
#include "system.h"
#include "error.h"
- #include "hard-locale.h"
+ #include "mbswidth.h"
@@ -324,6 +350,18 @@
#include "strftime.h"
#include "xstrtol.h"
More information about the arch-commits
mailing list