All of lore.kernel.org
 help / color / mirror / Atom feed
From: Eric Weigle <ehw@lanl.gov>
To: Alan Cox <alan@lxorguk.ukuu.org.uk>
Cc: Marcelo Tosatti <marcelo@conectiva.com.br>,
	Trivial Patch Monkey <trivial@rustcorp.com.au>,
	Linux Kernel Mailing List <linux-kernel@vger.kernel.org>
Subject: Re: [PATCH][TRIVIAL] checksum.h header fixes for 2.4
Date: Thu, 9 Jan 2003 15:52:32 -0700	[thread overview]
Message-ID: <20030109225232.GH3329@lanl.gov> (raw)
In-Reply-To: <1042153307.28469.15.camel@irongate.swansea.linux.org.uk>

> 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
------------------------------------------------------------

  reply	other threads:[~2003-01-09 22:44 UTC|newest]

Thread overview: 4+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2003-01-09 20:06 [PATCH][TRIVIAL] checksum.h header fixes for 2.4 Eric Weigle
2003-01-09 23:01 ` Alan Cox
2003-01-09 22:52   ` Eric Weigle [this message]
2003-01-10  7:47 ` Rusty Russell

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=20030109225232.GH3329@lanl.gov \
    --to=ehw@lanl.gov \
    --cc=alan@lxorguk.ukuu.org.uk \
    --cc=linux-kernel@vger.kernel.org \
    --cc=marcelo@conectiva.com.br \
    --cc=trivial@rustcorp.com.au \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.