summaryrefslogtreecommitdiff
path: root/gnu/dist/diffutils/src/diff.c
diff options
context:
space:
mode:
authorapb <apb@NetBSD.org>2006-01-14 09:18:17 +0000
committerapb <apb@NetBSD.org>2006-01-14 09:18:17 +0000
commitcea5941d7816bf7827c889a99e2abd110dc323ba (patch)
tree3bcae756490c0eab3185e86fce647f3315c0abec /gnu/dist/diffutils/src/diff.c
parent77e5f3531a26ba91ee8e4237d40f0e19778d0f4a (diff)
Two special files that both refer to the same device should be treated
as identical. PR 30779 Approved by christos
Diffstat (limited to 'gnu/dist/diffutils/src/diff.c')
-rw-r--r--gnu/dist/diffutils/src/diff.c9
1 files changed, 5 insertions, 4 deletions
diff --git a/gnu/dist/diffutils/src/diff.c b/gnu/dist/diffutils/src/diff.c
index e087fa76969..a2d04aa89a4 100644
--- a/gnu/dist/diffutils/src/diff.c
+++ b/gnu/dist/diffutils/src/diff.c
@@ -1,4 +1,4 @@
-/* $NetBSD: diff.c,v 1.1.1.1 2003/01/26 00:43:16 wiz Exp $ */
+/* $NetBSD: diff.c,v 1.2 2006/01/14 09:18:17 apb Exp $ */
/* diff - compare files line by line
@@ -1208,9 +1208,10 @@ compare_files (struct comparison const *parent,
else if ((same_files
= (cmp.file[0].desc != NONEXISTENT
&& cmp.file[1].desc != NONEXISTENT
- && 0 < same_file (&cmp.file[0].stat, &cmp.file[1].stat)
- && same_file_attributes (&cmp.file[0].stat,
- &cmp.file[1].stat)))
+ && (same_special_file (&cmp.file[0].stat, &cmp.file[1].stat)
+ || (0 < same_file (&cmp.file[0].stat, &cmp.file[1].stat)
+ && same_file_attributes (&cmp.file[0].stat,
+ &cmp.file[1].stat)))))
&& no_diff_means_no_output)
{
/* The two named files are actually the same physical file.