bug-gnulib
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: opendir and dirent.h


From: Bruno Haible
Subject: Re: opendir and dirent.h
Date: Sun, 19 Apr 2009 01:56:17 +0200
User-agent: KMail/1.9.9

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




reply via email to

[Prev in Thread] Current Thread [Next in Thread]