Subject: Removing /usr/include/sys/systm.h ?
To: None <tech-kern@netbsd.org>
From: Simon Burge <simonb@wasabisystems.com>
List: tech-kern
Date: 10/29/2005 19:24:39
The following patch removes the installation of src/sys/systm.h to
/usr/include/sys/systm.h .  This really is a kernel-only header file,
so it has no place in /usr/include.  I test compiled this on a handful
of archs - only sparc didn't work, and that was broken the same way
with and without this patch.

Any problems with me doing this?

Simon.
--
Simon Burge                                   <simonb@wasabisystems.com>
NetBSD Development, Support and Service:   http://www.wasabisystems.com/

Index: distrib/sets/lists/comp/mi
===================================================================
RCS file: /cvsroot/src/distrib/sets/lists/comp/mi,v
retrieving revision 1.826
diff -d -p -u -r1.826 mi
--- distrib/sets/lists/comp/mi	6 Oct 2005 23:39:26 -0000	1.826
+++ distrib/sets/lists/comp/mi	29 Oct 2005 09:14:56 -0000
@@ -1426,7 +1426,7 @@
 ./usr/include/sys/sysctl.h			comp-c-include
 ./usr/include/sys/syslimits.h			comp-c-include
 ./usr/include/sys/syslog.h			comp-c-include
-./usr/include/sys/systm.h			comp-c-include
+./usr/include/sys/systm.h			comp-obsolete		obsolete
 ./usr/include/sys/tablet.h			comp-c-include
 ./usr/include/sys/tape.h			comp-c-include
 ./usr/include/sys/termios.h			comp-c-include
Index: regress/include/okheaders/symbolcheck.c
===================================================================
RCS file: /cvsroot/src/regress/include/okheaders/symbolcheck.c,v
retrieving revision 1.18
diff -d -p -u -r1.18 symbolcheck.c
--- regress/include/okheaders/symbolcheck.c	25 Sep 2005 14:37:01 -0000	1.18
+++ regress/include/okheaders/symbolcheck.c	29 Oct 2005 09:16:26 -0000
@@ -131,7 +131,6 @@
 #include <sys/sysctl.h>
 #include <sys/syslimits.h>
 #include <sys/syslog.h>
-#include <sys/systm.h>
 #include <sys/tablet.h>
 #include <sys/termios.h>
 #include <sys/time.h>
Index: sys/dev/pci/pci_subr.c
===================================================================
RCS file: /cvsroot/src/sys/dev/pci/pci_subr.c,v
retrieving revision 1.61
diff -d -p -u -r1.61 pci_subr.c
--- sys/dev/pci/pci_subr.c	28 Jun 2005 00:28:42 -0000	1.61
+++ sys/dev/pci/pci_subr.c	29 Oct 2005 09:17:05 -0000
@@ -47,9 +47,9 @@ __KERNEL_RCSID(0, "$NetBSD: pci_subr.c,v
 #endif
 
 #include <sys/param.h>
-#include <sys/systm.h>
 
 #ifdef _KERNEL
+#include <sys/systm.h>
 #include <machine/intr.h>
 #else
 #include <pci.h>
Index: sys/sys/Makefile
===================================================================
RCS file: /cvsroot/src/sys/sys/Makefile,v
retrieving revision 1.76
diff -d -p -u -r1.76 Makefile
--- sys/sys/Makefile	27 Sep 2005 02:35:09 -0000	1.76
+++ sys/sys/Makefile	29 Oct 2005 09:17:09 -0000
@@ -25,7 +25,7 @@ INCS=	acct.h agpio.h ansi.h ataio.h audi
 	sa.h scanio.h sched.h scsiio.h select.h selinfo.h sem.h sha1.h shm.h \
 	siginfo.h signal.h signalvar.h sigtypes.h socket.h \
 	socketvar.h sockio.h stat.h statvfs.h syscall.h syscallargs.h \
-	sysctl.h stdint.h swap.h syslimits.h syslog.h systm.h \
+	sysctl.h stdint.h swap.h syslimits.h syslog.h \
 	tablet.h tape.h termios.h time.h timeb.h timepps.h times.h \
 	timex.h trace.h tree.h tty.h ttychars.h ttycom.h \
 	ttydefaults.h ttydev.h types.h \
Index: sys/ufs/ext2fs/ext2fs_bswap.c
===================================================================
RCS file: /cvsroot/src/sys/ufs/ext2fs/ext2fs_bswap.c,v
retrieving revision 1.9
diff -d -p -u -r1.9 ext2fs_bswap.c
--- sys/ufs/ext2fs/ext2fs_bswap.c	30 Aug 2005 22:01:12 -0000	1.9
+++ sys/ufs/ext2fs/ext2fs_bswap.c	29 Oct 2005 09:17:10 -0000
@@ -34,11 +34,12 @@
 __KERNEL_RCSID(0, "$NetBSD: ext2fs_bswap.c,v 1.9 2005/08/30 22:01:12 xtraeme Exp $");
 
 #include <sys/types.h>
-#include <sys/systm.h>
 #include <ufs/ext2fs/ext2fs.h>
 #include <ufs/ext2fs/ext2fs_dinode.h>
 
-#if !defined(_KERNEL)
+#if defined(_KERNEL)
+#include <sys/systm.h>
+#else
 #include <string.h>
 #endif
 
Index: sys/ufs/lfs/lfs_itimes.c
===================================================================
RCS file: /cvsroot/src/sys/ufs/lfs/lfs_itimes.c,v
retrieving revision 1.2
diff -d -p -u -r1.2 lfs_itimes.c
--- sys/ufs/lfs/lfs_itimes.c	13 Sep 2005 04:40:42 -0000	1.2
+++ sys/ufs/lfs/lfs_itimes.c	29 Oct 2005 09:17:10 -0000
@@ -39,7 +39,6 @@
 __KERNEL_RCSID(0, "$NetBSD: lfs_itimes.c,v 1.2 2005/09/13 04:40:42 christos Exp $");
 
 #include <sys/param.h>
-#include <sys/systm.h>
 #include <sys/time.h>
 #include <sys/ucred.h>
 #include <sys/mount.h>