lkml.org 
[lkml]   [2003]   [Jan]   [9]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
/
Date
From
SubjectRe: [PATCH][TRIVIAL] checksum.h header fixes for 2.4
> On Thu, 2003-01-09 at 20:06, Eric Weigle wrote:
> > I'm making a loadable module that will send IP packets; and need to
> > do IP
> > checksums. Unfortunately a simple #include of checksum.h fails
> > because that
> > file does not itself include the headers required to compile
> > correctly.
> > Several of the arch-specific files are this way.
> Include the other files you need first. The kernel headers are not
> really intended to always include everything you might want. That
> rapidly becomes unmanagable
These files include the ipv6 and VERIFY_* stuff unconditionally. _EVERY_
caller must know to include the in6.h/uaccess.h header files simply to get
it to compile. This is what the net/checksum.h file does. There are 31 files
including <asm/checksum.h> directly, and all of these _must_ track down the
dependencies by hand.

This isn't a _want_, it's an unconditional requirement. The files are broken.

<flamebait>
Of course, it's really C's bug, by doing brain-dead textual inclusion.
Trust me, I know the difficulties in managing #includes.
</flamebait>


-Eric


--
------------------------------------------------------------
Eric H. Weigle -- http://public.lanl.gov/ehw/
"They that can give up essential liberty to obtain a little
temporary safety deserve neither" -- Benjamin Franklin
------------------------------------------------------------
-
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@vger.kernel.org
More majordomo info at http://vger.kernel.org/majordomo-info.html
Please read the FAQ at http://www.tux.org/lkml/

\
 
 \ /
  Last update: 2005-03-22 13:32    [W:0.044 / U:0.272 seconds]
©2003-2020 Jasper Spaans|hosted at Digital Ocean and TransIP|Read the blog|Advertise on this site