This is the mail archive of the cygwin-patches mailing list for the Cygwin project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]
Other format: [Raw text]

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


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.

cgf


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]