d_ino deprecated in latest snapshot

classic Classic list List threaded Threaded
3 messages Options
Reply | Threaded
Open this post in threaded view
|

d_ino deprecated in latest snapshot

Christopher Faylor-2
I've deprecated dirent's d_ino field in the latest snapshot.  I've taken
this step because in the majority of cases this field was different from
the inode field returned by stat() and this presents problems for programs
which correctly think that they should be the same.

This field will continue to be filled out (in)correctly for older
programs but the field has now been renamed to __deprecated_d_ino so it
will not be detectable by configure.  The __deprecated_d_ino field is
now zero in any applications built with the snapshot or newer versions
of libcygwin.a.

What this means is that, with luck, packages like bash and find which
try to use this field in some meaningful way will switch to using the
reliable st_ino field instead.

FYI,
cgf

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

Reply | Threaded
Open this post in threaded view
|

Re: d_ino deprecated in latest snapshot

Eric Blake (cygwin)
-----BEGIN PGP SIGNED MESSAGE-----
Hash: SHA1

According to Christopher Faylor on 12/5/2005 2:26 PM:

> I've deprecated dirent's d_ino field in the latest snapshot.  I've taken
> this step because in the majority of cases this field was different from
> the inode field returned by stat() and this presents problems for programs
> which correctly think that they should be the same.
>
> This field will continue to be filled out (in)correctly for older
> programs but the field has now been renamed to __deprecated_d_ino so it
> will not be detectable by configure.  The __deprecated_d_ino field is
> now zero in any applications built with the snapshot or newer versions
> of libcygwin.a.

Actually, sys/dirent.h only has __deprecated_d_ino when __INSIDE_CYGWIN__,
but still used d_ino in __CYGWIN_USE_BIG_TYPES__.  Therefore a compile of
findutils-4.2.27 against the headers of snapshot 20051205 claimed:

checking for d_ino member in directory struct... yes

>
> What this means is that, with luck, packages like bash and find which
> try to use this field in some meaningful way will switch to using the
> reliable st_ino field instead.

Not quite.  I'll wait for the next snapshot before putting
findutils-4.2.27-1 online as a test version, so that you can get
sys/dirent.h fixed first.

- --
Life is short - so eat dessert first!

Eric Blake             [hidden email]
-----BEGIN PGP SIGNATURE-----
Version: GnuPG v1.4.1 (Cygwin)
Comment: Public key at home.comcast.net/~ericblake/eblake.gpg
Comment: Using GnuPG with Thunderbird - http://enigmail.mozdev.org

iD8DBQFDm2Ac84KuGfSFAYARApmWAKCF8l+ViVlpQb56bzsR41b+rNBFPgCfVzcD
4r2DCSlbOYEPu3ZYCPUxNw0=
=PjP+
-----END PGP SIGNATURE-----

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

Reply | Threaded
Open this post in threaded view
|

Re: d_ino deprecated in latest snapshot

Christopher Faylor-2
On Sat, Dec 10, 2005 at 04:09:16PM -0700, Eric Blake wrote:

>According to Christopher Faylor on 12/5/2005 2:26 PM:
>>I've deprecated dirent's d_ino field in the latest snapshot.  I've
>>taken this step because in the majority of cases this field was
>>different from the inode field returned by stat() and this presents
>>problems for programs which correctly think that they should be the
>>same.
>>
>>This field will continue to be filled out (in)correctly for older
>>programs but the field has now been renamed to __deprecated_d_ino so it
>>will not be detectable by configure.  The __deprecated_d_ino field is
>>now zero in any applications built with the snapshot or newer versions
>>of libcygwin.a.
>
>Actually, sys/dirent.h only has __deprecated_d_ino when
>__INSIDE_CYGWIN__, but still used d_ino in __CYGWIN_USE_BIG_TYPES__.
>Therefore a compile of findutils-4.2.27 against the headers of snapshot
>20051205 claimed:
>
>checking for d_ino member in directory struct...  yes
>
>>
>>What this means is that, with luck, packages like bash and find which
>>try to use this field in some meaningful way will switch to using the
>>reliable st_ino field instead.
>
>Not quite.  I'll wait for the next snapshot before putting
>findutils-4.2.27-1 online as a test version, so that you can get
>sys/dirent.h fixed first.

I'll make the change but have you completely given up on the concept of
"a patch" now?  It seems like you could have tested this pretty easily
by just making changes to the header and then rectified the behavior
by submitting a patch.

You didn't even need to check out cygwin source code for this one.

cgf

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