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. Bruno [1] http://www.gnu.org/software/gnulib/manual/html_node/dirent_002eh.html