bug-gnu-utils
[Top][All Lists]
Advanced

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

Re: grep-2.5.1: bug ?? --


From: Paul Townsend
Subject: Re: grep-2.5.1: bug ?? --
Date: Sat, 12 Apr 2003 01:32:48 -0500 (EST)

On Thu, 10 Apr 2003 11:40:00 -0400, Paul Jarc wrote:
>Paul Townsend <address@hidden> wrote:
>> --- src/grep.c.orig  Tue Mar 26 10:54:12 2002
>> +++ src/grep.c       Wed Apr  9 21:38:35 2003
>> @@ -263,7 +263,14 @@
>>    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(s
>tats->stat.st_mode) || S_ISSOCK(stats->stat.st_mode)))
>> +  if (devices == SKIP_DEVICES && (S_ISCHR(stats->stat.st_mode)
>> +# if defined(S_ISFIFO)
>> +    || S_ISFIFO(stats->stat.st_mode)
>> +# endif
>> +# if defined(S_ISDOOR)
>> +    || S_ISDOOR(stats->stat.st_mode)
>> +# endif
>> +    || 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(s
>tats->stat.st_mode)))
>>  #endif
>
>Maybe this would be best:
>  if (devices == SKIP_DEVICES && !S_ISREG(stats->stat.st_mode))

I like it a lot except that can't the file can be a directory?

--    Paul Townsend (address@hidden)

FYI.  I replied to "To: address@hidden (Paul Jarc)" and the mail bounced.




reply via email to

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