bug-grep
[Top][All Lists]
Advanced

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

Re: Bug#669084: grep does not match anything when reading from stdin


From: Jim Meyering
Subject: Re: Bug#669084: grep does not match anything when reading from stdin
Date: Tue, 17 Apr 2012 14:35:22 +0200

Tino Keitel wrote:
> 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)))))

Thanks.  Your change is relative to 2.11, while mine is
relative to the latest in the upstream git repository:

  http://git.savannah.gnu.org/cgit/grep.git/



reply via email to

[Prev in Thread] Current Thread [Next in Thread]