Re: [Patch] Add dirent.d_type support to Cygwin 1.7 ?

2008-11-29 Thread Jim Meyering
Jim Meyering <[EMAIL PROTECTED]> wrote: > Jim Meyering <[EMAIL PROTECTED]> wrote: >> "James Youngman" <[EMAIL PROTECTED]> wrote: >>> As far as I can see, the variable type is assigned in the function >>> above, but never used. Did you mean to use "type" rather than >>> "dtype" in the expression

Re: Fwd: [Patch] Add dirent.d_type support to Cygwin 1.7 ?

2008-11-29 Thread Jim Meyering
"James Youngman" <[EMAIL PROTECTED]> wrote: > [TO -= bug-gnulib, TO += findutils-patches] > > I'm planning to apply Jim's patch to findutils soon. I have snipped > out the gnulib patch he sent, because he later changed it. ... > + state.have_stat = false; // FIXME: depends on FTS_NOSTAT

Fwd: [Patch] Add dirent.d_type support to Cygwin 1.7 ?

2008-11-29 Thread James Youngman
[TO -= bug-gnulib, TO += findutils-patches] I'm planning to apply Jim's patch to findutils soon. I have snipped out the gnulib patch he sent, because he later changed it. -- Forwarded message -- From: Jim Meyering <[EMAIL PROTECTED]> Date: Fri, Nov 28, 2008 at 7:19 PM Subject:

Re: [Patch] Add dirent.d_type support to Cygwin 1.7 ?

2008-11-29 Thread James Youngman
On Sat, Nov 29, 2008 at 3:46 PM, Jim Meyering <[EMAIL PROTECTED]> wrote: > Jim Meyering <[EMAIL PROTECTED]> wrote: >> "James Youngman" <[EMAIL PROTECTED]> wrote: >>> As far as I can see, the variable type is assigned in the function >>> above, but never used. Did you mean to use "type" rather tha

Re: [Patch] Add dirent.d_type support to Cygwin 1.7 ?

2008-11-29 Thread Jim Meyering
Jim Meyering <[EMAIL PROTECTED]> wrote: > "James Youngman" <[EMAIL PROTECTED]> wrote: >> As far as I can see, the variable type is assigned in the function >> above, but never used. Did you mean to use "type" rather than >> "dtype" in the expression which assigns to st->st_mode? > > Thanks again.

Re: [Patch] Add dirent.d_type support to Cygwin 1.7 ?

2008-11-29 Thread Jim Meyering
"James Youngman" <[EMAIL PROTECTED]> wrote: > As far as I can see, the variable type is assigned in the function > above, but never used. Did you mean to use "type" rather than > "dtype" in the expression which assigns to st->st_mode? Thanks again. Here's the patch I'll push as soon as you say o

Re: [Patch] Add dirent.d_type support to Cygwin 1.7 ?

2008-11-29 Thread Jim Meyering
"James Youngman" <[EMAIL PROTECTED]> wrote: >> +static void >> +set_stat_type (struct stat *st, unsigned int dtype) >> +{ >> + mode_t type; >> + switch (dtype) >> +{ >> +case DT_BLK: >> + type = S_IFBLK; >> + break; >> +case DT_CHR: >> + type = S_IFCHR; >> + break;

Re: [Patch] Add dirent.d_type support to Cygwin 1.7 ?

2008-11-29 Thread Jim Meyering
"James Youngman" <[EMAIL PROTECTED]> wrote: > On Fri, Nov 28, 2008 at 7:19 PM, Jim Meyering <[EMAIL PROTECTED]> wrote: > > First, many thanks for looking at this! > > >> +/* Map the dirent.d_type value, DTYPE, to the corresponding stat.st_mode >> + S_IF* bit and set ST.st_mode, thus clearing all

Re: [Patch] Add dirent.d_type support to Cygwin 1.7 ?

2008-11-29 Thread James Youngman
On Fri, Nov 28, 2008 at 7:19 PM, Jim Meyering <[EMAIL PROTECTED]> wrote: First, many thanks for looking at this! > +/* Map the dirent.d_type value, DTYPE, to the corresponding stat.st_mode > + S_IF* bit and set ST.st_mode, thus clearing all other bits in that field. > */ > +static void > +se