mirror of
https://github.com/yann64/haikuports.git
synced 2026-04-10 22:00:09 +02:00
40 lines
1.3 KiB
Diff
40 lines
1.3 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);
|