Module Name: src
Committed By: christos
Date: Tue Dec 28 14:59:02 UTC 2021
Modified Files:
src/external/gpl2/grep/dist/src: grep.c
Log Message:
PR/56584: Andreas Gustafsson: Skip FIFO's when -D
To generate a diff of this commit:
cvs rdiff -u -r1.2 -r1.3 src/external/gpl2/grep/dist/src/grep.c
Please note that diffs are not public domain; they are subject to the
copyright notices on the relevant files.
Modified files:
Index: src/external/gpl2/grep/dist/src/grep.c
diff -u src/external/gpl2/grep/dist/src/grep.c:1.2 src/external/gpl2/grep/dist/src/grep.c:1.3
--- src/external/gpl2/grep/dist/src/grep.c:1.2 Sun Jan 10 17:16:40 2016
+++ src/external/gpl2/grep/dist/src/grep.c Tue Dec 28 09:59:02 2021
@@ -1,4 +1,4 @@
-/* $NetBSD: grep.c,v 1.2 2016/01/10 22:16:40 christos Exp $ */
+/* $NetBSD: grep.c,v 1.3 2021/12/28 14:59:02 christos Exp $ */
/* grep.c - main driver file for grep.
Copyright 1992, 1997-1999, 2000 Free Software Foundation, Inc.
@@ -271,11 +271,15 @@ reset (int fd, char const *file, struct
}
if (directories == SKIP_DIRECTORIES && S_ISDIR (stats->stat.st_mode))
return 0;
-#ifndef DJGPP
- if (devices == SKIP_DEVICES && (S_ISCHR(stats->stat.st_mode) || S_ISBLK(stats->stat.st_mode) || S_ISSOCK(stats->stat.st_mode)))
-#else
- if (devices == SKIP_DEVICES && (S_ISCHR(stats->stat.st_mode) || S_ISBLK(stats->stat.st_mode)))
+ if (devices == SKIP_DEVICES && (S_ISCHR(stats->stat.st_mode)
+ || S_ISBLK(stats->stat.st_mode)
+#ifdef S_ISSOCK
+ || S_ISSOCK(stats->stat.st_mode)
+#endif
+#ifdef S_ISFIFO
+ || S_ISFIFO(stats->stat.st_mode)
#endif
+ ))
return 0;
if (S_ISREG (stats->stat.st_mode))
{