Source-Changes-HG archive

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index][Old Index]

[src/trunk]: src/external/gpl2/grep/dist/src PR/56584: Andreas Gustafsson: Sk...



details:   https://anonhg.NetBSD.org/src/rev/25954f2b0e0d
branches:  trunk
changeset: 1029244:25954f2b0e0d
user:      christos <christos%NetBSD.org@localhost>
date:      Tue Dec 28 14:59:02 2021 +0000

description:
PR/56584: Andreas Gustafsson: Skip FIFO's when -D

diffstat:

 external/gpl2/grep/dist/src/grep.c |  14 +++++++++-----
 1 files changed, 9 insertions(+), 5 deletions(-)

diffs (29 lines):

diff -r 906f6597f82f -r 25954f2b0e0d external/gpl2/grep/dist/src/grep.c
--- a/external/gpl2/grep/dist/src/grep.c        Tue Dec 28 14:22:51 2021 +0000
+++ b/external/gpl2/grep/dist/src/grep.c        Tue Dec 28 14:59:02 2021 +0000
@@ -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 @@
     }
   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))
     {



Home | Main Index | Thread Index | Old Index