This is the mail archive of the cygwin 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: The dirent struct


On 6 August 2010 14:28, Corinna Vinschen wrote:
> On Aug ?6 13:31, Christopher Faylor wrote:
>> On Fri, Aug 06, 2010 at 06:39:25PM +0200, Corinna Vinschen wrote:
>> >Btw., d_fileno is just another old name for d_ino. ?The Linux headers
>> >defines it thus as `#define d_fileno d_ino'. ?We can do the same in
>> >Cygwin. ?Maybe that minimizes some porting effort.
>>
>> Huh. ?I thought the d_fileno actually stood for the file handle of the
>> opened directory.
>
> The Linux headers suggest that it was an old BSD name.

I've decided to take a different approach and decided to implement it
as follows:

#ifdef __CYGWIN__
    itr->d_fileno = entry->d_ino;
    itr->d_reclen = strlen(entry->d_name);
#else
    itr->d_fileno = entry->d_fileno;
    itr->d_reclen = entry->d_reclen;
#endif

I assume this is appropriate?

Chris

-- 
Chris Sutcliffe
http://emergedesktop.org
http://www.google.com/profiles/ir0nh34d

--
Problem reports:       http://cygwin.com/problems.html
FAQ:                   http://cygwin.com/faq/
Documentation:         http://cygwin.com/docs.html
Unsubscribe info:      http://cygwin.com/ml/#unsubscribe-simple


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