Module Name:src
Committed By: martin
Date: Thu Apr 18 16:05:24 UTC 2024
Modified Files:
src/external/gpl2/grep/dist/src [netbsd-9]: grep.c
Log Message:
Pull up following revision(s) (requested by riastradh in ticket #1832):
external/gpl2/grep/dist/src/grep.c: revision 1.3
PR/56584: Andreas Gustafsson: Skip FIFO's when -D
To generate a diff of this commit:
cvs rdiff -u -r1.2 -r1.2.18.1 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.2.18.1
--- src/external/gpl2/grep/dist/src/grep.c:1.2 Sun Jan 10 22:16:40 2016
+++ src/external/gpl2/grep/dist/src/grep.c Thu Apr 18 16:05:24 2024
@@ -1,4 +1,4 @@
-/* $NetBSD: grep.c,v 1.2 2016/01/10 22:16:40 christos Exp $ */
+/* $NetBSD: grep.c,v 1.2.18.1 2024/04/18 16:05:24 martin 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))
{