]> git.ipfire.org Git - people/arne_f/ipfire-3.x.git/blobdiff - coreutils/patches/coreutils-i18n.patch
coreutils: Update to 8.16.
[people/arne_f/ipfire-3.x.git] / coreutils / patches / coreutils-i18n.patch
index 6e10f376996b64f538259091a524df2249b653fb..ee2cf73aa6940f82c0aa6b61393e1f173149997a 100644 (file)
@@ -1,6 +1,6 @@
-diff -urNp coreutils-8.10-orig/lib/linebuffer.h coreutils-8.10/lib/linebuffer.h
---- coreutils-8.10-orig/lib/linebuffer.h       2011-01-06 09:47:56.000000000 +0100
-+++ coreutils-8.10/lib/linebuffer.h    2011-02-04 20:13:23.985464731 +0100
+diff -urNp coreutils-8.16-orig/lib/linebuffer.h coreutils-8.16/lib/linebuffer.h
+--- coreutils-8.16-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
 @@ -21,6 +21,11 @@
  
  # include <stdio.h>
@@ -10,7 +10,7 @@ diff -urNp coreutils-8.10-orig/lib/linebuffer.h coreutils-8.10/lib/linebuffer.h
 +#  include <wchar.h>
 +# endif
 +
- /* A `struct linebuffer' holds a line of text. */
+ /* A 'struct linebuffer' holds a line of text. */
  
  struct linebuffer
 @@ -28,6 +33,9 @@ struct linebuffer
@@ -23,9 +23,9 @@ diff -urNp coreutils-8.10-orig/lib/linebuffer.h coreutils-8.10/lib/linebuffer.h
  };
  
  /* Initialize linebuffer LINEBUFFER for use. */
-diff -urNp coreutils-8.10-orig/src/cut.c coreutils-8.10/src/cut.c
---- coreutils-8.10-orig/src/cut.c      2011-01-31 13:40:38.000000000 +0100
-+++ coreutils-8.10/src/cut.c   2011-02-04 20:13:23.988464025 +0100
+diff -urNp coreutils-8.16-orig/src/cut.c coreutils-8.16/src/cut.c
+--- coreutils-8.16-orig/src/cut.c      2012-03-24 21:26:51.000000000 +0100
++++ coreutils-8.16/src/cut.c   2012-03-26 17:46:48.000000000 +0200
 @@ -28,6 +28,11 @@
  #include <assert.h>
  #include <getopt.h>
@@ -54,7 +54,7 @@ diff -urNp coreutils-8.10-orig/src/cut.c coreutils-8.10/src/cut.c
 +# define mbrtowc(pwc, s, n, ps) (mbrtowc) (pwc, s, n, 0)
 +#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"
  
 @@ -72,6 +89,52 @@
@@ -75,7 +75,7 @@ diff -urNp coreutils-8.10-orig/src/cut.c coreutils-8.10/src/cut.c
 +  while (0)
 +
 +/* Get wide character on BUFPOS. BUFPOS is not included after that.
-+   If byte sequence is not valid as a character, CONVFAIL is 1. Otherwise 0. */ 
++   If byte sequence is not valid as a character, CONVFAIL is 1. Otherwise 0. */
 +#define GET_NEXT_WC_FROM_BUFFER(WC, BUFPOS, BUFLEN, MBLENGTH, STATE, CONVFAIL) \
 +  do                                                                        \
 +    {                                                                        \
@@ -118,7 +118,7 @@ diff -urNp coreutils-8.10-orig/src/cut.c coreutils-8.10/src/cut.c
 +/* The largest byte, character or field index used as an endpoint of a closed
     or degenerate range specification;  this doesn't include the starting
     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;
  
  /* This is a bit vector.
@@ -170,7 +170,7 @@ diff -urNp coreutils-8.10-orig/src/cut.c coreutils-8.10/src/cut.c
  
  /* True if the --output-delimiter=STRING option was 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\
                              that contains no delimiter character, unless\n\
                              the -s option is specified\n\
@@ -179,7 +179,7 @@ diff -urNp coreutils-8.10-orig/src/cut.c coreutils-8.10/src/cut.c
  "), stdout);
        fputs (_("\
        --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;
            /* Starting a range. */
            if (dash_found)
@@ -188,10 +188,10 @@ diff -urNp coreutils-8.10-orig/src/cut.c coreutils-8.10/src/cut.c
            dash_found = true;
            fieldstr++;
  
-@@ -390,14 +467,16 @@ set_fields (const char *fieldstr)
+@@ -389,14 +466,16 @@ set_fields (const char *fieldstr)
                if (!rhs_specified)
                  {
-                   /* `n-'.  From `initial' to end of line. */
+                   /* 'n-'.  From 'initial' to end of line. */
 -                  eol_range_start = initial;
 +                  if (eol_range_start == 0 ||
 +                      (eol_range_start != 0 && eol_range_start > initial))
@@ -200,14 +200,14 @@ diff -urNp coreutils-8.10-orig/src/cut.c coreutils-8.10/src/cut.c
                  }
                else
                  {
-                   /* `m-n' or `-n' (1-n). */
+                   /* 'm-n' or '-n' (1-n). */
                    if (value < initial)
 -                    FATAL_ERROR (_("invalid decreasing range"));
 +                    FATAL_ERROR (_("invalid byte, character or field list"));
  
                    /* Is there already a range going to end of line? */
                    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)
                  error (0, 0,
                         _("byte offset %s is too large"), quote (bad_num));
@@ -217,7 +217,7 @@ diff -urNp coreutils-8.10-orig/src/cut.c coreutils-8.10/src/cut.c
                else
                  error (0, 0,
                         _("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++;
          }
        else
@@ -226,7 +226,7 @@ diff -urNp coreutils-8.10-orig/src/cut.c coreutils-8.10/src/cut.c
      }
  
    max_range_endpoint = 0;
-@@ -580,6 +662,63 @@ cut_bytes (FILE *stream)
+@@ -581,6 +663,77 @@ cut_bytes (FILE *stream)
      }
  }
  
@@ -234,11 +234,11 @@ diff -urNp coreutils-8.10-orig/src/cut.c coreutils-8.10/src/cut.c
 +/* This function is in use for the following case.
 +
 +   1. Read from the stream STREAM, printing to standard output any selected
-+   characters. 
++   characters.
 +
 +   2. Read from stream STREAM, printing to standard output any selected bytes,
 +   without splitting multibyte characters.  */
-+ 
++
 +static void
 +cut_characters_or_cut_bytes_no_split (FILE *stream)
 +{
@@ -251,6 +251,9 @@ diff -urNp coreutils-8.10-orig/src/cut.c coreutils-8.10/src/cut.c
 +                           as same character as WC. */
 +  mbstate_t state;        /* State of the stream. */
 +  int convfail = 0;                /* 1, when conversion is failed. Otherwise 0. */
++  /* Whether to begin printing delimiters between ranges for the current line.
++     Set after we've begun printing data corresponding to the first range.  */
++  bool print_delimiter = false;
 +
 +  idx = 0;
 +  buflen = 0;
@@ -273,12 +276,23 @@ diff -urNp coreutils-8.10-orig/src/cut.c coreutils-8.10/src/cut.c
 +        {
 +          putchar ('\n');
 +          idx = 0;
++          print_delimiter = false;
 +        }
 +      else
 +        {
++          bool range_start;
++          bool *rs = output_delimiter_specified ? &range_start : NULL;
 +          idx += (operating_mode == byte_mode) ? mblength : 1;
-+          if (print_kth (idx, NULL))
-+            fwrite (bufpos, mblength, sizeof(char), stdout);
++          if (print_kth (idx, rs))
++            {
++              if (rs && *rs && print_delimiter)
++                {
++                  fwrite (output_delimiter_string, sizeof (char),
++                         output_delimiter_length, stdout);
++               }
++              print_delimiter = true;
++              fwrite (bufpos, mblength, sizeof(char), stdout);
++            }
 +        }
 +
 +      buflen -= mblength;
@@ -286,11 +300,11 @@ diff -urNp coreutils-8.10-orig/src/cut.c coreutils-8.10/src/cut.c
 +    }
 +}
 +#endif
-+                   
++
  /* Read from stream STREAM, printing to standard output any selected fields.  */
  
  static void
-@@ -702,13 +841,192 @@ cut_fields (FILE *stream)
+@@ -703,13 +856,195 @@ cut_fields (FILE *stream)
      }
  }
  
@@ -310,7 +324,7 @@ diff -urNp coreutils-8.10-orig/src/cut.c coreutils-8.10/src/cut.c
 +  size_t mblength;        /* The byte size of a multibyte character which shows
 +                           as same character as WC. */
 +  mbstate_t state;        /* State of the stream. */
