This is the mail archive of the
cygwin-patches
mailing list for the Cygwin project.
Re: [Patch] Add dirent.d_type support to Cygwin 1.7 ?
On Nov 27 21:15, Christopher Faylor wrote:
> On Thu, Nov 27, 2008 at 10:41:56PM +0100, Christian Franke wrote:
> > Corinna Vinschen wrote:
> >> The logic sounds ok to me. I just don't think we need a warning and the
> >> condition could be simplified accordingly.
> >>
> >>
> >
> > New patch below. Conditionals removed as suggested by cgf.
> >
> > Define of _DIRENT_HAVE_D_TYPE still there - google code search finds
> > several projects using this instead of a ./configure check.
> >
> >
> > 2008-11-27 Christian Franke <franke@computer.org>
> >
> > * dir.cc (readdir_worker): Initialize dirent.d_type and __d_unused1.
> > * fhandler_disk_file.cc (fhandler_disk_file::readdir_helper):
> > Set dirent.d_type based on FILE_ATTRIBUTE_*.
> > * include/sys/dirent.h: Define _DIRENT_HAVE_D_TYPE.
> > (struct dirent): Add d_type. Adjust __d_unused1 size to preserve layout.
> > [_DIRENT_HAVE_D_TYPE]: Enable DT_* declarations.
>
> If Corinna's ok with this then so am I.
Yep. Applied with just a minor change to the ChangeLog entry.
Thanks,
Corinna
--
Corinna Vinschen Please, send mails regarding Cygwin to
Cygwin Project Co-Leader cygwin AT cygwin DOT com
Red Hat