mirror of
https://github.com/yann64/haikuports.git
synced 2026-04-17 09:10:08 +02:00
98 lines
3.1 KiB
Diff
98 lines
3.1 KiB
Diff
diff -up diffutils-3.2/gnulib-tests/test-dup2.c.orig diffutils-3.2/gnulib-tests/test-dup2.c
|
|
--- diffutils-3.2/gnulib-tests/test-dup2.c.orig 2011-03-26 06:47:07.008126464 -0600
|
|
+++ diffutils-3.2/gnulib-tests/test-dup2.c 2012-05-02 23:07:17.022806528 -0600
|
|
@@ -181,6 +181,7 @@ main (void)
|
|
|
|
/* On systems that distinguish between text and binary mode, dup2
|
|
reuses the mode of the source. */
|
|
+#if O_BINARY
|
|
setmode (fd, O_BINARY);
|
|
ASSERT (is_mode (fd, O_BINARY));
|
|
ASSERT (dup2 (fd, fd + 1) == fd + 1);
|
|
@@ -195,6 +196,6 @@ main (void)
|
|
ASSERT (close (fd + 1) == 0);
|
|
ASSERT (close (fd) == 0);
|
|
ASSERT (unlink (file) == 0);
|
|
-
|
|
+#endif
|
|
return 0;
|
|
}
|
|
diff -up diffutils-3.2/gnulib-tests/test-fcntl.c.orig diffutils-3.2/gnulib-tests/test-fcntl.c
|
|
--- diffutils-3.2/gnulib-tests/test-fcntl.c.orig 2011-01-03 14:06:23.006815744 -0700
|
|
+++ diffutils-3.2/gnulib-tests/test-fcntl.c 2012-05-02 23:07:17.025952256 -0600
|
|
@@ -293,6 +293,7 @@ main (void)
|
|
ASSERT (is_mode (fd + 2, O_BINARY));
|
|
ASSERT (close (fd) == 0);
|
|
|
|
+#if O_TEXT
|
|
setmode (fd + 2, O_TEXT);
|
|
ASSERT (fcntl (fd + 2, F_DUPFD, fd + 1) == fd + 1);
|
|
ASSERT (!is_open (fd));
|
|
@@ -313,7 +314,7 @@ main (void)
|
|
ASSERT (is_mode (fd, O_TEXT));
|
|
ASSERT (is_mode (fd + 2, O_TEXT));
|
|
ASSERT (close (fd + 2) == 0);
|
|
-
|
|
+#endif
|
|
/* Test F_GETFD. */
|
|
errno = 0;
|
|
ASSERT (fcntl (-1, F_GETFD) == -1);
|
|
diff -urN diffutils-3.2/src/dir.c diffutils-3.2-c89/src/dir.c
|
|
--- diffutils-3.2/src/dir.c 2011-08-14 15:58:59.020709376 +0000
|
|
+++ diffutils-3.2-c89/src/dir.c 2012-09-14 16:59:18.000000000 +0000
|
|
@@ -202,6 +202,7 @@
|
|
struct dirdata dirdata[2];
|
|
int volatile val = EXIT_SUCCESS;
|
|
int i;
|
|
+ int v1;
|
|
|
|
if ((cmp->file[0].desc == -1 || dir_loop (cmp, 0))
|
|
&& (cmp->file[1].desc == -1 || dir_loop (cmp, 1)))
|
|
@@ -254,6 +255,7 @@
|
|
pretend the "next name" in that dir is very large. */
|
|
int nameorder = (!*names[0] ? 1 : !*names[1] ? -1
|
|
: compare_names (*names[0], *names[1]));
|
|
+ int v1;
|
|
|
|
/* Prefer a file_name_cmp match if available. This algorithm is
|
|
O(N**2), where N is the number of names in a directory
|
|
@@ -289,7 +291,7 @@
|
|
}
|
|
}
|
|
|
|
- int v1 = (*handle_file) (cmp,
|
|
+ v1 = (*handle_file) (cmp,
|
|
0 < nameorder ? 0 : *names[0]++,
|
|
nameorder < 0 ? 0 : *names[1]++);
|
|
if (val < v1)
|
|
@@ -342,7 +344,8 @@
|
|
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 -urN diffutils-3.2/src/io.c diffutils-3.2-c89/src/io.c
|
|
--- diffutils-3.2/src/io.c 2011-08-15 05:24:38.019136512 +0000
|
|
+++ diffutils-3.2-c89/src/io.c 2012-09-14 17:02:59.000000000 +0000
|
|
@@ -258,6 +258,7 @@
|
|
case IGNORE_TRAILING_SPACE:
|
|
{
|
|
size_t column = 0;
|
|
+ size_t repetitions = 1;
|
|
while ((c = *p++) != '\n')
|
|
{
|
|
if (ig_white_space & IGNORE_TRAILING_SPACE
|
|
@@ -274,8 +275,6 @@
|
|
while (isspace (c1));
|
|
}
|
|
|
|
- size_t repetitions = 1;
|
|
-
|
|
if (ig_white_space & IGNORE_TAB_EXPANSION)
|
|
switch (c)
|
|
{
|