Merge branch 'f18' into f19

This commit is contained in:
Tim Waugh 2013-03-26 11:27:52 +00:00
commit ca4a9c85a5
8 changed files with 48 additions and 132 deletions

1
.gitignore vendored
View File

@ -2,3 +2,4 @@ diffutils-2.8.1.tar.gz
/diffutils-3.0.tar.xz
/diffutils-3.1.tar.xz
/diffutils-3.2.tar.xz
/diffutils-3.3.tar.xz

View File

@ -1,17 +0,0 @@
-----BEGIN PGP SIGNATURE-----
Version: GnuPG v1.4.11 (GNU/Linux)
iQIcBAABCAAGBQJOYPXJAAoJEH/Z/MsAC+7uxAwP/3GXgtb768UHYBBUBk+8e9ZC
vsoE3kxUwHPu1vPXHwoFPtsAqVtwKs8UEdpOBN4yrO0z7Nm1ELn58AfrfPuweflv
dJqsSVAt1lGxe596oS1+WXXKjjV6t27KVfJOypsYgqpJ5CAbjEjmeciYCa7N3MH4
KMaIX1zxOOmBiqm2SI/Uv+1ub1Bjcr7s2E2+8Y/ufmPRYsd0ushK+mHNDE/OoySn
qByLTqbU93vJzBDvdfqG9z0e8JZmVAcdHU1Z4EDISV4L6eBORUDlroBCOVwIA+qm
c9yGA9OfWy2ThAZpeBcrd/eOus/Rx3U6znPpCwPmcaAUCLJKT3O4VU5NDPSm5/xX
1vO0lcIj3iJS0AcsHI+jWjKmuufxnWT9X9vPrpwPP47V8EfNk/zJkX8yfAT8GBqv
+LF1NOfaguvZhaIz7yIwJKB1WU5G2IImuYDNU1l/NxPKad498sGuL3UxqWVznHL/
fB1mn1PQOimL48GvfuOqfw4GXGpN9YLF6fXlfjOAMDExzuuOr/nZbePvNNEjzHgK
iAlc/nHUlguBqfpEGqTjrSnT6akBHelnWjGx+/s7H7zsjAuE38IAyacxPQAEq0D9
sbaGnutDARrTVo70eIp6rdrZzcuWCtWs46Au35qPtW8m6dFJLkQDpCzIXBvj3Kff
I5UeFwrX6rRqqSD+IFpn
=ngbK
-----END PGP SIGNATURE-----

View File

