new upstream release 8.16, defuzz patches, remove already applied patches

This commit is contained in:
Ondřej Vašík 2012-03-26 18:23:32 +02:00
parent 1618770344
commit bb1a465686
9 changed files with 215 additions and 272 deletions

1
.gitignore vendored
View File

@ -4,3 +4,4 @@
/coreutils-8.13.tar.xz /coreutils-8.13.tar.xz
/coreutils-8.14.tar.xz /coreutils-8.14.tar.xz
/coreutils-8.15.tar.xz /coreutils-8.15.tar.xz
/coreutils-8.16.tar.xz

View File

@ -1,43 +0,0 @@
diff --git a/src/du.c b/src/du.c
index e4e36df..41c9535 100644
--- a/src/du.c
+++ b/src/du.c
@@ -443,7 +443,14 @@ process_file (FTS *fts, FTSENT *ent)
return false;
}
- if (fts->fts_options & FTS_XDEV && fts->fts_dev != sb->st_dev)
+ /* The --one-file-system (-x) option cannot exclude anything
+ specified on the command-line. By definition, it can exclude
+ a file or directory only when its device number is different
+ from that of its just-processed parent directory, and du does
+ not process the parent of a command-line argument. */
+ if (fts->fts_options & FTS_XDEV
+ && FTS_ROOTLEVEL < ent->fts_level
+ && fts->fts_dev != sb->st_dev)
excluded = true;
}
diff --git a/tests/du/one-file-system b/tests/du/one-file-system
index f0d264a..110080f 100755
--- a/tests/du/one-file-system
+++ b/tests/du/one-file-system
@@ -43,7 +43,15 @@ compare exp out || fail=1
du -xL d > u || fail=1
sed 's/^[0-9][0-9]* //' u > out1
echo d > exp1 || fail=1
-
compare exp1 out1 || fail=1
+# With coreutils-8.15, "du -xs FILE" would print no output.
+touch f
+for opt in -x -xs; do
+ du $opt f > u || fail=1
+ sed 's/^[0-9][0-9]* //' u > out2
+ echo f > exp2 || fail=1
+ compare exp2 out2 || fail=1
+done
+
Exit $fail
--
cgit v0.9.0.2

View File

@ -1,19 +1,7 @@
From ea2d050b1952feb99f86c98255280beb6e589d8c Mon Sep 17 00:00:00 2001 diff -urNp coreutils-8.16-orig/configure.ac coreutils-8.16/configure.ac
From: Ludwig Nussel <ludwig.nussel@suse.de> --- coreutils-8.16-orig/configure.ac 2012-03-24 19:22:13.000000000 +0100
Date: Tue, 17 Aug 2010 13:21:44 +0200 +++ coreutils-8.16/configure.ac 2012-03-26 17:59:07.900139497 +0200
Subject: [PATCH 1/7] pam support for su @@ -185,6 +185,20 @@ fi
---
configure.ac | 14 +++
src/Makefile.am | 4 +-
src/su.c | 266 ++++++++++++++++++++++++++++++++++++++++++++++++++++++-
3 files changed, 278 insertions(+), 6 deletions(-)
diff --git a/configure.ac b/configure.ac
index b07a52b..1fb5839 100644
--- a/configure.ac
+++ b/configure.ac
@@ -128,6 +128,20 @@ fi
AC_FUNC_FORK AC_FUNC_FORK
@ -34,11 +22,34 @@ index b07a52b..1fb5839 100644
optional_bin_progs= optional_bin_progs=
AC_CHECK_FUNCS([chroot], AC_CHECK_FUNCS([chroot],
gl_ADD_PROG([optional_bin_progs], [chroot])) gl_ADD_PROG([optional_bin_progs], [chroot]))
diff --git a/src/Makefile.am b/src/Makefile.am diff -urNp coreutils-8.16-orig/doc/coreutils.texi coreutils-8.16/doc/coreutils.texi
index db5359b..154a5ed 100644 --- coreutils-8.16-orig/doc/coreutils.texi 2012-03-26 17:58:27.624763998 +0200
--- a/src/Makefile.am +++ coreutils-8.16/doc/coreutils.texi 2012-03-26 17:59:07.907138599 +0200
+++ b/src/Makefile.am @@ -15804,7 +15804,9 @@ the exit status of @var{command} otherwi
@@ -363,8 +363,8 @@ factor_LDADD += $(LIB_GMP)
@command{su} allows one user to temporarily become another user. It runs a
command (often an interactive shell) with the real and effective user
-ID, group ID, and supplemental groups of a given @var{user}. Synopsis:
+ID, group ID, and supplemental groups of a given @var{user}. When the -l
+option is given, the su-l PAM file is used instead of the default su PAM file.
+Synopsis:
@example
su [@var{option}]@dots{} [@var{user} [@var{arg}]@dots{}]
@@ -15883,7 +15885,8 @@ environment variables except @env{TERM},
(which are set, even for the super-user, as described above), and set
@env{PATH} to a compiled-in default value. Change to @var{user}'s home
directory. Prepend @samp{-} to the shell's name, intended to make it
-read its login startup file(s).
+read its login startup file(s). When this option is given, /etc/pam.d/su-l
+PAM file is used instead of the default one.
@item -m
@itemx -p
diff -urNp coreutils-8.16-orig/src/Makefile.am coreutils-8.16/src/Makefile.am
--- coreutils-8.16-orig/src/Makefile.am 2012-03-24 19:22:13.000000000 +0100
+++ coreutils-8.16/src/Makefile.am 2012-03-26 17:59:07.928142551 +0200
@@ -357,8 +357,8 @@ factor_LDADD += $(LIB_GMP)
# for getloadavg # for getloadavg
uptime_LDADD += $(GETLOADAVG_LIBS) uptime_LDADD += $(GETLOADAVG_LIBS)
@ -49,10 +60,9 @@ index db5359b..154a5ed 100644
# for various ACL functions # for various ACL functions
copy_LDADD += $(LIB_ACL) copy_LDADD += $(LIB_ACL)
diff --git a/src/su.c b/src/su.c diff -urNp coreutils-8.16-orig/src/su.c coreutils-8.16/src/su.c
index f8f5b61..811aad7 100644 --- coreutils-8.16-orig/src/su.c 2012-03-26 17:58:27.629764055 +0200
--- a/src/su.c +++ coreutils-8.16/src/su.c 2012-03-26 17:59:07.931138998 +0200
+++ b/src/su.c
@@ -37,6 +37,16 @@ @@ -37,6 +37,16 @@
restricts who can su to UID 0 accounts. RMS considers that to restricts who can su to UID 0 accounts. RMS considers that to
be fascist. be fascist.
@ -84,7 +94,7 @@ index f8f5b61..811aad7 100644
#include "system.h" #include "system.h"
#include "getpass.h" #include "getpass.h"
@@ -111,7 +128,9 @@ @@ -120,7 +137,9 @@
/* The user to become if none is specified. */ /* The user to become if none is specified. */
#define DEFAULT_USER "root" #define DEFAULT_USER "root"
@ -94,7 +104,7 @@ index f8f5b61..811aad7 100644
static void run_shell (char const *, char const *, char **, size_t) static void run_shell (char const *, char const *, char **, size_t)
ATTRIBUTE_NORETURN; ATTRIBUTE_NORETURN;
@@ -125,6 +144,11 @@ static bool simulate_login; @@ -134,6 +153,11 @@ static bool simulate_login;
/* If true, change some environment vars to indicate the user su'd to. */ /* If true, change some environment vars to indicate the user su'd to. */
static bool change_environment; static bool change_environment;
@ -106,7 +116,7 @@ index f8f5b61..811aad7 100644
static struct option const longopts[] = static struct option const longopts[] =
{ {
{"command", required_argument, NULL, 'c'}, {"command", required_argument, NULL, 'c'},
@@ -200,7 +224,174 @@ log_su (struct passwd const *pw, bool successful) @@ -212,7 +236,174 @@ log_su (struct passwd const *pw, bool su
} }
#endif #endif
@ -281,7 +291,7 @@ index f8f5b61..811aad7 100644
Return true if the user gives the correct password for entry PW, Return true if the user gives the correct password for entry PW,
false if not. Return true without asking for a password if run by UID 0 false if not. Return true without asking for a password if run by UID 0
or if PW has an empty password. */ or if PW has an empty password. */
@@ -208,10 +399,52 @@ log_su (struct passwd const *pw, bool successful) @@ -220,10 +411,52 @@ log_su (struct passwd const *pw, bool su
static bool static bool
correct_password (const struct passwd *pw) correct_password (const struct passwd *pw)
{ {
@ -335,15 +345,15 @@ index f8f5b61..811aad7 100644
endspent (); endspent ();
if (sp) if (sp)
@@ -232,6 +465,7 @@ correct_password (const struct passwd *pw) @@ -244,6 +477,7 @@ correct_password (const struct passwd *p
encrypted = crypt (unencrypted, correct); encrypted = crypt (unencrypted, correct);
memset (unencrypted, 0, strlen (unencrypted)); memset (unencrypted, 0, strlen (unencrypted));
return STREQ (encrypted, correct); return STREQ (encrypted, correct);
+#endif /* !USE_PAM */ +#endif /* !USE_PAM */
} }
/* Update `environ' for the new shell based on PW, with SHELL being /* Update 'environ' for the new shell based on PW, with SHELL being
@@ -274,19 +508,41 @@ modify_environment (const struct passwd *pw, const char *shell) @@ -286,19 +520,41 @@ modify_environment (const struct passwd
} }
} }
} }
@ -387,7 +397,7 @@ index f8f5b61..811aad7 100644
if (setgid (pw->pw_gid)) if (setgid (pw->pw_gid))
error (EXIT_CANCELED, errno, _("cannot set group id")); error (EXIT_CANCELED, errno, _("cannot set group id"));
if (setuid (pw->pw_uid)) if (setuid (pw->pw_uid))
@@ -500,9 +756,21 @@ main (int argc, char **argv) @@ -511,9 +767,21 @@ main (int argc, char **argv)
shell = NULL; shell = NULL;
} }
shell = xstrdup (shell ? shell : pw->pw_shell); shell = xstrdup (shell ? shell : pw->pw_shell);
@ -410,29 +420,3 @@ index f8f5b61..811aad7 100644
if (simulate_login && chdir (pw->pw_dir) != 0) if (simulate_login && chdir (pw->pw_dir) != 0)
error (0, errno, _("warning: cannot change directory to %s"), pw->pw_dir); error (0, errno, _("warning: cannot change directory to %s"), pw->pw_dir);
--
1.7.1
diff -urNp coreutils-8.7-orig/doc/coreutils.texi coreutils-8.7/doc/coreutils.texi
--- coreutils-8.7-orig/doc/coreutils.texi 2010-11-15 12:47:03.529922880 +0100
+++ coreutils-8.7/doc/coreutils.texi 2010-11-15 12:49:55.945171380 +0100
@@ -15180,7 +15180,9 @@ the exit status of @var{command} otherwi
@command{su} allows one user to temporarily become another user. It runs a
command (often an interactive shell) with the real and effective user
-ID, group ID, and supplemental groups of a given @var{user}. Synopsis:
+ID, group ID, and supplemental groups of a given @var{user}. When the -l
+option is given, the su-l PAM file is used instead of the default su PAM file.
+Synopsis:
@example
su [@var{option}]@dots{} [@var{user} [@var{arg}]@dots{}]
@@ -15259,7 +15261,8 @@ environment variables except @env{TERM},
(which are set, even for the super-user, as described above), and set
@env{PATH} to a compiled-in default value. Change to @var{user}'s home
directory. Prepend @samp{-} to the shell's name, intended to make it
-read its login startup file(s).
+read its login startup file(s). When this option is given, /etc/pam.d/su-l
+PAM file is used instead of the default one.
@item -m
@itemx -p

View File

@ -100,7 +100,7 @@ diff -urNp coreutils-8.7-orig/src/su.c coreutils-8.7/src/su.c
@@ -100,9 +100,15 @@ @@ -100,9 +100,15 @@
#include "error.h" #include "error.h"
/* The official name of this program (e.g., no `g' prefix). */ /* The official name of this program (e.g., no 'g' prefix). */
+#ifndef RUNUSER +#ifndef RUNUSER
#define PROGRAM_NAME "su" #define PROGRAM_NAME "su"
+#else +#else

View File

@ -1,7 +1,7 @@
diff -urNp coreutils-8.11-orig/doc/coreutils.texi coreutils-8.11/doc/coreutils.texi diff -urNp coreutils-8.16-orig/doc/coreutils.texi coreutils-8.16/doc/coreutils.texi
--- coreutils-8.11-orig/doc/coreutils.texi 2011-04-12 12:07:43.000000000 +0200 --- coreutils-8.16-orig/doc/coreutils.texi 2012-03-26 07:38:37.000000000 +0200
+++ coreutils-8.11/doc/coreutils.texi 2011-04-14 09:53:43.764309420 +0200 +++ coreutils-8.16/doc/coreutils.texi 2012-03-26 17:31:31.101014556 +0200
@@ -10409,6 +10409,13 @@ pseudo-file-systems, such as automounter @@ -10584,6 +10584,13 @@ pseudo-file-systems, such as automounter
Scale sizes by @var{size} before printing them (@pxref{Block size}). Scale sizes by @var{size} before printing them (@pxref{Block size}).
For example, @option{-BG} prints sizes in units of 1,073,741,824 bytes. For example, @option{-BG} prints sizes in units of 1,073,741,824 bytes.
@ -15,10 +15,10 @@ diff -urNp coreutils-8.11-orig/doc/coreutils.texi coreutils-8.11/doc/coreutils.t
@itemx --total @itemx --total
@opindex --total @opindex --total
@cindex grand total of disk size, usage and available space @cindex grand total of disk size, usage and available space
diff -urNp coreutils-8.11-orig/src/df.c coreutils-8.11/src/df.c diff -urNp coreutils-8.16-orig/src/df.c coreutils-8.16/src/df.c
--- coreutils-8.11-orig/src/df.c 2011-04-12 12:07:43.000000000 +0200 --- coreutils-8.16-orig/src/df.c 2012-03-24 21:26:51.000000000 +0100
+++ coreutils-8.11/src/df.c 2011-04-14 10:37:44.208308771 +0200 +++ coreutils-8.16/src/df.c 2012-03-26 17:31:31.102014797 +0200
@@ -112,6 +112,9 @@ static bool print_type; @@ -113,6 +113,9 @@ static bool print_type;
/* If true, print a grand total at the end. */ /* If true, print a grand total at the end. */
static bool print_grand_total; static bool print_grand_total;
@ -28,7 +28,7 @@ diff -urNp coreutils-8.11-orig/src/df.c coreutils-8.11/src/df.c
/* Grand total data. */ /* Grand total data. */
static struct fs_usage grand_fsu; static struct fs_usage grand_fsu;
@@ -166,13 +169,15 @@ static size_t nrows; @@ -167,13 +170,15 @@ static size_t nrows;
enum enum
{ {
NO_SYNC_OPTION = CHAR_MAX + 1, NO_SYNC_OPTION = CHAR_MAX + 1,
@ -45,7 +45,7 @@ diff -urNp coreutils-8.11-orig/src/df.c coreutils-8.11/src/df.c
{"inodes", no_argument, NULL, 'i'}, {"inodes", no_argument, NULL, 'i'},
{"human-readable", no_argument, NULL, 'h'}, {"human-readable", no_argument, NULL, 'h'},
{"si", no_argument, NULL, 'H'}, {"si", no_argument, NULL, 'H'},
@@ -259,7 +264,11 @@ get_header (void) @@ -260,7 +265,11 @@ get_header (void)
} }
char *cell = NULL; char *cell = NULL;
@ -58,7 +58,7 @@ diff -urNp coreutils-8.11-orig/src/df.c coreutils-8.11/src/df.c
if (!header) if (!header)
header = _(headers[field][DEFAULT_MODE]); header = _(headers[field][DEFAULT_MODE]);
@@ -757,6 +766,17 @@ get_point (const char *point, const stru @@ -790,6 +799,17 @@ get_point (const char *point, const stru
static void static void
get_entry (char const *name, struct stat const *statp) get_entry (char const *name, struct stat const *statp)
{ {
@ -76,15 +76,15 @@ diff -urNp coreutils-8.11-orig/src/df.c coreutils-8.11/src/df.c
if ((S_ISBLK (statp->st_mode) || S_ISCHR (statp->st_mode)) if ((S_ISBLK (statp->st_mode) || S_ISCHR (statp->st_mode))
&& get_disk (name)) && get_disk (name))
return; return;
@@ -825,6 +845,7 @@ Mandatory arguments to long options are @@ -857,6 +877,7 @@ Mandatory arguments to long options are
-B, --block-size=SIZE scale sizes by SIZE before printing them. E.g.,\n\ -B, --block-size=SIZE scale sizes by SIZE before printing them. E.g.,\n\
`-BM' prints sizes in units of 1,048,576 bytes.\n\ '-BM' prints sizes in units of 1,048,576 bytes.\n\
See SIZE format below.\n\ See SIZE format below.\n\
+ --direct show statistics for a file instead of mount point\n\ + --direct show statistics for a file instead of mount point\n\
--total produce a grand total\n\ --total produce a grand total\n\
-h, --human-readable print sizes in human readable format (e.g., 1K 234M 2G)\ -h, --human-readable print sizes in human readable format (e.g., 1K 234M 2G)\
\n\ \n\
@@ -901,6 +922,9 @@ main (int argc, char **argv) @@ -933,6 +954,9 @@ main (int argc, char **argv)
xstrtol_fatal (e, oi, c, long_options, optarg); xstrtol_fatal (e, oi, c, long_options, optarg);
} }
break; break;
@ -94,7 +94,7 @@ diff -urNp coreutils-8.11-orig/src/df.c coreutils-8.11/src/df.c
case 'i': case 'i':
inode_format = true; inode_format = true;
break; break;
@@ -961,6 +985,13 @@ main (int argc, char **argv) @@ -993,6 +1017,13 @@ main (int argc, char **argv)
} }
} }
@ -108,9 +108,9 @@ diff -urNp coreutils-8.11-orig/src/df.c coreutils-8.11/src/df.c
if (human_output_opts == -1) if (human_output_opts == -1)
{ {
if (posix_format) if (posix_format)
diff -urNp coreutils-8.11-orig/tests/df/direct coreutils-8.11/tests/df/direct diff -urNp coreutils-8.16-orig/tests/df/direct coreutils-8.16/tests/df/direct
--- coreutils-8.11-orig/tests/df/direct 1970-01-01 01:00:00.000000000 +0100 --- coreutils-8.16-orig/tests/df/direct 1970-01-01 01:00:00.000000000 +0100
+++ coreutils-8.11/tests/df/direct 2011-04-14 09:53:43.767400034 +0200 +++ coreutils-8.16/tests/df/direct 2012-03-26 17:31:31.102897406 +0200
@@ -0,0 +1,55 @@ @@ -0,0 +1,55 @@
+#!/bin/sh +#!/bin/sh
+# Ensure "df --direct" works as documented +# Ensure "df --direct" works as documented
@ -167,10 +167,10 @@ diff -urNp coreutils-8.11-orig/tests/df/direct coreutils-8.11/tests/df/direct
+compare file_out file_exp || fail=1 +compare file_out file_exp || fail=1
+ +
+Exit $fail +Exit $fail
diff -urNp coreutils-8.11-orig/tests/Makefile.am coreutils-8.11/tests/Makefile.am diff -urNp coreutils-8.16-orig/tests/Makefile.am coreutils-8.16/tests/Makefile.am
--- coreutils-8.11-orig/tests/Makefile.am 2011-04-14 09:53:13.666324768 +0200 --- coreutils-8.16-orig/tests/Makefile.am 2012-03-26 17:31:08.642764437 +0200
+++ coreutils-8.11/tests/Makefile.am 2011-04-14 09:53:43.768432620 +0200 +++ coreutils-8.16/tests/Makefile.am 2012-03-26 17:31:31.104015483 +0200
@@ -362,6 +362,7 @@ TESTS = \ @@ -379,6 +379,7 @@ TESTS = \
dd/stderr \ dd/stderr \
dd/unblock \ dd/unblock \
dd/unblock-sync \ dd/unblock-sync \

View File

@ -1,6 +1,6 @@
diff -urNp coreutils-8.15-orig/lib/linebuffer.h coreutils-8.15/lib/linebuffer.h diff -urNp coreutils-8.16-orig/lib/linebuffer.h coreutils-8.16/lib/linebuffer.h
--- coreutils-8.15-orig/lib/linebuffer.h 2012-01-06 10:14:31.000000000 +0100 --- coreutils-8.16-orig/lib/linebuffer.h 2012-01-06 10:14:31.000000000 +0100
+++ coreutils-8.15/lib/linebuffer.h 2012-03-07 21:25:39.499333158 +0100 +++ coreutils-8.16/lib/linebuffer.h 2012-03-26 18:02:00.993889446 +0200
@@ -21,6 +21,11 @@ @@ -21,6 +21,11 @@
# include <stdio.h> # include <stdio.h>
@ -23,9 +23,9 @@ diff -urNp coreutils-8.15-orig/lib/linebuffer.h coreutils-8.15/lib/linebuffer.h
}; };
/* Initialize linebuffer LINEBUFFER for use. */ /* Initialize linebuffer LINEBUFFER for use. */
diff -urNp coreutils-8.15-orig/src/cut.c coreutils-8.15/src/cut.c diff -urNp coreutils-8.16-orig/src/cut.c coreutils-8.16/src/cut.c
--- coreutils-8.15-orig/src/cut.c 2012-01-01 10:04:06.000000000 +0100 --- coreutils-8.16-orig/src/cut.c 2012-03-24 21:26:51.000000000 +0100
+++ coreutils-8.15/src/cut.c 2012-03-07 21:25:39.501333069 +0100 +++ coreutils-8.16/src/cut.c 2012-03-26 17:46:48.000000000 +0200
@@ -28,6 +28,11 @@ @@ -28,6 +28,11 @@
#include <assert.h> #include <assert.h>
#include <getopt.h> #include <getopt.h>
@ -54,7 +54,7 @@ diff -urNp coreutils-8.15-orig/src/cut.c coreutils-8.15/src/cut.c
+# define mbrtowc(pwc, s, n, ps) (mbrtowc) (pwc, s, n, 0) +# define mbrtowc(pwc, s, n, ps) (mbrtowc) (pwc, s, n, 0)
+#endif +#endif
+ +
/* The official name of this program (e.g., no `g' prefix). */ /* The official name of this program (e.g., no 'g' prefix). */
#define PROGRAM_NAME "cut" #define PROGRAM_NAME "cut"
@@ -72,6 +89,52 @@ @@ -72,6 +89,52 @@
@ -118,7 +118,7 @@ diff -urNp coreutils-8.15-orig/src/cut.c coreutils-8.15/src/cut.c
+/* The largest byte, character or field index used as an endpoint of a closed +/* The largest byte, character or field index used as an endpoint of a closed
or degenerate range specification; this doesn't include the starting or degenerate range specification; this doesn't include the starting
index of right-open-ended ranges. For example, with either range spec index of right-open-ended ranges. For example, with either range spec
`2-5,9-', `2-3,5,9-' this variable would be set to 5. */ '2-5,9-', '2-3,5,9-' this variable would be set to 5. */
@@ -102,10 +165,11 @@ static size_t eol_range_start; @@ -102,10 +165,11 @@ static size_t eol_range_start;
/* This is a bit vector. /* This is a bit vector.
@ -170,7 +170,7 @@ diff -urNp coreutils-8.15-orig/src/cut.c coreutils-8.15/src/cut.c
/* True if the --output-delimiter=STRING option was specified. */ /* True if the --output-delimiter=STRING option was specified. */
static bool output_delimiter_specified; static bool output_delimiter_specified;
@@ -207,7 +284,7 @@ Mandatory arguments to long options are @@ -206,7 +283,7 @@ Mandatory arguments to long options are
-f, --fields=LIST select only these fields; also print any line\n\ -f, --fields=LIST select only these fields; also print any line\n\
that contains no delimiter character, unless\n\ that contains no delimiter character, unless\n\
the -s option is specified\n\ the -s option is specified\n\
@ -179,7 +179,7 @@ diff -urNp coreutils-8.15-orig/src/cut.c coreutils-8.15/src/cut.c
"), stdout); "), stdout);
fputs (_("\ fputs (_("\
--complement complement the set of selected bytes, characters\n\ --complement complement the set of selected bytes, characters\n\
@@ -366,7 +443,7 @@ set_fields (const char *fieldstr) @@ -365,7 +442,7 @@ set_fields (const char *fieldstr)
in_digits = false; in_digits = false;
/* Starting a range. */ /* Starting a range. */
if (dash_found) if (dash_found)
@ -188,10 +188,10 @@ diff -urNp coreutils-8.15-orig/src/cut.c coreutils-8.15/src/cut.c
dash_found = true; dash_found = true;
fieldstr++; fieldstr++;
@@ -390,14 +467,16 @@ set_fields (const char *fieldstr) @@ -389,14 +466,16 @@ set_fields (const char *fieldstr)
if (!rhs_specified) if (!rhs_specified)
{ {
/* `n-'. From `initial' to end of line. */ /* 'n-'. From 'initial' to end of line. */
- eol_range_start = initial; - eol_range_start = initial;
+ if (eol_range_start == 0 || + if (eol_range_start == 0 ||
+ (eol_range_start != 0 && eol_range_start > initial)) + (eol_range_start != 0 && eol_range_start > initial))
@ -200,14 +200,14 @@ diff -urNp coreutils-8.15-orig/src/cut.c coreutils-8.15/src/cut.c
} }
else else
{ {
/* `m-n' or `-n' (1-n). */ /* 'm-n' or '-n' (1-n). */
if (value < initial) if (value < initial)
- FATAL_ERROR (_("invalid decreasing range")); - FATAL_ERROR (_("invalid decreasing range"));
+ FATAL_ERROR (_("invalid byte, character or field list")); + FATAL_ERROR (_("invalid byte, character or field list"));
/* Is there already a range going to end of line? */ /* Is there already a range going to end of line? */
if (eol_range_start != 0) if (eol_range_start != 0)
@@ -477,6 +556,9 @@ set_fields (const char *fieldstr) @@ -476,6 +555,9 @@ set_fields (const char *fieldstr)
if (operating_mode == byte_mode) if (operating_mode == byte_mode)
error (0, 0, error (0, 0,
_("byte offset %s is too large"), quote (bad_num)); _("byte offset %s is too large"), quote (bad_num));
@ -217,7 +217,7 @@ diff -urNp coreutils-8.15-orig/src/cut.c coreutils-8.15/src/cut.c
else else
error (0, 0, error (0, 0,
_("field number %s is too large"), quote (bad_num)); _("field number %s is too large"), quote (bad_num));
@@ -487,7 +569,7 @@ set_fields (const char *fieldstr) @@ -486,7 +568,7 @@ set_fields (const char *fieldstr)
fieldstr++; fieldstr++;
} }
else else
@ -226,7 +226,7 @@ diff -urNp coreutils-8.15-orig/src/cut.c coreutils-8.15/src/cut.c
} }
max_range_endpoint = 0; max_range_endpoint = 0;
@@ -582,6 +664,77 @@ cut_bytes (FILE *stream) @@ -581,6 +663,77 @@ cut_bytes (FILE *stream)
} }
} }
@ -304,7 +304,7 @@ diff -urNp coreutils-8.15-orig/src/cut.c coreutils-8.15/src/cut.c
/* Read from stream STREAM, printing to standard output any selected fields. */ /* Read from stream STREAM, printing to standard output any selected fields. */
static void static void
@@ -704,13 +857,195 @@ cut_fields (FILE *stream) @@ -703,13 +856,195 @@ cut_fields (FILE *stream)
} }
} }
@ -503,7 +503,7 @@ diff -urNp coreutils-8.15-orig/src/cut.c coreutils-8.15/src/cut.c
} }
/* Process file FILE to standard output. /* Process file FILE to standard output.
@@ -762,6 +1097,8 @@ main (int argc, char **argv) @@ -761,6 +1096,8 @@ main (int argc, char **argv)
bool ok; bool ok;
bool delim_specified = false; bool delim_specified = false;
char *spec_list_string IF_LINT ( = NULL); char *spec_list_string IF_LINT ( = NULL);
@ -512,7 +512,7 @@ diff -urNp coreutils-8.15-orig/src/cut.c coreutils-8.15/src/cut.c
initialize_main (&argc, &argv); initialize_main (&argc, &argv);
set_program_name (argv[0]); set_program_name (argv[0]);
@@ -784,7 +1121,6 @@ main (int argc, char **argv) @@ -783,7 +1120,6 @@ main (int argc, char **argv)
switch (optc) switch (optc)
{ {
case 'b': case 'b':
@ -520,7 +520,7 @@ diff -urNp coreutils-8.15-orig/src/cut.c coreutils-8.15/src/cut.c
/* Build the byte list. */ /* Build the byte list. */
if (operating_mode != undefined_mode) if (operating_mode != undefined_mode)
FATAL_ERROR (_("only one type of list may be specified")); FATAL_ERROR (_("only one type of list may be specified"));
@@ -792,6 +1128,14 @@ main (int argc, char **argv) @@ -791,6 +1127,14 @@ main (int argc, char **argv)
spec_list_string = optarg; spec_list_string = optarg;
break; break;
@ -535,10 +535,10 @@ diff -urNp coreutils-8.15-orig/src/cut.c coreutils-8.15/src/cut.c
case 'f': case 'f':
/* Build the field list. */ /* Build the field list. */
if (operating_mode != undefined_mode) if (operating_mode != undefined_mode)
@@ -803,10 +1147,35 @@ main (int argc, char **argv) @@ -802,10 +1146,35 @@ main (int argc, char **argv)
case 'd': case 'd':
/* New delimiter. */ /* New delimiter. */
/* Interpret -d '' to mean `use the NUL byte as the delimiter.' */ /* Interpret -d '' to mean 'use the NUL byte as the delimiter.' */
- if (optarg[0] != '\0' && optarg[1] != '\0') - if (optarg[0] != '\0' && optarg[1] != '\0')
- FATAL_ERROR (_("the delimiter must be a single character")); - FATAL_ERROR (_("the delimiter must be a single character"));
- delim = optarg[0]; - delim = optarg[0];
@ -575,7 +575,7 @@ diff -urNp coreutils-8.15-orig/src/cut.c coreutils-8.15/src/cut.c
break; break;
case OUTPUT_DELIMITER_OPTION: case OUTPUT_DELIMITER_OPTION:
@@ -819,6 +1188,7 @@ main (int argc, char **argv) @@ -818,6 +1187,7 @@ main (int argc, char **argv)
break; break;
case 'n': case 'n':
@ -583,7 +583,7 @@ diff -urNp coreutils-8.15-orig/src/cut.c coreutils-8.15/src/cut.c
break; break;
case 's': case 's':
@@ -841,7 +1211,7 @@ main (int argc, char **argv) @@ -840,7 +1210,7 @@ main (int argc, char **argv)
if (operating_mode == undefined_mode) if (operating_mode == undefined_mode)
FATAL_ERROR (_("you must specify a list of bytes, characters, or fields")); FATAL_ERROR (_("you must specify a list of bytes, characters, or fields"));
@ -592,7 +592,7 @@ diff -urNp coreutils-8.15-orig/src/cut.c coreutils-8.15/src/cut.c
FATAL_ERROR (_("an input delimiter may be specified only\ FATAL_ERROR (_("an input delimiter may be specified only\
when operating on fields")); when operating on fields"));
@@ -868,15 +1238,34 @@ main (int argc, char **argv) @@ -867,15 +1237,34 @@ main (int argc, char **argv)
} }
if (!delim_specified) if (!delim_specified)
@ -633,10 +633,10 @@ diff -urNp coreutils-8.15-orig/src/cut.c coreutils-8.15/src/cut.c
} }
if (optind == argc) if (optind == argc)
diff -urNp coreutils-8.15-orig/src/expand.c coreutils-8.15/src/expand.c diff -urNp coreutils-8.16-orig/src/expand.c coreutils-8.16/src/expand.c
--- coreutils-8.15-orig/src/expand.c 2012-01-01 10:04:06.000000000 +0100 --- coreutils-8.16-orig/src/expand.c 2012-03-24 21:26:51.000000000 +0100
+++ coreutils-8.15/src/expand.c 2012-03-07 21:25:39.502358144 +0100 +++ coreutils-8.16/src/expand.c 2012-03-26 17:42:56.000000000 +0200
@@ -38,12 +38,29 @@ @@ -37,12 +37,29 @@
#include <stdio.h> #include <stdio.h>
#include <getopt.h> #include <getopt.h>
#include <sys/types.h> #include <sys/types.h>
@ -663,10 +663,10 @@ diff -urNp coreutils-8.15-orig/src/expand.c coreutils-8.15/src/expand.c
+# define mbrtowc(pwc, s, n, ps) (mbrtowc) (pwc, s, n, 0) +# define mbrtowc(pwc, s, n, ps) (mbrtowc) (pwc, s, n, 0)
+#endif +#endif
+ +
/* The official name of this program (e.g., no `g' prefix). */ /* The official name of this program (e.g., no 'g' prefix). */
#define PROGRAM_NAME "expand" #define PROGRAM_NAME "expand"
@@ -360,6 +377,142 @@ expand (void) @@ -358,6 +375,142 @@ expand (void)
} }
} }
@ -809,7 +809,7 @@ diff -urNp coreutils-8.15-orig/src/expand.c coreutils-8.15/src/expand.c
int int
main (int argc, char **argv) main (int argc, char **argv)
{ {
@@ -424,7 +577,12 @@ main (int argc, char **argv) @@ -422,7 +575,12 @@ main (int argc, char **argv)
file_list = (optind < argc ? &argv[optind] : stdin_argv); file_list = (optind < argc ? &argv[optind] : stdin_argv);
@ -823,9 +823,9 @@ diff -urNp coreutils-8.15-orig/src/expand.c coreutils-8.15/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.15-orig/src/fold.c coreutils-8.15/src/fold.c diff -urNp coreutils-8.16-orig/src/fold.c coreutils-8.16/src/fold.c
--- coreutils-8.15-orig/src/fold.c 2012-01-01 10:04:06.000000000 +0100 --- coreutils-8.16-orig/src/fold.c 2012-03-24 19:22:13.000000000 +0100
+++ coreutils-8.15/src/fold.c 2012-03-07 21:25:39.504360585 +0100 +++ coreutils-8.16/src/fold.c 2012-03-26 17:48:37.000000000 +0200
@@ -22,12 +22,34 @@ @@ -22,12 +22,34 @@
#include <getopt.h> #include <getopt.h>
#include <sys/types.h> #include <sys/types.h>
@ -860,7 +860,7 @@ diff -urNp coreutils-8.15-orig/src/fold.c coreutils-8.15/src/fold.c
+ +
#define TAB_WIDTH 8 #define TAB_WIDTH 8
/* The official name of this program (e.g., no `g' prefix). */ /* The official name of this program (e.g., no 'g' prefix). */
@@ -35,20 +57,41 @@ @@ -35,20 +57,41 @@
#define AUTHORS proper_name ("David MacKenzie") #define AUTHORS proper_name ("David MacKenzie")
@ -907,7 +907,7 @@ diff -urNp coreutils-8.15-orig/src/fold.c coreutils-8.15/src/fold.c
{"spaces", no_argument, NULL, 's'}, {"spaces", no_argument, NULL, 's'},
{"width", required_argument, NULL, 'w'}, {"width", required_argument, NULL, 'w'},
{GETOPT_HELP_OPTION_DECL}, {GETOPT_HELP_OPTION_DECL},
@@ -78,6 +121,7 @@ Mandatory arguments to long options are @@ -77,6 +120,7 @@ Mandatory arguments to long options are
"), stdout); "), stdout);
fputs (_("\ fputs (_("\
-b, --bytes count bytes rather than columns\n\ -b, --bytes count bytes rather than columns\n\
@ -915,7 +915,7 @@ diff -urNp coreutils-8.15-orig/src/fold.c coreutils-8.15/src/fold.c
-s, --spaces break at spaces\n\ -s, --spaces break at spaces\n\
-w, --width=WIDTH use WIDTH columns instead of 80\n\ -w, --width=WIDTH use WIDTH columns instead of 80\n\
"), stdout); "), stdout);
@@ -95,7 +139,7 @@ Mandatory arguments to long options are @@ -94,7 +138,7 @@ Mandatory arguments to long options are
static size_t static size_t
adjust_column (size_t column, char c) adjust_column (size_t column, char c)
{ {
@ -924,7 +924,7 @@ diff -urNp coreutils-8.15-orig/src/fold.c coreutils-8.15/src/fold.c
{ {
if (c == '\b') if (c == '\b')
{ {
@@ -118,30 +162,14 @@ adjust_column (size_t column, char c) @@ -117,30 +161,14 @@ adjust_column (size_t column, char c)
to stdout, with maximum line length WIDTH. to stdout, with maximum line length WIDTH.
Return true if successful. */ Return true if successful. */
@ -936,7 +936,7 @@ diff -urNp coreutils-8.15-orig/src/fold.c coreutils-8.15/src/fold.c
- FILE *istream; - FILE *istream;
int c; int c;
size_t column = 0; /* Screen column where next char will go. */ size_t column = 0; /* Screen column where next char will go. */
size_t offset_out = 0; /* Index in `line_out' for next char. */ size_t offset_out = 0; /* Index in 'line_out' for next char. */
static char *line_out = NULL; static char *line_out = NULL;
static size_t allocated_out = 0; static size_t allocated_out = 0;
- int saved_errno; - int saved_errno;
@ -957,7 +957,7 @@ diff -urNp coreutils-8.15-orig/src/fold.c coreutils-8.15/src/fold.c
fadvise (istream, FADVISE_SEQUENTIAL); fadvise (istream, FADVISE_SEQUENTIAL);
@@ -171,6 +199,15 @@ fold_file (char const *filename, size_t @@ -170,6 +198,15 @@ fold_file (char const *filename, size_t
bool found_blank = false; bool found_blank = false;
size_t logical_end = offset_out; size_t logical_end = offset_out;
@ -973,7 +973,7 @@ diff -urNp coreutils-8.15-orig/src/fold.c coreutils-8.15/src/fold.c
/* Look for the last blank. */ /* Look for the last blank. */
while (logical_end) while (logical_end)
{ {
@@ -217,11 +254,221 @@ fold_file (char const *filename, size_t @@ -216,11 +253,221 @@ fold_file (char const *filename, size_t
line_out[offset_out++] = c; line_out[offset_out++] = c;
} }
@ -1196,7 +1196,7 @@ diff -urNp coreutils-8.15-orig/src/fold.c coreutils-8.15/src/fold.c
if (ferror (istream)) if (ferror (istream))
{ {
error (0, saved_errno, "%s", filename); error (0, saved_errno, "%s", filename);
@@ -254,7 +501,8 @@ main (int argc, char **argv) @@ -253,7 +500,8 @@ main (int argc, char **argv)
atexit (close_stdout); atexit (close_stdout);
@ -1206,7 +1206,7 @@ diff -urNp coreutils-8.15-orig/src/fold.c coreutils-8.15/src/fold.c
while ((optc = getopt_long (argc, argv, shortopts, longopts, NULL)) != -1) while ((optc = getopt_long (argc, argv, shortopts, longopts, NULL)) != -1)
{ {
@@ -263,7 +511,15 @@ main (int argc, char **argv) @@ -262,7 +510,15 @@ main (int argc, char **argv)
switch (optc) switch (optc)
{ {
case 'b': /* Count bytes rather than columns. */ case 'b': /* Count bytes rather than columns. */
@ -1223,9 +1223,9 @@ diff -urNp coreutils-8.15-orig/src/fold.c coreutils-8.15/src/fold.c
break; break;
case 's': /* Break at word boundaries. */ case 's': /* Break at word boundaries. */
diff -urNp coreutils-8.15-orig/src/join.c coreutils-8.15/src/join.c diff -urNp coreutils-8.16-orig/src/join.c coreutils-8.16/src/join.c
--- coreutils-8.15-orig/src/join.c 2012-01-01 10:04:06.000000000 +0100 --- coreutils-8.16-orig/src/join.c 2012-03-24 21:26:51.000000000 +0100
+++ coreutils-8.15/src/join.c 2012-03-07 21:25:39.506358365 +0100 +++ coreutils-8.16/src/join.c 2012-03-26 17:50:02.000000000 +0200
@@ -22,18 +22,32 @@ @@ -22,18 +22,32 @@
#include <sys/types.h> #include <sys/types.h>
#include <getopt.h> #include <getopt.h>
@ -1257,11 +1257,11 @@ diff -urNp coreutils-8.15-orig/src/join.c coreutils-8.15/src/join.c
+# define mbrtowc(pwc, s, n, ps) (mbrtowc) (pwc, s, n, 0) +# define mbrtowc(pwc, s, n, ps) (mbrtowc) (pwc, s, n, 0)
+#endif +#endif
+ +
/* The official name of this program (e.g., no `g' prefix). */ /* The official name of this program (e.g., no 'g' prefix). */
#define PROGRAM_NAME "join" #define PROGRAM_NAME "join"
@@ -135,10 +149,12 @@ static struct outlist outlist_head; @@ -135,10 +149,12 @@ static struct outlist outlist_head;
/* Last element in `outlist', where a new element can be added. */ /* Last element in 'outlist', where a new element can be added. */
static struct outlist *outlist_end = &outlist_head; static struct outlist *outlist_end = &outlist_head;
-/* Tab character separating fields. If negative, fields are separated -/* Tab character separating fields. If negative, fields are separated
@ -1277,7 +1277,7 @@ diff -urNp coreutils-8.15-orig/src/join.c coreutils-8.15/src/join.c
/* If nonzero, check that the input is correctly ordered. */ /* If nonzero, check that the input is correctly ordered. */
static enum static enum
@@ -263,13 +279,14 @@ xfields (struct line *line) @@ -262,13 +278,14 @@ xfields (struct line *line)
if (ptr == lim) if (ptr == lim)
return; return;
@ -1295,7 +1295,7 @@ diff -urNp coreutils-8.15-orig/src/join.c coreutils-8.15/src/join.c
{ {
/* Skip leading blanks before the first field. */ /* Skip leading blanks before the first field. */
while (isblank (to_uchar (*ptr))) while (isblank (to_uchar (*ptr)))
@@ -293,6 +310,148 @@ xfields (struct line *line) @@ -292,6 +309,148 @@ xfields (struct line *line)
extract_field (line, ptr, lim - ptr); extract_field (line, ptr, lim - ptr);
} }
@ -1444,7 +1444,7 @@ diff -urNp coreutils-8.15-orig/src/join.c coreutils-8.15/src/join.c
static void static void
freeline (struct line *line) freeline (struct line *line)
{ {
@@ -314,56 +473,115 @@ keycmp (struct line const *line1, struct @@ -313,56 +472,115 @@ 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. */
@ -1583,7 +1583,7 @@ diff -urNp coreutils-8.15-orig/src/join.c coreutils-8.15/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
@@ -455,6 +673,11 @@ get_line (FILE *fp, struct line **linep, @@ -454,6 +672,11 @@ get_line (FILE *fp, struct line **linep,
} }
++line_no[which - 1]; ++line_no[which - 1];
@ -1595,7 +1595,7 @@ diff -urNp coreutils-8.15-orig/src/join.c coreutils-8.15/src/join.c
xfields (line); xfields (line);
if (prevline[which - 1]) if (prevline[which - 1])
@@ -554,21 +777,28 @@ prfield (size_t n, struct line const *li @@ -553,21 +776,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 +1627,7 @@ diff -urNp coreutils-8.15-orig/src/join.c coreutils-8.15/src/join.c
prfield (i, line); prfield (i, line);
} }
} }
@@ -579,7 +809,6 @@ static void @@ -578,7 +808,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 +1635,7 @@ diff -urNp coreutils-8.15-orig/src/join.c coreutils-8.15/src/join.c
size_t field; size_t field;
struct line const *line; struct line const *line;
@@ -613,7 +842,7 @@ prjoin (struct line const *line1, struct @@ -612,7 +841,7 @@ prjoin (struct line const *line1, struct
o = o->next; o = o->next;
if (o == NULL) if (o == NULL)
break; break;
@ -1644,7 +1644,7 @@ diff -urNp coreutils-8.15-orig/src/join.c coreutils-8.15/src/join.c
} }
putchar ('\n'); putchar ('\n');
} }
@@ -1091,21 +1320,46 @@ main (int argc, char **argv) @@ -1090,21 +1319,46 @@ main (int argc, char **argv)
case 't': case 't':
{ {
@ -1701,9 +1701,9 @@ diff -urNp coreutils-8.15-orig/src/join.c coreutils-8.15/src/join.c
break; break;
case NOCHECK_ORDER_OPTION: case NOCHECK_ORDER_OPTION:
diff -urNp coreutils-8.15-orig/src/pr.c coreutils-8.15/src/pr.c diff -urNp coreutils-8.16-orig/src/pr.c coreutils-8.16/src/pr.c
--- coreutils-8.15-orig/src/pr.c 2012-01-01 10:04:06.000000000 +0100 --- coreutils-8.16-orig/src/pr.c 2012-03-24 21:26:51.000000000 +0100
+++ coreutils-8.15/src/pr.c 2012-03-07 21:25:39.509333048 +0100 +++ coreutils-8.16/src/pr.c 2012-03-26 17:50:48.000000000 +0200
@@ -312,6 +312,32 @@ @@ -312,6 +312,32 @@
#include <getopt.h> #include <getopt.h>
@ -1753,7 +1753,7 @@ diff -urNp coreutils-8.15-orig/src/pr.c coreutils-8.15/src/pr.c
+extern int wcwidth (); +extern int wcwidth ();
+#endif +#endif
+ +
/* The official name of this program (e.g., no `g' prefix). */ /* The official name of this program (e.g., no 'g' prefix). */
#define PROGRAM_NAME "pr" #define PROGRAM_NAME "pr"
@@ -415,7 +453,20 @@ struct COLUMN @@ -415,7 +453,20 @@ struct COLUMN
@ -1840,7 +1840,7 @@ diff -urNp coreutils-8.15-orig/src/pr.c coreutils-8.15/src/pr.c
/* (-n) line counting starts with 1st line of input file (not with 1st /* (-n) line counting starts with 1st line of input file (not with 1st
line of 1st page printed). */ line of 1st page printed). */
@@ -691,6 +751,7 @@ static bool use_col_separator = false; @@ -691,6 +751,7 @@ static bool use_col_separator = false;
-a|COLUMN|-m is a `space' and with the -J option a `tab'. */ -a|COLUMN|-m is a 'space' and with the -J option a 'tab'. */
static char *col_sep_string = (char *) ""; static char *col_sep_string = (char *) "";
static int col_sep_length = 0; static int col_sep_length = 0;
+static int col_sep_width = 0; +static int col_sep_width = 0;
@ -2082,7 +2082,7 @@ diff -urNp coreutils-8.15-orig/src/pr.c coreutils-8.15/src/pr.c
@@ -2050,22 +2181,24 @@ add_line_number (COLUMN *p) @@ -2050,22 +2181,24 @@ add_line_number (COLUMN *p)
/* Tabification is assumed for multiple columns, also for n-separators, /* Tabification is assumed for multiple columns, also for n-separators,
but `default n-separator = TAB' hasn't been given priority over but 'default n-separator = TAB' hasn't been given priority over
equal column_width also specified by POSIX. */ equal column_width also specified by POSIX. */
- if (number_separator == '\t') - if (number_separator == '\t')
+ if (number_separator[0] == '\t') + if (number_separator[0] == '\t')
@ -2447,9 +2447,9 @@ diff -urNp coreutils-8.15-orig/src/pr.c coreutils-8.15/src/pr.c
/* We've just printed some files and need to clean up things before /* We've just printed some files and need to clean up things before
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.15-orig/src/sort.c coreutils-8.15/src/sort.c diff -urNp coreutils-8.16-orig/src/sort.c coreutils-8.16/src/sort.c
--- coreutils-8.15-orig/src/sort.c 2012-01-01 10:04:06.000000000 +0100 --- coreutils-8.16-orig/src/sort.c 2012-03-24 21:26:51.000000000 +0100
+++ coreutils-8.15/src/sort.c 2012-03-07 21:28:21.856210178 +0100 +++ coreutils-8.16/src/sort.c 2012-03-26 17:35:09.000000000 +0200
@@ -22,11 +22,20 @@ @@ -22,11 +22,20 @@
#include <config.h> #include <config.h>
@ -2524,7 +2524,7 @@ diff -urNp coreutils-8.15-orig/src/sort.c coreutils-8.15/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. */
@@ -783,6 +812,46 @@ reap_all (void) @@ -782,6 +811,46 @@ reap_all (void)
reap (-1); reap (-1);
} }
@ -2571,7 +2571,7 @@ diff -urNp coreutils-8.15-orig/src/sort.c coreutils-8.15/src/sort.c
/* Clean up any remaining temporary files. */ /* Clean up any remaining temporary files. */
static void static void
@@ -1215,7 +1284,7 @@ zaptemp (char const *name) @@ -1214,7 +1283,7 @@ zaptemp (char const *name)
free (node); free (node);
} }
@ -2580,7 +2580,7 @@ diff -urNp coreutils-8.15-orig/src/sort.c coreutils-8.15/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)
@@ -1230,7 +1299,7 @@ struct_month_cmp (void const *m1, void c @@ -1229,7 +1298,7 @@ struct_month_cmp (void const *m1, void c
/* Initialize the character class tables. */ /* Initialize the character class tables. */
static void static void
@ -2589,7 +2589,7 @@ diff -urNp coreutils-8.15-orig/src/sort.c coreutils-8.15/src/sort.c
{ {
size_t i; size_t i;
@@ -1242,7 +1311,7 @@ inittables (void) @@ -1241,7 +1310,7 @@ inittables (void)
fold_toupper[i] = toupper (i); fold_toupper[i] = toupper (i);
} }
@ -2598,7 +2598,7 @@ diff -urNp coreutils-8.15-orig/src/sort.c coreutils-8.15/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)
{ {
@@ -1324,6 +1393,84 @@ specify_nmerge (int oi, char c, char con @@ -1323,6 +1392,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);
} }
@ -2683,7 +2683,7 @@ diff -urNp coreutils-8.15-orig/src/sort.c coreutils-8.15/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)
@@ -1552,7 +1699,7 @@ buffer_linelim (struct buffer const *buf @@ -1551,7 +1698,7 @@ buffer_linelim (struct buffer const *buf
by KEY in LINE. */ by KEY in LINE. */
static char * static char *
@ -2692,7 +2692,7 @@ diff -urNp coreutils-8.15-orig/src/sort.c coreutils-8.15/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;
@@ -1561,10 +1708,10 @@ begfield (struct line const *line, struc @@ -1560,10 +1707,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. */
@ -2705,7 +2705,7 @@ diff -urNp coreutils-8.15-orig/src/sort.c coreutils-8.15/src/sort.c
++ptr; ++ptr;
if (ptr < lim) if (ptr < lim)
++ptr; ++ptr;
@@ -1590,11 +1737,70 @@ begfield (struct line const *line, struc @@ -1589,11 +1736,70 @@ begfield (struct line const *line, struc
return ptr; return ptr;
} }
@ -2777,9 +2777,9 @@ diff -urNp coreutils-8.15-orig/src/sort.c coreutils-8.15/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;
@@ -1609,10 +1815,10 @@ limfield (struct line const *line, struc @@ -1608,10 +1814,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. */
- if (tab != TAB_DEFAULT) - if (tab != TAB_DEFAULT)
+ if (tab_length) + if (tab_length)
@ -2790,7 +2790,7 @@ diff -urNp coreutils-8.15-orig/src/sort.c coreutils-8.15/src/sort.c
++ptr; ++ptr;
if (ptr < lim && (eword || echar)) if (ptr < lim && (eword || echar))
++ptr; ++ptr;
@@ -1658,10 +1864,10 @@ limfield (struct line const *line, struc @@ -1657,10 +1863,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. */
@ -2803,7 +2803,7 @@ diff -urNp coreutils-8.15-orig/src/sort.c coreutils-8.15/src/sort.c
if (newlim) if (newlim)
lim = newlim; lim = newlim;
} }
@@ -1692,6 +1898,130 @@ limfield (struct line const *line, struc @@ -1691,6 +1897,130 @@ limfield (struct line const *line, struc
return ptr; return ptr;
} }
@ -2934,7 +2934,7 @@ diff -urNp coreutils-8.15-orig/src/sort.c coreutils-8.15/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
@@ -1778,8 +2108,22 @@ fillbuf (struct buffer *buf, FILE *fp, c @@ -1777,8 +2107,22 @@ fillbuf (struct buffer *buf, FILE *fp, c
else else
{ {
if (key->skipsblanks) if (key->skipsblanks)
@ -2959,7 +2959,7 @@ diff -urNp coreutils-8.15-orig/src/sort.c coreutils-8.15/src/sort.c
line->keybeg = line_start; line->keybeg = line_start;
} }
} }
@@ -1900,7 +2244,7 @@ human_numcompare (char const *a, char co @@ -1899,7 +2243,7 @@ human_numcompare (char const *a, char co
hideously fast. */ hideously fast. */
static int static int
@ -2968,7 +2968,7 @@ diff -urNp coreutils-8.15-orig/src/sort.c coreutils-8.15/src/sort.c
{ {
while (blanks[to_uchar (*a)]) while (blanks[to_uchar (*a)])
a++; a++;
@@ -1910,6 +2254,25 @@ numcompare (char const *a, char const *b @@ -1909,6 +2253,25 @@ numcompare (char const *a, char const *b
return strnumcmp (a, b, decimal_point, thousands_sep); return strnumcmp (a, b, decimal_point, thousands_sep);
} }
@ -2994,7 +2994,7 @@ diff -urNp coreutils-8.15-orig/src/sort.c coreutils-8.15/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
@@ -1960,7 +2323,7 @@ general_numcompare (char const *sa, char @@ -1959,7 +2322,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
@ -3003,7 +3003,7 @@ diff -urNp coreutils-8.15-orig/src/sort.c coreutils-8.15/src/sort.c
{ {
size_t lo = 0; size_t lo = 0;
size_t hi = MONTHS_PER_YEAR; size_t hi = MONTHS_PER_YEAR;
@@ -2235,15 +2598,14 @@ debug_key (struct line const *line, stru @@ -2234,15 +2597,14 @@ debug_key (struct line const *line, stru
char saved = *lim; char saved = *lim;
*lim = '\0'; *lim = '\0';
@ -3021,7 +3021,7 @@ diff -urNp coreutils-8.15-orig/src/sort.c coreutils-8.15/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)
@@ -2387,7 +2749,7 @@ key_warnings (struct keyfield const *gke @@ -2386,7 +2748,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 */
@ -3030,8 +3030,8 @@ diff -urNp coreutils-8.15-orig/src/sort.c coreutils-8.15/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)))
@@ -2445,11 +2807,83 @@ key_warnings (struct keyfield const *gke @@ -2444,11 +2806,83 @@ 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"));
} }
+#if HAVE_MBRTOWC +#if HAVE_MBRTOWC
@ -3115,7 +3115,7 @@ diff -urNp coreutils-8.15-orig/src/sort.c coreutils-8.15/src/sort.c
{ {
struct keyfield *key = keylist; struct keyfield *key = keylist;
@@ -2534,7 +2968,7 @@ keycompare (struct line const *a, struct @@ -2533,7 +2967,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)
@ -3124,7 +3124,7 @@ diff -urNp coreutils-8.15-orig/src/sort.c coreutils-8.15/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)
@@ -2650,6 +3084,180 @@ keycompare (struct line const *a, struct @@ -2649,6 +3083,180 @@ keycompare (struct line const *a, struct
return key->reverse ? -diff : diff; return key->reverse ? -diff : diff;
} }
@ -3305,7 +3305,7 @@ diff -urNp coreutils-8.15-orig/src/sort.c coreutils-8.15/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. */
@@ -4110,7 +4718,7 @@ main (int argc, char **argv) @@ -4109,7 +4717,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);
@ -3314,7 +3314,7 @@ diff -urNp coreutils-8.15-orig/src/sort.c coreutils-8.15/src/sort.c
hard_LC_TIME = hard_locale (LC_TIME); hard_LC_TIME = hard_locale (LC_TIME);
#endif #endif
@@ -4131,6 +4739,29 @@ main (int argc, char **argv) @@ -4130,6 +4738,29 @@ main (int argc, char **argv)
thousands_sep = -1; thousands_sep = -1;
} }
@ -3344,7 +3344,7 @@ diff -urNp coreutils-8.15-orig/src/sort.c coreutils-8.15/src/sort.c
have_read_stdin = false; have_read_stdin = false;
inittables (); inittables ();
@@ -4401,13 +5032,34 @@ main (int argc, char **argv) @@ -4400,13 +5031,34 @@ main (int argc, char **argv)
case 't': case 't':
{ {
@ -3382,8 +3382,8 @@ diff -urNp coreutils-8.15-orig/src/sort.c coreutils-8.15/src/sort.c
+ newtab[0] = '\0'; + newtab[0] = '\0';
else else
{ {
/* Provoke with `sort -txx'. Complain about /* Provoke with 'sort -txx'. Complain about
@@ -4418,9 +5070,12 @@ main (int argc, char **argv) @@ -4417,9 +5069,12 @@ main (int argc, char **argv)
quote (optarg)); quote (optarg));
} }
} }
@ -3398,10 +3398,10 @@ diff -urNp coreutils-8.15-orig/src/sort.c coreutils-8.15/src/sort.c
} }
break; break;
diff -urNp coreutils-8.15-orig/src/unexpand.c coreutils-8.15/src/unexpand.c diff -urNp coreutils-8.16-orig/src/unexpand.c coreutils-8.16/src/unexpand.c
--- coreutils-8.15-orig/src/unexpand.c 2012-01-01 10:04:06.000000000 +0100 --- coreutils-8.16-orig/src/unexpand.c 2012-03-24 21:26:51.000000000 +0100
+++ coreutils-8.15/src/unexpand.c 2012-03-07 21:25:39.517457874 +0100 +++ coreutils-8.16/src/unexpand.c 2012-03-26 17:51:46.000000000 +0200
@@ -39,12 +39,29 @@ @@ -38,12 +38,29 @@
#include <stdio.h> #include <stdio.h>
#include <getopt.h> #include <getopt.h>
#include <sys/types.h> #include <sys/types.h>
@ -3428,10 +3428,10 @@ diff -urNp coreutils-8.15-orig/src/unexpand.c coreutils-8.15/src/unexpand.c
+# define mbrtowc(pwc, s, n, ps) (mbrtowc) (pwc, s, n, 0) +# define mbrtowc(pwc, s, n, ps) (mbrtowc) (pwc, s, n, 0)
+#endif +#endif
+ +
/* The official name of this program (e.g., no `g' prefix). */ /* The official name of this program (e.g., no 'g' prefix). */
#define PROGRAM_NAME "unexpand" #define PROGRAM_NAME "unexpand"
@@ -104,6 +121,208 @@ static struct option const longopts[] = @@ -103,6 +120,208 @@ static struct option const longopts[] =
{NULL, 0, NULL, 0} {NULL, 0, NULL, 0}
}; };
@ -3640,7 +3640,7 @@ diff -urNp coreutils-8.15-orig/src/unexpand.c coreutils-8.15/src/unexpand.c
void void
usage (int status) usage (int status)
{ {
@@ -526,7 +745,12 @@ main (int argc, char **argv) @@ -524,7 +743,12 @@ main (int argc, char **argv)
file_list = (optind < argc ? &argv[optind] : stdin_argv); file_list = (optind < argc ? &argv[optind] : stdin_argv);
@ -3654,9 +3654,9 @@ diff -urNp coreutils-8.15-orig/src/unexpand.c coreutils-8.15/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.15-orig/src/uniq.c coreutils-8.15/src/uniq.c diff -urNp coreutils-8.16-orig/src/uniq.c coreutils-8.16/src/uniq.c
--- coreutils-8.15-orig/src/uniq.c 2012-01-01 10:04:06.000000000 +0100 --- coreutils-8.16-orig/src/uniq.c 2012-03-24 21:26:51.000000000 +0100
+++ coreutils-8.15/src/uniq.c 2012-03-07 21:25:39.519460555 +0100 +++ coreutils-8.16/src/uniq.c 2012-03-26 17:35:09.000000000 +0200
@@ -21,6 +21,16 @@ @@ -21,6 +21,16 @@
#include <getopt.h> #include <getopt.h>
#include <sys/types.h> #include <sys/types.h>
@ -3693,7 +3693,7 @@ diff -urNp coreutils-8.15-orig/src/uniq.c coreutils-8.15/src/uniq.c
+#endif +#endif
+ +
/* The official name of this program (e.g., no `g' prefix). */ /* The official name of this program (e.g., no 'g' prefix). */
#define PROGRAM_NAME "uniq" #define PROGRAM_NAME "uniq"
@@ -108,6 +130,10 @@ static enum delimit_method const delimit @@ -108,6 +130,10 @@ static enum delimit_method const delimit
/* Select whether/how to delimit groups of duplicate lines. */ /* Select whether/how to delimit groups of duplicate lines. */
@ -3706,7 +3706,7 @@ diff -urNp coreutils-8.15-orig/src/uniq.c coreutils-8.15/src/uniq.c
static struct option const longopts[] = static struct option const longopts[] =
{ {
{"count", no_argument, NULL, 'c'}, {"count", no_argument, NULL, 'c'},
@@ -207,7 +233,7 @@ size_opt (char const *opt, char const *m @@ -206,7 +232,7 @@ size_opt (char const *opt, char const *m
return a pointer to the beginning of the line's field to be compared. */ return a pointer to the beginning of the line's field to be compared. */
static char * _GL_ATTRIBUTE_PURE static char * _GL_ATTRIBUTE_PURE
@ -3715,7 +3715,7 @@ diff -urNp coreutils-8.15-orig/src/uniq.c coreutils-8.15/src/uniq.c
{ {
size_t count; size_t count;
char const *lp = line->buffer; char const *lp = line->buffer;
@@ -227,6 +253,83 @@ find_field (struct linebuffer const *lin @@ -226,6 +252,83 @@ find_field (struct linebuffer const *lin
return line->buffer + i; return line->buffer + i;
} }
@ -3799,7 +3799,7 @@ diff -urNp coreutils-8.15-orig/src/uniq.c coreutils-8.15/src/uniq.c
/* Return false if two strings OLD and NEW match, true if not. /* Return false if two strings OLD and NEW match, true if not.
OLD and NEW point not to the beginnings of the lines OLD and NEW point not to the beginnings of the lines
but rather to the beginnings of the fields to compare. but rather to the beginnings of the fields to compare.
@@ -235,6 +338,8 @@ find_field (struct linebuffer const *lin @@ -234,6 +337,8 @@ find_field (struct linebuffer const *lin
static bool static bool
different (char *old, char *new, size_t oldlen, size_t newlen) different (char *old, char *new, size_t oldlen, size_t newlen)
{ {
@ -3808,7 +3808,7 @@ diff -urNp coreutils-8.15-orig/src/uniq.c coreutils-8.15/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)
@@ -242,14 +347,92 @@ different (char *old, char *new, size_t @@ -241,14 +346,92 @@ different (char *old, char *new, size_t
if (ignore_case) if (ignore_case)
{ {
@ -3906,7 +3906,7 @@ diff -urNp coreutils-8.15-orig/src/uniq.c coreutils-8.15/src/uniq.c
/* 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.
@@ -305,15 +488,43 @@ check_file (const char *infile, const ch @@ -304,15 +487,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);
@ -3950,7 +3950,7 @@ diff -urNp coreutils-8.15-orig/src/uniq.c coreutils-8.15/src/uniq.c
if (prevline->length == 0 if (prevline->length == 0
|| different (thisfield, prevfield, thislen, prevlen)) || different (thisfield, prevfield, thislen, prevlen))
{ {
@@ -332,17 +543,26 @@ check_file (const char *infile, const ch @@ -331,17 +542,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;
@ -3977,7 +3977,7 @@ diff -urNp coreutils-8.15-orig/src/uniq.c coreutils-8.15/src/uniq.c
if (readlinebuffer_delim (thisline, stdin, delimiter) == 0) if (readlinebuffer_delim (thisline, stdin, delimiter) == 0)
{ {
if (ferror (stdin)) if (ferror (stdin))
@@ -351,6 +571,14 @@ check_file (const char *infile, const ch @@ -350,6 +570,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);
@ -3992,7 +3992,7 @@ diff -urNp coreutils-8.15-orig/src/uniq.c coreutils-8.15/src/uniq.c
match = !different (thisfield, prevfield, thislen, prevlen); match = !different (thisfield, prevfield, thislen, prevlen);
match_count += match; match_count += match;
@@ -383,6 +611,9 @@ check_file (const char *infile, const ch @@ -382,6 +610,9 @@ check_file (const char *infile, const ch
SWAP_LINES (prevline, thisline); SWAP_LINES (prevline, thisline);
prevfield = thisfield; prevfield = thisfield;
prevlen = thislen; prevlen = thislen;
@ -4002,7 +4002,7 @@ diff -urNp coreutils-8.15-orig/src/uniq.c coreutils-8.15/src/uniq.c
if (!match) if (!match)
match_count = 0; match_count = 0;
} }
@@ -428,6 +659,19 @@ main (int argc, char **argv) @@ -427,6 +658,19 @@ main (int argc, char **argv)
atexit (close_stdout); atexit (close_stdout);
@ -4022,18 +4022,18 @@ diff -urNp coreutils-8.15-orig/src/uniq.c coreutils-8.15/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.15-orig/tests/Makefile.am coreutils-8.15/tests/Makefile.am diff -urNp coreutils-8.16-orig/tests/Makefile.am coreutils-8.16/tests/Makefile.am
--- coreutils-8.15-orig/tests/Makefile.am 2012-03-07 21:25:03.149233957 +0100 --- coreutils-8.16-orig/tests/Makefile.am 2012-03-26 18:01:35.564014659 +0200
+++ coreutils-8.15/tests/Makefile.am 2012-03-07 21:25:39.520458288 +0100 +++ coreutils-8.16/tests/Makefile.am 2012-03-26 18:02:01.023015013 +0200
@@ -240,6 +240,7 @@ TESTS = \ @@ -242,6 +242,7 @@ TESTS = \
misc/sort-debug-keys \
misc/sort-debug-warn \ misc/sort-debug-warn \
misc/sort-discrim \
misc/sort-files0-from \ misc/sort-files0-from \
+ misc/sort-mb-tests \ + misc/sort-mb-tests \
misc/sort-float \ misc/sort-float \
misc/sort-merge \ misc/sort-merge \
misc/sort-merge-fdlimit \ misc/sort-merge-fdlimit \
@@ -526,6 +527,10 @@ TESTS = \ @@ -537,6 +538,10 @@ TESTS = \
$(root_tests) $(root_tests)
pr_data = \ pr_data = \
@ -4044,9 +4044,9 @@ diff -urNp coreutils-8.15-orig/tests/Makefile.am coreutils-8.15/tests/Makefile.a
pr/0F \ pr/0F \
pr/0FF \ pr/0FF \
pr/0FFnt \ pr/0FFnt \
diff -urNp coreutils-8.15-orig/tests/misc/cut coreutils-8.15/tests/misc/cut diff -urNp coreutils-8.16-orig/tests/misc/cut coreutils-8.16/tests/misc/cut
--- coreutils-8.15-orig/tests/misc/cut 2012-01-01 10:04:06.000000000 +0100 --- coreutils-8.16-orig/tests/misc/cut 2012-02-03 10:22:06.000000000 +0100
+++ coreutils-8.15/tests/misc/cut 2012-03-07 21:25:39.521460928 +0100 +++ coreutils-8.16/tests/misc/cut 2012-03-26 17:40:49.000000000 +0200
@@ -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;
@ -4060,7 +4060,7 @@ diff -urNp coreutils-8.15-orig/tests/misc/cut coreutils-8.15/tests/misc/cut
+my $mb_locale = 'C'; +my $mb_locale = 'C';
my $prog = 'cut'; my $prog = 'cut';
my $try = "Try \`$prog --help' for more information.\n"; my $try = "Try '$prog --help' for more information.\n";
my $from_1 = "$prog: fields and positions are numbered from 1\n$try"; 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 or field list\n$try";
+my $inval = "$prog: invalid byte, character or field list\n$try"; +my $inval = "$prog: invalid byte, character or field list\n$try";
@ -4076,41 +4076,41 @@ diff -urNp coreutils-8.15-orig/tests/misc/cut coreutils-8.15/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.15-orig/tests/misc/mb1.I coreutils-8.15/tests/misc/mb1.I diff -urNp coreutils-8.16-orig/tests/misc/mb1.I coreutils-8.16/tests/misc/mb1.I
--- coreutils-8.15-orig/tests/misc/mb1.I 1970-01-01 01:00:00.000000000 +0100 --- coreutils-8.16-orig/tests/misc/mb1.I 1970-01-01 01:00:00.000000000 +0100
+++ coreutils-8.15/tests/misc/mb1.I 2012-03-07 21:25:39.521460928 +0100 +++ coreutils-8.16/tests/misc/mb1.I 2012-03-26 17:35:09.000000000 +0200
@@ -0,0 +1,4 @@ @@ -0,0 +1,4 @@
+Apple10 +Apple10
+Banana5 +Banana5
+Citrus20 +Citrus20
+Cherry30 +Cherry30
diff -urNp coreutils-8.15-orig/tests/misc/mb1.X coreutils-8.15/tests/misc/mb1.X diff -urNp coreutils-8.16-orig/tests/misc/mb1.X coreutils-8.16/tests/misc/mb1.X
--- coreutils-8.15-orig/tests/misc/mb1.X 1970-01-01 01:00:00.000000000 +0100 --- coreutils-8.16-orig/tests/misc/mb1.X 1970-01-01 01:00:00.000000000 +0100
+++ coreutils-8.15/tests/misc/mb1.X 2012-03-07 21:25:39.522458368 +0100 +++ coreutils-8.16/tests/misc/mb1.X 2012-03-26 17:35:09.000000000 +0200
@@ -0,0 +1,4 @@ @@ -0,0 +1,4 @@
+Banana5 +Banana5
+Apple10 +Apple10
+Citrus20 +Citrus20
+Cherry30 +Cherry30
diff -urNp coreutils-8.15-orig/tests/misc/mb2.I coreutils-8.15/tests/misc/mb2.I diff -urNp coreutils-8.16-orig/tests/misc/mb2.I coreutils-8.16/tests/misc/mb2.I
--- coreutils-8.15-orig/tests/misc/mb2.I 1970-01-01 01:00:00.000000000 +0100 --- coreutils-8.16-orig/tests/misc/mb2.I 1970-01-01 01:00:00.000000000 +0100
+++ coreutils-8.15/tests/misc/mb2.I 2012-03-07 21:25:39.523458000 +0100 +++ coreutils-8.16/tests/misc/mb2.I 2012-03-26 17:35:09.000000000 +0200
@@ -0,0 +1,4 @@ @@ -0,0 +1,4 @@
+Apple1020 +Apple1020
+Banana530 +Banana530
+Citrus205 +Citrus205
+Cherry3010 +Cherry3010
diff -urNp coreutils-8.15-orig/tests/misc/mb2.X coreutils-8.15/tests/misc/mb2.X diff -urNp coreutils-8.16-orig/tests/misc/mb2.X coreutils-8.16/tests/misc/mb2.X
--- coreutils-8.15-orig/tests/misc/mb2.X 1970-01-01 01:00:00.000000000 +0100 --- coreutils-8.16-orig/tests/misc/mb2.X 1970-01-01 01:00:00.000000000 +0100
+++ coreutils-8.15/tests/misc/mb2.X 2012-03-07 21:25:39.523458000 +0100 +++ coreutils-8.16/tests/misc/mb2.X 2012-03-26 17:35:09.000000000 +0200
@@ -0,0 +1,4 @@ @@ -0,0 +1,4 @@
+Citrus205 +Citrus205
+Cherry3010 +Cherry3010
+Apple1020 +Apple1020
+Banana530 +Banana530
diff -urNp coreutils-8.15-orig/tests/misc/sort-mb-tests coreutils-8.15/tests/misc/sort-mb-tests diff -urNp coreutils-8.16-orig/tests/misc/sort-mb-tests coreutils-8.16/tests/misc/sort-mb-tests
--- coreutils-8.15-orig/tests/misc/sort-mb-tests 1970-01-01 01:00:00.000000000 +0100 --- coreutils-8.16-orig/tests/misc/sort-mb-tests 1970-01-01 01:00:00.000000000 +0100
+++ coreutils-8.15/tests/misc/sort-mb-tests 2012-03-07 21:25:39.524460637 +0100 +++ coreutils-8.16/tests/misc/sort-mb-tests 2012-03-26 17:35:09.000000000 +0200
@@ -0,0 +1,58 @@ @@ -0,0 +1,58 @@
+#! /bin/sh +#! /bin/sh
+case $# in +case $# in

View File

@ -392,7 +392,7 @@ diff -urNp coreutils-8.13-orig/src/ls.c coreutils-8.13/src/ls.c
|| format_needs_stat || format_needs_stat
@@ -2869,7 +2896,7 @@ gobble_file (char const *name, enum file @@ -2869,7 +2896,7 @@ gobble_file (char const *name, enum file
&& print_with_color && is_colored (C_CAP)) && print_with_color && is_colored (C_CAP))
f->has_capability = has_capability (absolute_name); f->has_capability = has_capability_cache (absolute_name, f);
- if (format == long_format || print_scontext) - if (format == long_format || print_scontext)
+ if (format == long_format || format == security_format || print_scontext) + if (format == long_format || format == security_format || print_scontext)
@ -406,7 +406,7 @@ diff -urNp coreutils-8.13-orig/src/ls.c coreutils-8.13/src/ls.c
- if (err == 0 && format == long_format) - if (err == 0 && format == long_format)
+ if (err == 0 && (format == long_format || format == security_format)) + if (err == 0 && (format == long_format || format == security_format))
{ {
int n = file_has_acl (absolute_name, &f->stat); int n = file_has_acl_cache (absolute_name, f);
err = (n < 0); err = (n < 0);
@@ -2911,7 +2938,8 @@ gobble_file (char const *name, enum file @@ -2911,7 +2938,8 @@ gobble_file (char const *name, enum file
} }

View File

@ -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.15 Version: 8.16
Release: 8%{?dist} Release: 1%{?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/
@ -18,8 +18,6 @@ Source202: coreutils-su-l.pamd
Source203: coreutils-runuser-l.pamd Source203: coreutils-runuser-l.pamd
# From upstream # From upstream
# fix regression in du -x with nondir argument
Patch1: coreutils-8.15-du-x-nondir.patch
# Our patches # Our patches
#general patch to workaround koji build system issues #general patch to workaround koji build system issues
@ -145,7 +143,6 @@ the old GNU fileutils, sh-utils, and textutils packages.
%setup -q %setup -q
# From upstream # From upstream
%patch1 -p1 -b .xnondir
# Our patches # Our patches
%patch100 -p1 -b .configure %patch100 -p1 -b .configure
@ -419,6 +416,10 @@ fi
%{?!norunuser:%{_sbindir}/runuser} %{?!norunuser:%{_sbindir}/runuser}
%changelog %changelog
* Mon Mar 26 2012 Ondrej Vasik <ovasik@redhat.com> 8.16-1
- new upstream release 8.16
- defuzz patches, remove already applied patches
* Thu Mar 08 2012 Ondrej Vasik <ovasik@redhat.com> 8.15-8 * Thu Mar 08 2012 Ondrej Vasik <ovasik@redhat.com> 8.15-8
- fix regression in du -x with nondir argument (by J.Meyering) - fix regression in du -x with nondir argument (by J.Meyering)

View File

@ -1 +1 @@
094909fafa86110140b32e4948941545 coreutils-8.15.tar.xz 89b06f91634208dceba7b36ad1f9e8b9 coreutils-8.16.tar.xz