-+  int convfail;                /* 1, when conversion is failed. Otherwise 0. */
++  int convfail = 0;                /* 1, when conversion is failed. Otherwise 0. */
 +
 +  found_any_selected_field = 0;
 +  field_idx = 1;
@@ -321,7 +335,10 @@ diff -urNp coreutils-8.10-orig/src/cut.c coreutils-8.10/src/cut.c
 +  c = getc (stream);
 +  empty_input = (c == EOF);
 +  if (c != EOF)
++  {
 +    ungetc (c, stream);
++    wc = 0;
++  }
 +  else
 +    wc = WEOF;
 +
@@ -486,7 +503,7 @@ diff -urNp coreutils-8.10-orig/src/cut.c coreutils-8.10/src/cut.c
  }
  
  /* Process file FILE to standard output.
-@@ -760,6 +1078,8 @@ main (int argc, char **argv)
+@@ -761,6 +1096,8 @@ main (int argc, char **argv)
    bool ok;
    bool delim_specified = false;
    char *spec_list_string IF_LINT ( = NULL);
@@ -495,7 +512,7 @@ diff -urNp coreutils-8.10-orig/src/cut.c coreutils-8.10/src/cut.c
  
    initialize_main (&argc, &argv);
    set_program_name (argv[0]);
-@@ -782,7 +1102,6 @@ main (int argc, char **argv)
+@@ -783,7 +1120,6 @@ main (int argc, char **argv)
        switch (optc)
          {
          case 'b':
@@ -503,7 +520,7 @@ diff -urNp coreutils-8.10-orig/src/cut.c coreutils-8.10/src/cut.c
            /* Build the byte list. */
            if (operating_mode != undefined_mode)
              FATAL_ERROR (_("only one type of list may be specified"));
-@@ -790,6 +1109,14 @@ main (int argc, char **argv)
+@@ -791,6 +1127,14 @@ main (int argc, char **argv)
            spec_list_string = optarg;
            break;
  
@@ -518,10 +535,10 @@ diff -urNp coreutils-8.10-orig/src/cut.c coreutils-8.10/src/cut.c
          case 'f':
            /* Build the field list. */
            if (operating_mode != undefined_mode)
-@@ -801,10 +1128,35 @@ main (int argc, char **argv)
+@@ -802,10 +1146,35 @@ main (int argc, char **argv)
          case 'd':
            /* 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')
 -            FATAL_ERROR (_("the delimiter must be a single character"));
 -          delim = optarg[0];
@@ -558,7 +575,7 @@ diff -urNp coreutils-8.10-orig/src/cut.c coreutils-8.10/src/cut.c
            break;
  
          case OUTPUT_DELIMITER_OPTION:
-@@ -817,6 +1169,7 @@ main (int argc, char **argv)
+@@ -818,6 +1187,7 @@ main (int argc, char **argv)
            break;
  
          case 'n':
@@ -566,7 +583,7 @@ diff -urNp coreutils-8.10-orig/src/cut.c coreutils-8.10/src/cut.c
            break;
  
          case 's':
-@@ -839,7 +1192,7 @@ main (int argc, char **argv)
+@@ -840,7 +1210,7 @@ main (int argc, char **argv)
    if (operating_mode == undefined_mode)
      FATAL_ERROR (_("you must specify a list of bytes, characters, or fields"));
  
@@ -575,7 +592,7 @@ diff -urNp coreutils-8.10-orig/src/cut.c coreutils-8.10/src/cut.c
      FATAL_ERROR (_("an input delimiter may be specified only\
   when operating on fields"));
  
-@@ -866,15 +1219,34 @@ main (int argc, char **argv)
+@@ -867,15 +1237,34 @@ main (int argc, char **argv)
      }
  
    if (!delim_specified)
@@ -607,7 +624,7 @@ diff -urNp coreutils-8.10-orig/src/cut.c coreutils-8.10/src/cut.c
 +      if (MB_CUR_MAX <= 1 || force_singlebyte_mode)
 +#endif
 +        {
-+          static char dummy[2]; 
++          static char dummy[2];
 +          dummy[0] = delim;
 +          dummy[1] = '\0';
 +          output_delimiter_string = dummy;
@@ -616,10 +633,10 @@ diff -urNp coreutils-8.10-orig/src/cut.c coreutils-8.10/src/cut.c
      }
  
    if (optind == argc)
-diff -urNp coreutils-8.10-orig/src/expand.c coreutils-8.10/src/expand.c
---- coreutils-8.10-orig/src/expand.c   2011-01-31 13:40:38.000000000 +0100
-+++ coreutils-8.10/src/expand.c        2011-02-04 20:13:23.990463571 +0100
-@@ -38,12 +38,29 @@
+diff -urNp coreutils-8.16-orig/src/expand.c coreutils-8.16/src/expand.c
+--- coreutils-8.16-orig/src/expand.c   2012-03-24 21:26:51.000000000 +0100
++++ coreutils-8.16/src/expand.c        2012-03-26 17:42:56.000000000 +0200
+@@ -37,12 +37,29 @@
  #include <stdio.h>
  #include <getopt.h>
  #include <sys/types.h>
@@ -646,10 +663,10 @@ diff -urNp coreutils-8.10-orig/src/expand.c coreutils-8.10/src/expand.c
 +# define mbrtowc(pwc, s, n, ps) (mbrtowc) (pwc, s, n, 0)
 +#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"
  
-@@ -360,6 +377,142 @@ expand (void)
+@@ -358,6 +375,142 @@ expand (void)
      }
  }
  
@@ -792,7 +809,7 @@ diff -urNp coreutils-8.10-orig/src/expand.c coreutils-8.10/src/expand.c
  int
  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);
  
@@ -806,9 +823,9 @@ diff -urNp coreutils-8.10-orig/src/expand.c coreutils-8.10/src/expand.c
  
    if (have_read_stdin && fclose (stdin) != 0)
      error (EXIT_FAILURE, errno, "-");
-diff -urNp coreutils-8.10-orig/src/fold.c coreutils-8.10/src/fold.c
---- coreutils-8.10-orig/src/fold.c     2011-01-31 13:40:38.000000000 +0100
-+++ coreutils-8.10/src/fold.c  2011-02-04 20:13:23.992463115 +0100
+diff -urNp coreutils-8.16-orig/src/fold.c coreutils-8.16/src/fold.c
+--- coreutils-8.16-orig/src/fold.c     2012-03-24 19:22:13.000000000 +0100
++++ coreutils-8.16/src/fold.c  2012-03-26 17:48:37.000000000 +0200
 @@ -22,12 +22,34 @@
  #include <getopt.h>
  #include <sys/types.h>
@@ -843,7 +860,7 @@ diff -urNp coreutils-8.10-orig/src/fold.c coreutils-8.10/src/fold.c
 +
  #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 @@
  
  #define AUTHORS proper_name ("David MacKenzie")
@@ -890,7 +907,7 @@ diff -urNp coreutils-8.10-orig/src/fold.c coreutils-8.10/src/fold.c
    {"spaces", no_argument, NULL, 's'},
    {"width", required_argument, NULL, 'w'},
    {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);
        fputs (_("\
    -b, --bytes         count bytes rather than columns\n\
@@ -898,7 +915,7 @@ diff -urNp coreutils-8.10-orig/src/fold.c coreutils-8.10/src/fold.c
    -s, --spaces        break at spaces\n\
    -w, --width=WIDTH   use WIDTH columns instead of 80\n\
  "), stdout);
-@@ -95,7 +139,7 @@ Mandatory arguments to long options are 
+@@ -94,7 +138,7 @@ Mandatory arguments to long options are 
  static size_t
  adjust_column (size_t column, char c)
  {
@@ -907,7 +924,7 @@ diff -urNp coreutils-8.10-orig/src/fold.c coreutils-8.10/src/fold.c
      {
        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.
     Return true if successful.  */
  
@@ -919,7 +936,7 @@ diff -urNp coreutils-8.10-orig/src/fold.c coreutils-8.10/src/fold.c
 -  FILE *istream;
    int c;
    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 size_t allocated_out = 0;
 -  int saved_errno;
@@ -940,7 +957,7 @@ diff -urNp coreutils-8.10-orig/src/fold.c coreutils-8.10/src/fold.c
  
    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;
                size_t logical_end = offset_out;
  
@@ -956,7 +973,7 @@ diff -urNp coreutils-8.10-orig/src/fold.c coreutils-8.10/src/fold.c
                /* Look for the last blank. */
                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;
      }
  
