-----BEGIN PGP SIGNED MESSAGE----- Hash: SHA1 According to Jim Meyering on 12/19/2009 5:46 PM: >> -extern int dirfd (DIR const *dir) _GL_ARG_NONNULL ((1)); >> +extern int dirfd (DIR *dir) _GL_ARG_NONNULL ((1)); > > Do you know of any dirfd implementation that actually modifies the > pointed-to buffer? I do not, and cannot imagine one that would. > I would prefer to leave it "const" and to consider lobbying POSIX > to permit the "const" declaration.
I don't know of any existing implementation that modifies the DIR struct. However, POSIX is explicit that DIR need not have a backing fd when diropen() is first called; therefore, I can see the feasibility of an implementation that only opens the fd if dirfd() is called, and hence needs to modify the struct as part of dirfd. I'm afraid we would lose that battle to change POSIX. At any rate, the problem came because I got a compilation error due to the conflict in declarations between the system <dirent.h> and the gnulib replacement, when testing out my warn-on-use macro. Basically, any configure.ac that uses both the dirfd module and AC_CHECK_DECLS_ONCE([dirfd]) will encounter the declaration clash, if we revert that patch. - -- Don't work too hard, make some time for fun as well! Eric Blake e...@byu.net -----BEGIN PGP SIGNATURE----- Version: GnuPG v1.4.9 (Cygwin) Comment: Public key at home.comcast.net/~ericblake/eblake.gpg Comment: Using GnuPG with Mozilla - http://enigmail.mozdev.org/ iEYEARECAAYFAkstdf8ACgkQ84KuGfSFAYDORwCgohKqJWS3sXWJj2wrVXtassuX 3aQAn1KA6lvZ+EuHyWf7fiqSta71cBNw =YJam -----END PGP SIGNATURE-----