summaryrefslogtreecommitdiff
path: root/regress/sys/arch
diff options
context:
space:
mode:
authorTheo de Raadt <deraadt@cvs.openbsd.org>2021-12-13 16:56:51 +0000
committerTheo de Raadt <deraadt@cvs.openbsd.org>2021-12-13 16:56:51 +0000
commita02bd508e1de79feadc042a6a602194d97f70dab (patch)
tree81ef7c621045b36a4c34f46ab1652c0f97a80c23 /regress/sys/arch
parentba1590a4b017c07576ce93524f047637c9acbcea (diff)
remove a couple hundred sys/param.h includes in userland code, and
also whack some sys/cdefs.h early includes which is such a brutally bad pattern ok bluhm mbuhl
Diffstat (limited to 'regress/sys/arch')
-rw-r--r--regress/sys/arch/amd64/dump_tables/dump_tables.c4
-rw-r--r--regress/sys/arch/amd64/fpu/fdfl.c6
-rw-r--r--regress/sys/arch/amd64/fpu/fdump.c6
-rw-r--r--regress/sys/arch/amd64/fpu/feget.c6
-rw-r--r--regress/sys/arch/amd64/fpu/fxproc0.c7
-rw-r--r--regress/sys/arch/hppa/probe/probe.c4
-rw-r--r--regress/sys/arch/hppa/sfuid/sfuid.c4
7 files changed, 23 insertions, 14 deletions
diff --git a/regress/sys/arch/amd64/dump_tables/dump_tables.c b/regress/sys/arch/amd64/dump_tables/dump_tables.c
index b7296ea4823..634e72c9efa 100644
--- a/regress/sys/arch/amd64/dump_tables/dump_tables.c
+++ b/regress/sys/arch/amd64/dump_tables/dump_tables.c
@@ -1,4 +1,4 @@
-/* $OpenBSD: dump_tables.c,v 1.6 2019/04/23 04:46:03 guenther Exp $ */
+/* $OpenBSD: dump_tables.c,v 1.7 2021/12/13 16:56:49 deraadt Exp $ */
/*
* Copyright (c) 2019 Philip Guenther <guenther@openbsd.org>
*
@@ -20,7 +20,7 @@
* Requires "kern.allowkmem=1" sysctl
*/
-#include <sys/param.h>
+#include <sys/param.h> /* PAGE_SIZE and other things */
#include <sys/sysctl.h>
#include <sys/time.h>
#include <uvm/uvm_extern.h>
diff --git a/regress/sys/arch/amd64/fpu/fdfl.c b/regress/sys/arch/amd64/fpu/fdfl.c
index 8dee91b9041..a4c7f7d0a66 100644
--- a/regress/sys/arch/amd64/fpu/fdfl.c
+++ b/regress/sys/arch/amd64/fpu/fdfl.c
@@ -1,4 +1,4 @@
-/* $OpenBSD: fdfl.c,v 1.1 2018/08/21 18:35:18 bluhm Exp $ */
+/* $OpenBSD: fdfl.c,v 1.2 2021/12/13 16:56:49 deraadt Exp $ */
/*
* Copyright (c) 2018 Alexander Bluhm <bluhm@openbsd.org>
*
@@ -15,11 +15,13 @@
* OR IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS SOFTWARE.
*/
-#include <sys/param.h>
+#include <sys/types.h>
#include <fenv.h>
#include <stdio.h>
+#define nitems(_a) (sizeof((_a)) / sizeof((_a)[0]))
+
int
main(int argc, char *argv[])
{
diff --git a/regress/sys/arch/amd64/fpu/fdump.c b/regress/sys/arch/amd64/fpu/fdump.c
index 4f66c0656d8..5e23034b197 100644
--- a/regress/sys/arch/amd64/fpu/fdump.c
+++ b/regress/sys/arch/amd64/fpu/fdump.c
@@ -1,4 +1,4 @@
-/* $OpenBSD: fdump.c,v 1.1 2018/08/21 18:35:18 bluhm Exp $ */
+/* $OpenBSD: fdump.c,v 1.2 2021/12/13 16:56:49 deraadt Exp $ */
/*
* Copyright (c) 2018 Alexander Bluhm <bluhm@openbsd.org>
*
@@ -15,13 +15,15 @@
* OR IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS SOFTWARE.
*/
-#include <sys/param.h>
+#include <sys/types.h>
#include <err.h>
#include <fenv.h>
#include <stdio.h>
#include <unistd.h>
+#define nitems(_a) (sizeof((_a)) / sizeof((_a)[0]))
+
int
main(int argc, char *argv[])
{
diff --git a/regress/sys/arch/amd64/fpu/feget.c b/regress/sys/arch/amd64/fpu/feget.c
index eb94c966fcc..4cdb62fc69d 100644
--- a/regress/sys/arch/amd64/fpu/feget.c
+++ b/regress/sys/arch/amd64/fpu/feget.c
@@ -1,4 +1,4 @@
-/* $OpenBSD: feget.c,v 1.1 2018/08/21 18:35:18 bluhm Exp $ */
+/* $OpenBSD: feget.c,v 1.2 2021/12/13 16:56:49 deraadt Exp $ */
/*
* Copyright (c) 2018 Alexander Bluhm <bluhm@openbsd.org>
*
@@ -15,12 +15,14 @@
* OR IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS SOFTWARE.
*/
-#include <sys/param.h>
+#include <sys/types.h>
#include <err.h>
#include <fenv.h>
#include <stdio.h>
+#define nitems(_a) (sizeof((_a)) / sizeof((_a)[0]))
+
int
main(int argc, char *argv[])
{
diff --git a/regress/sys/arch/amd64/fpu/fxproc0.c b/regress/sys/arch/amd64/fpu/fxproc0.c
index af440da5e5c..d401e1a74a9 100644
--- a/regress/sys/arch/amd64/fpu/fxproc0.c
+++ b/regress/sys/arch/amd64/fpu/fxproc0.c
@@ -1,4 +1,4 @@
-/* $OpenBSD: fxproc0.c,v 1.1 2018/08/21 18:35:18 bluhm Exp $ */
+/* $OpenBSD: fxproc0.c,v 1.2 2021/12/13 16:56:49 deraadt Exp $ */
/*
* Copyright (c) 2018 Alexander Bluhm <bluhm@openbsd.org>
*
@@ -15,7 +15,8 @@
* OR IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS SOFTWARE.
*/
-#include <sys/param.h>
+#include <sys/types.h>
+#include <sys/signal.h>
#include <sys/proc.h>
#include <sys/user.h>
#include <machine/fpu.h>
@@ -29,6 +30,8 @@
#include <stdlib.h>
#include <unistd.h>
+#define nitems(_a) (sizeof((_a)) / sizeof((_a)[0]))
+
void __dead usage(void);
void fenv_proc(kvm_t *, unsigned long);
diff --git a/regress/sys/arch/hppa/probe/probe.c b/regress/sys/arch/hppa/probe/probe.c
index 6462ddee58e..723a4c9e3cd 100644
--- a/regress/sys/arch/hppa/probe/probe.c
+++ b/regress/sys/arch/hppa/probe/probe.c
@@ -1,10 +1,10 @@
-/* $OpenBSD: probe.c,v 1.3 2017/01/13 15:28:02 kettenis Exp $ */
+/* $OpenBSD: probe.c,v 1.4 2021/12/13 16:56:49 deraadt Exp $ */
/*
* Written by Michael Shalayeff, 2004. Public Domain.
*/
-#include <sys/param.h>
+#include <sys/types.h>
#include <signal.h>
#include <unistd.h>
#include <stdio.h>
diff --git a/regress/sys/arch/hppa/sfuid/sfuid.c b/regress/sys/arch/hppa/sfuid/sfuid.c
index 10f8d634bbd..a61bda5d826 100644
--- a/regress/sys/arch/hppa/sfuid/sfuid.c
+++ b/regress/sys/arch/hppa/sfuid/sfuid.c
@@ -1,10 +1,10 @@
-/* $OpenBSD: sfuid.c,v 1.3 2017/01/13 15:28:02 kettenis Exp $ */
+/* $OpenBSD: sfuid.c,v 1.4 2021/12/13 16:56:49 deraadt Exp $ */
/*
* Written by Michael Shalayeff, 2004. Public Domain.
*/
-#include <sys/param.h>
+#include <sys/types.h>
#include <signal.h>
#include <unistd.h>
#include <stdio.h>