On Tue, Apr 17, 2012 at 14:23:48 +0200, Tino Keitel wrote:
> Hi,
>
> I had problems extracting the patch from the mail, so I had to use
> copy&paste. Also, the patch portion in main.c looked totally different
Forgot the patch, it's attached.
Regards,
Tino
--- grep-2.11_orig/src/main.c 2012-04-17 10:08:47.626634496 +0200
+++ grep-2.11/src/main.c 2012-04-17 14:17:13.293392207 +0200
@@ -1251,11 +1251,12 @@
return 1;
}
- if ((directories == SKIP_DIRECTORIES && S_ISDIR (stats->stat.st_mode))
- || (devices == SKIP_DEVICES && (S_ISCHR (stats->stat.st_mode)
+ if (desc != STDIN_FILENO &&
+ ((directories == SKIP_DIRECTORIES && S_ISDIR (stats->stat.st_mode))
+ || (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))))
+ || S_ISFIFO (stats->stat.st_mode)))))
{
if (file)
close (desc);