From mboxrd@z Thu Jan 1 00:00:00 1970 From: Scott Wood Date: Tue, 17 Nov 2009 15:10:48 -0600 Subject: [U-Boot] [PATCH] flash.h: pull in common.h for types In-Reply-To: <20091117210015.3545CF51B08@gemini.denx.de> References: <1258401513-16014-1-git-send-email-vapier@gentoo.org> <20091116213127.14F5E3F6C2@gemini.denx.de> <200911161703.46965.vapier@gentoo.org> <20091117210015.3545CF51B08@gemini.denx.de> Message-ID: <4B031158.20501@freescale.com> List-Id: MIME-Version: 1.0 Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: 7bit To: u-boot@lists.denx.de Wolfgang Denk wrote: > Dear Mike Frysinger, > > In message <200911161703.46965.vapier@gentoo.org> you wrote: >>> Why would that be needed? Which problem are you trying to solve? >> like the subject very briefly says, 'for types'. if your source code includes >> flash.h before anything else, it'll fail to compile as flash.h uses types not >> declared implicitly by the compiler. > > I'm not sure if this is needed or even wanted. > > We don't attempt to make all header files self-sufficient, or do we? > Does Linux do this? > > When looking at man pages for system calls and library funtions it > seems this is not the case; also, I can find wise people argumenting > against self-sufficient headers (and others argumenting in their > favour). > > > My question: is there a definitive position somewhere (for example > for the Linux kernel; I'm sure we don't have one for U-Boot [yet]), > whether system headers should be self-sufficient? I'd say they should be self-sufficient, in that the inclusion of the header itself should not fail if I haven't included some arbitrary other header. I don't see what the argument would be for not doing this. I don't know whether Linux has a specific policy on this, but I haven't noticed many problems in this regard, and when I did find one in the kernel a few years back I didn't get any argument when I submitted a patch to fix it. Which man pages are you looking at? -Scott