@@ -1179,7 +1196,7 @@ diff -urNp coreutils-8.10-orig/src/fold.c coreutils-8.10/src/fold.c
    if (ferror (istream))
      {
        error (0, saved_errno, "%s", filename);
-@@ -254,7 +502,8 @@ main (int argc, char **argv)
+@@ -253,7 +500,8 @@ main (int argc, char **argv)
  
    atexit (close_stdout);
  
@@ -1189,7 +1206,7 @@ diff -urNp coreutils-8.10-orig/src/fold.c coreutils-8.10/src/fold.c
  
    while ((optc = getopt_long (argc, argv, shortopts, longopts, NULL)) != -1)
      {
-@@ -263,7 +512,15 @@ main (int argc, char **argv)
+@@ -262,7 +510,15 @@ main (int argc, char **argv)
        switch (optc)
          {
          case 'b':             /* Count bytes rather than columns. */
@@ -1206,9 +1223,9 @@ diff -urNp coreutils-8.10-orig/src/fold.c coreutils-8.10/src/fold.c
            break;
  
          case 's':             /* Break at word boundaries. */
-diff -urNp coreutils-8.10-orig/src/join.c coreutils-8.10/src/join.c
---- coreutils-8.10-orig/src/join.c     2011-01-31 13:40:38.000000000 +0100
-+++ coreutils-8.10/src/join.c  2011-02-04 20:20:15.985114387 +0100
+diff -urNp coreutils-8.16-orig/src/join.c coreutils-8.16/src/join.c
+--- coreutils-8.16-orig/src/join.c     2012-03-24 21:26:51.000000000 +0100
++++ coreutils-8.16/src/join.c  2012-03-26 17:50:02.000000000 +0200
 @@ -22,18 +22,32 @@
  #include <sys/types.h>
  #include <getopt.h>
@@ -1240,11 +1257,11 @@ diff -urNp coreutils-8.10-orig/src/join.c coreutils-8.10/src/join.c
 +# define mbrtowc(pwc, s, n, ps) (mbrtowc) (pwc, s, n, 0)
 +#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"
  
-@@ -129,10 +143,12 @@ static struct outlist outlist_head;
- /* Last element in `outlist', where a new element can be added.  */
+@@ -135,10 +149,12 @@ static struct outlist outlist_head;
+ /* Last element in 'outlist', where a new element can be added.  */
  static struct outlist *outlist_end = &outlist_head;
  
 -/* Tab character separating fields.  If negative, fields are separated
@@ -1260,7 +1277,7 @@ diff -urNp coreutils-8.10-orig/src/join.c coreutils-8.10/src/join.c
  
  /* If nonzero, check that the input is correctly ordered. */
  static enum
-@@ -257,13 +273,14 @@ xfields (struct line *line)
+@@ -262,13 +278,14 @@ xfields (struct line *line)
    if (ptr == lim)
      return;
  
@@ -1278,7 +1295,7 @@ diff -urNp coreutils-8.10-orig/src/join.c coreutils-8.10/src/join.c
      {
        /* Skip leading blanks before the first field.  */
        while (isblank (to_uchar (*ptr)))
-@@ -287,6 +304,148 @@ xfields (struct line *line)
+@@ -292,6 +309,148 @@ xfields (struct line *line)
    extract_field (line, ptr, lim - ptr);
  }
  
@@ -1427,7 +1444,7 @@ diff -urNp coreutils-8.10-orig/src/join.c coreutils-8.10/src/join.c
  static void
  freeline (struct line *line)
  {
-@@ -308,56 +467,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)
  {
    /* Start of field to compare in each file.  */
@@ -1551,7 +1568,7 @@ diff -urNp coreutils-8.10-orig/src/join.c coreutils-8.10/src/join.c
 -        return xmemcoll (beg1, len1, beg2, len2);
 -      diff = memcmp (beg1, beg2, MIN (len1, len2));
 +      copy[0] = (unsigned char *) beg[0];
-+      copy[1] = (unsigned char *) beg[1];  
++      copy[1] = (unsigned char *) beg[1];
      }
  
 +  if (hard_LC_COLLATE)
@@ -1566,9 +1583,9 @@ diff -urNp coreutils-8.10-orig/src/join.c coreutils-8.10/src/join.c
  }
  
  /* Check that successive input lines PREV and CURRENT from input file
-@@ -438,6 +656,11 @@ get_line (FILE *fp, struct line **linep,
-       return false;
+@@ -454,6 +672,11 @@ get_line (FILE *fp, struct line **linep,
      }
+   ++line_no[which - 1];
  
 +#if HAVE_MBRTOWC
 +  if (MB_CUR_MAX > 1)
@@ -1578,7 +1595,7 @@ diff -urNp coreutils-8.10-orig/src/join.c coreutils-8.10/src/join.c
    xfields (line);
  
    if (prevline[which - 1])
-@@ -537,21 +760,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.  */
  
@@ -1610,7 +1627,7 @@ diff -urNp coreutils-8.10-orig/src/join.c coreutils-8.10/src/join.c
        prfield (i, line);
      }
  }
