kernel headers dependency graph ? (systm.h tangle)

Luigi Rizzo rizzo at icir.org
Thu Feb 8 21:29:15 UTC 2007


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



More information about the freebsd-hackers mailing list