This is the mail archive of the
cygwin
mailing list for the Cygwin project.
Re: The dirent struct
On 7 August 2010 11:06, Steven Monai wrote:
> IMHO, this is an unsafe approach. If, in a future version, upstream
> decides to start using itr->d_reclen for its intended purpose, then the
> plausible-but-incorrect value you've put there could become the source
> of Cygwin-specific bugs. In principle, if you can't/won't put the
> correct value there (which I see Corinna has helpfully posted), then you
> ought to put an obviously incorrect value there instead, such as 0 or -1.
>
> Perhaps the safest approach, though, would be to remove (or comment-out)
> the d_reclen field from the itr struct. Then, if upstream *does* use
> that field in the future, you should get build errors to alert you of that.
I've actually went with Corinna's proposed itr->d_reclen
implementation, which I believe is the safest route for now.
Cheers!
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