summaryrefslogtreecommitdiff
path: root/sys/arch
diff options
context:
space:
mode:
Diffstat (limited to 'sys/arch')
-rw-r--r--sys/arch/alpha/include/stdarg.h6
-rw-r--r--sys/arch/amd64/include/stdarg.h27
-rw-r--r--sys/arch/arm/include/stdarg.h6
-rw-r--r--sys/arch/hppa/hppa/genassym.cf3
-rw-r--r--sys/arch/hppa/include/stdarg.h5
-rw-r--r--sys/arch/hppa64/include/stdarg.h5
-rw-r--r--sys/arch/i386/include/stdarg.h6
-rw-r--r--sys/arch/m68k/include/stdarg.h6
-rw-r--r--sys/arch/m88k/include/stdarg.h6
-rw-r--r--sys/arch/m88k/include/va-m88k.h4
-rw-r--r--sys/arch/m88k/include/varargs.h6
-rw-r--r--sys/arch/mips64/include/stdarg.h6
-rw-r--r--sys/arch/powerpc/include/frame.h4
-rw-r--r--sys/arch/powerpc/include/signal.h16
-rw-r--r--sys/arch/powerpc/include/stdarg.h6
-rw-r--r--sys/arch/powerpc/include/va-ppc.h4
-rw-r--r--sys/arch/powerpc/include/varargs.h6
-rw-r--r--sys/arch/sparc/include/stdarg.h6
-rw-r--r--sys/arch/sparc64/include/bus.h3
-rw-r--r--sys/arch/sparc64/include/stdarg.h6
-rw-r--r--sys/arch/vax/include/stdarg.h6
21 files changed, 76 insertions, 67 deletions
diff --git a/sys/arch/alpha/include/stdarg.h b/sys/arch/alpha/include/stdarg.h
index 3d64c0fb39e..03b50b40166 100644
--- a/sys/arch/alpha/include/stdarg.h
+++ b/sys/arch/alpha/include/stdarg.h
@@ -1,4 +1,4 @@
-/* $OpenBSD: stdarg.h,v 1.8 2005/12/14 23:51:32 deraadt Exp $ */
+/* $OpenBSD: stdarg.h,v 1.9 2006/01/06 18:53:04 millert Exp $ */
/* $NetBSD: stdarg.h,v 1.4 1996/10/09 21:13:05 cgd Exp $ */
/*-
@@ -36,9 +36,9 @@
#define _ALPHA_STDARG_H_
#include <sys/cdefs.h>
-#include <machine/ansi.h>
+#include <machine/_types.h>
-typedef _BSD_VA_LIST_ va_list;
+typedef __va_list va_list;
#define __va_size(type) \
(((sizeof(type) + sizeof(long) - 1) / sizeof(long)) * sizeof(long))
diff --git a/sys/arch/amd64/include/stdarg.h b/sys/arch/amd64/include/stdarg.h
index 370b624166f..feeb97970a7 100644
--- a/sys/arch/amd64/include/stdarg.h
+++ b/sys/arch/amd64/include/stdarg.h
@@ -1,4 +1,4 @@
-/* $OpenBSD: stdarg.h,v 1.3 2005/12/14 21:46:30 millert Exp $ */
+/* $OpenBSD: stdarg.h,v 1.4 2006/01/06 18:53:05 millert Exp $ */
/* $NetBSD: stdarg.h,v 1.2 2003/04/28 23:16:17 bjh21 Exp $ */
/*-
@@ -36,17 +36,28 @@
#define _AMD64_STDARG_H_
#include <sys/cdefs.h>
-#include <machine/ansi.h>
+#include <machine/_types.h> /* for __va_list */
-typedef _BSD_VA_LIST_ va_list;
+/*
+ * NOTE: this file is only used by lint and non-GNU compilers
+ */
+
+typedef __va_list va_list;
+
+#define __va_size(type) \
+ (((sizeof(type) + sizeof(long) - 1) / sizeof(long)) * sizeof(long))
-#define va_start(ap, last) __builtin_stdarg_start((ap), (last))
-#define va_arg __builtin_va_arg
-#define va_end(ap) __builtin_va_end(ap)
-#define __va_copy(dest, src) __builtin_va_copy((dest), (src))
+#define va_start(ap, last) \
+ ((ap) = (va_list)&(last) + __va_size(last))
+
+#define va_arg(ap, type) \
+ (*(type *)((ap) += __va_size(type), (ap) - __va_size(type)))
#if __ISO_C_VISIBLE >= 1999
-#define va_copy(dest, src) __va_copy((dest), (src))
+#define va_copy(dest, src) \
+ ((dest) = (src))
#endif
+#define va_end(ap)
+
#endif /* !_AMD64_STDARG_H_ */
diff --git a/sys/arch/arm/include/stdarg.h b/sys/arch/arm/include/stdarg.h
index 4af3e313bb8..ad025c06942 100644
--- a/sys/arch/arm/include/stdarg.h
+++ b/sys/arch/arm/include/stdarg.h
@@ -1,4 +1,4 @@
-/* $OpenBSD: stdarg.h,v 1.4 2005/12/14 21:46:30 millert Exp $ */
+/* $OpenBSD: stdarg.h,v 1.5 2006/01/06 18:53:05 millert Exp $ */
/* $NetBSD: stdarg.h,v 1.7 2003/08/07 16:26:53 agc Exp $ */
/*
@@ -36,9 +36,9 @@
#define _ARM32_STDARG_H_
#include <sys/cdefs.h>
-#include <machine/ansi.h>
+#include <machine/_types.h>
-typedef _BSD_VA_LIST_ va_list;
+typedef __va_list va_list;
#ifdef __lint__
#define __builtin_next_arg(t) ((t) ? 0 : 0)
#define __builtin_stdarg_start(a, l) ((a) = ((l) ? 0 : 0))
diff --git a/sys/arch/hppa/hppa/genassym.cf b/sys/arch/hppa/hppa/genassym.cf
index 3942e2971fa..842af4daa32 100644
--- a/sys/arch/hppa/hppa/genassym.cf
+++ b/sys/arch/hppa/hppa/genassym.cf
@@ -1,4 +1,4 @@
-# $OpenBSD: genassym.cf,v 1.27 2005/04/21 04:39:35 mickey Exp $
+# $OpenBSD: genassym.cf,v 1.28 2006/01/06 18:53:05 millert Exp $
#
# Copyright (c) 1982, 1990, 1993
@@ -42,7 +42,6 @@ include <sys/user.h>
include <uvm/uvm.h>
-include <machine/types.h>
include <machine/cpu.h>
include <machine/psl.h>
include <machine/reg.h>
diff --git a/sys/arch/hppa/include/stdarg.h b/sys/arch/hppa/include/stdarg.h
index 3bfcc43f46c..712395bdcb5 100644
--- a/sys/arch/hppa/include/stdarg.h
+++ b/sys/arch/hppa/include/stdarg.h
@@ -1,4 +1,4 @@
-/* $OpenBSD: stdarg.h,v 1.6 2005/12/14 23:51:32 deraadt Exp $ */
+/* $OpenBSD: stdarg.h,v 1.7 2006/01/06 18:53:05 millert Exp $ */
/*-
* Copyright (c) 1991, 1993
@@ -35,8 +35,9 @@
#define _MACHINE_STDARG_H_
#include <sys/cdefs.h>
+#include <machine/_types.h>
-typedef double *va_list;
+typedef __va_list va_list;
#ifdef __GNUC__
#define va_start(ap,lastarg) ((ap) = (va_list)__builtin_saveregs())
diff --git a/sys/arch/hppa64/include/stdarg.h b/sys/arch/hppa64/include/stdarg.h
index e8de77c5e4f..697d41a8b9f 100644
--- a/sys/arch/hppa64/include/stdarg.h
+++ b/sys/arch/hppa64/include/stdarg.h
@@ -1,4 +1,4 @@
-/* $OpenBSD: stdarg.h,v 1.3 2005/12/14 23:51:32 deraadt Exp $ */
+/* $OpenBSD: stdarg.h,v 1.4 2006/01/06 18:53:05 millert Exp $ */
/*-
* Copyright (c) 1991, 1993
@@ -35,8 +35,9 @@
#define _MACHINE_STDARG_H_
#include <sys/cdefs.h>
+#include <machine/_types.h>
-typedef double *va_list;
+typedef __va_list va_list;
#ifdef __GNUC__
#define va_start(ap,lastarg) ((ap) = (va_list)__builtin_saveregs())
diff --git a/sys/arch/i386/include/stdarg.h b/sys/arch/i386/include/stdarg.h
index 473b059b105..4df981d3d9a 100644
--- a/sys/arch/i386/include/stdarg.h
+++ b/sys/arch/i386/include/stdarg.h
@@ -1,4 +1,4 @@
-/* $OpenBSD: stdarg.h,v 1.8 2005/12/14 23:51:32 deraadt Exp $ */
+/* $OpenBSD: stdarg.h,v 1.9 2006/01/06 18:53:05 millert Exp $ */
/* $NetBSD: stdarg.h,v 1.12 1995/12/25 23:15:31 mycroft Exp $ */
/*-
@@ -36,9 +36,9 @@
#define _I386_STDARG_H_
#include <sys/cdefs.h>
-#include <machine/ansi.h>
+#include <machine/_types.h>
-typedef _BSD_VA_LIST_ va_list;
+typedef __va_list va_list;
#define __va_size(type) \
(((sizeof(type) + sizeof(long) - 1) / sizeof(long)) * sizeof(long))
diff --git a/sys/arch/m68k/include/stdarg.h b/sys/arch/m68k/include/stdarg.h
index cb457c20574..b6bc860cbb5 100644
--- a/sys/arch/m68k/include/stdarg.h
+++ b/sys/arch/m68k/include/stdarg.h
@@ -1,4 +1,4 @@
-/* $OpenBSD: stdarg.h,v 1.8 2005/12/14 23:51:32 deraadt Exp $ */
+/* $OpenBSD: stdarg.h,v 1.9 2006/01/06 18:53:05 millert Exp $ */
/* $NetBSD: stdarg.h,v 1.14 1995/12/25 23:15:33 mycroft Exp $ */
/*-
@@ -36,9 +36,9 @@
#define _M68K_STDARG_H_
#include <sys/cdefs.h>
-#include <machine/ansi.h>
+#include <machine/_types.h>
-typedef _BSD_VA_LIST_ va_list;
+typedef __va_list va_list;
#define __va_size(type) \
(((sizeof(type) + sizeof(long) - 1) / sizeof(long)) * sizeof(long))
diff --git a/sys/arch/m88k/include/stdarg.h b/sys/arch/m88k/include/stdarg.h
index 2c918f9fe95..1b42ef6d009 100644
--- a/sys/arch/m88k/include/stdarg.h
+++ b/sys/arch/m88k/include/stdarg.h
@@ -1,9 +1,9 @@
-/* $OpenBSD: stdarg.h,v 1.1 2004/04/26 12:34:05 miod Exp $ */
+/* $OpenBSD: stdarg.h,v 1.2 2006/01/06 18:53:05 millert Exp $ */
#ifndef _M88K_STDARGS_H_
#define _M88K_STDARGS_H_
-#include <machine/ansi.h>
+#include <machine/_types.h>
#ifndef _STDARG_H
#define _STDARG_H
@@ -11,6 +11,6 @@
#include <machine/va-m88k.h>
-typedef _BSD_VA_LIST_ va_list;
+typedef __va_list va_list;
#endif /* _M88K_STDARGS_H_ */
diff --git a/sys/arch/m88k/include/va-m88k.h b/sys/arch/m88k/include/va-m88k.h
index 1920fdd8410..3b9665803c0 100644
--- a/sys/arch/m88k/include/va-m88k.h
+++ b/sys/arch/m88k/include/va-m88k.h
@@ -1,4 +1,4 @@
-/* $OpenBSD: va-m88k.h,v 1.7 2005/12/20 14:42:05 millert Exp $ */
+/* $OpenBSD: va-m88k.h,v 1.8 2006/01/06 18:53:05 millert Exp $ */
/* Define __gnuc_va_list. */
@@ -11,7 +11,7 @@ typedef struct __va_list_tag {
unsigned int __va_arg; /* argument number */
unsigned int *__va_stk; /* start of args passed on stack */
unsigned int *__va_reg; /* start of args passed in regs */
-} __va_list[1], __gnuc_va_list[1];
+} __gnuc_va_list[1];
#endif /* not __GNUC_VA_LIST */
diff --git a/sys/arch/m88k/include/varargs.h b/sys/arch/m88k/include/varargs.h
index 85a3d759cd0..a399f55b2a2 100644
--- a/sys/arch/m88k/include/varargs.h
+++ b/sys/arch/m88k/include/varargs.h
@@ -1,13 +1,13 @@
-/* $OpenBSD: varargs.h,v 1.1 2004/04/26 12:34:05 miod Exp $ */
+/* $OpenBSD: varargs.h,v 1.2 2006/01/06 18:53:05 millert Exp $ */
#ifndef _M88K_VARARGS_H_
#define _M88K_VARARGS_H_
#define _VARARGS_H
-#include <machine/ansi.h>
+#include <machine/_types.h>
#include <machine/va-m88k.h>
-typedef _BSD_VA_LIST_ va_list;
+typedef __va_list va_list;
#endif /* _M88K_VARARGS_H_ */
diff --git a/sys/arch/mips64/include/stdarg.h b/sys/arch/mips64/include/stdarg.h
index 60e066da7d9..94450d105c0 100644
--- a/sys/arch/mips64/include/stdarg.h
+++ b/sys/arch/mips64/include/stdarg.h
@@ -1,4 +1,4 @@
-/* $OpenBSD: stdarg.h,v 1.4 2005/12/14 23:51:33 deraadt Exp $ */
+/* $OpenBSD: stdarg.h,v 1.5 2006/01/06 18:53:05 millert Exp $ */
/*-
* Copyright (c) 1992, 1993
@@ -35,9 +35,9 @@
#define _MIPS_STDARG_H_
#include <sys/cdefs.h>
-#include <machine/ansi.h>
+#include <machine/_types.h>
-typedef _BSD_VA_LIST_ va_list;
+typedef __va_list va_list;
#ifndef __GNUC_VA_LIST
#define __GNUC_VA_LIST
diff --git a/sys/arch/powerpc/include/frame.h b/sys/arch/powerpc/include/frame.h
index 674f7c2e9fa..4eda8735ee7 100644
--- a/sys/arch/powerpc/include/frame.h
+++ b/sys/arch/powerpc/include/frame.h
@@ -1,4 +1,4 @@
-/* $OpenBSD: frame.h,v 1.6 2005/08/02 21:02:49 drahn Exp $ */
+/* $OpenBSD: frame.h,v 1.7 2006/01/06 18:53:05 millert Exp $ */
/*
* Copyright (C) 1995, 1996 Wolfgang Solfrank.
@@ -33,8 +33,6 @@
#ifndef _POWERPC_FRAME_H_
#define _POWERPC_FRAME_H_
-#include <machine/types.h>
-
/*
* This is to ensure alignment of the stackpointer
*/
diff --git a/sys/arch/powerpc/include/signal.h b/sys/arch/powerpc/include/signal.h
index d25ec5e6fe6..89f2bb0dc84 100644
--- a/sys/arch/powerpc/include/signal.h
+++ b/sys/arch/powerpc/include/signal.h
@@ -1,4 +1,4 @@
-/* $OpenBSD: signal.h,v 1.5 2005/12/14 21:46:31 millert Exp $ */
+/* $OpenBSD: signal.h,v 1.6 2006/01/06 18:53:05 millert Exp $ */
/* $NetBSD: signal.h,v 1.1 1996/09/30 16:34:34 ws Exp $ */
/*
@@ -39,7 +39,7 @@
typedef int sig_atomic_t;
#if __BSD_VISIBLE
-#include <machine/types.h>
+#include <machine/_types.h>
/*
* We have to save all registers on every trap, because
@@ -51,16 +51,16 @@ typedef int sig_atomic_t;
*
*/
struct trapframe {
- u_int32_t fixreg[32];
- u_int32_t lr;
- u_int32_t cr;
- u_int32_t xer;
- u_int32_t ctr;
+ __register_t fixreg[32];
+ __register_t lr;
+ __register_t cr;
+ __register_t xer;
+ __register_t ctr;
int srr0;
int srr1;
int dar; /* dar & dsisr are only filled on a DSI trap */
int dsisr;
- u_int32_t exc;
+ __register_t exc;
};
struct sigcontext {
diff --git a/sys/arch/powerpc/include/stdarg.h b/sys/arch/powerpc/include/stdarg.h
index 9c23da50f7e..76e3cda1d08 100644
--- a/sys/arch/powerpc/include/stdarg.h
+++ b/sys/arch/powerpc/include/stdarg.h
@@ -1,4 +1,4 @@
-/* $OpenBSD: stdarg.h,v 1.5 2003/06/02 23:27:53 millert Exp $ */
+/* $OpenBSD: stdarg.h,v 1.6 2006/01/06 18:53:05 millert Exp $ */
/* $NetBSD: stdarg.h,v 1.1 1996/09/30 16:34:35 ws Exp $ */
/*-
@@ -35,13 +35,13 @@
#ifndef _POWERPC_STDARG_H_
#define _POWERPC_STDARG_H_
-#include <machine/ansi.h>
+#include <machine/_types.h>
#ifndef _STDARG_H
#define _STDARG_H
#endif
#include <machine/va-ppc.h>
-typedef _BSD_VA_LIST_ va_list;
+typedef __va_list va_list;
#endif /* !_POWERPC_STDARG_H_ */
diff --git a/sys/arch/powerpc/include/va-ppc.h b/sys/arch/powerpc/include/va-ppc.h
index 028bae06382..86353c6b2ef 100644
--- a/sys/arch/powerpc/include/va-ppc.h
+++ b/sys/arch/powerpc/include/va-ppc.h
@@ -1,4 +1,4 @@
-/* $OpenBSD: va-ppc.h,v 1.11 2005/12/14 21:46:31 millert Exp $ */
+/* $OpenBSD: va-ppc.h,v 1.12 2006/01/06 18:53:05 millert Exp $ */
/* GNU C varargs support for the PowerPC with either the V.4 or Windows NT calling sequences */
#include <sys/cdefs.h>
@@ -29,7 +29,7 @@ typedef struct __va_list_tag {
char *overflow_arg_area; /* location on stack that holds the next
overflow argument */
char *reg_save_area; /* where r3:r10 and f1:f8, if saved are stored */
-} __va_list[1], __gnuc_va_list[1];
+} __gnuc_va_list[1];
#else /* _SYS_VA_LIST */
diff --git a/sys/arch/powerpc/include/varargs.h b/sys/arch/powerpc/include/varargs.h
index 4330af8f837..e17efff0df7 100644
--- a/sys/arch/powerpc/include/varargs.h
+++ b/sys/arch/powerpc/include/varargs.h
@@ -1,4 +1,4 @@
-/* $OpenBSD: varargs.h,v 1.4 2003/06/02 23:27:53 millert Exp $ */
+/* $OpenBSD: varargs.h,v 1.5 2006/01/06 18:53:05 millert Exp $ */
/* $NetBSD: varargs.h,v 1.1 1996/09/30 16:34:37 ws Exp $ */
/*-
@@ -42,9 +42,9 @@
#define _VARARGS_H
-#include <machine/ansi.h>
+#include <machine/_types.h>
#include <machine/va-ppc.h>
-typedef _BSD_VA_LIST_ va_list;
+typedef __va_list va_list;
#endif /* !_POWERPC_VARARGS_H_ */
diff --git a/sys/arch/sparc/include/stdarg.h b/sys/arch/sparc/include/stdarg.h
index bbddc6e4914..fe878fec5d4 100644
--- a/sys/arch/sparc/include/stdarg.h
+++ b/sys/arch/sparc/include/stdarg.h
@@ -1,4 +1,4 @@
-/* $OpenBSD: stdarg.h,v 1.11 2005/12/15 13:44:52 millert Exp $ */
+/* $OpenBSD: stdarg.h,v 1.12 2006/01/06 18:53:05 millert Exp $ */
/* $NetBSD: stdarg.h,v 1.10 1996/12/27 20:55:28 pk Exp $ */
/*
@@ -45,13 +45,13 @@
#define _SPARC_STDARG_H_
#include <sys/cdefs.h>
-#include <machine/ansi.h>
+#include <machine/_types.h>
#ifdef __lint__
#define __builtin_classify_type(t) (0)
#endif
-typedef _BSD_VA_LIST_ va_list;
+typedef __va_list va_list;
#define __va_size(type) \
(((sizeof(type) + sizeof(long) - 1) / sizeof(long)) * sizeof(long))
diff --git a/sys/arch/sparc64/include/bus.h b/sys/arch/sparc64/include/bus.h
index 14f61133f02..38ab7a81f64 100644
--- a/sys/arch/sparc64/include/bus.h
+++ b/sys/arch/sparc64/include/bus.h
@@ -1,4 +1,4 @@
-/* $OpenBSD: bus.h,v 1.17 2005/07/10 00:23:11 brad Exp $ */
+/* $OpenBSD: bus.h,v 1.18 2006/01/06 18:53:05 millert Exp $ */
/* $NetBSD: bus.h,v 1.31 2001/09/21 15:30:41 wiz Exp $ */
/*-
@@ -73,7 +73,6 @@
#ifndef _SPARC_BUS_H_
#define _SPARC_BUS_H_
-#include <machine/types.h>
#include <machine/ctlreg.h>
/*
diff --git a/sys/arch/sparc64/include/stdarg.h b/sys/arch/sparc64/include/stdarg.h
index 58e56a19799..cd01cc9b967 100644
--- a/sys/arch/sparc64/include/stdarg.h
+++ b/sys/arch/sparc64/include/stdarg.h
@@ -1,4 +1,4 @@
-/* $OpenBSD: stdarg.h,v 1.4 2005/12/14 21:46:31 millert Exp $ */
+/* $OpenBSD: stdarg.h,v 1.5 2006/01/06 18:53:05 millert Exp $ */
/* $NetBSD: stdarg.h,v 1.11 2000/07/23 21:36:56 mycroft Exp $ */
/*
@@ -45,7 +45,7 @@
#define _SPARC64_STDARG_H_
#include <sys/cdefs.h>
-#include <machine/ansi.h>
+#include <machine/_types.h>
#ifdef __lint__
#define __builtin_saveregs(t) (0)
@@ -53,7 +53,7 @@
#define __builtin_next_arg(t) ((t) ? 0 : 0)
#endif
-typedef _BSD_VA_LIST_ va_list;
+typedef __va_list va_list;
#define va_start(ap, last) \
(__builtin_next_arg(last), (ap) = (va_list)__builtin_saveregs())
diff --git a/sys/arch/vax/include/stdarg.h b/sys/arch/vax/include/stdarg.h
index 2ebf9dc7f26..b3aca7c0a8a 100644
--- a/sys/arch/vax/include/stdarg.h
+++ b/sys/arch/vax/include/stdarg.h
@@ -1,4 +1,4 @@
-/* $OpenBSD: stdarg.h,v 1.7 2005/12/14 21:46:31 millert Exp $ */
+/* $OpenBSD: stdarg.h,v 1.8 2006/01/06 18:53:05 millert Exp $ */
/* $NetBSD: stdarg.h,v 1.11 1999/05/03 16:30:34 christos Exp $ */
/*-
@@ -36,9 +36,9 @@
#define _VAX_STDARG_H_
#include <sys/cdefs.h>
-#include <machine/ansi.h>
+#include <machine/_types.h>
-typedef _BSD_VA_LIST_ va_list;
+typedef __va_list va_list;
#ifdef __lint__
#define __builtin_next_arg(t) ((t) ? 0 : 0)