Skip site navigation (1)Skip section navigation (2)
Date:      Thu, 8 Feb 2007 16:02:11 -0800 (PST)
From:      youshi10@u.washington.edu
To:        freebsd-hackers@freebsd.org
Subject:   Re: kernel headers dependency graph ? (systm.h tangle)
Message-ID:  <Pine.LNX.4.43.0702081602110.26886@hymn08.u.washington.edu>
In-Reply-To: <20070208125910.A87229@xorpc.icir.org>

next in thread | previous in thread | raw e-mail | index | archive | help
On Thu, 8 Feb 2007, Luigi Rizzo wrote:

> Hi,
> Is there a tool to produce a dependency graph for C headers ?
>
> If that matters (i.e. someone has already studied it),
> i am interested in the header situation in the FreeBSD kernel.
>
> It may be a well known thing, but i just realized
> that <sys/systm.h> is entagled with <sys/libkern.h> and both bring
> in a lot of other headers, and you cannot bring in simply
> the string.h functions, or printf, because there is no
> leaf header for them.
> I don't know if this is the only case, or there are other
> 'classes' which are intermixed with lots of other stuff.
>
> I suppose the problem has been already discussed and it is just
> the result of historical reasons, but is there any reason other
> than ENOTIME why (to cite things that are trivial to fix while
> preserving compatibility):
>
> - we don't have sys/string.h with all the memcpy/bcopy and friends
>  that are currently spread between systm.h and libkern.h
>
> - printf/scanf and strto*() are not in their own header;
>
> and so on ?
>
>        cheers
>        luigi

Not sure if it's been done before, but it sounds like a good job for Perl or (I can't believe I'm suggesting this) Ruby.

-Garrett




Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?Pine.LNX.4.43.0702081602110.26886>