Subject: Re: is obsolete?
To: None <>
From: walt <>
List: current-users
Date: 03/10/2006 09:32:50
On Fri, 2006-03-10 at 11:00 -0500, Chris Ross wrote:
> On Mar 10, 2006, at 9:16 AM, walt wrote:
> > Thanks.  This is my real problem:  building libgtop2 from pkgsrc:
> >
> >
> > _KERNEL is indeed defined in the source code of libgtop2 which is
> > why msg.h wants to include systm.h.  But systm.h has been deleted
> > by postinstall, which doesn't seem to make sense.

>    Any software that defines _KERNEL (because it needs internal
> interface stuff) needs to include files from /sys (or /usr/src/sys, or
> the like), rather than /usr/include.  The stuff in /usr/include is
> for user-land software, not kernel software.

I've always been confused about this subject -- still am.  Maybe you
can clear this up for me.

For example, take this snippet from /usr/include/sys/msg.h:
#include <sys/systm.h>

Given that _KERNEL is defined (as it is in libgtop2) what is
cpp supposed to do with that line?  How/why would it look anywhere
but /usr/include?  (I understand that the <> brackets mean that
the header is to be found in /usr/include -- am I mistaken about

Thanks for any clues.