From cea5941d7816bf7827c889a99e2abd110dc323ba Mon Sep 17 00:00:00 2001 From: apb Date: Sat, 14 Jan 2006 09:18:17 +0000 Subject: Two special files that both refer to the same device should be treated as identical. PR 30779 Approved by christos --- gnu/dist/diffutils/src/diff.c | 9 +++++---- 1 file changed, 5 insertions(+), 4 deletions(-) (limited to 'gnu/dist/diffutils/src/diff.c') 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. -- cgit