Just saw this in the vicinity, so cleaned up:

>From 59e615e3fd46ee97ba5009238793ee9b57d3e8dd Mon Sep 17 00:00:00 2001
From: Jim Meyering <[email protected]>
Date: Mon, 8 Feb 2010 10:24:32 +0100
Subject: [PATCH] remove useless DJGPP-specific code

* src/grep.c (grepfile): Remove now-useless DJGPP-specific code.
Now, all S_IS* macros are guaranteed to be defined via gnulib.
---
 src/grep.c |    9 ++++-----
 1 files changed, 4 insertions(+), 5 deletions(-)

diff --git a/src/grep.c b/src/grep.c
index 5bb7284..7d4311f 100644
--- a/src/grep.c
+++ b/src/grep.c
@@ -1227,11 +1227,10 @@ grepfile (char const *file, struct stats *stats)
         }
       if (directories == SKIP_DIRECTORIES && S_ISDIR (stats->stat.st_mode))
         return 1;
-#ifndef DJGPP
-      if (devices == SKIP_DEVICES && (S_ISCHR(stats->stat.st_mode) || 
S_ISBLK(stats->stat.st_mode) || S_ISSOCK(stats->stat.st_mode) || 
S_ISFIFO(stats->stat.st_mode)))
-#else
-      if (devices == SKIP_DEVICES && (S_ISCHR(stats->stat.st_mode) || 
S_ISBLK(stats->stat.st_mode)))
-#endif
+      if (devices == SKIP_DEVICES && (S_ISCHR (stats->stat.st_mode)
+                                     || S_ISBLK (stats->stat.st_mode)
+                                     || S_ISSOCK (stats->stat.st_mode)
+                                     || S_ISFIFO (stats->stat.st_mode)))
         return 1;
       while ((desc = open (file, O_RDONLY)) < 0 && errno == EINTR)
        continue;
--
1.7.0.rc1.214.gd5f8a


Reply via email to