-@@ -562,7 +792,6 @@ static void
+@@ -578,7 +808,6 @@ static void
  prjoin (struct line const *line1, struct line const *line2)
  {
    const struct outlist *outlist;
@@ -1618,7 +1635,7 @@ diff -urNp coreutils-8.10-orig/src/join.c coreutils-8.10/src/join.c
    size_t field;
    struct line const *line;
  
-@@ -596,7 +825,7 @@ prjoin (struct line const *line1, struct
+@@ -612,7 +841,7 @@ prjoin (struct line const *line1, struct
            o = o->next;
            if (o == NULL)
              break;
@@ -1627,12 +1644,12 @@ diff -urNp coreutils-8.10-orig/src/join.c coreutils-8.10/src/join.c
          }
        putchar ('\n');
      }
-@@ -1075,21 +1304,46 @@ main (int argc, char **argv)
+@@ -1090,21 +1319,46 @@ main (int argc, char **argv)
  
          case 't':
            {
 -            unsigned char newtab = optarg[0];
-+            char *newtab;
++            char *newtab = NULL;
 +            size_t newtablen;
 +            newtab = xstrdup (optarg);
 +#if HAVE_MBRTOWC
@@ -1653,8 +1670,9 @@ diff -urNp coreutils-8.10-orig/src/join.c coreutils-8.10/src/join.c
 +#endif
 +              newtablen = 1;
              if (! newtab)
+-              newtab = '\n'; /* '' => process the whole line.  */
 +            {
-               newtab = '\n'; /* '' => process the whole line.  */
++              newtab = "\n"; /* '' => process the whole line.  */
 +            }
              else if (optarg[1])
                {
@@ -1683,9 +1701,9 @@ diff -urNp coreutils-8.10-orig/src/join.c coreutils-8.10/src/join.c
            break;
  
          case NOCHECK_ORDER_OPTION:
-diff -urNp coreutils-8.10-orig/src/pr.c coreutils-8.10/src/pr.c
---- coreutils-8.10-orig/src/pr.c       2011-01-31 13:40:38.000000000 +0100
-+++ coreutils-8.10/src/pr.c    2011-02-04 20:13:24.002460897 +0100
+diff -urNp coreutils-8.16-orig/src/pr.c coreutils-8.16/src/pr.c
+--- coreutils-8.16-orig/src/pr.c       2012-03-24 21:26:51.000000000 +0100
++++ coreutils-8.16/src/pr.c    2012-03-26 17:50:48.000000000 +0200
 @@ -312,6 +312,32 @@
  
  #include <getopt.h>
@@ -1735,7 +1753,7 @@ diff -urNp coreutils-8.10-orig/src/pr.c coreutils-8.10/src/pr.c
 +extern int wcwidth ();
 +#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"
  
 @@ -415,7 +453,20 @@ struct COLUMN
@@ -1766,9 +1784,9 @@ diff -urNp coreutils-8.10-orig/src/pr.c coreutils-8.10/src/pr.c
  static void getoptarg (char *arg, char switch_char, char *character,
 +                       int *character_length, int *character_width,
                         int *number);
- void usage (int status);
  static void print_files (int number_of_files, char **av);
-@@ -439,7 +491,6 @@ static void store_char (char c);
+ static void init_parameters (int number_of_files);
+@@ -438,7 +490,6 @@ static void store_char (char c);
  static void pad_down (int lines);
  static void read_rest_of_line (COLUMN *p);
  static void skip_read (COLUMN *p, int column_number);
@@ -1776,7 +1794,7 @@ diff -urNp coreutils-8.10-orig/src/pr.c coreutils-8.10/src/pr.c
  static void cleanup (void);
  static void print_sep_string (void);
  static void separator_string (const char *optarg_S);
-@@ -451,7 +502,7 @@ static COLUMN *column_vector;
+@@ -450,7 +501,7 @@ static COLUMN *column_vector;
     we store the leftmost columns contiguously in buff.
     To print a line from buff, get the index of the first character
     from line_vector[i], and print up to line_vector[i + 1]. */
@@ -1785,7 +1803,7 @@ diff -urNp coreutils-8.10-orig/src/pr.c coreutils-8.10/src/pr.c
  
  /* Index of the position in buff where the next character
     will be stored. */
-@@ -555,7 +606,7 @@ static int chars_per_column;
+@@ -554,7 +605,7 @@ static int chars_per_column;
  static bool untabify_input = false;
  
  /* (-e) The input tab character. */
@@ -1794,7 +1812,7 @@ diff -urNp coreutils-8.10-orig/src/pr.c coreutils-8.10/src/pr.c
  
  /* (-e) Tabstops are at chars_per_tab, 2*chars_per_tab, 3*chars_per_tab, ...
     where the leftmost column is 1. */
-@@ -565,7 +616,10 @@ static int chars_per_input_tab = 8;
+@@ -564,7 +615,10 @@ static int chars_per_input_tab = 8;
  static bool tabify_output = false;
  
  /* (-i) The output tab character. */
@@ -1806,7 +1824,7 @@ diff -urNp coreutils-8.10-orig/src/pr.c coreutils-8.10/src/pr.c
  
  /* (-i) The width of the output tab. */
  static int chars_per_output_tab = 8;
-@@ -639,7 +693,13 @@ static int power_10;
+@@ -638,7 +692,13 @@ static int power_10;
  static bool numbered_lines = false;
  
  /* (-n) Character which follows each line number. */
@@ -1821,15 +1839,15 @@ diff -urNp coreutils-8.10-orig/src/pr.c coreutils-8.10/src/pr.c
  
  /* (-n) line counting starts with 1st line of input file (not with 1st
     line of 1st page printed). */
-@@ -692,6 +752,7 @@ static bool use_col_separator = false;
-    -a|COLUMN|-m is a `space' and with the -J option a `tab'. */
+@@ -691,6 +751,7 @@ static bool use_col_separator = false;
+    -a|COLUMN|-m is a 'space' and with the -J option a 'tab'. */
  static char *col_sep_string = (char *) "";
  static int col_sep_length = 0;
 +static int col_sep_width = 0;
  static char *column_separator = (char *) " ";
  static char *line_separator = (char *) "\t";
  
-@@ -848,6 +909,13 @@ separator_string (const char *optarg_S)
+@@ -847,6 +908,13 @@ separator_string (const char *optarg_S)
    col_sep_length = (int) strlen (optarg_S);
    col_sep_string = xmalloc (col_sep_length + 1);
    strcpy (col_sep_string, optarg_S);
@@ -1843,7 +1861,7 @@ diff -urNp coreutils-8.10-orig/src/pr.c coreutils-8.10/src/pr.c
  }
  
  int
-@@ -872,6 +940,21 @@ main (int argc, char **argv)
+@@ -871,6 +939,21 @@ main (int argc, char **argv)
  
    atexit (close_stdout);
  
@@ -1865,7 +1883,7 @@ diff -urNp coreutils-8.10-orig/src/pr.c coreutils-8.10/src/pr.c
    n_files = 0;
    file_names = (argc > 1
                  ? xmalloc ((argc - 1) * sizeof (char *))
-@@ -948,8 +1031,12 @@ main (int argc, char **argv)
+@@ -947,8 +1030,12 @@ main (int argc, char **argv)
            break;
          case 'e':
            if (optarg)
@@ -1880,7 +1898,7 @@ diff -urNp coreutils-8.10-orig/src/pr.c coreutils-8.10/src/pr.c
            /* Could check tab width > 0. */
            untabify_input = true;
            break;
-@@ -962,8 +1049,12 @@ main (int argc, char **argv)
+@@ -961,8 +1048,12 @@ main (int argc, char **argv)
            break;
          case 'i':
            if (optarg)
@@ -1895,7 +1913,7 @@ diff -urNp coreutils-8.10-orig/src/pr.c coreutils-8.10/src/pr.c
            /* Could check tab width > 0. */
            tabify_output = true;
            break;
-@@ -990,8 +1081,8 @@ main (int argc, char **argv)
+@@ -989,8 +1080,8 @@ main (int argc, char **argv)
          case 'n':
            numbered_lines = true;
            if (optarg)
@@ -1906,7 +1924,7 @@ diff -urNp coreutils-8.10-orig/src/pr.c coreutils-8.10/src/pr.c
            break;
          case 'N':
            skip_count = false;
-@@ -1030,7 +1121,7 @@ main (int argc, char **argv)
+@@ -1029,7 +1120,7 @@ main (int argc, char **argv)
            old_s = false;
            /* Reset an additional input of -s, -S dominates -s */
            col_sep_string = bad_cast ("");
@@ -1915,7 +1933,7 @@ diff -urNp coreutils-8.10-orig/src/pr.c coreutils-8.10/src/pr.c
            use_col_separator = true;
            if (optarg)
              separator_string (optarg);
-@@ -1187,10 +1278,45 @@ main (int argc, char **argv)
+@@ -1186,10 +1277,45 @@ main (int argc, char **argv)
     a number. */
  
  static void
@@ -1963,7 +1981,19 @@ diff -urNp coreutils-8.10-orig/src/pr.c coreutils-8.10/src/pr.c
    if (*arg)
      {
        long int tmp_long;
-@@ -1249,7 +1375,7 @@ init_parameters (int number_of_files)
+@@ -1211,6 +1337,11 @@ static void
+ init_parameters (int number_of_files)
+ {
+   int chars_used_by_number = 0;
++  int mb_len = 1;
++#if HAVE_MBRTOWC
++  if (MB_CUR_MAX > 1)
++    mb_len = MB_LEN_MAX;
++#endif
+   lines_per_body = lines_per_page - lines_per_header - lines_per_footer;
+   if (lines_per_body <= 0)
+@@ -1248,7 +1379,7 @@ init_parameters (int number_of_files)
            else
              col_sep_string = column_separator;
  
@@ -1972,7 +2002,7 @@ diff -urNp coreutils-8.10-orig/src/pr.c coreutils-8.10/src/pr.c
            use_col_separator = true;
          }
        /* It's rather pointless to define a TAB separator with column
-@@ -1280,11 +1406,11 @@ init_parameters (int number_of_files)
+@@ -1279,11 +1410,11 @@ init_parameters (int number_of_files)
               TAB_WIDTH (chars_per_input_tab, chars_per_number);   */
  
        /* Estimate chars_per_text without any margin and keep it constant. */
@@ -1986,7 +2016,7 @@ diff -urNp coreutils-8.10-orig/src/pr.c coreutils-8.10/src/pr.c
  
        /* The number is part of the column width unless we are
           printing files in parallel. */
-@@ -1299,7 +1425,7 @@ init_parameters (int number_of_files)
+@@ -1298,7 +1429,7 @@ init_parameters (int number_of_files)
      }
  
    chars_per_column = (chars_per_line - chars_used_by_number -
@@ -1995,7 +2025,16 @@ diff -urNp coreutils-8.10-orig/src/pr.c coreutils-8.10/src/pr.c
  
    if (chars_per_column < 1)
      error (EXIT_FAILURE, 0, _("page width too narrow"));
-@@ -1424,7 +1550,7 @@ init_funcs (void)
+@@ -1315,7 +1446,7 @@ init_parameters (int number_of_files)
+      We've to use 8 as the lower limit, if we use chars_per_default_tab = 8
+      to expand a tab which is not an input_tab-char. */
+   free (clump_buff);
+-  clump_buff = xmalloc (MAX (8, chars_per_input_tab));
++  clump_buff = xmalloc (mb_len * MAX (8, chars_per_input_tab));
+ }
\f
+ /* Open the necessary files,
+@@ -1423,7 +1554,7 @@ init_funcs (void)
  
    /* Enlarge p->start_position of first column to use the same form of
       padding_not_printed with all columns. */
@@ -2004,7 +2043,7 @@ diff -urNp coreutils-8.10-orig/src/pr.c coreutils-8.10/src/pr.c
  
    /* This loop takes care of all but the rightmost column. */
  
-@@ -1458,7 +1584,7 @@ init_funcs (void)
+@@ -1457,7 +1588,7 @@ init_funcs (void)
          }
        else
          {
@@ -2013,7 +2052,7 @@ diff -urNp coreutils-8.10-orig/src/pr.c coreutils-8.10/src/pr.c
            h_next = h + chars_per_column;
          }
      }
-@@ -1749,9 +1875,9 @@ static void
+@@ -1748,9 +1879,9 @@ static void
  align_column (COLUMN *p)
  {
    padding_not_printed = p->start_position;
@@ -2025,7 +2064,7 @@ diff -urNp coreutils-8.10-orig/src/pr.c coreutils-8.10/src/pr.c
        padding_not_printed = ANYWHERE;
      }
  
-@@ -2022,13 +2148,13 @@ store_char (char c)
+@@ -2021,13 +2152,13 @@ store_char (char c)
        /* May be too generous. */
        buff = X2REALLOC (buff, &buff_allocated);
      }
