Compare commits
8 commits
| Author | SHA1 | Date | |
|---|---|---|---|
|
|
8def217510 | ||
|
|
1b40d50d5e | ||
|
|
c04182840f | ||
|
|
0700256c12 | ||
|
|
d3438ce278 | ||
|
|
ea6e077444 | ||
|
|
c28ebe0f20 | ||
|
|
72b7ef7f55 |
7 changed files with 511 additions and 104 deletions
|
|
@ -42,6 +42,19 @@ diff -urNp coreutils-8.13-orig/gnulib-tests/gnulib.mk coreutils-8.13/gnulib-test
|
||||||
|
|
||||||
## end gnulib module fchdir-tests
|
## end gnulib module fchdir-tests
|
||||||
|
|
||||||
|
@@ -874,9 +874,9 @@ EXTRA_DIST += test-getloadavg.c signatur
|
||||||
|
|
||||||
|
## begin gnulib module getlogin-tests
|
||||||
|
|
||||||
|
-TESTS += test-getlogin
|
||||||
|
-check_PROGRAMS += test-getlogin
|
||||||
|
-EXTRA_DIST += test-getlogin.c signature.h macros.h
|
||||||
|
+#TESTS += test-getlogin
|
||||||
|
+#check_PROGRAMS += test-getlogin
|
||||||
|
+#EXTRA_DIST += test-getlogin.c signature.h macros.h
|
||||||
|
|
||||||
|
## end gnulib module getlogin-tests
|
||||||
|
|
||||||
@@ -918,10 +918,10 @@ EXTRA_DIST += test-link.h test-link.c si
|
@@ -918,10 +918,10 @@ EXTRA_DIST += test-link.h test-link.c si
|
||||||
|
|
||||||
## begin gnulib module linkat-tests
|
## begin gnulib module linkat-tests
|
||||||
|
|
|
||||||
29
coreutils-8.17-cp-freememoryread.patch
Normal file
29
coreutils-8.17-cp-freememoryread.patch
Normal file
|
|
@ -0,0 +1,29 @@
|
||||||
|
diff -urNp coreutils-8.17-orig/src/extent-scan.c coreutils-8.17/src/extent-scan.c
|
||||||
|
--- coreutils-8.17-orig/src/extent-scan.c 2012-05-02 10:31:47.000000000 +0200
|
||||||
|
+++ coreutils-8.17/src/extent-scan.c 2012-11-05 12:05:36.732370966 +0100
|
||||||
|
@@ -89,7 +89,7 @@ extern bool
|
||||||
|
extent_scan_read (struct extent_scan *scan)
|
||||||
|
{
|
||||||
|
unsigned int si = 0;
|
||||||
|
- struct extent_info *last_ei IF_LINT ( = scan->ext_info);
|
||||||
|
+ struct extent_info *last_ei = scan->ext_info;
|
||||||
|
|
||||||
|
while (true)
|
||||||
|
{
|
||||||
|
@@ -127,8 +127,14 @@ extent_scan_read (struct extent_scan *sc
|
||||||
|
|
||||||
|
assert (scan->ei_count <= SIZE_MAX - fiemap->fm_mapped_extents);
|
||||||
|
scan->ei_count += fiemap->fm_mapped_extents;
|
||||||
|
- scan->ext_info = xnrealloc (scan->ext_info, scan->ei_count,
|
||||||
|
- sizeof (struct extent_info));
|
||||||
|
+ {
|
||||||
|
+ /* last_ei points into a buffer that may be freed via xnrealloc.
|
||||||
|
+ Record its offset and adjust after allocation. */
|
||||||
|
+ size_t prev_idx = last_ei - scan->ext_info;
|
||||||
|
+ scan->ext_info = xnrealloc (scan->ext_info, scan->ei_count,
|
||||||
|
+ sizeof (struct extent_info));
|
||||||
|
+ last_ei = scan->ext_info + prev_idx;
|
||||||
|
+ }
|
||||||
|
|
||||||
|
unsigned int i = 0;
|
||||||
|
for (i = 0; i < fiemap->fm_mapped_extents; i++)
|
||||||
264
coreutils-8.17-df-duplicates.patch
Normal file
264
coreutils-8.17-df-duplicates.patch
Normal file
|
|
@ -0,0 +1,264 @@
|
||||||
|
diff -urNp coreutils-8.17-orig/doc/coreutils.texi coreutils-8.17/doc/coreutils.texi
|
||||||
|
--- coreutils-8.17-orig/doc/coreutils.texi 2012-05-10 09:14:30.000000000 +0200
|
||||||
|
+++ coreutils-8.17/doc/coreutils.texi 2012-12-11 11:30:38.730760947 +0100
|
||||||
|
@@ -10561,6 +10561,14 @@ Normally the disk space is printed in un
|
||||||
|
1024 bytes, but this can be overridden (@pxref{Block size}).
|
||||||
|
Non-integer quantities are rounded up to the next higher unit.
|
||||||
|
|
||||||
|
+For bind mounts and without arguments, @command{df} only outputs the statistics
|
||||||
|
+for the first occurence of that device in the list of file systems (@var{mtab}),
|
||||||
|
+i.e., it hides duplicate entries, unless the @option{-a} option is specified.
|
||||||
|
+
|
||||||
|
+By default, @command{df} omits the early-boot pseudo file system type
|
||||||
|
+@samp{rootfs}, unless the @option{-a} option is specified or that file system
|
||||||
|
+type is explicitly to be included by using the @option{-t} option.
|
||||||
|
+
|
||||||
|
@cindex disk device file
|
||||||
|
@cindex device file, disk
|
||||||
|
If an argument @var{file} is a disk device file containing a mounted
|
||||||
|
diff -urNp coreutils-8.17-orig/src/df.c coreutils-8.17/src/df.c
|
||||||
|
--- coreutils-8.17-orig/src/df.c 2012-05-01 22:55:08.000000000 +0200
|
||||||
|
+++ coreutils-8.17/src/df.c 2012-12-11 11:30:38.803069545 +0100
|
||||||
|
@@ -46,6 +46,17 @@
|
||||||
|
/* If true, show inode information. */
|
||||||
|
static bool inode_format;
|
||||||
|
|
||||||
|
+/* Filled with device numbers of examined file systems to avoid
|
||||||
|
+ duplicities in output. */
|
||||||
|
+struct devlist
|
||||||
|
+{
|
||||||
|
+ dev_t dev_num;
|
||||||
|
+ struct devlist *next;
|
||||||
|
+};
|
||||||
|
+
|
||||||
|
+/* Store of already-processed device numbers. */
|
||||||
|
+static struct devlist *devlist_head;
|
||||||
|
+
|
||||||
|
/* If true, show even file systems with zero size or
|
||||||
|
uninteresting types. */
|
||||||
|
static bool show_all_fs;
|
||||||
|
@@ -57,6 +68,12 @@ static bool show_local_fs;
|
||||||
|
command line argument -- even if it's a dummy (automounter) entry. */
|
||||||
|
static bool show_listed_fs;
|
||||||
|
|
||||||
|
+/* If true, include rootfs in the output. */
|
||||||
|
+static bool show_rootfs;
|
||||||
|
+
|
||||||
|
+/* The literal name of the initial root file system. */
|
||||||
|
+static char const *ROOTFS = "rootfs";
|
||||||
|
+
|
||||||
|
/* Human-readable options for output. */
|
||||||
|
static int human_output_opts;
|
||||||
|
|
||||||
|
@@ -350,6 +367,29 @@ excluded_fstype (const char *fstype)
|
||||||
|
return false;
|
||||||
|
}
|
||||||
|
|
||||||
|
+/* Check if the device was already examined. */
|
||||||
|
+
|
||||||
|
+static bool
|
||||||
|
+dev_examined (char const *mount_dir, char const *devname)
|
||||||
|
+{
|
||||||
|
+ struct stat buf;
|
||||||
|
+ if (-1 == stat (mount_dir, &buf))
|
||||||
|
+ return false;
|
||||||
|
+
|
||||||
|
+ struct devlist *devlist = devlist_head;
|
||||||
|
+ for ( ; devlist; devlist = devlist->next)
|
||||||
|
+ if (devlist->dev_num == buf.st_dev)
|
||||||
|
+ return true;
|
||||||
|
+
|
||||||
|
+ /* Add the device number to the global list devlist. */
|
||||||
|
+ devlist = xmalloc (sizeof *devlist);
|
||||||
|
+ devlist->dev_num = buf.st_dev;
|
||||||
|
+ devlist->next = devlist_head;
|
||||||
|
+ devlist_head = devlist;
|
||||||
|
+
|
||||||
|
+ return false;
|
||||||
|
+}
|
||||||
|
+
|
||||||
|
/* Return true if N is a known integer value. On many file systems,
|
||||||
|
UINTMAX_MAX represents an unknown value; on AIX, UINTMAX_MAX - 1
|
||||||
|
represents unknown. Use a rule that works on AIX file systems, and
|
||||||
|
@@ -474,6 +514,15 @@ get_dev (char const *disk, char const *m
|
||||||
|
if (!selected_fstype (fstype) || excluded_fstype (fstype))
|
||||||
|
return;
|
||||||
|
|
||||||
|
+ if (process_all && !show_all_fs && !show_listed_fs)
|
||||||
|
+ {
|
||||||
|
+ /* No arguments nor "df -a", then check if df has to ... */
|
||||||
|
+ if (!show_rootfs && STREQ (disk, ROOTFS))
|
||||||
|
+ return; /* ... skip rootfs: (unless -trootfs is given. */
|
||||||
|
+ if (dev_examined (mount_point, disk))
|
||||||
|
+ return; /* ... skip duplicate entries (bind mounts). */
|
||||||
|
+ }
|
||||||
|
+
|
||||||
|
/* If MOUNT_POINT is NULL, then the file system is not mounted, and this
|
||||||
|
program reports on the file system that the special file is on.
|
||||||
|
It would be better to report on the unmounted file system,
|
||||||
|
@@ -972,6 +1021,7 @@ main (int argc, char **argv)
|
||||||
|
/* Accept -F as a synonym for -t for compatibility with Solaris. */
|
||||||
|
case 't':
|
||||||
|
add_fs_type (optarg);
|
||||||
|
+ show_rootfs = selected_fstype (ROOTFS);
|
||||||
|
break;
|
||||||
|
|
||||||
|
case 'v': /* For SysV compatibility. */
|
||||||
|
@@ -1105,6 +1155,14 @@ main (int argc, char **argv)
|
||||||
|
|
||||||
|
if (! file_systems_processed)
|
||||||
|
error (EXIT_FAILURE, 0, _("no file systems processed"));
|
||||||
|
+ IF_LINT (
|
||||||
|
+ while (devlist_head)
|
||||||
|
+ {
|
||||||
|
+ struct devlist *devlist = devlist_head->next;
|
||||||
|
+ free (devlist_head);
|
||||||
|
+ devlist_head = devlist;
|
||||||
|
+ }
|
||||||
|
+ );
|
||||||
|
|
||||||
|
exit (exit_status);
|
||||||
|
}
|
||||||
|
diff -urNp coreutils-8.17-orig/tests/df/skip-duplicates coreutils-8.17/tests/df/skip-duplicates
|
||||||
|
--- coreutils-8.17-orig/tests/df/skip-duplicates 1970-01-01 01:00:00.000000000 +0100
|
||||||
|
+++ coreutils-8.17/tests/df/skip-duplicates 2012-12-11 11:30:38.820762450 +0100
|
||||||
|
@@ -0,0 +1,77 @@
|
||||||
|
+#!/bin/sh
|
||||||
|
+# Test df's behavior when the mount list contains duplicate entries.
|
||||||
|
+# This test is skipped on systems that lack LD_PRELOAD support; that's fine.
|
||||||
|
+
|
||||||
|
+# Copyright (C) 2012 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
|
||||||
|
+# the Free Software Foundation, either version 3 of the License, or
|
||||||
|
+# (at your option) any later version.
|
||||||
|
+
|
||||||
|
+# This program is distributed in the hope that it will be useful,
|
||||||
|
+# but WITHOUT ANY WARRANTY; without even the implied warranty of
|
||||||
|
+# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
||||||
|
+# GNU General Public License for more details.
|
||||||
|
+
|
||||||
|
+# You should have received a copy of the GNU General Public License
|
||||||
|
+# along with this program. If not, see <http://www.gnu.org/licenses/>.
|
||||||
|
+
|
||||||
|
+. "${srcdir=.}/init.sh"; path_prepend_ ../src
|
||||||
|
+print_ver_ df
|
||||||
|
+
|
||||||
|
+df || skip_ "df fails"
|
||||||
|
+
|
||||||
|
+# Simulate an mtab file with two entries of the same device number.
|
||||||
|
+cat > k.c <<'EOF' || framework_failure_
|
||||||
|
+#include <stdio.h>
|
||||||
|
+#include <mntent.h>
|
||||||
|
+
|
||||||
|
+struct mntent *getmntent (FILE *fp)
|
||||||
|
+{
|
||||||
|
+ /* Prove that LD_PRELOAD works. */
|
||||||
|
+ static int done = 0;
|
||||||
|
+ if (!done)
|
||||||
|
+ {
|
||||||
|
+ fclose (fopen ("x", "w"));
|
||||||
|
+ ++done;
|
||||||
|
+ }
|
||||||
|
+
|
||||||
|
+ static struct mntent mntent;
|
||||||
|
+
|
||||||
|
+ while (done++ < 3)
|
||||||
|
+ {
|
||||||
|
+ mntent.mnt_fsname = "fsname";
|
||||||
|
+ mntent.mnt_dir = "/";
|
||||||
|
+ mntent.mnt_type = "-";
|
||||||
|
+
|
||||||
|
+ return &mntent;
|
||||||
|
+ }
|
||||||
|
+ return NULL;
|
||||||
|
+}
|
||||||
|
+EOF
|
||||||
|
+
|
||||||
|
+# Then compile/link it:
|
||||||
|
+gcc --std=gnu99 -shared -fPIC -ldl -O2 k.c -o k.so \
|
||||||
|
+ || skip_ "getmntent hack does not work on this platform"
|
||||||
|
+
|
||||||
|
+# Test if LD_PRELOAD works:
|
||||||
|
+LD_PRELOAD=./k.so df
|
||||||
|
+test -f x || skip_ "internal test failure: maybe LD_PRELOAD doesn't work?"
|
||||||
|
+
|
||||||
|
+# The fake mtab file should only contain 2 entries, both
|
||||||
|
+# having the same device number; thus the output should
|
||||||
|
+# consist of a header and one entry.
|
||||||
|
+LD_PRELOAD=./k.so df >out || fail=1
|
||||||
|
+test $(wc -l <out) -eq 2 || { fail=1; cat out; }
|
||||||
|
+
|
||||||
|
+# Ensure that filtering duplicates does not affect -a processing.
|
||||||
|
+LD_PRELOAD=./k.so df -a >out || fail=1
|
||||||
|
+test $(wc -l <out) -eq 3 || { fail=1; cat out; }
|
||||||
|
+
|
||||||
|
+# Ensure that filtering duplcates does not affect
|
||||||
|
+# argument processing (now without the fake getmntent()).
|
||||||
|
+df '.' '.' >out || fail=1
|
||||||
|
+test $(wc -l <out) -eq 3 || { fail=1; cat out; }
|
||||||
|
+
|
||||||
|
+Exit $fail
|
||||||
|
diff -urNp coreutils-8.17-orig/tests/df/skip-rootfs coreutils-8.17/tests/df/skip-rootfs
|
||||||
|
--- coreutils-8.17-orig/tests/df/skip-rootfs 1970-01-01 01:00:00.000000000 +0100
|
||||||
|
+++ coreutils-8.17/tests/df/skip-rootfs 2012-12-11 11:30:38.821762595 +0100
|
||||||
|
@@ -0,0 +1,46 @@
|
||||||
|
+#!/bin/sh
|
||||||
|
+# Test df's behavior for skipping the pseudo "rootfs" file system.
|
||||||
|
+
|
||||||
|
+# Copyright (C) 2012 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
|
||||||
|
+# the Free Software Foundation, either version 3 of the License, or
|
||||||
|
+# (at your option) any later version.
|
||||||
|
+
|
||||||
|
+# This program is distributed in the hope that it will be useful,
|
||||||
|
+# but WITHOUT ANY WARRANTY; without even the implied warranty of
|
||||||
|
+# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
||||||
|
+# GNU General Public License for more details.
|
||||||
|
+
|
||||||
|
+# You should have received a copy of the GNU General Public License
|
||||||
|
+# along with this program. If not, see <http://www.gnu.org/licenses/>.
|
||||||
|
+
|
||||||
|
+. "${srcdir=.}/init.sh"; path_prepend_ ../src
|
||||||
|
+print_ver_ df
|
||||||
|
+
|
||||||
|
+df || skip_ "df fails"
|
||||||
|
+
|
||||||
|
+# Verify that rootfs is in mtab (and shown when the -a option is specified).
|
||||||
|
+df -a >out || fail=1
|
||||||
|
+grep '^rootfs' out || skip_ "no rootfs in mtab"
|
||||||
|
+
|
||||||
|
+# Ensure that rootfs is supressed when no options is specified.
|
||||||
|
+df >out || fail=1
|
||||||
|
+grep '^rootfs' out && { fail=1; cat out; }
|
||||||
|
+
|
||||||
|
+# Ensure that the rootfs is shown when explicitly specifying "-t rootfs".
|
||||||
|
+df -t rootfs >out || fail=1
|
||||||
|
+grep '^rootfs' out || { fail=1; cat out; }
|
||||||
|
+
|
||||||
|
+# Ensure that the rootfs is shown when explicitly specifying "-t rootfs",
|
||||||
|
+# even when the -a option is specified.
|
||||||
|
+df -t rootfs -a >out || fail=1
|
||||||
|
+grep '^rootfs' out || { fail=1; cat out; }
|
||||||
|
+
|
||||||
|
+# Ensure that the rootfs is omitted in all_fs mode when it is explicitly
|
||||||
|
+# black-listed.
|
||||||
|
+df -a -x rootfs >out || fail=1
|
||||||
|
+grep '^rootfs' out && { fail=1; cat out; }
|
||||||
|
+
|
||||||
|
+Exit $fail
|
||||||
|
diff -urNp coreutils-8.17-orig/tests/Makefile.am coreutils-8.17/tests/Makefile.am
|
||||||
|
--- coreutils-8.17-orig/tests/Makefile.am 2012-05-10 16:36:42.000000000 +0200
|
||||||
|
+++ coreutils-8.17/tests/Makefile.am 2012-12-11 11:32:23.021760237 +0100
|
||||||
|
@@ -373,6 +373,8 @@ TESTS = \
|
||||||
|
cp/symlink-slash \
|
||||||
|
cp/thru-dangling \
|
||||||
|
df/unreadable \
|
||||||
|
+ df/skip-duplicates \
|
||||||
|
+ df/skip-rootfs \
|
||||||
|
dd/direct \
|
||||||
|
dd/misc \
|
||||||
|
dd/nocache \
|
||||||
51
coreutils-8.17-sort-uniq-fmr.patch
Normal file
51
coreutils-8.17-sort-uniq-fmr.patch
Normal file
|
|
@ -0,0 +1,51 @@
|
||||||
|
diff -urNp coreutils-8.17-orig/src/sort.c coreutils-8.17/src/sort.c
|
||||||
|
--- coreutils-8.17-orig/src/sort.c 2012-08-20 13:15:39.703470009 +0200
|
||||||
|
+++ coreutils-8.17/src/sort.c 2012-08-20 13:29:47.177468563 +0200
|
||||||
|
@@ -292,6 +292,9 @@ struct merge_node_queue
|
||||||
|
when popping. */
|
||||||
|
};
|
||||||
|
|
||||||
|
+/* Used to implement --unique (-u). */
|
||||||
|
+static struct line saved_line;
|
||||||
|
+
|
||||||
|
/* FIXME: None of these tables work with multibyte character sets.
|
||||||
|
Also, there are many other bugs when handling multibyte characters.
|
||||||
|
One way to fix this is to rewrite 'sort' to use wide characters
|
||||||
|
@@ -3943,13 +3946,12 @@ queue_pop (struct merge_node_queue *queu
|
||||||
|
static void
|
||||||
|
write_unique (struct line const *line, FILE *tfp, char const *temp_output)
|
||||||
|
{
|
||||||
|
- static struct line saved;
|
||||||
|
|
||||||
|
if (unique)
|
||||||
|
{
|
||||||
|
- if (saved.text && ! compare (line, &saved))
|
||||||
|
+ if (saved_line.text && ! compare (line, &saved_line))
|
||||||
|
return;
|
||||||
|
- saved = *line;
|
||||||
|
+ saved_line = *line;
|
||||||
|
}
|
||||||
|
|
||||||
|
write_line (line, tfp, temp_output);
|
||||||
|
@@ -4451,6 +4453,7 @@ sort (char *const *files, size_t nfiles,
|
||||||
|
break;
|
||||||
|
}
|
||||||
|
|
||||||
|
+ saved_line.text = NULL;
|
||||||
|
line = buffer_linelim (&buf);
|
||||||
|
if (buf.eof && !nfiles && !ntemps && !buf.left)
|
||||||
|
{
|
||||||
|
diff -urNp coreutils-8.17-orig/tests/misc/sort coreutils-8.17/tests/misc/sort
|
||||||
|
--- coreutils-8.17-orig/tests/misc/sort 2012-02-03 10:22:06.000000000 +0100
|
||||||
|
+++ coreutils-8.17/tests/misc/sort 2012-08-20 13:31:38.685565488 +0200
|
||||||
|
@@ -226,6 +226,10 @@ my @Tests =
|
||||||
|
["15c", '-i -u', {IN=>"a\1\na\n"}, {OUT=>"a\1\n"}],
|
||||||
|
["15d", '-i -u', {IN=>"\1a\na\n"}, {OUT=>"\1a\n"}],
|
||||||
|
["15e", '-i -u', {IN=>"a\n\1\1\1\1\1a\1\1\1\1\n"}, {OUT=>"a\n"}],
|
||||||
|
+# Before 8.19, this would trigger a free-memory read.
|
||||||
|
+["unique-free-mem-read", '-u --p=1 -S32b',
|
||||||
|
+ {IN=>"a\n"."b"x900 ."\n"},
|
||||||
|
+ {OUT=>"a\n"."b"x900 ."\n"}],
|
||||||
|
|
||||||
|
# From Erick Branderhorst -- fixed around 1.19e
|
||||||
|
["16a", '-f',
|
||||||
|
|
@ -1,6 +1,6 @@
|
||||||
diff -urNp coreutils-8.16-orig/lib/linebuffer.h coreutils-8.16/lib/linebuffer.h
|
diff -urNp coreutils-8.17-orig/lib/linebuffer.h coreutils-8.17/lib/linebuffer.h
|
||||||
--- coreutils-8.16-orig/lib/linebuffer.h 2012-01-06 10:14:31.000000000 +0100
|
--- coreutils-8.17-orig/lib/linebuffer.h 2012-01-06 10:14:31.000000000 +0100
|
||||||
+++ coreutils-8.16/lib/linebuffer.h 2012-03-26 18:02:00.993889446 +0200
|
+++ coreutils-8.17/lib/linebuffer.h 2013-01-24 17:11:53.530457138 +0100
|
||||||
@@ -21,6 +21,11 @@
|
@@ -21,6 +21,11 @@
|
||||||
|
|
||||||
# include <stdio.h>
|
# include <stdio.h>
|
||||||
|
|
@ -23,9 +23,9 @@ diff -urNp coreutils-8.16-orig/lib/linebuffer.h coreutils-8.16/lib/linebuffer.h
|
||||||
};
|
};
|
||||||
|
|
||||||
/* Initialize linebuffer LINEBUFFER for use. */
|
/* Initialize linebuffer LINEBUFFER for use. */
|
||||||
diff -urNp coreutils-8.16-orig/src/cut.c coreutils-8.16/src/cut.c
|
diff -urNp coreutils-8.17-orig/src/cut.c coreutils-8.17/src/cut.c
|
||||||
--- coreutils-8.16-orig/src/cut.c 2012-03-24 21:26:51.000000000 +0100
|
--- coreutils-8.17-orig/src/cut.c 2012-05-02 10:31:47.000000000 +0200
|
||||||
+++ coreutils-8.16/src/cut.c 2012-03-26 17:46:48.000000000 +0200
|
+++ coreutils-8.17/src/cut.c 2013-01-24 17:11:53.532456847 +0100
|
||||||
@@ -28,6 +28,11 @@
|
@@ -28,6 +28,11 @@
|
||||||
#include <assert.h>
|
#include <assert.h>
|
||||||
#include <getopt.h>
|
#include <getopt.h>
|
||||||
|
|
@ -376,7 +376,7 @@ diff -urNp coreutils-8.16-orig/src/cut.c coreutils-8.16/src/cut.c
|
||||||
+ break;
|
+ break;
|
||||||
+ }
|
+ }
|
||||||
+
|
+
|
||||||
+ if (wc == WEOF)
|
+ if (len<=0 && wc == WEOF)
|
||||||
+ break;
|
+ break;
|
||||||
+
|
+
|
||||||
+ /* If the first field extends to the end of line (it is not
|
+ /* If the first field extends to the end of line (it is not
|
||||||
|
|
@ -633,9 +633,9 @@ diff -urNp coreutils-8.16-orig/src/cut.c coreutils-8.16/src/cut.c
|
||||||
}
|
}
|
||||||
|
|
||||||
if (optind == argc)
|
if (optind == argc)
|
||||||
diff -urNp coreutils-8.16-orig/src/expand.c coreutils-8.16/src/expand.c
|
diff -urNp coreutils-8.17-orig/src/expand.c coreutils-8.17/src/expand.c
|
||||||
--- coreutils-8.16-orig/src/expand.c 2012-03-24 21:26:51.000000000 +0100
|
--- coreutils-8.17-orig/src/expand.c 2012-05-01 22:55:08.000000000 +0200
|
||||||
+++ coreutils-8.16/src/expand.c 2012-03-26 17:42:56.000000000 +0200
|
+++ coreutils-8.17/src/expand.c 2013-01-24 17:11:53.534459250 +0100
|
||||||
@@ -37,12 +37,29 @@
|
@@ -37,12 +37,29 @@
|
||||||
#include <stdio.h>
|
#include <stdio.h>
|
||||||
#include <getopt.h>
|
#include <getopt.h>
|
||||||
|
|
@ -733,7 +733,7 @@ diff -urNp coreutils-8.16-orig/src/expand.c coreutils-8.16/src/expand.c
|
||||||
+ if (convert)
|
+ if (convert)
|
||||||
+ {
|
+ {
|
||||||
+ ++column;
|
+ ++column;
|
||||||
+ if (convert_entire_line == 0)
|
+ if (convert_entire_line == 0 && !isblank(*bufpos))
|
||||||
+ convert = 0;
|
+ convert = 0;
|
||||||
+ }
|
+ }
|
||||||
+ putchar (*bufpos);
|
+ putchar (*bufpos);
|
||||||
|
|
@ -793,7 +793,7 @@ diff -urNp coreutils-8.16-orig/src/expand.c coreutils-8.16/src/expand.c
|
||||||
+
|
+
|
||||||
+ width = wcwidth (wc);
|
+ width = wcwidth (wc);
|
||||||
+ column += (width > 0) ? width : 0;
|
+ column += (width > 0) ? width : 0;
|
||||||
+ if (convert_entire_line == 0)
|
+ if (convert_entire_line == 0 && !iswblank(wc))
|
||||||
+ convert = 0;
|
+ convert = 0;
|
||||||
+ }
|
+ }
|
||||||
+ }
|
+ }
|
||||||
|
|
@ -823,9 +823,9 @@ diff -urNp coreutils-8.16-orig/src/expand.c coreutils-8.16/src/expand.c
|
||||||
|
|
||||||
if (have_read_stdin && fclose (stdin) != 0)
|
if (have_read_stdin && fclose (stdin) != 0)
|
||||||
error (EXIT_FAILURE, errno, "-");
|
error (EXIT_FAILURE, errno, "-");
|
||||||
diff -urNp coreutils-8.16-orig/src/fold.c coreutils-8.16/src/fold.c
|
diff -urNp coreutils-8.17-orig/src/fold.c coreutils-8.17/src/fold.c
|
||||||
--- coreutils-8.16-orig/src/fold.c 2012-03-24 19:22:13.000000000 +0100
|
--- coreutils-8.17-orig/src/fold.c 2012-04-29 13:45:30.000000000 +0200
|
||||||
+++ coreutils-8.16/src/fold.c 2012-03-26 17:48:37.000000000 +0200
|
+++ coreutils-8.17/src/fold.c 2013-01-24 17:11:53.535456924 +0100
|
||||||
@@ -22,12 +22,34 @@
|
@@ -22,12 +22,34 @@
|
||||||
#include <getopt.h>
|
#include <getopt.h>
|
||||||
#include <sys/types.h>
|
#include <sys/types.h>
|
||||||
|
|
@ -1223,9 +1223,9 @@ diff -urNp coreutils-8.16-orig/src/fold.c coreutils-8.16/src/fold.c
|
||||||
break;
|
break;
|
||||||
|
|
||||||
case 's': /* Break at word boundaries. */
|
case 's': /* Break at word boundaries. */
|
||||||
diff -urNp coreutils-8.16-orig/src/join.c coreutils-8.16/src/join.c
|
diff -urNp coreutils-8.17-orig/src/join.c coreutils-8.17/src/join.c
|
||||||
--- coreutils-8.16-orig/src/join.c 2012-03-24 21:26:51.000000000 +0100
|
--- coreutils-8.17-orig/src/join.c 2012-05-02 10:31:47.000000000 +0200
|
||||||
+++ coreutils-8.16/src/join.c 2012-03-26 17:50:02.000000000 +0200
|
+++ coreutils-8.17/src/join.c 2013-01-24 17:11:53.537387892 +0100
|
||||||
@@ -22,18 +22,32 @@
|
@@ -22,18 +22,32 @@
|
||||||
#include <sys/types.h>
|
#include <sys/types.h>
|
||||||
#include <getopt.h>
|
#include <getopt.h>
|
||||||
|
|
@ -1444,7 +1444,7 @@ diff -urNp coreutils-8.16-orig/src/join.c coreutils-8.16/src/join.c
|
||||||
static void
|
static void
|
||||||
freeline (struct line *line)
|
freeline (struct line *line)
|
||||||
{
|
{
|
||||||
@@ -313,56 +472,115 @@ keycmp (struct line const *line1, struct
|
@@ -313,56 +472,130 @@ keycmp (struct line const *line1, struct
|
||||||
size_t jf_1, size_t jf_2)
|
size_t jf_1, size_t jf_2)
|
||||||
{
|
{
|
||||||
/* Start of field to compare in each file. */
|
/* Start of field to compare in each file. */
|
||||||
|
|
@ -1458,6 +1458,7 @@ diff -urNp coreutils-8.16-orig/src/join.c coreutils-8.16/src/join.c
|
||||||
+ size_t len[2]; /* Length of fields to compare. */
|
+ size_t len[2]; /* Length of fields to compare. */
|
||||||
int diff;
|
int diff;
|
||||||
+ int i, j;
|
+ int i, j;
|
||||||
|
+ int mallocd = 0;
|
||||||
|
|
||||||
if (jf_1 < line1->nfields)
|
if (jf_1 < line1->nfields)
|
||||||
{
|
{
|
||||||
|
|
@ -1513,7 +1514,8 @@ diff -urNp coreutils-8.16-orig/src/join.c coreutils-8.16/src/join.c
|
||||||
+
|
+
|
||||||
+ for (i = 0; i < 2; i++)
|
+ for (i = 0; i < 2; i++)
|
||||||
+ {
|
+ {
|
||||||
+ copy[i] = alloca (len[i] + 1);
|
+ mallocd = 1;
|
||||||
|
+ copy[i] = xmalloc (len[i] + 1);
|
||||||
+
|
+
|
||||||
+ for (j = 0; j < MIN (len[0], len[1]);)
|
+ for (j = 0; j < MIN (len[0], len[1]);)
|
||||||
+ {
|
+ {
|
||||||
|
|
@ -1553,7 +1555,8 @@ diff -urNp coreutils-8.16-orig/src/join.c coreutils-8.16/src/join.c
|
||||||
+ {
|
+ {
|
||||||
+ for (i = 0; i < 2; i++)
|
+ for (i = 0; i < 2; i++)
|
||||||
+ {
|
+ {
|
||||||
+ copy[i] = alloca (len[i] + 1);
|
+ mallocd = 1;
|
||||||
|
+ copy[i] = xmalloc (len[i] + 1);
|
||||||
+
|
+
|
||||||
+ for (j = 0; j < MIN (len[0], len[1]); j++)
|
+ for (j = 0; j < MIN (len[0], len[1]); j++)
|
||||||
+ copy[i][j] = toupper (beg[i][j]);
|
+ copy[i][j] = toupper (beg[i][j]);
|
||||||
|
|
@ -1572,9 +1575,21 @@ diff -urNp coreutils-8.16-orig/src/join.c coreutils-8.16/src/join.c
|
||||||
}
|
}
|
||||||
|
|
||||||
+ if (hard_LC_COLLATE)
|
+ if (hard_LC_COLLATE)
|
||||||
+ return xmemcoll ((char *) copy[0], len[0], (char *) copy[1], len[1]);
|
+ {
|
||||||
|
+ diff = xmemcoll ((char *) copy[0], len[0], (char *) copy[1], len[1]);
|
||||||
|
+
|
||||||
|
+ if (mallocd)
|
||||||
|
+ for (i = 0; i < 2; i++)
|
||||||
|
+ free (copy[i]);
|
||||||
|
+
|
||||||
|
+ return diff;
|
||||||
|
+ }
|
||||||
+ diff = memcmp (copy[0], copy[1], MIN (len[0], len[1]));
|
+ diff = memcmp (copy[0], copy[1], MIN (len[0], len[1]));
|
||||||
+
|
+
|
||||||
|
+ if (mallocd)
|
||||||
|
+ for (i = 0; i < 2; i++)
|
||||||
|
+ free (copy[i]);
|
||||||
|
+
|
||||||
+
|
+
|
||||||
if (diff)
|
if (diff)
|
||||||
return diff;
|
return diff;
|
||||||
|
|
@ -1583,7 +1598,7 @@ diff -urNp coreutils-8.16-orig/src/join.c coreutils-8.16/src/join.c
|
||||||
}
|
}
|
||||||
|
|
||||||
/* Check that successive input lines PREV and CURRENT from input file
|
/* Check that successive input lines PREV and CURRENT from input file
|
||||||
@@ -454,6 +672,11 @@ get_line (FILE *fp, struct line **linep,
|
@@ -454,6 +687,11 @@ get_line (FILE *fp, struct line **linep,
|
||||||
}
|
}
|
||||||
++line_no[which - 1];
|
++line_no[which - 1];
|
||||||
|
|
||||||
|
|
@ -1595,7 +1610,7 @@ diff -urNp coreutils-8.16-orig/src/join.c coreutils-8.16/src/join.c
|
||||||
xfields (line);
|
xfields (line);
|
||||||
|
|
||||||
if (prevline[which - 1])
|
if (prevline[which - 1])
|
||||||
@@ -553,21 +776,28 @@ prfield (size_t n, struct line const *li
|
@@ -553,21 +791,28 @@ prfield (size_t n, struct line const *li
|
||||||
|
|
||||||
/* Output all the fields in line, other than the join field. */
|
/* Output all the fields in line, other than the join field. */
|
||||||
|
|
||||||
|
|
@ -1627,7 +1642,7 @@ diff -urNp coreutils-8.16-orig/src/join.c coreutils-8.16/src/join.c
|
||||||
prfield (i, line);
|
prfield (i, line);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
@@ -578,7 +808,6 @@ static void
|
@@ -578,7 +823,6 @@ static void
|
||||||
prjoin (struct line const *line1, struct line const *line2)
|
prjoin (struct line const *line1, struct line const *line2)
|
||||||
{
|
{
|
||||||
const struct outlist *outlist;
|
const struct outlist *outlist;
|
||||||
|
|
@ -1635,7 +1650,7 @@ diff -urNp coreutils-8.16-orig/src/join.c coreutils-8.16/src/join.c
|
||||||
size_t field;
|
size_t field;
|
||||||
struct line const *line;
|
struct line const *line;
|
||||||
|
|
||||||
@@ -612,7 +841,7 @@ prjoin (struct line const *line1, struct
|
@@ -612,7 +856,7 @@ prjoin (struct line const *line1, struct
|
||||||
o = o->next;
|
o = o->next;
|
||||||
if (o == NULL)
|
if (o == NULL)
|
||||||
break;
|
break;
|
||||||
|
|
@ -1644,7 +1659,7 @@ diff -urNp coreutils-8.16-orig/src/join.c coreutils-8.16/src/join.c
|
||||||
}
|
}
|
||||||
putchar ('\n');
|
putchar ('\n');
|
||||||
}
|
}
|
||||||
@@ -1090,21 +1319,46 @@ main (int argc, char **argv)
|
@@ -1090,21 +1334,46 @@ main (int argc, char **argv)
|
||||||
|
|
||||||
case 't':
|
case 't':
|
||||||
{
|
{
|
||||||
|
|
@ -1701,9 +1716,9 @@ diff -urNp coreutils-8.16-orig/src/join.c coreutils-8.16/src/join.c
|
||||||
break;
|
break;
|
||||||
|
|
||||||
case NOCHECK_ORDER_OPTION:
|
case NOCHECK_ORDER_OPTION:
|
||||||
diff -urNp coreutils-8.16-orig/src/pr.c coreutils-8.16/src/pr.c
|
diff -urNp coreutils-8.17-orig/src/pr.c coreutils-8.17/src/pr.c
|
||||||
--- coreutils-8.16-orig/src/pr.c 2012-03-24 21:26:51.000000000 +0100
|
--- coreutils-8.17-orig/src/pr.c 2012-05-10 09:14:30.000000000 +0200
|
||||||
+++ coreutils-8.16/src/pr.c 2012-03-26 17:50:48.000000000 +0200
|
+++ coreutils-8.17/src/pr.c 2013-01-24 17:11:53.543389383 +0100
|
||||||
@@ -312,6 +312,32 @@
|
@@ -312,6 +312,32 @@
|
||||||
|
|
||||||
#include <getopt.h>
|
#include <getopt.h>
|
||||||
|
|
@ -2448,8 +2463,8 @@ diff -urNp coreutils-8.16-orig/src/pr.c coreutils-8.16/src/pr.c
|
||||||
looking for more options and printing the next batch of files.
|
looking for more options and printing the next batch of files.
|
||||||
|
|
||||||
diff -urNp coreutils-8.17-orig/src/sort.c coreutils-8.17/src/sort.c
|
diff -urNp coreutils-8.17-orig/src/sort.c coreutils-8.17/src/sort.c
|
||||||
--- coreutils-8.17-orig/src/sort.c
|
--- coreutils-8.17-orig/src/sort.c 2013-01-24 17:03:36.008333014 +0100
|
||||||
+++ coreutils-8.17/src/sort.c
|
+++ coreutils-8.17/src/sort.c 2013-01-24 17:11:53.549332078 +0100
|
||||||
@@ -22,12 +22,21 @@
|
@@ -22,12 +22,21 @@
|
||||||
|
|
||||||
#include <config.h>
|
#include <config.h>
|
||||||
|
|
@ -2472,7 +2487,7 @@ diff -urNp coreutils-8.17-orig/src/sort.c coreutils-8.17/src/sort.c
|
||||||
#include "system.h"
|
#include "system.h"
|
||||||
#include "argmatch.h"
|
#include "argmatch.h"
|
||||||
#include "error.h"
|
#include "error.h"
|
||||||
@@ -167,12 +176,34 @@ static int thousands_sep;
|
@@ -165,12 +174,34 @@ static int thousands_sep;
|
||||||
|
|
||||||
/* Nonzero if the corresponding locales are hard. */
|
/* Nonzero if the corresponding locales are hard. */
|
||||||
static bool hard_LC_COLLATE;
|
static bool hard_LC_COLLATE;
|
||||||
|
|
@ -2508,7 +2523,7 @@ diff -urNp coreutils-8.17-orig/src/sort.c coreutils-8.17/src/sort.c
|
||||||
/* The kind of blanks for '-b' to skip in various options. */
|
/* The kind of blanks for '-b' to skip in various options. */
|
||||||
enum blanktype { bl_start, bl_end, bl_both };
|
enum blanktype { bl_start, bl_end, bl_both };
|
||||||
|
|
||||||
@@ -343,13 +374,11 @@ static bool reverse;
|
@@ -344,13 +375,11 @@ static bool reverse;
|
||||||
they were read if all keys compare equal. */
|
they were read if all keys compare equal. */
|
||||||
static bool stable;
|
static bool stable;
|
||||||
|
|
||||||
|
|
@ -2525,7 +2540,7 @@ diff -urNp coreutils-8.17-orig/src/sort.c coreutils-8.17/src/sort.c
|
||||||
|
|
||||||
/* Flag to remove consecutive duplicate lines from the output.
|
/* Flag to remove consecutive duplicate lines from the output.
|
||||||
Only the last of a sequence of equal lines will be output. */
|
Only the last of a sequence of equal lines will be output. */
|
||||||
@@ -782,6 +811,46 @@ reap_all (void)
|
@@ -783,6 +812,46 @@ reap_all (void)
|
||||||
reap (-1);
|
reap (-1);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
@ -2572,7 +2587,7 @@ diff -urNp coreutils-8.17-orig/src/sort.c coreutils-8.17/src/sort.c
|
||||||
/* Clean up any remaining temporary files. */
|
/* Clean up any remaining temporary files. */
|
||||||
|
|
||||||
static void
|
static void
|
||||||
@@ -1214,7 +1283,7 @@ zaptemp (char const *name)
|
@@ -1215,7 +1284,7 @@ zaptemp (char const *name)
|
||||||
free (node);
|
free (node);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
@ -2581,7 +2596,7 @@ diff -urNp coreutils-8.17-orig/src/sort.c coreutils-8.17/src/sort.c
|
||||||
|
|
||||||
static int
|
static int
|
||||||
struct_month_cmp (void const *m1, void const *m2)
|
struct_month_cmp (void const *m1, void const *m2)
|
||||||
@@ -1229,7 +1298,7 @@ struct_month_cmp (void const *m1, void c
|
@@ -1230,7 +1299,7 @@ struct_month_cmp (void const *m1, void c
|
||||||
/* Initialize the character class tables. */
|
/* Initialize the character class tables. */
|
||||||
|
|
||||||
static void
|
static void
|
||||||
|
|
@ -2590,7 +2605,7 @@ diff -urNp coreutils-8.17-orig/src/sort.c coreutils-8.17/src/sort.c
|
||||||
{
|
{
|
||||||
size_t i;
|
size_t i;
|
||||||
|
|
||||||
@@ -1241,7 +1310,7 @@ inittables (void)
|
@@ -1242,7 +1311,7 @@ inittables (void)
|
||||||
fold_toupper[i] = toupper (i);
|
fold_toupper[i] = toupper (i);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
@ -2599,7 +2614,7 @@ diff -urNp coreutils-8.17-orig/src/sort.c coreutils-8.17/src/sort.c
|
||||||
/* If we're not in the "C" locale, read different names for months. */
|
/* If we're not in the "C" locale, read different names for months. */
|
||||||
if (hard_LC_TIME)
|
if (hard_LC_TIME)
|
||||||
{
|
{
|
||||||
@@ -1323,6 +1392,84 @@ specify_nmerge (int oi, char c, char con
|
@@ -1324,6 +1393,84 @@ specify_nmerge (int oi, char c, char con
|
||||||
xstrtol_fatal (e, oi, c, long_options, s);
|
xstrtol_fatal (e, oi, c, long_options, s);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
@ -2684,7 +2699,7 @@ diff -urNp coreutils-8.17-orig/src/sort.c coreutils-8.17/src/sort.c
|
||||||
/* Specify the amount of main memory to use when sorting. */
|
/* Specify the amount of main memory to use when sorting. */
|
||||||
static void
|
static void
|
||||||
specify_sort_size (int oi, char c, char const *s)
|
specify_sort_size (int oi, char c, char const *s)
|
||||||
@@ -1551,7 +1698,7 @@ buffer_linelim (struct buffer const *buf
|
@@ -1552,7 +1699,7 @@ buffer_linelim (struct buffer const *buf
|
||||||
by KEY in LINE. */
|
by KEY in LINE. */
|
||||||
|
|
||||||
static char *
|
static char *
|
||||||
|
|
@ -2693,7 +2708,7 @@ diff -urNp coreutils-8.17-orig/src/sort.c coreutils-8.17/src/sort.c
|
||||||
{
|
{
|
||||||
char *ptr = line->text, *lim = ptr + line->length - 1;
|
char *ptr = line->text, *lim = ptr + line->length - 1;
|
||||||
size_t sword = key->sword;
|
size_t sword = key->sword;
|
||||||
@@ -1560,10 +1707,10 @@ begfield (struct line const *line, struc
|
@@ -1561,10 +1708,10 @@ begfield (struct line const *line, struc
|
||||||
/* The leading field separator itself is included in a field when -t
|
/* The leading field separator itself is included in a field when -t
|
||||||
is absent. */
|
is absent. */
|
||||||
|
|
||||||
|
|
@ -2706,7 +2721,7 @@ diff -urNp coreutils-8.17-orig/src/sort.c coreutils-8.17/src/sort.c
|
||||||
++ptr;
|
++ptr;
|
||||||
if (ptr < lim)
|
if (ptr < lim)
|
||||||
++ptr;
|
++ptr;
|
||||||
@@ -1589,11 +1736,70 @@ begfield (struct line const *line, struc
|
@@ -1590,11 +1737,70 @@ begfield (struct line const *line, struc
|
||||||
return ptr;
|
return ptr;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
@ -2778,7 +2793,7 @@ diff -urNp coreutils-8.17-orig/src/sort.c coreutils-8.17/src/sort.c
|
||||||
{
|
{
|
||||||
char *ptr = line->text, *lim = ptr + line->length - 1;
|
char *ptr = line->text, *lim = ptr + line->length - 1;
|
||||||
size_t eword = key->eword, echar = key->echar;
|
size_t eword = key->eword, echar = key->echar;
|
||||||
@@ -1608,10 +1814,10 @@ limfield (struct line const *line, struc
|
@@ -1609,10 +1815,10 @@ limfield (struct line const *line, struc
|
||||||
'beginning' is the first character following the delimiting TAB.
|
'beginning' is the first character following the delimiting TAB.
|
||||||
Otherwise, leave PTR pointing at the first 'blank' character after
|
Otherwise, leave PTR pointing at the first 'blank' character after
|
||||||
the preceding field. */
|
the preceding field. */
|
||||||
|
|
@ -2791,7 +2806,7 @@ diff -urNp coreutils-8.17-orig/src/sort.c coreutils-8.17/src/sort.c
|
||||||
++ptr;
|
++ptr;
|
||||||
if (ptr < lim && (eword || echar))
|
if (ptr < lim && (eword || echar))
|
||||||
++ptr;
|
++ptr;
|
||||||
@@ -1657,10 +1863,10 @@ limfield (struct line const *line, struc
|
@@ -1658,10 +1864,10 @@ limfield (struct line const *line, struc
|
||||||
*/
|
*/
|
||||||
|
|
||||||
/* Make LIM point to the end of (one byte past) the current field. */
|
/* Make LIM point to the end of (one byte past) the current field. */
|
||||||
|
|
@ -2804,7 +2819,7 @@ diff -urNp coreutils-8.17-orig/src/sort.c coreutils-8.17/src/sort.c
|
||||||
if (newlim)
|
if (newlim)
|
||||||
lim = newlim;
|
lim = newlim;
|
||||||
}
|
}
|
||||||
@@ -1691,6 +1897,130 @@ limfield (struct line const *line, struc
|
@@ -1692,6 +1898,130 @@ limfield (struct line const *line, struc
|
||||||
return ptr;
|
return ptr;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
@ -2935,7 +2950,7 @@ diff -urNp coreutils-8.17-orig/src/sort.c coreutils-8.17/src/sort.c
|
||||||
/* Fill BUF reading from FP, moving buf->left bytes from the end
|
/* Fill BUF reading from FP, moving buf->left bytes from the end
|
||||||
of buf->buf to the beginning first. If EOF is reached and the
|
of buf->buf to the beginning first. If EOF is reached and the
|
||||||
file wasn't terminated by a newline, supply one. Set up BUF's line
|
file wasn't terminated by a newline, supply one. Set up BUF's line
|
||||||
@@ -1777,8 +2107,22 @@ fillbuf (struct buffer *buf, FILE *fp, c
|
@@ -1778,8 +2108,22 @@ fillbuf (struct buffer *buf, FILE *fp, c
|
||||||
else
|
else
|
||||||
{
|
{
|
||||||
if (key->skipsblanks)
|
if (key->skipsblanks)
|
||||||
|
|
@ -2960,7 +2975,7 @@ diff -urNp coreutils-8.17-orig/src/sort.c coreutils-8.17/src/sort.c
|
||||||
line->keybeg = line_start;
|
line->keybeg = line_start;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
@@ -1899,7 +2243,7 @@ human_numcompare (char const *a, char co
|
@@ -1900,7 +2244,7 @@ human_numcompare (char const *a, char co
|
||||||
hideously fast. */
|
hideously fast. */
|
||||||
|
|
||||||
static int
|
static int
|
||||||
|
|
@ -2969,7 +2984,7 @@ diff -urNp coreutils-8.17-orig/src/sort.c coreutils-8.17/src/sort.c
|
||||||
{
|
{
|
||||||
while (blanks[to_uchar (*a)])
|
while (blanks[to_uchar (*a)])
|
||||||
a++;
|
a++;
|
||||||
@@ -1909,6 +2253,25 @@ numcompare (char const *a, char const *b
|
@@ -1910,6 +2254,25 @@ numcompare (char const *a, char const *b
|
||||||
return strnumcmp (a, b, decimal_point, thousands_sep);
|
return strnumcmp (a, b, decimal_point, thousands_sep);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
@ -2995,7 +3010,7 @@ diff -urNp coreutils-8.17-orig/src/sort.c coreutils-8.17/src/sort.c
|
||||||
/* Work around a problem whereby the long double value returned by glibc's
|
/* Work around a problem whereby the long double value returned by glibc's
|
||||||
strtold ("NaN", ...) contains uninitialized bits: clear all bytes of
|
strtold ("NaN", ...) contains uninitialized bits: clear all bytes of
|
||||||
A and B before calling strtold. FIXME: remove this function once
|
A and B before calling strtold. FIXME: remove this function once
|
||||||
@@ -1959,7 +2322,7 @@ general_numcompare (char const *sa, char
|
@@ -1960,7 +2323,7 @@ general_numcompare (char const *sa, char
|
||||||
Return 0 if the name in S is not recognized. */
|
Return 0 if the name in S is not recognized. */
|
||||||
|
|
||||||
static int
|
static int
|
||||||
|
|
@ -3004,7 +3019,7 @@ diff -urNp coreutils-8.17-orig/src/sort.c coreutils-8.17/src/sort.c
|
||||||
{
|
{
|
||||||
size_t lo = 0;
|
size_t lo = 0;
|
||||||
size_t hi = MONTHS_PER_YEAR;
|
size_t hi = MONTHS_PER_YEAR;
|
||||||
@@ -2234,15 +2597,14 @@ debug_key (struct line const *line, stru
|
@@ -2235,15 +2598,14 @@ debug_key (struct line const *line, stru
|
||||||
char saved = *lim;
|
char saved = *lim;
|
||||||
*lim = '\0';
|
*lim = '\0';
|
||||||
|
|
||||||
|
|
@ -3022,7 +3037,7 @@ diff -urNp coreutils-8.17-orig/src/sort.c coreutils-8.17/src/sort.c
|
||||||
else if (key->general_numeric)
|
else if (key->general_numeric)
|
||||||
ignore_value (strtold (beg, &tighter_lim));
|
ignore_value (strtold (beg, &tighter_lim));
|
||||||
else if (key->numeric || key->human_numeric)
|
else if (key->numeric || key->human_numeric)
|
||||||
@@ -2386,7 +2748,7 @@ key_warnings (struct keyfield const *gke
|
@@ -2387,7 +2749,7 @@ key_warnings (struct keyfield const *gke
|
||||||
bool maybe_space_aligned = !hard_LC_COLLATE && default_key_compare (key)
|
bool maybe_space_aligned = !hard_LC_COLLATE && default_key_compare (key)
|
||||||
&& !(key->schar || key->echar);
|
&& !(key->schar || key->echar);
|
||||||
bool line_offset = key->eword == 0 && key->echar != 0; /* -k1.x,1.y */
|
bool line_offset = key->eword == 0 && key->echar != 0; /* -k1.x,1.y */
|
||||||
|
|
@ -3031,7 +3046,7 @@ diff -urNp coreutils-8.17-orig/src/sort.c coreutils-8.17/src/sort.c
|
||||||
&& ((!key->skipsblanks && !(implicit_skip || maybe_space_aligned))
|
&& ((!key->skipsblanks && !(implicit_skip || maybe_space_aligned))
|
||||||
|| (!key->skipsblanks && key->schar)
|
|| (!key->skipsblanks && key->schar)
|
||||||
|| (!key->skipeblanks && key->echar)))
|
|| (!key->skipeblanks && key->echar)))
|
||||||
@@ -2444,11 +2806,83 @@ key_warnings (struct keyfield const *gke
|
@@ -2445,11 +2807,87 @@ key_warnings (struct keyfield const *gke
|
||||||
error (0, 0, _("option '-r' only applies to last-resort comparison"));
|
error (0, 0, _("option '-r' only applies to last-resort comparison"));
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
@ -3058,13 +3073,13 @@ diff -urNp coreutils-8.17-orig/src/sort.c coreutils-8.17/src/sort.c
|
||||||
+ if (len == 0)
|
+ if (len == 0)
|
||||||
+ return 0;
|
+ return 0;
|
||||||
+
|
+
|
||||||
+ month = (char *) alloca (len + 1);
|
+ month = (char *) xmalloc (len + 1);
|
||||||
+
|
+
|
||||||
+ tmp = (char *) alloca (len + 1);
|
+ tmp = (char *) xmalloc (len + 1);
|
||||||
+ memcpy (tmp, s, len);
|
+ memcpy (tmp, s, len);
|
||||||
+ tmp[len] = '\0';
|
+ tmp[len] = '\0';
|
||||||
+ pp = (const char **)&tmp;
|
+ pp = (const char **)&tmp;
|
||||||
+ month_wcs = (wchar_t *) alloca ((len + 1) * sizeof (wchar_t));
|
+ month_wcs = (wchar_t *) xmalloc ((len + 1) * sizeof (wchar_t));
|
||||||
+ memset (&state, '\0', sizeof(mbstate_t));
|
+ memset (&state, '\0', sizeof(mbstate_t));
|
||||||
+
|
+
|
||||||
+ wclength = mbsrtowcs (month_wcs, pp, len + 1, &state);
|
+ wclength = mbsrtowcs (month_wcs, pp, len + 1, &state);
|
||||||
|
|
@ -3103,6 +3118,10 @@ diff -urNp coreutils-8.17-orig/src/sort.c coreutils-8.17/src/sort.c
|
||||||
+ if (ea && result)
|
+ if (ea && result)
|
||||||
+ *ea = s + strlen (monthtab[lo].name);
|
+ *ea = s + strlen (monthtab[lo].name);
|
||||||
+
|
+
|
||||||
|
+ free (month);
|
||||||
|
+ free (tmp);
|
||||||
|
+ free (month_wcs);
|
||||||
|
+
|
||||||
+ return result;
|
+ return result;
|
||||||
+}
|
+}
|
||||||
+#endif
|
+#endif
|
||||||
|
|
@ -3116,7 +3135,7 @@ diff -urNp coreutils-8.17-orig/src/sort.c coreutils-8.17/src/sort.c
|
||||||
{
|
{
|
||||||
struct keyfield *key = keylist;
|
struct keyfield *key = keylist;
|
||||||
|
|
||||||
@@ -2533,7 +2967,7 @@ keycompare (struct line const *a, struct
|
@@ -2534,7 +2972,7 @@ keycompare (struct line const *a, struct
|
||||||
else if (key->human_numeric)
|
else if (key->human_numeric)
|
||||||
diff = human_numcompare (ta, tb);
|
diff = human_numcompare (ta, tb);
|
||||||
else if (key->month)
|
else if (key->month)
|
||||||
|
|
@ -3125,7 +3144,7 @@ diff -urNp coreutils-8.17-orig/src/sort.c coreutils-8.17/src/sort.c
|
||||||
else if (key->random)
|
else if (key->random)
|
||||||
diff = compare_random (ta, tlena, tb, tlenb);
|
diff = compare_random (ta, tlena, tb, tlenb);
|
||||||
else if (key->version)
|
else if (key->version)
|
||||||
@@ -2649,6 +3083,180 @@ keycompare (struct line const *a, struct
|
@@ -2650,6 +3088,181 @@ keycompare (struct line const *a, struct
|
||||||
return key->reverse ? -diff : diff;
|
return key->reverse ? -diff : diff;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
@ -3181,7 +3200,7 @@ diff -urNp coreutils-8.17-orig/src/sort.c coreutils-8.17/src/sort.c
|
||||||
+ {
|
+ {
|
||||||
+ if (ignore || translate)
|
+ if (ignore || translate)
|
||||||
+ {
|
+ {
|
||||||
+ char *copy_a = (char *) alloca (lena + 1 + lenb + 1);
|
+ char *copy_a = (char *) xmalloc (lena + 1 + lenb + 1);
|
||||||
+ char *copy_b = copy_a + lena + 1;
|
+ char *copy_b = copy_a + lena + 1;
|
||||||
+ size_t new_len_a, new_len_b;
|
+ size_t new_len_a, new_len_b;
|
||||||
+ size_t i, j;
|
+ size_t i, j;
|
||||||
|
|
@ -3257,6 +3276,7 @@ diff -urNp coreutils-8.17-orig/src/sort.c coreutils-8.17/src/sort.c
|
||||||
+ IGNORE_CHARS (new_len_b, lenb, textb, copy_b,
|
+ IGNORE_CHARS (new_len_b, lenb, textb, copy_b,
|
||||||
+ wc_b, mblength_b, state_b);
|
+ wc_b, mblength_b, state_b);
|
||||||
+ diff = xmemcoll (copy_a, new_len_a, copy_b, new_len_b);
|
+ diff = xmemcoll (copy_a, new_len_a, copy_b, new_len_b);
|
||||||
|
+ free(copy_a);
|
||||||
+ }
|
+ }
|
||||||
+ else if (lena == 0)
|
+ else if (lena == 0)
|
||||||
+ diff = - NONZERO (lenb);
|
+ diff = - NONZERO (lenb);
|
||||||
|
|
@ -3306,7 +3326,7 @@ diff -urNp coreutils-8.17-orig/src/sort.c coreutils-8.17/src/sort.c
|
||||||
/* Compare two lines A and B, returning negative, zero, or positive
|
/* Compare two lines A and B, returning negative, zero, or positive
|
||||||
depending on whether A compares less than, equal to, or greater than B. */
|
depending on whether A compares less than, equal to, or greater than B. */
|
||||||
|
|
||||||
@@ -4109,7 +4717,7 @@ main (int argc, char **argv)
|
@@ -4110,7 +4723,7 @@ main (int argc, char **argv)
|
||||||
initialize_exit_failure (SORT_FAILURE);
|
initialize_exit_failure (SORT_FAILURE);
|
||||||
|
|
||||||
hard_LC_COLLATE = hard_locale (LC_COLLATE);
|
hard_LC_COLLATE = hard_locale (LC_COLLATE);
|
||||||
|
|
@ -3315,7 +3335,7 @@ diff -urNp coreutils-8.17-orig/src/sort.c coreutils-8.17/src/sort.c
|
||||||
hard_LC_TIME = hard_locale (LC_TIME);
|
hard_LC_TIME = hard_locale (LC_TIME);
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
@@ -4130,6 +4738,29 @@ main (int argc, char **argv)
|
@@ -4131,6 +4744,29 @@ main (int argc, char **argv)
|
||||||
thousands_sep = -1;
|
thousands_sep = -1;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
@ -3345,7 +3365,7 @@ diff -urNp coreutils-8.17-orig/src/sort.c coreutils-8.17/src/sort.c
|
||||||
have_read_stdin = false;
|
have_read_stdin = false;
|
||||||
inittables ();
|
inittables ();
|
||||||
|
|
||||||
@@ -4400,13 +5031,34 @@ main (int argc, char **argv)
|
@@ -4401,13 +5037,34 @@ main (int argc, char **argv)
|
||||||
|
|
||||||
case 't':
|
case 't':
|
||||||
{
|
{
|
||||||
|
|
@ -3384,7 +3404,7 @@ diff -urNp coreutils-8.17-orig/src/sort.c coreutils-8.17/src/sort.c
|
||||||
else
|
else
|
||||||
{
|
{
|
||||||
/* Provoke with 'sort -txx'. Complain about
|
/* Provoke with 'sort -txx'. Complain about
|
||||||
@@ -4417,9 +5069,12 @@ main (int argc, char **argv)
|
@@ -4418,9 +5075,12 @@ main (int argc, char **argv)
|
||||||
quote (optarg));
|
quote (optarg));
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
@ -3399,9 +3419,9 @@ diff -urNp coreutils-8.17-orig/src/sort.c coreutils-8.17/src/sort.c
|
||||||
}
|
}
|
||||||
break;
|
break;
|
||||||
|
|
||||||
diff -urNp coreutils-8.16-orig/src/unexpand.c coreutils-8.16/src/unexpand.c
|
diff -urNp coreutils-8.17-orig/src/unexpand.c coreutils-8.17/src/unexpand.c
|
||||||
--- coreutils-8.16-orig/src/unexpand.c 2012-03-24 21:26:51.000000000 +0100
|
--- coreutils-8.17-orig/src/unexpand.c 2012-05-01 22:55:08.000000000 +0200
|
||||||
+++ coreutils-8.16/src/unexpand.c 2012-03-26 17:51:46.000000000 +0200
|
+++ coreutils-8.17/src/unexpand.c 2013-01-24 17:11:53.551335712 +0100
|
||||||
@@ -38,12 +38,29 @@
|
@@ -38,12 +38,29 @@
|
||||||
#include <stdio.h>
|
#include <stdio.h>
|
||||||
#include <getopt.h>
|
#include <getopt.h>
|
||||||
|
|
@ -3655,9 +3675,9 @@ diff -urNp coreutils-8.16-orig/src/unexpand.c coreutils-8.16/src/unexpand.c
|
||||||
|
|
||||||
if (have_read_stdin && fclose (stdin) != 0)
|
if (have_read_stdin && fclose (stdin) != 0)
|
||||||
error (EXIT_FAILURE, errno, "-");
|
error (EXIT_FAILURE, errno, "-");
|
||||||
diff -urNp coreutils-8.16-orig/src/uniq.c coreutils-8.16/src/uniq.c
|
diff -urNp coreutils-8.17-orig/src/uniq.c coreutils-8.17/src/uniq.c
|
||||||
--- coreutils-8.16-orig/src/uniq.c 2012-03-24 21:26:51.000000000 +0100
|
--- coreutils-8.17-orig/src/uniq.c 2012-05-01 22:55:08.000000000 +0200
|
||||||
+++ coreutils-8.16/src/uniq.c 2012-03-26 17:35:09.000000000 +0200
|
+++ coreutils-8.17/src/uniq.c 2013-01-24 17:11:53.552332659 +0100
|
||||||
@@ -21,6 +21,16 @@
|
@@ -21,6 +21,16 @@
|
||||||
#include <getopt.h>
|
#include <getopt.h>
|
||||||
#include <sys/types.h>
|
#include <sys/types.h>
|
||||||
|
|
@ -3809,7 +3829,7 @@ diff -urNp coreutils-8.16-orig/src/uniq.c coreutils-8.16/src/uniq.c
|
||||||
if (check_chars < oldlen)
|
if (check_chars < oldlen)
|
||||||
oldlen = check_chars;
|
oldlen = check_chars;
|
||||||
if (check_chars < newlen)
|
if (check_chars < newlen)
|
||||||
@@ -241,14 +346,92 @@ different (char *old, char *new, size_t
|
@@ -241,14 +346,100 @@ different (char *old, char *new, size_t
|
||||||
|
|
||||||
if (ignore_case)
|
if (ignore_case)
|
||||||
{
|
{
|
||||||
|
|
@ -3817,14 +3837,18 @@ diff -urNp coreutils-8.16-orig/src/uniq.c coreutils-8.16/src/uniq.c
|
||||||
- return oldlen != newlen || memcasecmp (old, new, oldlen);
|
- return oldlen != newlen || memcasecmp (old, new, oldlen);
|
||||||
+ size_t i;
|
+ size_t i;
|
||||||
+
|
+
|
||||||
+ copy_old = alloca (oldlen + 1);
|
+ copy_old = xmalloc (oldlen + 1);
|
||||||
+ copy_new = alloca (oldlen + 1);
|
+ copy_new = xmalloc (oldlen + 1);
|
||||||
+
|
+
|
||||||
+ for (i = 0; i < oldlen; i++)
|
+ for (i = 0; i < oldlen; i++)
|
||||||
+ {
|
+ {
|
||||||
+ copy_old[i] = toupper (old[i]);
|
+ copy_old[i] = toupper (old[i]);
|
||||||
+ copy_new[i] = toupper (new[i]);
|
+ copy_new[i] = toupper (new[i]);
|
||||||
+ }
|
+ }
|
||||||
|
+ bool rc = xmemcoll (copy_old, oldlen, copy_new, newlen);
|
||||||
|
+ free (copy_old);
|
||||||
|
+ free (copy_new);
|
||||||
|
+ return rc;
|
||||||
}
|
}
|
||||||
- else if (hard_LC_COLLATE)
|
- else if (hard_LC_COLLATE)
|
||||||
- return xmemcoll (old, oldlen, new, newlen) != 0;
|
- return xmemcoll (old, oldlen, new, newlen) != 0;
|
||||||
|
|
@ -3836,6 +3860,7 @@ diff -urNp coreutils-8.16-orig/src/uniq.c coreutils-8.16/src/uniq.c
|
||||||
+ }
|
+ }
|
||||||
+
|
+
|
||||||
+ return xmemcoll (copy_old, oldlen, copy_new, newlen);
|
+ return xmemcoll (copy_old, oldlen, copy_new, newlen);
|
||||||
|
+
|
||||||
+}
|
+}
|
||||||
+
|
+
|
||||||
+#if HAVE_MBRTOWC
|
+#if HAVE_MBRTOWC
|
||||||
|
|
@ -3860,7 +3885,7 @@ diff -urNp coreutils-8.16-orig/src/uniq.c coreutils-8.16/src/uniq.c
|
||||||
+
|
+
|
||||||
+ for (i = 0; i < 2; i++)
|
+ for (i = 0; i < 2; i++)
|
||||||
+ {
|
+ {
|
||||||
+ copy[i] = alloca (len[i] + 1);
|
+ copy[i] = xmalloc (len[i] + 1);
|
||||||
+
|
+
|
||||||
+ for (j = 0, chars = 0; j < len[i] && chars < check_chars; chars++)
|
+ for (j = 0, chars = 0; j < len[i] && chars < check_chars; chars++)
|
||||||
+ {
|
+ {
|
||||||
|
|
@ -3900,14 +3925,17 @@ diff -urNp coreutils-8.16-orig/src/uniq.c coreutils-8.16/src/uniq.c
|
||||||
+ copy[i][j] = '\0';
|
+ copy[i][j] = '\0';
|
||||||
+ len[i] = j;
|
+ len[i] = j;
|
||||||
+ }
|
+ }
|
||||||
|
+ int rc = xmemcoll (copy[0], len[0], copy[1], len[1]);
|
||||||
|
+ free (copy[0]);
|
||||||
|
+ free (copy[1]);
|
||||||
|
+ return rc;
|
||||||
+
|
+
|
||||||
+ return xmemcoll (copy[0], len[0], copy[1], len[1]);
|
|
||||||
}
|
}
|
||||||
+#endif
|
+#endif
|
||||||
|
|
||||||
/* Output the line in linebuffer LINE to standard output
|
/* Output the line in linebuffer LINE to standard output
|
||||||
provided that the switches say it should be output.
|
provided that the switches say it should be output.
|
||||||
@@ -304,15 +487,43 @@ check_file (const char *infile, const ch
|
@@ -304,15 +495,43 @@ check_file (const char *infile, const ch
|
||||||
{
|
{
|
||||||
char *prevfield IF_LINT ( = NULL);
|
char *prevfield IF_LINT ( = NULL);
|
||||||
size_t prevlen IF_LINT ( = 0);
|
size_t prevlen IF_LINT ( = 0);
|
||||||
|
|
@ -3951,7 +3979,7 @@ diff -urNp coreutils-8.16-orig/src/uniq.c coreutils-8.16/src/uniq.c
|
||||||
if (prevline->length == 0
|
if (prevline->length == 0
|
||||||
|| different (thisfield, prevfield, thislen, prevlen))
|
|| different (thisfield, prevfield, thislen, prevlen))
|
||||||
{
|
{
|
||||||
@@ -331,17 +542,26 @@ check_file (const char *infile, const ch
|
@@ -331,17 +550,26 @@ check_file (const char *infile, const ch
|
||||||
size_t prevlen;
|
size_t prevlen;
|
||||||
uintmax_t match_count = 0;
|
uintmax_t match_count = 0;
|
||||||
bool first_delimiter = true;
|
bool first_delimiter = true;
|
||||||
|
|
@ -3978,7 +4006,7 @@ diff -urNp coreutils-8.16-orig/src/uniq.c coreutils-8.16/src/uniq.c
|
||||||
if (readlinebuffer_delim (thisline, stdin, delimiter) == 0)
|
if (readlinebuffer_delim (thisline, stdin, delimiter) == 0)
|
||||||
{
|
{
|
||||||
if (ferror (stdin))
|
if (ferror (stdin))
|
||||||
@@ -350,6 +570,14 @@ check_file (const char *infile, const ch
|
@@ -350,6 +578,14 @@ check_file (const char *infile, const ch
|
||||||
}
|
}
|
||||||
thisfield = find_field (thisline);
|
thisfield = find_field (thisline);
|
||||||
thislen = thisline->length - 1 - (thisfield - thisline->buffer);
|
thislen = thisline->length - 1 - (thisfield - thisline->buffer);
|
||||||
|
|
@ -3993,7 +4021,7 @@ diff -urNp coreutils-8.16-orig/src/uniq.c coreutils-8.16/src/uniq.c
|
||||||
match = !different (thisfield, prevfield, thislen, prevlen);
|
match = !different (thisfield, prevfield, thislen, prevlen);
|
||||||
match_count += match;
|
match_count += match;
|
||||||
|
|
||||||
@@ -382,6 +610,9 @@ check_file (const char *infile, const ch
|
@@ -382,6 +618,9 @@ check_file (const char *infile, const ch
|
||||||
SWAP_LINES (prevline, thisline);
|
SWAP_LINES (prevline, thisline);
|
||||||
prevfield = thisfield;
|
prevfield = thisfield;
|
||||||
prevlen = thislen;
|
prevlen = thislen;
|
||||||
|
|
@ -4003,7 +4031,7 @@ diff -urNp coreutils-8.16-orig/src/uniq.c coreutils-8.16/src/uniq.c
|
||||||
if (!match)
|
if (!match)
|
||||||
match_count = 0;
|
match_count = 0;
|
||||||
}
|
}
|
||||||
@@ -427,6 +658,19 @@ main (int argc, char **argv)
|
@@ -427,6 +666,19 @@ main (int argc, char **argv)
|
||||||
|
|
||||||
atexit (close_stdout);
|
atexit (close_stdout);
|
||||||
|
|
||||||
|
|
@ -4023,10 +4051,10 @@ diff -urNp coreutils-8.16-orig/src/uniq.c coreutils-8.16/src/uniq.c
|
||||||
skip_chars = 0;
|
skip_chars = 0;
|
||||||
skip_fields = 0;
|
skip_fields = 0;
|
||||||
check_chars = SIZE_MAX;
|
check_chars = SIZE_MAX;
|
||||||
diff -urNp coreutils-8.16-orig/tests/Makefile.am coreutils-8.16/tests/Makefile.am
|
diff -urNp coreutils-8.17-orig/tests/Makefile.am coreutils-8.17/tests/Makefile.am
|
||||||
--- coreutils-8.16-orig/tests/Makefile.am 2012-03-26 18:01:35.564014659 +0200
|
--- coreutils-8.17-orig/tests/Makefile.am 2013-01-24 17:03:36.144332400 +0100
|
||||||
+++ coreutils-8.16/tests/Makefile.am 2012-03-26 18:02:01.023015013 +0200
|
+++ coreutils-8.17/tests/Makefile.am 2013-01-24 17:11:53.554331990 +0100
|
||||||
@@ -242,6 +242,7 @@ TESTS = \
|
@@ -246,6 +246,7 @@ TESTS = \
|
||||||
misc/sort-debug-warn \
|
misc/sort-debug-warn \
|
||||||
misc/sort-discrim \
|
misc/sort-discrim \
|
||||||
misc/sort-files0-from \
|
misc/sort-files0-from \
|
||||||
|
|
@ -4034,7 +4062,7 @@ diff -urNp coreutils-8.16-orig/tests/Makefile.am coreutils-8.16/tests/Makefile.a
|
||||||
misc/sort-float \
|
misc/sort-float \
|
||||||
misc/sort-merge \
|
misc/sort-merge \
|
||||||
misc/sort-merge-fdlimit \
|
misc/sort-merge-fdlimit \
|
||||||
@@ -537,6 +538,10 @@ TESTS = \
|
@@ -545,6 +546,10 @@ TESTS = \
|
||||||
$(root_tests)
|
$(root_tests)
|
||||||
|
|
||||||
pr_data = \
|
pr_data = \
|
||||||
|
|
@ -4045,9 +4073,9 @@ diff -urNp coreutils-8.16-orig/tests/Makefile.am coreutils-8.16/tests/Makefile.a
|
||||||
pr/0F \
|
pr/0F \
|
||||||
pr/0FF \
|
pr/0FF \
|
||||||
pr/0FFnt \
|
pr/0FFnt \
|
||||||
diff -urNp coreutils-8.16-orig/tests/misc/cut coreutils-8.16/tests/misc/cut
|
diff -urNp coreutils-8.17-orig/tests/misc/cut coreutils-8.17/tests/misc/cut
|
||||||
--- coreutils-8.16-orig/tests/misc/cut 2012-02-03 10:22:06.000000000 +0100
|
--- coreutils-8.17-orig/tests/misc/cut 2012-02-03 10:22:06.000000000 +0100
|
||||||
+++ coreutils-8.16/tests/misc/cut 2012-03-26 17:40:49.000000000 +0200
|
+++ coreutils-8.17/tests/misc/cut 2013-01-24 17:11:53.555332032 +0100
|
||||||
@@ -23,14 +23,15 @@ use strict;
|
@@ -23,14 +23,15 @@ use strict;
|
||||||
# Turn off localization of executable's output.
|
# Turn off localization of executable's output.
|
||||||
@ENV{qw(LANGUAGE LANG LC_ALL)} = ('C') x 3;
|
@ENV{qw(LANGUAGE LANG LC_ALL)} = ('C') x 3;
|
||||||
|
|
@ -4077,41 +4105,41 @@ diff -urNp coreutils-8.16-orig/tests/misc/cut coreutils-8.16/tests/misc/cut
|
||||||
['inval2', qw(-f -), {IN=>''}, {OUT=>''}, {EXIT=>1}, {ERR=>$no_endpoint}],
|
['inval2', qw(-f -), {IN=>''}, {OUT=>''}, {EXIT=>1}, {ERR=>$no_endpoint}],
|
||||||
['inval3', '-f', '4,-', {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},
|
['inval4', '-f', '1-2,-', {IN=>''}, {OUT=>''}, {EXIT=>1},
|
||||||
diff -urNp coreutils-8.16-orig/tests/misc/mb1.I coreutils-8.16/tests/misc/mb1.I
|
diff -urNp coreutils-8.17-orig/tests/misc/mb1.I coreutils-8.17/tests/misc/mb1.I
|
||||||
--- coreutils-8.16-orig/tests/misc/mb1.I 1970-01-01 01:00:00.000000000 +0100
|
--- coreutils-8.17-orig/tests/misc/mb1.I 1970-01-01 01:00:00.000000000 +0100
|
||||||
+++ coreutils-8.16/tests/misc/mb1.I 2012-03-26 17:35:09.000000000 +0200
|
+++ coreutils-8.17/tests/misc/mb1.I 2013-01-24 17:11:53.555332032 +0100
|
||||||
@@ -0,0 +1,4 @@
|
@@ -0,0 +1,4 @@
|
||||||
+Apple@10
|
+Apple@10
|
||||||
+Banana@5
|
+Banana@5
|
||||||
+Citrus@20
|
+Citrus@20
|
||||||
+Cherry@30
|
+Cherry@30
|
||||||
diff -urNp coreutils-8.16-orig/tests/misc/mb1.X coreutils-8.16/tests/misc/mb1.X
|
diff -urNp coreutils-8.17-orig/tests/misc/mb1.X coreutils-8.17/tests/misc/mb1.X
|
||||||
--- coreutils-8.16-orig/tests/misc/mb1.X 1970-01-01 01:00:00.000000000 +0100
|
--- coreutils-8.17-orig/tests/misc/mb1.X 1970-01-01 01:00:00.000000000 +0100
|
||||||
+++ coreutils-8.16/tests/misc/mb1.X 2012-03-26 17:35:09.000000000 +0200
|
+++ coreutils-8.17/tests/misc/mb1.X 2013-01-24 17:11:53.556332141 +0100
|
||||||
@@ -0,0 +1,4 @@
|
@@ -0,0 +1,4 @@
|
||||||
+Banana@5
|
+Banana@5
|
||||||
+Apple@10
|
+Apple@10
|
||||||
+Citrus@20
|
+Citrus@20
|
||||||
+Cherry@30
|
+Cherry@30
|
||||||
diff -urNp coreutils-8.16-orig/tests/misc/mb2.I coreutils-8.16/tests/misc/mb2.I
|
diff -urNp coreutils-8.17-orig/tests/misc/mb2.I coreutils-8.17/tests/misc/mb2.I
|
||||||
--- coreutils-8.16-orig/tests/misc/mb2.I 1970-01-01 01:00:00.000000000 +0100
|
--- coreutils-8.17-orig/tests/misc/mb2.I 1970-01-01 01:00:00.000000000 +0100
|
||||||
+++ coreutils-8.16/tests/misc/mb2.I 2012-03-26 17:35:09.000000000 +0200
|
+++ coreutils-8.17/tests/misc/mb2.I 2013-01-24 17:11:53.556332141 +0100
|
||||||
@@ -0,0 +1,4 @@
|
@@ -0,0 +1,4 @@
|
||||||
+Apple@AA10@@20
|
+Apple@AA10@@20
|
||||||
+Banana@AA5@@30
|
+Banana@AA5@@30
|
||||||
+Citrus@AA20@@5
|
+Citrus@AA20@@5
|
||||||
+Cherry@AA30@@10
|
+Cherry@AA30@@10
|
||||||
diff -urNp coreutils-8.16-orig/tests/misc/mb2.X coreutils-8.16/tests/misc/mb2.X
|
diff -urNp coreutils-8.17-orig/tests/misc/mb2.X coreutils-8.17/tests/misc/mb2.X
|
||||||
--- coreutils-8.16-orig/tests/misc/mb2.X 1970-01-01 01:00:00.000000000 +0100
|
--- coreutils-8.17-orig/tests/misc/mb2.X 1970-01-01 01:00:00.000000000 +0100
|
||||||
+++ coreutils-8.16/tests/misc/mb2.X 2012-03-26 17:35:09.000000000 +0200
|
+++ coreutils-8.17/tests/misc/mb2.X 2013-01-24 17:11:53.557333171 +0100
|
||||||
@@ -0,0 +1,4 @@
|
@@ -0,0 +1,4 @@
|
||||||
+Citrus@AA20@@5
|
+Citrus@AA20@@5
|
||||||
+Cherry@AA30@@10
|
+Cherry@AA30@@10
|
||||||
+Apple@AA10@@20
|
+Apple@AA10@@20
|
||||||
+Banana@AA5@@30
|
+Banana@AA5@@30
|
||||||
diff -urNp coreutils-8.16-orig/tests/misc/sort-mb-tests coreutils-8.16/tests/misc/sort-mb-tests
|
diff -urNp coreutils-8.17-orig/tests/misc/sort-mb-tests coreutils-8.17/tests/misc/sort-mb-tests
|
||||||
--- coreutils-8.16-orig/tests/misc/sort-mb-tests 1970-01-01 01:00:00.000000000 +0100
|
--- coreutils-8.17-orig/tests/misc/sort-mb-tests 1970-01-01 01:00:00.000000000 +0100
|
||||||
+++ coreutils-8.16/tests/misc/sort-mb-tests 2012-03-26 17:35:09.000000000 +0200
|
+++ coreutils-8.17/tests/misc/sort-mb-tests 2013-01-24 17:11:53.557333171 +0100
|
||||||
@@ -0,0 +1,58 @@
|
@@ -0,0 +1,58 @@
|
||||||
+#! /bin/sh
|
+#! /bin/sh
|
||||||
+case $# in
|
+case $# in
|
||||||
|
|
|
||||||
|
|
@ -4,7 +4,7 @@ auth sufficient pam_rootok.so
|
||||||
#auth sufficient pam_wheel.so trust use_uid
|
#auth sufficient pam_wheel.so trust use_uid
|
||||||
# Uncomment the following line to require a user to be in the "wheel" group.
|
# Uncomment the following line to require a user to be in the "wheel" group.
|
||||||
#auth required pam_wheel.so use_uid
|
#auth required pam_wheel.so use_uid
|
||||||
auth include system-auth
|
auth substack system-auth
|
||||||
auth include postlogin
|
auth include postlogin
|
||||||
account sufficient pam_succeed_if.so uid = 0 use_uid quiet
|
account sufficient pam_succeed_if.so uid = 0 use_uid quiet
|
||||||
account include system-auth
|
account include system-auth
|
||||||
|
|
|
||||||
|
|
@ -1,7 +1,7 @@
|
||||||
Summary: A set of basic GNU tools commonly used in shell scripts
|
Summary: A set of basic GNU tools commonly used in shell scripts
|
||||||
Name: coreutils
|
Name: coreutils
|
||||||
Version: 8.17
|
Version: 8.17
|
||||||
Release: 4%{?dist}
|
Release: 8%{?dist}
|
||||||
License: GPLv3+
|
License: GPLv3+
|
||||||
Group: System Environment/Base
|
Group: System Environment/Base
|
||||||
Url: http://www.gnu.org/software/coreutils/
|
Url: http://www.gnu.org/software/coreutils/
|
||||||
|
|
@ -19,6 +19,9 @@ Source203: coreutils-runuser-l.pamd
|
||||||
|
|
||||||
# From upstream
|
# From upstream
|
||||||
Patch1: coreutils-8.17-ls-rootdir-symlink.patch
|
Patch1: coreutils-8.17-ls-rootdir-symlink.patch
|
||||||
|
Patch2: coreutils-8.17-sort-uniq-fmr.patch
|
||||||
|
Patch3: coreutils-8.17-cp-freememoryread.patch
|
||||||
|
Patch4: coreutils-8.17-df-duplicates.patch
|
||||||
|
|
||||||
# Our patches
|
# Our patches
|
||||||
#general patch to workaround koji build system issues
|
#general patch to workaround koji build system issues
|
||||||
|
|
@ -146,6 +149,9 @@ the old GNU fileutils, sh-utils, and textutils packages.
|
||||||
|
|
||||||
# From upstream
|
# From upstream
|
||||||
%patch1 -p1 -b .roodirsymlink
|
%patch1 -p1 -b .roodirsymlink
|
||||||
|
%patch2 -p1 -b .fmr
|
||||||
|
%patch3 -p1 -b .freememoryread
|
||||||
|
%patch4 -p1 -b .duplic
|
||||||
|
|
||||||
# Our patches
|
# Our patches
|
||||||
%patch100 -p1 -b .configure
|
%patch100 -p1 -b .configure
|
||||||
|
|
@ -176,7 +182,7 @@ the old GNU fileutils, sh-utils, and textutils packages.
|
||||||
%patch951 -p1 -b .selinuxman
|
%patch951 -p1 -b .selinuxman
|
||||||
%patch952 -p1 -b .cpZ
|
%patch952 -p1 -b .cpZ
|
||||||
|
|
||||||
chmod a+x tests/misc/sort-mb-tests tests/df/direct || :
|
chmod a+x tests/misc/sort-mb-tests tests/df/direct tests/df/skip-duplicates tests/df/skip-rootfs || :
|
||||||
|
|
||||||
#fix typos/mistakes in localized documentation(#439410, #440056)
|
#fix typos/mistakes in localized documentation(#439410, #440056)
|
||||||
find ./po/ -name "*.p*" | xargs \
|
find ./po/ -name "*.p*" | xargs \
|
||||||
|
|
@ -419,6 +425,22 @@ fi
|
||||||
%{?!norunuser:%{_sbindir}/runuser}
|
%{?!norunuser:%{_sbindir}/runuser}
|
||||||
|
|
||||||
%changelog
|
%changelog
|
||||||
|
* Thu Jan 24 2013 Ondrej Vasik <ovasik@redhat.com> 8.17-8
|
||||||
|
- fix multiple segmantation faults in i18n patch (by SUSE)
|
||||||
|
(#869442, #902917)- CVE2013-0223/CVE2013-0221/CVE2013-0222
|
||||||
|
|
||||||
|
* Tue Dec 11 2012 Ondrej Vasik <ovasik@redhat.com> 8.17-7
|
||||||
|
- fix showing duplicates in df (#709351, O.Oprala, B.Voelker)
|
||||||
|
|
||||||
|
* Mon Nov 05 2012 Ondrej Vasik <ovasik@redhat.com> 8.17-6
|
||||||
|
- fix support for ecryptfs mount of "Private" in su (#722323)
|
||||||
|
- cp: avoid data-corrupting free-memory-read (upstream fix)
|
||||||
|
|
||||||
|
* Mon Aug 20 2012 Ondrej Vasik <ovasik@redhat.com> 8.17-5
|
||||||
|
- fix possible free memory read and dataloss in sort -u
|
||||||
|
(upstream fix)
|
||||||
|
- multibyte fixes in cut and expand (by M.Briza, #821260)
|
||||||
|
|
||||||
* Wed Jul 18 2012 Fedora Release Engineering <rel-eng@lists.fedoraproject.org> - 8.17-4
|
* Wed Jul 18 2012 Fedora Release Engineering <rel-eng@lists.fedoraproject.org> - 8.17-4
|
||||||
- Rebuilt for https://fedoraproject.org/wiki/Fedora_18_Mass_Rebuild
|
- Rebuilt for https://fedoraproject.org/wiki/Fedora_18_Mass_Rebuild
|
||||||
|
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue