[Top][All Lists]

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

Re: Should trivfs.h include fcntl.h?

From: Carl Fredrik Hammar
Subject: Re: Should trivfs.h include fcntl.h?
Date: Mon, 21 Dec 2009 08:34:38 +0100
User-agent: Mutt/1.5.20 (2009-06-14)


On Sun, Dec 20, 2009 at 06:40:10PM +0100, olafBuddenhagen@gmx.net wrote:
> While trivfs.h doesn't use any definitions from fcntl.h itself,
> trivfs_allow_open takes values like O_READ, which are defined in fcntl.h
> -- so a program including trivfs.h will generally need these definitions
> as well. Thus I wonder whether trivfs.h shouldn't just include fcntl.h,
> so they are always available?
> (Admittedly, this logic is not generally applied to libc headers
> either...)

I generally agree that all headers needed to use a library should be
included in its header.  But by that logic we should push it down to
fshelp.h, then we'll get it in diskfs.h and netfs.h as well.  I'd say
put it in iohelp.h as well, but surprisingly it seems that none of its
functions deal with open modes.


reply via email to

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