@@ -2041,9 +2080,9 @@ diff -urNp coreutils-8.10-orig/src/pr.c coreutils-8.10/src/pr.c
    char *s;
    int left_cut;
  
-@@ -2051,22 +2177,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,
-          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. */
 -      if (number_separator == '\t')
 +      if (number_separator[0] == '\t')
@@ -2070,7 +2109,7 @@ diff -urNp coreutils-8.10-orig/src/pr.c coreutils-8.10/src/pr.c
          output_position = POS_AFTER_TAB (chars_per_output_tab,
                            output_position);
      }
-@@ -2227,7 +2355,7 @@ print_white_space (void)
+@@ -2226,7 +2359,7 @@ print_white_space (void)
    while (goal - h_old > 1
           && (h_new = POS_AFTER_TAB (chars_per_output_tab, h_old)) <= goal)
      {
@@ -2079,7 +2118,7 @@ diff -urNp coreutils-8.10-orig/src/pr.c coreutils-8.10/src/pr.c
        h_old = h_new;
      }
    while (++h_old <= goal)
-@@ -2247,6 +2375,7 @@ print_sep_string (void)
+@@ -2246,6 +2379,7 @@ print_sep_string (void)
  {
    char *s;
    int l = col_sep_length;
@@ -2087,7 +2126,7 @@ diff -urNp coreutils-8.10-orig/src/pr.c coreutils-8.10/src/pr.c
  
    s = col_sep_string;
  
-@@ -2260,6 +2389,7 @@ print_sep_string (void)
+@@ -2259,6 +2393,7 @@ print_sep_string (void)
      {
        for (; separators_not_printed > 0; --separators_not_printed)
          {
@@ -2095,7 +2134,7 @@ diff -urNp coreutils-8.10-orig/src/pr.c coreutils-8.10/src/pr.c
            while (l-- > 0)
              {
                /* 3 types of sep_strings: spaces only, spaces and chars,
-@@ -2273,12 +2403,15 @@ print_sep_string (void)
+@@ -2272,12 +2407,15 @@ print_sep_string (void)
                  }
                else
                  {
@@ -2112,7 +2151,7 @@ diff -urNp coreutils-8.10-orig/src/pr.c coreutils-8.10/src/pr.c
            /* sep_string ends with some spaces */
            if (spaces_not_printed > 0)
              print_white_space ();
-@@ -2306,7 +2439,7 @@ print_clump (COLUMN *p, int n, char *clu
+@@ -2305,7 +2443,7 @@ print_clump (COLUMN *p, int n, char *clu
     required number of tabs and spaces. */
  
  static void
@@ -2121,7 +2160,7 @@ diff -urNp coreutils-8.10-orig/src/pr.c coreutils-8.10/src/pr.c
  {
    if (tabify_output)
      {
-@@ -2330,6 +2463,74 @@ print_char (char c)
+@@ -2329,6 +2467,74 @@ print_char (char c)
    putchar (c);
  }
  
@@ -2196,7 +2235,7 @@ diff -urNp coreutils-8.10-orig/src/pr.c coreutils-8.10/src/pr.c
  /* Skip to page PAGE before printing.
     PAGE may be larger than total number of pages. */
  
-@@ -2509,9 +2710,9 @@ read_line (COLUMN *p)
+@@ -2508,9 +2714,9 @@ read_line (COLUMN *p)
            align_empty_cols = false;
          }
  
@@ -2208,7 +2247,7 @@ diff -urNp coreutils-8.10-orig/src/pr.c coreutils-8.10/src/pr.c
            padding_not_printed = ANYWHERE;
          }
  
-@@ -2612,9 +2813,9 @@ print_stored (COLUMN *p)
+@@ -2611,9 +2817,9 @@ print_stored (COLUMN *p)
          }
      }
  
@@ -2220,7 +2259,7 @@ diff -urNp coreutils-8.10-orig/src/pr.c coreutils-8.10/src/pr.c
        padding_not_printed = ANYWHERE;
      }
  
-@@ -2627,8 +2828,8 @@ print_stored (COLUMN *p)
+@@ -2626,8 +2832,8 @@ print_stored (COLUMN *p)
    if (spaces_not_printed == 0)
      {
        output_position = p->start_position + end_vector[line];
@@ -2231,7 +2270,7 @@ diff -urNp coreutils-8.10-orig/src/pr.c coreutils-8.10/src/pr.c
      }
  
    return true;
-@@ -2647,7 +2848,7 @@ print_stored (COLUMN *p)
+@@ -2646,7 +2852,7 @@ print_stored (COLUMN *p)
     number of characters is 1.) */
  
  static int
@@ -2240,7 +2279,7 @@ diff -urNp coreutils-8.10-orig/src/pr.c coreutils-8.10/src/pr.c
  {
    unsigned char uc = c;
    char *s = clump_buff;
-@@ -2657,10 +2858,10 @@ char_to_clump (char c)
+@@ -2656,10 +2862,10 @@ char_to_clump (char c)
    int chars;
    int chars_per_c = 8;
  
@@ -2253,7 +2292,7 @@ diff -urNp coreutils-8.10-orig/src/pr.c coreutils-8.10/src/pr.c
      {
        width = TAB_WIDTH (chars_per_c, input_position);
  
-@@ -2741,6 +2942,154 @@ char_to_clump (char c)
+@@ -2740,6 +2946,154 @@ char_to_clump (char c)
    return chars;
  }
  
@@ -2298,7 +2337,7 @@ diff -urNp coreutils-8.10-orig/src/pr.c coreutils-8.10/src/pr.c
 +              width = +4;
 +              chars = +4;
 +              *s++ = '\\';
-+              sprintf (esc_buff, "%03o", mbc[0]);
++              sprintf (esc_buff, "%03o", (unsigned char) mbc[0]);
 +              for (i = 0; i <= 2; ++i)
 +                *s++ = (int) esc_buff[i];
 +            }
@@ -2347,7 +2386,7 @@ diff -urNp coreutils-8.10-orig/src/pr.c coreutils-8.10/src/pr.c
 +                      width += 4;
 +                      chars += 4;
 +                      *s++ = '\\';
-+                      sprintf (esc_buff, "%03o", c);
++                      sprintf (esc_buff, "%03o", (unsigned char) mbc[i]);
 +                      for (j = 0; j <= 2; ++j)
 +                        *s++ = (int) esc_buff[j];
 +                    }
@@ -2368,7 +2407,7 @@ diff -urNp coreutils-8.10-orig/src/pr.c coreutils-8.10/src/pr.c
 +                          width += 4;
 +                          chars += 4;
 +                          *s++ = '\\';
-+                          sprintf (esc_buff, "%03o", c);
++                          sprintf (esc_buff, "%03o", (unsigned char) mbc[i]);
 +                          for (j = 0; j <= 2; ++j)
 +                            *s++ = (int) esc_buff[j];
 +                        }
@@ -2408,9 +2447,9 @@ diff -urNp coreutils-8.10-orig/src/pr.c coreutils-8.10/src/pr.c
  /* We've just printed some files and need to clean up things before
     looking for more options and printing the next batch of files.
  
-diff -urNp coreutils-8.10-orig/src/sort.c coreutils-8.10/src/sort.c
---- coreutils-8.10-orig/src/sort.c     2011-02-03 11:24:35.000000000 +0100
-+++ coreutils-8.10/src/sort.c  2011-02-04 20:15:44.160384535 +0100
+diff -urNp coreutils-8.16-orig/src/sort.c coreutils-8.16/src/sort.c
+--- coreutils-8.16-orig/src/sort.c     2012-03-24 21:26:51.000000000 +0100
++++ coreutils-8.16/src/sort.c  2012-03-26 17:35:09.000000000 +0200
 @@ -22,11 +22,20 @@
  
  #include <config.h>
@@ -2432,7 +2471,7 @@ diff -urNp coreutils-8.10-orig/src/sort.c coreutils-8.10/src/sort.c
  #include "system.h"
  #include "argmatch.h"
  #include "error.h"
-@@ -163,12 +172,34 @@ static int thousands_sep;
+@@ -167,12 +176,34 @@ static int thousands_sep;
  
  /* Nonzero if the corresponding locales are hard.  */
  static bool hard_LC_COLLATE;
