Eric Blake wrote: > 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.
Ok then. Given that there is an actual motivation for the change, then I won't make a fuss ;-)