Bruno Haible wrote:
Lorenzo Bettini wrote:
However, I then noticed that there's dirent as a module (and opendir is declared in dirent.h) so I bet I should import dirent module anyway, shouldn't I?

When you look at the gnulib/lib/dirent.in.h file, you see that it declares
only functions; it provides no types, enums, or macros. In such a situation,
it's sufficient for you to require the particular function modules (such as
'dirfd', 'scandir', etc.); the 'dirent' module will be pulled in implicitly,
as a dependency, if it is needed.

The documentation in [1] also mentions no particular reason for which you
would need to use the 'dirent' module. That may change over time, of course:
it is alwaus possible that we discover some portability problems and fix it
in the 'dirent' module.


OK

so for the moment if I include this only because I use opendir, it is still safe to do so, though not necessary, as far as I understand

cheers
        Lorenzo

--
Lorenzo Bettini, PhD in Computer Science, DI, Univ. Torino
ICQ# lbetto, 16080134     (GNU/Linux User # 158233)
HOME: http://www.lorenzobettini.it MUSIC: http://www.purplesucker.com
http://www.myspace.com/supertrouperabba
BLOGS: http://tronprog.blogspot.com  http://longlivemusic.blogspot.com
http://www.gnu.org/software/src-highlite
http://www.gnu.org/software/gengetopt
http://www.gnu.org/software/gengen http://doublecpp.sourceforge.net



Reply via email to