mirror of
https://github.com/yann64/haikuports.git
synced 2026-04-18 01:30:07 +02:00
Convert/update diffutils to working recipe
This commit is contained in:
62
sys-apps/diffutils/patches/diffutils-3.3.patchset
Normal file
62
sys-apps/diffutils/patches/diffutils-3.3.patchset
Normal file
@@ -0,0 +1,62 @@
|
||||
From c648aa48039deac1e3e1e031eaedd74c3428493f Mon Sep 17 00:00:00 2001
|
||||
From: Chris Roberts <cpr420@gmail.com>
|
||||
Date: Sat, 19 Oct 2013 23:34:25 -0600
|
||||
Subject: gcc2 fixes
|
||||
|
||||
|
||||
diff --git a/src/dir.c b/src/dir.c
|
||||
index 7f647b0..e9526ac 100644
|
||||
--- a/src/dir.c
|
||||
+++ b/src/dir.c
|
||||
@@ -249,6 +249,7 @@ diff_dirs (struct comparison const *cmp,
|
||||
/* Loop while files remain in one or both dirs. */
|
||||
while (*names[0] || *names[1])
|
||||
{
|
||||
+ int v1;
|
||||
/* Compare next name in dir 0 with next name in dir 1.
|
||||
At the end of a dir,
|
||||
pretend the "next name" in that dir is very large. */
|
||||
@@ -289,7 +290,7 @@ diff_dirs (struct comparison const *cmp,
|
||||
}
|
||||
}
|
||||
|
||||
- int v1 = (*handle_file) (cmp,
|
||||
+ v1 = (*handle_file) (cmp,
|
||||
0 < nameorder ? 0 : *names[0]++,
|
||||
nameorder < 0 ? 0 : *names[1]++);
|
||||
if (val < v1)
|
||||
@@ -347,7 +348,8 @@ find_dir_file_pathname (char const *dir, char const *file)
|
||||
match = file; /* longjmp may mess up MATCH. */
|
||||
else
|
||||
{
|
||||
- for (char const **p = dirdata.names; *p; p++)
|
||||
+ char const **p;
|
||||
+ for (p = dirdata.names; *p; p++)
|
||||
if (compare_names (*p, file) == 0)
|
||||
{
|
||||
if (file_name_cmp (*p, file) == 0)
|
||||
diff --git a/src/io.c b/src/io.c
|
||||
index 463ee35..965cd3b 100644
|
||||
--- a/src/io.c
|
||||
+++ b/src/io.c
|
||||
@@ -274,6 +274,8 @@ find_and_hash_each_line (struct file_data *current)
|
||||
size_t column = 0;
|
||||
while ((c = *p++) != '\n')
|
||||
{
|
||||
+ size_t repetitions = 1;
|
||||
+
|
||||
if (ig_white_space & IGNORE_TRAILING_SPACE
|
||||
&& isspace (c))
|
||||
{
|
||||
@@ -288,8 +290,6 @@ find_and_hash_each_line (struct file_data *current)
|
||||
while (isspace (c1));
|
||||
}
|
||||
|
||||
- size_t repetitions = 1;
|
||||
-
|
||||
if (ig_white_space & IGNORE_TAB_EXPANSION)
|
||||
switch (c)
|
||||
{
|
||||
--
|
||||
1.8.3.4
|
||||
|
||||
Reference in New Issue
Block a user