@@ -2468,7 +2507,7 @@ diff -urNp coreutils-8.10-orig/src/sort.c coreutils-8.10/src/sort.c
  /* The kind of blanks for '-b' to skip in various options. */
  enum blanktype { bl_start, bl_end, bl_both };
  
-@@ -335,13 +366,11 @@ static bool reverse;
+@@ -343,13 +374,11 @@ static bool reverse;
     they were read if all keys compare equal.  */
  static bool stable;
  
@@ -2485,7 +2524,7 @@ diff -urNp coreutils-8.10-orig/src/sort.c coreutils-8.10/src/sort.c
  
  /* Flag to remove consecutive duplicate lines from the output.
     Only the last of a sequence of equal lines will be output. */
-@@ -775,6 +804,46 @@ reap_all (void)
+@@ -782,6 +811,46 @@ reap_all (void)
      reap (-1);
  }
  
@@ -2532,7 +2571,7 @@ diff -urNp coreutils-8.10-orig/src/sort.c coreutils-8.10/src/sort.c
  /* Clean up any remaining temporary files.  */
  
  static void
-@@ -1207,7 +1276,7 @@ zaptemp (char const *name)
+@@ -1214,7 +1283,7 @@ zaptemp (char const *name)
    free (node);
  }
  
@@ -2541,7 +2580,7 @@ diff -urNp coreutils-8.10-orig/src/sort.c coreutils-8.10/src/sort.c
  
  static int
  struct_month_cmp (void const *m1, void const *m2)
-@@ -1222,7 +1291,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. */
  
  static void
@@ -2550,7 +2589,7 @@ diff -urNp coreutils-8.10-orig/src/sort.c coreutils-8.10/src/sort.c
  {
    size_t i;
  
-@@ -1234,7 +1303,7 @@ inittables (void)
+@@ -1241,7 +1310,7 @@ inittables (void)
        fold_toupper[i] = toupper (i);
      }
  
@@ -2559,7 +2598,7 @@ diff -urNp coreutils-8.10-orig/src/sort.c coreutils-8.10/src/sort.c
    /* If we're not in the "C" locale, read different names for months.  */
    if (hard_LC_TIME)
      {
-@@ -1316,6 +1385,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);
  }
  
@@ -2644,7 +2683,7 @@ diff -urNp coreutils-8.10-orig/src/sort.c coreutils-8.10/src/sort.c
  /* Specify the amount of main memory to use when sorting.  */
  static void
  specify_sort_size (int oi, char c, char const *s)
