Subject: Re: is obsolete?
To: None <>
From: walt <>
List: current-users
Date: 03/10/2006 06:16:44
On Fri, 2006-03-10 at 15:54 +1100, Simon Burge wrote:
> walt wrote:
> > I notice that 'postinstall fix obsolete' deletes
> > /usr/include/sys/systm.h, which causes problems.
> > 
> > For example, msg.h, sysctl.h. event.h all include
> > systm.h, and there are others as well.
> > 
> > Is this a mistake?

> This is deliberate.  <sys/systm.h> is for internal kernel variable
> declarations and prototypes.  You'll notice that any header file
> that includes it in /usr/include/sys will have the inclusion wrapped
> in a "#ifdef _KERNEL" block.

Thanks.  This is my real problem:  building libgtop2 from pkgsrc:

 cc -DHAVE_CONFIG_H -I. -I../.. -D_IN_LIBGTOP -D_GNU_SOURCE -I../../sysdeps/freebsd -I../../include -I/usr/pkgsrc/sysutils/libgtop2/work/.buildlink/include/glib/glib-2.0 -I/usr/pkgsrc/sysutils/libgtop2/work/.buildlink/lib/glib-2.0/include -Winline -Wall -std=gnu89 -Wchar-subscripts -Wmissing-declarations -Wmissing-prototypes -Wnested-externs -Wpointer-arith -Wcast-align -Wsign-compare -fno-strict-aliasing -O2 -I/usr/pkgsrc/sysutils/libgtop2/work/.buildlink/include -I/usr/include/krb5 -DGTOPLOCALEDIR=\"/usr/pkg/share/locale\" -DLIBGTOP_VERSION=\"2.12.2\" -DLIBGTOP_SERVER_VERSION=\"5\" -DLIBGTOP_VERSION_CODE=2012002 -DLIBGTOP_SERVER=\"/usr/pkg/bin/libgtop_server2\" -DHAVE_STATVFS_READS_COUNT -DHAVE_STATVFS_WRITES_COUNT -Winline -Wall -std=gnu89 -Wchar-subscripts -Wmissing-declarations -Wmissing-prototypes -Wnested-externs -Wpointer-arith -Wcast-align -Wsign-compare -fno-strict-aliasing -O2 -c msg_limits.c  -fPIC -DPIC -o .libs/msg_limits.o
In file included from msg_limits.c:56:
/usr/include/sys/msg.h:193:23: sys/systm.h: No such file or directory

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

Can you enlighten?