- Fixed CRLF detection (bug #154283).

This commit is contained in:
Tim Waugh 2005-08-11 12:02:10 +00:00
parent b0aad101df
commit d4ef45fe1c
2 changed files with 40 additions and 0 deletions

35
patch-stripcr.patch Normal file
View File

@ -0,0 +1,35 @@
--- patch-2.5.4/pch.c.stripcr 1999-08-30 07:20:08.000000000 +0100
+++ patch-2.5.4/pch.c 2005-08-11 12:59:35.000000000 +0100
@@ -355,10 +355,16 @@
if (!stars_last_line && strnEQ(s, "*** ", 4))
name[OLD] = fetchname (s+4, strippath, &p_timestamp[OLD]);
else if (strnEQ(s, "+++ ", 4))
+ {
/* Swap with NEW below. */
name[OLD] = fetchname (s+4, strippath, &p_timestamp[OLD]);
+ p_strip_trailing_cr = strip_trailing_cr;
+ }
else if (strnEQ(s, "Index:", 6))
+ {
name[INDEX] = fetchname (s+6, strippath, (time_t *) 0);
+ p_strip_trailing_cr = strip_trailing_cr;
+ }
else if (strnEQ(s, "Prereq:", 7)) {
for (t = s + 7; ISSPACE ((unsigned char) *t); t++)
continue;
@@ -386,6 +392,7 @@
p_timestamp[NEW] = timestamp;
p_rfc934_nesting = (t - s) >> 1;
}
+ p_strip_trailing_cr = strip_trailing_cr;
}
}
if ((diff_type == NO_DIFF || diff_type == ED_DIFF) &&
@@ -419,7 +426,6 @@
if (s[0] == '+' && s[1] == '0' && !ISDIGIT (s[2]))
p_says_nonexistent[NEW] = 1 + ! p_timestamp[NEW];
p_indent = indent;
- p_strip_trailing_cr = strip_trailing_cr;
p_start = this_line;
p_sline = p_input_line;
retval = UNI_DIFF;

View File

@ -11,6 +11,7 @@ Patch2: patch-2.5.4-suffix.patch
Patch3: patch-2.5.4-sigsegv.patch
Patch4: patch-2.5.4-ifdef.patch
Patch5: patch-2.5.4-program_name.patch
Patch6: patch-stripcr.patch
Buildroot: %{_tmppath}/%{name}-%{version}-root
%description
@ -30,6 +31,7 @@ applications.
%patch3 -p1 -b .sigsegv
%patch4 -p1 -b .ifdef
%patch5 -p1 -b .program_name
%patch6 -p1 -b .stripcr
%build
CFLAGS="$RPM_OPT_FLAGS -D_GNU_SOURCE"
@ -56,6 +58,9 @@ rm -rf $RPM_BUILD_ROOT
%{_mandir}/*/*
%changelog
* Thu Aug 11 2005 Tim Waugh <twaugh@redhat.com>
- Fixed CRLF detection (bug #154283).
* Wed May 4 2005 Tim Waugh <twaugh@redhat.com> 2.5.4-24
- Reverted last change (bug #154283, bug #156762).