@ -1,7 +1,7 @@
diff -up diffutils-3.2/src/diff.c.i18n diffutils-3.2/src/diff.c
--- diffutils-3.2/src/diff.c.i18n 2011-08-15 06:24:38.000000000 +0100
+++ diffutils-3.2/src/diff.c 2012-10-26 18:23:47.495735160 +0100
@@ -73,6 +73,8 @@ static void try_help (char const *, char
diff -up diffutils-3.3/src/diff.c.i18n diffutils-3.3/src/diff.c
--- diffutils-3.3/src/diff.c.i18n 2013-02-02 04:39:05.000000000 +0000
+++ diffutils-3.3/src/diff.c 2013-03-26 09:40:26.213878482 +0000
@@ -74,6 +74,8 @@ static void try_help (char const *, char
static void check_stdout (void);
static void usage (void);
@ -10,7 +10,7 @@ diff -up diffutils-3.2/src/diff.c.i18n diffutils-3.2/src/diff.c
/* If comparing directories, compare their common subdirectories
recursively. */
static bool recursive;
@@ -286,6 +288,13 @@ main (int argc, char **argv)
@@ -285,6 +287,13 @@ main (int argc, char **argv)
re_set_syntax (RE_SYNTAX_GREP | RE_NO_POSIX_BACKTRACKING);
excluded = new_exclude ();
@ -24,9 +24,9 @@ diff -up diffutils-3.2/src/diff.c.i18n diffutils-3.2/src/diff.c
/* Decode the options. */
while ((c = getopt_long (argc, argv, shortopts, longopts, NULL)) != -1)
diff -up diffutils-3.2/src/diff.h.i18n diffutils-3.2/src/diff.h
--- diffutils-3.2/src/diff.h.i18n 2011-08-15 06:25:26.000000000 +0100
+++ diffutils-3.2/src/diff.h 2012-10-26 18:23:47.495735160 +0100
diff -up diffutils-3.3/src/diff.h.i18n diffutils-3.3/src/diff.h
--- diffutils-3.3/src/diff.h.i18n 2013-02-02 04:39:05.000000000 +0000
+++ diffutils-3.3/src/diff.h 2013-03-26 09:42:32.941357743 +0000
@@ -23,6 +23,17 @@
#include <stdio.h>
#include <unlocked-io.h>
@ -45,23 +45,23 @@ diff -up diffutils-3.2/src/diff.h.i18n diffutils-3.2/src/diff.h
/* What kind of changes a hunk contains. */
enum changes
{
@@ -361,7 +372,11 @@ extern void print_sdiff_script (struct c
@@ -365,7 +376,11 @@ extern void print_sdiff_script (struct c
extern char const change_letter[4];
extern char const pr_program[];
extern char *concat (char const *, char const *, char const *);
-extern bool lines_differ (char const *, char const *);
+extern bool (*lines_differ) (char const *, size_t, char const *, size_t);
+extern bool lines_differ_singlebyte (char const *, size_t, char const *, size_t);
-extern bool lines_differ (char const *, char const *) _GL_ATTRIBUTE_PURE;
+extern bool (*lines_differ) (char const *, size_t, char const *, size_t) _GL_ATTRIBUTE_PURE;
+extern bool lines_differ_singlebyte (char const *, size_t, char const *, size_t) _GL_ATTRIBUTE_PURE;
+#ifdef HANDLE_MULTIBYTE
+extern bool lines_differ_multibyte (char const *, size_t, char const *, size_t);
+extern bool lines_differ_multibyte (char const *, size_t, char const *, size_t) _GL_ATTRIBUTE_PURE;
+#endif
extern lin translate_line_number (struct file_data const *, lin);
extern struct change *find_change (struct change *);
extern struct change *find_reverse_change (struct change *);
diff -up diffutils-3.2/src/io.c.i18n diffutils-3.2/src/io.c
--- diffutils-3.2/src/io.c.i18n 2011-08-15 06:24:38.000000000 +0100
+++ diffutils-3.2/src/io.c 2013-02-22 14:05:48.700990339 +0000
@@ -22,6 +22,7 @@
diff -up diffutils-3.3/src/io.c.i18n diffutils-3.3/src/io.c
--- diffutils-3.3/src/io.c.i18n 2013-02-02 04:39:05.000000000 +0000
+++ diffutils-3.3/src/io.c 2013-03-26 09:40:26.215878488 +0000
@@ -23,6 +23,7 @@
#include <cmpbuf.h>
#include <file-type.h>
#include <xalloc.h>
@ -69,7 +69,7 @@ diff -up diffutils-3.2/src/io.c.i18n diffutils-3.2/src/io.c
/* Rotate an unsigned value to the left. */
#define ROL(v, n) ((v) << (n) | (v) >> (sizeof (v) * CHAR_BIT - (n)))
@@ -194,6 +195,28 @@ slurp (struct file_data *current)
@@ -208,6 +209,28 @@ slurp (struct file_data *current)
/* Split the file into lines, simultaneously computing the equivalence
class for each line. */
@ -98,7 +98,7 @@ diff -up diffutils-3.2/src/io.c.i18n diffutils-3.2/src/io.c
static void
find_and_hash_each_line (struct file_data *current)
@@ -220,12 +243,302 @@ find_and_hash_each_line (struct file_dat
@@ -234,12 +257,302 @@ find_and_hash_each_line (struct file_dat
bool same_length_diff_contents_compare_anyway =
diff_length_compare_anyway | ig_case;
@ -401,7 +401,7 @@ diff -up diffutils-3.2/src/io.c.i18n diffutils-3.2/src/io.c
/* Hash this line until we find a newline. */
switch (ig_white_space)
{
@@ -376,7 +689,7 @@ find_and_hash_each_line (struct file_dat
@@ -390,7 +703,7 @@ find_and_hash_each_line (struct file_dat
else if (!diff_length_compare_anyway)
continue;
@ -410,10 +410,10 @@ diff -up diffutils-3.2/src/io.c.i18n diffutils-3.2/src/io.c
break;
}
diff -up diffutils-3.2/src/util.c.i18n diffutils-3.2/src/util.c
--- diffutils-3.2/src/util.c.i18n 2011-08-15 06:24:38.000000000 +0100
+++ diffutils-3.2/src/util.c 2012-10-26 18:23:47.496735164 +0100
@@ -317,7 +317,8 @@ finish_output (void)
diff -up diffutils-3.3/src/util.c.i18n diffutils-3.3/src/util.c
--- diffutils-3.3/src/util.c.i18n 2013-02-02 04:39:05.000000000 +0000
+++ diffutils-3.3/src/util.c 2013-03-26 09:40:26.215878488 +0000
@@ -408,7 +408,8 @@ finish_output (void)
Return nonzero if the lines differ. */
bool
@ -423,7 +423,7 @@ diff -up diffutils-3.2/src/util.c.i18n diffutils-3.2/src/util.c
{
register char const *t1 = s1;
register char const *t2 = s2;
@@ -473,6 +474,354 @@ lines_differ (char const *s1, char const
@@ -564,6 +565,354 @@ lines_differ (char const *s1, char const
return true;
}

12
diffutils-mkdir_p.patch Normal file
View File

@ -0,0 +1,12 @@
diff -up diffutils-3.3/po/Makefile.in.in.mkdir_p diffutils-3.3/po/Makefile.in.in
--- diffutils-3.3/po/Makefile.in.in.mkdir_p 2013-03-26 11:25:58.869375066 +0000
+++ diffutils-3.3/po/Makefile.in.in 2013-03-26 11:26:00.114379442 +0000
@@ -42,7 +42,7 @@ INSTALL_DATA = @INSTALL_DATA@
mkinstalldirs = $(SHELL) @install_sh@ -d
install_sh = $(SHELL) @install_sh@
MKDIR_P = @MKDIR_P@
-mkdir_p = @mkdir_p@
+mkdir_p = @MKDIR_P@
GMSGFMT_ = @GMSGFMT@
GMSGFMT_no = @GMSGFMT@

View File

@ -1,49 +0,0 @@
diff -up diffutils-3.2/gnulib-tests/float.c.ppc-float diffutils-3.2/gnulib-tests/float.c
--- diffutils-3.2/gnulib-tests/float.c.ppc-float 2011-08-28 12:57:24.000000000 +0100
+++ diffutils-3.2/gnulib-tests/float.c 2011-11-25 14:13:58.090442846 +0000
@@ -22,7 +22,7 @@
/* Specification. */
#include <float.h>
-#if (defined _ARCH_PPC || defined _POWER) && defined _AIX && (LDBL_MANT_DIG == 106) && defined __GNUC__
+#if (defined _ARCH_PPC || defined _POWER) && (defined _AIX || defined __linux__) && (LDBL_MANT_DIG == 106) && defined __GNUC__
const union gl_long_double_union gl_LDBL_MAX =
{ { DBL_MAX, DBL_MAX / (double)134217728UL / (double)134217728UL } };
#elif defined __i386__
diff -up diffutils-3.2/gnulib-tests/float.in.h.ppc-float diffutils-3.2/gnulib-tests/float.in.h
--- diffutils-3.2/gnulib-tests/float.in.h.ppc-float 2011-08-28 12:57:25.000000000 +0100
+++ diffutils-3.2/gnulib-tests/float.in.h 2011-11-25 14:13:58.091442827 +0000
@@ -111,7 +111,8 @@ extern const union gl_long_double_union
#endif
/* On AIX 7.1 with gcc 4.2, the values of LDBL_MIN_EXP, LDBL_MIN, LDBL_MAX are
- wrong. */
+ wrong.
+ On Linux/PowerPC with gcc 4.4, the value of LDBL_MAX is wrong. */
#if (defined _ARCH_PPC || defined _POWER) && defined _AIX && (LDBL_MANT_DIG == 106) && defined __GNUC__
# undef LDBL_MIN_EXP
# define LDBL_MIN_EXP DBL_MIN_EXP
@@ -119,6 +120,8 @@ extern const union gl_long_double_union
# define LDBL_MIN_10_EXP DBL_MIN_10_EXP
# undef LDBL_MIN
# define LDBL_MIN 2.22507385850720138309023271733240406422e-308L /* DBL_MIN = 2^-1022 */
+#endif
+#if (defined _ARCH_PPC || defined _POWER) && (defined _AIX || defined __linux__) && (LDBL_MANT_DIG == 106) && defined __GNUC__
# undef LDBL_MAX
/* LDBL_MAX is represented as { 0x7FEFFFFF, 0xFFFFFFFF, 0x7C8FFFFF, 0xFFFFFFFF }.
It is not easy to define:
diff -up diffutils-3.2/gnulib-tests/test-float.c.ppc-float diffutils-3.2/gnulib-tests/test-float.c
--- diffutils-3.2/gnulib-tests/test-float.c.ppc-float 2011-09-01 23:38:42.000000000 +0100
+++ diffutils-3.2/gnulib-tests/test-float.c 2011-11-25 14:14:04.623319695 +0000
@@ -325,7 +325,11 @@ test_long_double (void)
int n;
ASSERT (m + m > m);
+#if (defined _ARCH_PPC || defined _POWER)
+ for (n = 0; n <= 2 * DBL_MANT_DIG; n++)
+#else
for (n = 0; n <= 2 * LDBL_MANT_DIG; n++)
+#endif
{
volatile long double pow2_n = pow2l (n); /* 2^n */
volatile long double x = m + (m / pow2_n);

View File

@ -1,30 +0,0 @@
diff -up diffutils-3.2/lib/stdio.in.h.stdio-gets diffutils-3.2/lib/stdio.in.h
--- diffutils-3.2/lib/stdio.in.h.stdio-gets 2012-07-23 17:29:22.311787651 +0100
+++ diffutils-3.2/lib/stdio.in.h 2012-07-23 17:29:58.316908463 +0100
@@ -681,26 +681,6 @@ _GL_WARN_ON_USE (getline, "getline is un
# endif
#endif
-#if @GNULIB_GETS@
-# if @REPLACE_STDIO_READ_FUNCS@ && @GNULIB_STDIO_H_NONBLOCKING@
-# if !(defined __cplusplus && defined GNULIB_NAMESPACE)
-# undef gets
-# define gets rpl_gets
-# endif
-_GL_FUNCDECL_RPL (gets, char *, (char *s) _GL_ARG_NONNULL ((1)));
-_GL_CXXALIAS_RPL (gets, char *, (char *s));
-# else
-_GL_CXXALIAS_SYS (gets, char *, (char *s));
-# undef gets
-# endif
-_GL_CXXALIASWARN (gets);
-/* It is very rare that the developer ever has full control of stdin,
- so any use of gets warrants an unconditional warning. Assume it is
- always declared, since it is required by C89. */
-_GL_WARN_ON_USE (gets, "gets is a security hole - use fgets instead");
-#endif
-
-
#if @GNULIB_OBSTACK_PRINTF@ || @GNULIB_OBSTACK_PRINTF_POSIX@
struct obstack;
/* Grow an obstack with formatted output. Return the number of

View File

@ -1,14 +1,13 @@
Summary: A GNU collection of diff utilities
Name: diffutils
Version: 3.2
Release: 13%{?dist}
Version: 3.3
Release: 1%{?dist}
Group: Applications/Text
URL: http://www.gnu.org/software/diffutils/diffutils.html
Source: ftp://ftp.gnu.org/gnu/diffutils/diffutils-%{version}.tar.xz
Patch1: diffutils-cmp-s-empty.patch
Patch2: diffutils-ppc-float.patch
Patch3: diffutils-stdio-gets.patch
Patch4: diffutils-3.2-i18n.patch
Patch2: diffutils-mkdir_p.patch
Patch4: diffutils-i18n.patch
License: GPLv3+
Requires(post): info
Requires(preun): info
@ -34,11 +33,8 @@ Install diffutils if you need to compare text files.
# For 'cmp -s', compare file sizes only if both non-zero (bug #563618).
%patch1 -p1 -b .cmp-s-empty
# Applied upstream gnulib fix for float test on ppc (bug #733536).
%patch2 -p1 -b .ppc-float
# Fixed build failure.
%patch3 -p1 -b .stdio-gets
# Work around @mkdir_p@ build issue.
%patch2 -p1 -b .mkdir_p
%patch4 -p1 -b .i18n
@ -75,6 +71,9 @@ rm -rf $RPM_BUILD_ROOT
%{_infodir}/diffutils.info*gz
%changelog
* Tue Mar 26 2013 Tim Waugh <twaugh@redhat.com> 3.3-1
- 3.3 (bug #927560).
* Fri Feb 22 2013 Tim Waugh <twaugh@redhat.com> 3.2-13
- Fixed i18n handling of 'diff -E' (bug #914666).

View File

@ -1 +1 @@
26ff64c332429c830c154be46b393382 diffutils-3.2.tar.xz
99180208ec2a82ce71f55b0d7389f1b3 diffutils-3.3.tar.xz