-@@ -1544,7 +1691,7 @@ buffer_linelim (struct buffer const *buf
+@@ -1551,7 +1698,7 @@ buffer_linelim (struct buffer const *buf
     by KEY in LINE. */
  
  static char *
@@ -2653,7 +2692,7 @@ diff -urNp coreutils-8.10-orig/src/sort.c coreutils-8.10/src/sort.c
  {
    char *ptr = line->text, *lim = ptr + line->length - 1;
    size_t sword = key->sword;
-@@ -1553,10 +1700,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
       is absent.  */
  
@@ -2666,7 +2705,7 @@ diff -urNp coreutils-8.10-orig/src/sort.c coreutils-8.10/src/sort.c
            ++ptr;
          if (ptr < lim)
            ++ptr;
-@@ -1582,11 +1729,70 @@ begfield (struct line const *line, struc
+@@ -1589,11 +1736,70 @@ begfield (struct line const *line, struc
    return ptr;
  }
  
@@ -2738,9 +2777,9 @@ diff -urNp coreutils-8.10-orig/src/sort.c coreutils-8.10/src/sort.c
  {
    char *ptr = line->text, *lim = ptr + line->length - 1;
    size_t eword = key->eword, echar = key->echar;
-@@ -1601,10 +1807,10 @@ limfield (struct line const *line, struc
-      `beginning' is the first character following the delimiting TAB.
-      Otherwise, leave PTR pointing at the first `blank' character after
+@@ -1608,10 +1814,10 @@ limfield (struct line const *line, struc
+      'beginning' is the first character following the delimiting TAB.
+      Otherwise, leave PTR pointing at the first 'blank' character after
       the preceding field.  */
 -  if (tab != TAB_DEFAULT)
 +  if (tab_length)
@@ -2751,7 +2790,7 @@ diff -urNp coreutils-8.10-orig/src/sort.c coreutils-8.10/src/sort.c
            ++ptr;
          if (ptr < lim && (eword || echar))
            ++ptr;
-@@ -1650,10 +1856,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.  */
@@ -2764,7 +2803,7 @@ diff -urNp coreutils-8.10-orig/src/sort.c coreutils-8.10/src/sort.c
        if (newlim)
          lim = newlim;
      }
-@@ -1684,6 +1890,130 @@ limfield (struct line const *line, struc
+@@ -1691,6 +1897,130 @@ limfield (struct line const *line, struc
    return ptr;
  }
  
@@ -2895,7 +2934,7 @@ diff -urNp coreutils-8.10-orig/src/sort.c coreutils-8.10/src/sort.c
  /* 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
     file wasn't terminated by a newline, supply one.  Set up BUF's line
-@@ -1770,8 +2100,22 @@ fillbuf (struct buffer *buf, FILE *fp, c
+@@ -1777,8 +2107,22 @@ fillbuf (struct buffer *buf, FILE *fp, c
                    else
                      {
                        if (key->skipsblanks)
@@ -2920,7 +2959,7 @@ diff -urNp coreutils-8.10-orig/src/sort.c coreutils-8.10/src/sort.c
                        line->keybeg = line_start;
                      }
                  }
-@@ -1892,7 +2236,7 @@ human_numcompare (char const *a, char co
+@@ -1899,7 +2243,7 @@ human_numcompare (char const *a, char co
     hideously fast. */
  
  static int
@@ -2929,7 +2968,7 @@ diff -urNp coreutils-8.10-orig/src/sort.c coreutils-8.10/src/sort.c
  {
    while (blanks[to_uchar (*a)])
      a++;
-@@ -1902,6 +2246,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);
  }
  
@@ -2952,10 +2991,10 @@ diff -urNp coreutils-8.10-orig/src/sort.c coreutils-8.10/src/sort.c
 +}
 +#endif /* HAV_EMBRTOWC */
 +
- static int
- general_numcompare (char const *sa, char const *sb)
- {
-@@ -1934,7 +2297,7 @@ general_numcompare (char const *sa, char
+ /* Work around a problem whereby the long double value returned by glibc's
+    strtold ("NaN", ...) contains uninitialized bits: clear all bytes of
+    A and B before calling strtold.  FIXME: remove this function once
+@@ -1959,7 +2322,7 @@ general_numcompare (char const *sa, char
     Return 0 if the name in S is not recognized.  */
  
  static int
@@ -2964,7 +3003,7 @@ diff -urNp coreutils-8.10-orig/src/sort.c coreutils-8.10/src/sort.c
  {
    size_t lo = 0;
    size_t hi = MONTHS_PER_YEAR;
-@@ -2209,15 +2572,14 @@ debug_key (struct line const *line, stru
+@@ -2234,15 +2597,14 @@ debug_key (struct line const *line, stru
            char saved = *lim;
            *lim = '\0';
  
@@ -2982,7 +3021,7 @@ diff -urNp coreutils-8.10-orig/src/sort.c coreutils-8.10/src/sort.c
            else if (key->general_numeric)
              ignore_value (strtold (beg, &tighter_lim));
            else if (key->numeric || key->human_numeric)
-@@ -2361,7 +2723,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)
                                   && !(key->schar || key->echar);
        bool line_offset = key->eword == 0 && key->echar != 0; /* -k1.x,1.y  */
@@ -2991,8 +3030,8 @@ diff -urNp coreutils-8.10-orig/src/sort.c coreutils-8.10/src/sort.c
            && ((!key->skipsblanks && !(implicit_skip || maybe_space_aligned))
                || (!key->skipsblanks && key->schar)
                || (!key->skipeblanks && key->echar)))
-@@ -2419,11 +2781,83 @@ key_warnings (struct keyfield const *gke
-     error (0, 0, _("option `-r' only applies to last-resort comparison"));
+@@ -2444,11 +2806,83 @@ key_warnings (struct keyfield const *gke
+     error (0, 0, _("option '-r' only applies to last-resort comparison"));
  }
  
 +#if HAVE_MBRTOWC
@@ -3057,12 +3096,12 @@ diff -urNp coreutils-8.10-orig/src/sort.c coreutils-8.10/src/sort.c
 +    }
 +  while (hi - lo > 1);
 +
-+  if (ea)
-+     *ea = (char *) month;
-+
 +  result = (!strncmp (month, monthtab[lo].name, strlen (monthtab[lo].name))
 +      ? monthtab[lo].val : 0);
 +
++  if (ea && result)
++     *ea = s + strlen (monthtab[lo].name);
++
 +  return result;
 +}
 +#endif
@@ -3076,7 +3115,7 @@ diff -urNp coreutils-8.10-orig/src/sort.c coreutils-8.10/src/sort.c
  {
    struct keyfield *key = keylist;
  
-@@ -2508,7 +2942,7 @@ keycompare (struct line const *a, struct
+@@ -2533,7 +2967,7 @@ keycompare (struct line const *a, struct
            else if (key->human_numeric)
              diff = human_numcompare (ta, tb);
            else if (key->month)
@@ -3085,7 +3124,7 @@ diff -urNp coreutils-8.10-orig/src/sort.c coreutils-8.10/src/sort.c
            else if (key->random)
              diff = compare_random (ta, tlena, tb, tlenb);
            else if (key->version)
-@@ -2624,6 +3058,179 @@ keycompare (struct line const *a, struct
+@@ -2649,6 +3083,180 @@ keycompare (struct line const *a, struct
    return key->reverse ? -diff : diff;
  }
  
@@ -3167,7 +3206,8 @@ diff -urNp coreutils-8.10-orig/src/sort.c coreutils-8.10/src/sort.c
 +              if (MBLENGTH == (size_t)-2 || MBLENGTH == (size_t)-1)        \
 +                STATE = state_bak;                                        \
 +              if (!ignore)                                                \
-+                COPY[NEW_LEN++] = TEXT[i++];                                \
++                COPY[NEW_LEN++] = TEXT[i];                                \
++              i++;                                                         \
 +              continue;                                                        \
 +            }                                                                \
 +                                                                        \
@@ -3265,7 +3305,7 @@ diff -urNp coreutils-8.10-orig/src/sort.c coreutils-8.10/src/sort.c
  /* Compare two lines A and B, returning negative, zero, or positive
     depending on whether A compares less than, equal to, or greater than B. */
  
-@@ -4087,7 +4694,7 @@ main (int argc, char **argv)
+@@ -4109,7 +4717,7 @@ main (int argc, char **argv)
    initialize_exit_failure (SORT_FAILURE);
  
    hard_LC_COLLATE = hard_locale (LC_COLLATE);
@@ -3274,7 +3314,7 @@ diff -urNp coreutils-8.10-orig/src/sort.c coreutils-8.10/src/sort.c
    hard_LC_TIME = hard_locale (LC_TIME);
  #endif
  
-@@ -4108,6 +4715,29 @@ main (int argc, char **argv)
+@@ -4130,6 +4738,29 @@ main (int argc, char **argv)
        thousands_sep = -1;
    }
  
@@ -3304,7 +3344,7 @@ diff -urNp coreutils-8.10-orig/src/sort.c coreutils-8.10/src/sort.c
    have_read_stdin = false;
    inittables ();
  
-@@ -4378,13 +5008,34 @@ main (int argc, char **argv)
+@@ -4400,13 +5031,34 @@ main (int argc, char **argv)
  
          case 't':
            {
@@ -3342,8 +3382,8 @@ diff -urNp coreutils-8.10-orig/src/sort.c coreutils-8.10/src/sort.c
 +                  newtab[0] = '\0';
                  else
                    {
-                     /* Provoke with `sort -txx'.  Complain about
-@@ -4395,9 +5046,12 @@ main (int argc, char **argv)
+                     /* Provoke with 'sort -txx'.  Complain about
+@@ -4417,9 +5069,12 @@ main (int argc, char **argv)
                             quote (optarg));
                    }
                }
@@ -3358,10 +3398,10 @@ diff -urNp coreutils-8.10-orig/src/sort.c coreutils-8.10/src/sort.c
            }
            break;
  
-diff -urNp coreutils-8.10-orig/src/unexpand.c coreutils-8.10/src/unexpand.c
---- coreutils-8.10-orig/src/unexpand.c 2011-01-31 13:40:38.000000000 +0100
-+++ coreutils-8.10/src/unexpand.c      2011-02-04 20:13:24.015458014 +0100
-@@ -39,12 +39,29 @@
+diff -urNp coreutils-8.16-orig/src/unexpand.c coreutils-8.16/src/unexpand.c
+--- coreutils-8.16-orig/src/unexpand.c 2012-03-24 21:26:51.000000000 +0100
++++ coreutils-8.16/src/unexpand.c      2012-03-26 17:51:46.000000000 +0200
+@@ -38,12 +38,29 @@
  #include <stdio.h>
  #include <getopt.h>
  #include <sys/types.h>
@@ -3388,10 +3428,10 @@ diff -urNp coreutils-8.10-orig/src/unexpand.c coreutils-8.10/src/unexpand.c
 +# define mbrtowc(pwc, s, n, ps) (mbrtowc) (pwc, s, n, 0)
 +#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"
  
-@@ -104,6 +121,208 @@ static struct option const longopts[] =
+@@ -103,6 +120,208 @@ static struct option const longopts[] =
    {NULL, 0, NULL, 0}
  };
  
@@ -3600,7 +3640,7 @@ diff -urNp coreutils-8.10-orig/src/unexpand.c coreutils-8.10/src/unexpand.c
  void
  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);
  
@@ -3614,9 +3654,9 @@ diff -urNp coreutils-8.10-orig/src/unexpand.c coreutils-8.10/src/unexpand.c
  
    if (have_read_stdin && fclose (stdin) != 0)
      error (EXIT_FAILURE, errno, "-");
-diff -urNp coreutils-8.10-orig/src/uniq.c coreutils-8.10/src/uniq.c
---- coreutils-8.10-orig/src/uniq.c     2011-01-31 13:40:38.000000000 +0100
-+++ coreutils-8.10/src/uniq.c  2011-02-04 20:13:24.018457349 +0100
+diff -urNp coreutils-8.16-orig/src/uniq.c coreutils-8.16/src/uniq.c
+--- coreutils-8.16-orig/src/uniq.c     2012-03-24 21:26:51.000000000 +0100
++++ coreutils-8.16/src/uniq.c  2012-03-26 17:35:09.000000000 +0200
 @@ -21,6 +21,16 @@
  #include <getopt.h>
  #include <sys/types.h>
@@ -3653,7 +3693,7 @@ diff -urNp coreutils-8.10-orig/src/uniq.c coreutils-8.10/src/uniq.c
 +#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"
 @@ -108,6 +130,10 @@ static enum delimit_method const delimit
  /* Select whether/how to delimit groups of duplicate lines.  */
@@ -3666,16 +3706,16 @@ diff -urNp coreutils-8.10-orig/src/uniq.c coreutils-8.10/src/uniq.c
  static struct option const longopts[] =
  {
    {"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. */
  
- static char *
+ static char * _GL_ATTRIBUTE_PURE
 -find_field (struct linebuffer const *line)
 +find_field_uni (struct linebuffer *line)
  {
    size_t count;
    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;
  }
  
@@ -3759,7 +3799,7 @@ diff -urNp coreutils-8.10-orig/src/uniq.c coreutils-8.10/src/uniq.c
  /* Return false if two strings OLD and NEW match, true if not.
     OLD and NEW point not to the beginnings of the lines
     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
  different (char *old, char *new, size_t oldlen, size_t newlen)
  {
@@ -3768,7 +3808,7 @@ diff -urNp coreutils-8.10-orig/src/uniq.c coreutils-8.10/src/uniq.c
    if (check_chars < oldlen)
      oldlen = check_chars;
    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)
      {
@@ -3866,7 +3906,7 @@ diff -urNp coreutils-8.10-orig/src/uniq.c coreutils-8.10/src/uniq.c
  
  /* Output the line in linebuffer LINE to standard 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);
        size_t prevlen IF_LINT ( = 0);
@@ -3910,7 +3950,7 @@ diff -urNp coreutils-8.10-orig/src/uniq.c coreutils-8.10/src/uniq.c
            if (prevline->length == 0
                || 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;
        uintmax_t match_count = 0;
        bool first_delimiter = true;
@@ -3937,7 +3977,7 @@ diff -urNp coreutils-8.10-orig/src/uniq.c coreutils-8.10/src/uniq.c
            if (readlinebuffer_delim (thisline, stdin, delimiter) == 0)
              {
                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);
            thislen = thisline->length - 1 - (thisfield - thisline->buffer);
@@ -3952,7 +3992,7 @@ diff -urNp coreutils-8.10-orig/src/uniq.c coreutils-8.10/src/uniq.c
            match = !different (thisfield, prevfield, thislen, prevlen);
            match_count += match;
  
-@@ -383,6 +612,9 @@ check_file (const char *infile, const ch
+@@ -382,6 +610,9 @@ check_file (const char *infile, const ch
                SWAP_LINES (prevline, thisline);
                prevfield = thisfield;
                prevlen = thislen;
@@ -3962,7 +4002,7 @@ diff -urNp coreutils-8.10-orig/src/uniq.c coreutils-8.10/src/uniq.c
                if (!match)
                  match_count = 0;
              }
-@@ -428,6 +660,19 @@ main (int argc, char **argv)
+@@ -427,6 +658,19 @@ main (int argc, char **argv)
  
    atexit (close_stdout);
  
@@ -3982,18 +4022,18 @@ diff -urNp coreutils-8.10-orig/src/uniq.c coreutils-8.10/src/uniq.c
    skip_chars = 0;
    skip_fields = 0;
    check_chars = SIZE_MAX;
-diff -urNp coreutils-8.10-orig/tests/Makefile.am coreutils-8.10/tests/Makefile.am
---- coreutils-8.10-orig/tests/Makefile.am      2011-02-04 20:12:58.236173903 +0100
-+++ coreutils-8.10/tests/Makefile.am   2011-02-04 20:13:24.020456905 +0100
-@@ -235,6 +235,7 @@ TESTS =                                            \
-   misc/sort-debug-keys                                \
+diff -urNp coreutils-8.16-orig/tests/Makefile.am coreutils-8.16/tests/Makefile.am
+--- coreutils-8.16-orig/tests/Makefile.am      2012-03-26 18:01:35.564014659 +0200
++++ coreutils-8.16/tests/Makefile.am   2012-03-26 18:02:01.023015013 +0200
+@@ -242,6 +242,7 @@ TESTS =                                            \
    misc/sort-debug-warn                                \
+   misc/sort-discrim                           \
    misc/sort-files0-from                               \
 +  misc/sort-mb-tests                          \
    misc/sort-float                             \
    misc/sort-merge                             \
    misc/sort-merge-fdlimit                     \
-@@ -505,6 +506,10 @@ TESTS =                                           \
+@@ -537,6 +538,10 @@ TESTS =                                           \
    $(root_tests)
  
  pr_data =                                     \
@@ -4004,19 +4044,30 @@ diff -urNp coreutils-8.10-orig/tests/Makefile.am coreutils-8.10/tests/Makefile.a
    pr/0F                                               \
    pr/0FF                                      \
    pr/0FFnt                                    \
-diff -urNp coreutils-8.10-orig/tests/misc/cut coreutils-8.10/tests/misc/cut
---- coreutils-8.10-orig/tests/misc/cut 2011-01-31 13:40:38.000000000 +0100
-+++ coreutils-8.10/tests/misc/cut      2011-02-04 20:13:24.021456684 +0100
-@@ -26,7 +26,7 @@ use strict;
+diff -urNp coreutils-8.16-orig/tests/misc/cut coreutils-8.16/tests/misc/cut
+--- coreutils-8.16-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
+@@ -23,14 +23,15 @@ use strict;
+ # Turn off localization of executable's output.
+ @ENV{qw(LANGUAGE LANG LC_ALL)} = ('C') x 3;
+-my $mb_locale = $ENV{LOCALE_FR_UTF8};
+-! defined $mb_locale || $mb_locale eq 'none'
+-  and $mb_locale = 'C';
++#my $mb_locale = $ENV{LOCALE_FR_UTF8};
++#! defined $mb_locale || $mb_locale eq 'none'
++#  and $mb_locale = 'C';
++my $mb_locale = 'C';
  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 $inval = "$prog: invalid byte or field list\n$try";
 +my $inval = "$prog: invalid byte, character or field list\n$try";
  my $no_endpoint = "$prog: invalid range with no endpoint: -\n$try";
  
  my @Tests =
-@@ -143,7 +143,7 @@ my @Tests =
+@@ -147,7 +148,7 @@ my @Tests =
  
    # None of the following invalid ranges provoked an error up to coreutils-6.9.
    ['inval1', qw(-f 2-0), {IN=>''}, {OUT=>''}, {EXIT=>1},
@@ -4025,41 +4076,41 @@ diff -urNp coreutils-8.10-orig/tests/misc/cut coreutils-8.10/tests/misc/cut
    ['inval2', qw(-f -), {IN=>''}, {OUT=>''}, {EXIT=>1}, {ERR=>$no_endpoint}],
    ['inval3', '-f', '4,-', {IN=>''}, {OUT=>''}, {EXIT=>1}, {ERR=>$no_endpoint}],
    ['inval4', '-f', '1-2,-', {IN=>''}, {OUT=>''}, {EXIT=>1},
-diff -urNp coreutils-8.10-orig/tests/misc/mb1.I coreutils-8.10/tests/misc/mb1.I
---- coreutils-8.10-orig/tests/misc/mb1.I       1970-01-01 01:00:00.000000000 +0100
-+++ coreutils-8.10/tests/misc/mb1.I    2011-02-04 20:13:24.022456462 +0100
+diff -urNp coreutils-8.16-orig/tests/misc/mb1.I coreutils-8.16/tests/misc/mb1.I
+--- coreutils-8.16-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
 @@ -0,0 +1,4 @@
 +Apple@10
 +Banana@5
 +Citrus@20
 +Cherry@30
-diff -urNp coreutils-8.10-orig/tests/misc/mb1.X coreutils-8.10/tests/misc/mb1.X
---- coreutils-8.10-orig/tests/misc/mb1.X       1970-01-01 01:00:00.000000000 +0100
-+++ coreutils-8.10/tests/misc/mb1.X    2011-02-04 20:13:24.023456240 +0100
+diff -urNp coreutils-8.16-orig/tests/misc/mb1.X coreutils-8.16/tests/misc/mb1.X
+--- coreutils-8.16-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
 @@ -0,0 +1,4 @@
 +Banana@5
 +Apple@10
 +Citrus@20
 +Cherry@30
-diff -urNp coreutils-8.10-orig/tests/misc/mb2.I coreutils-8.10/tests/misc/mb2.I
---- coreutils-8.10-orig/tests/misc/mb2.I       1970-01-01 01:00:00.000000000 +0100
-+++ coreutils-8.10/tests/misc/mb2.I    2011-02-04 20:13:24.024456019 +0100
+diff -urNp coreutils-8.16-orig/tests/misc/mb2.I coreutils-8.16/tests/misc/mb2.I
+--- coreutils-8.16-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
 @@ -0,0 +1,4 @@
 +Apple@AA10@@20
 +Banana@AA5@@30
 +Citrus@AA20@@5
 +Cherry@AA30@@10
-diff -urNp coreutils-8.10-orig/tests/misc/mb2.X coreutils-8.10/tests/misc/mb2.X
---- coreutils-8.10-orig/tests/misc/mb2.X       1970-01-01 01:00:00.000000000 +0100
-+++ coreutils-8.10/tests/misc/mb2.X    2011-02-04 20:13:24.024456019 +0100
+diff -urNp coreutils-8.16-orig/tests/misc/mb2.X coreutils-8.16/tests/misc/mb2.X
+--- coreutils-8.16-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
 @@ -0,0 +1,4 @@
 +Citrus@AA20@@5
 +Cherry@AA30@@10
 +Apple@AA10@@20
 +Banana@AA5@@30
-diff -urNp coreutils-8.10-orig/tests/misc/sort-mb-tests coreutils-8.10/tests/misc/sort-mb-tests
---- coreutils-8.10-orig/tests/misc/sort-mb-tests       1970-01-01 01:00:00.000000000 +0100
-+++ coreutils-8.10/tests/misc/sort-mb-tests    2011-02-04 20:13:24.025455797 +0100
+diff -urNp coreutils-8.16-orig/tests/misc/sort-mb-tests coreutils-8.16/tests/misc/sort-mb-tests
+--- coreutils-8.16-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
 @@ -0,0 +1,58 @@
 +#! /bin/sh
 +case $# in
@@ -4079,7 +4130,7 @@ diff -urNp coreutils-8.10-orig/tests/misc/sort-mb-tests coreutils-8.10/tests/mis
 +$xx -t @ -k2 -n misc/mb1.I > misc/mb1.O
 +code=$?
 +if test $code != 0; then
-+  $echo "Test mb1 failed: $xx return code $code differs from expected value 0" 1>&2
++  $echo "Test mb1 failed: $xx return code $code differs from expected value 0"
 +  errors=`expr $errors + 1`
 +else
 +  cmp misc/mb1.O $srcdir/misc/mb1.X > /dev/null 2>&1