cvs-dev
[Top][All Lists]
Advanced

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

Re: new dirent module (was Re: [Cvs-dev] Re: [bug-gnulib] AC_HEADER_DIRE


From: Bruno Haible
Subject: Re: new dirent module (was Re: [Cvs-dev] Re: [bug-gnulib] AC_HEADER_DIRENT)
Date: Thu, 13 Jul 2006 16:04:32 +0200
User-agent: KMail/1.9.1

Derek R. Price wrote:
> Okay, I've attached the proposed lib/dirent.c, lib/dirent.h, and
> modules/dirent.

Thanks a lot!

> I wasn't sure what to do about the Makefile.am chunk of 
> the modules description.  Since this is only currently intended to build
> on Windows, the only thing that would really be needed in Makefile.am is
> the EXTRA_DIST line, but I decided to write it as if there were a
> configure macro to fill in some variables and to create the dirent.h
> file from dirent_.h, on the theory that this might be instructive to
> someone working with MSVC.

That makes sense.

> /* Validate API.  */
> #include <sys/types.h>
> #include <dirent.h>

<dirent.h> should be includable standalone. (See for example in
http://www.opengroup.org/susv3xsh/opendir.html.) Therefore I would
remove the <sys/types.h> include from the .c file and put it into
the .h file instead. Actually, I think only size_t is needed, and
you can find it in <stddef.h> - no need to include <sys/types.h> just
for size_t.

Bruno




reply via email to

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