diff options
Diffstat (limited to 'sys')
52 files changed, 247 insertions, 92 deletions
diff --git a/sys/arch/alpha/include/ansi.h b/sys/arch/alpha/include/ansi.h index 13755b90ffb..e460b0f6593 100644 --- a/sys/arch/alpha/include/ansi.h +++ b/sys/arch/alpha/include/ansi.h @@ -1,4 +1,4 @@ -/* $OpenBSD: ansi.h,v 1.10 2003/06/02 23:27:43 millert Exp $ */ +/* $OpenBSD: ansi.h,v 1.11 2004/01/03 14:08:52 espie Exp $ */ /* $NetBSD: ansi.h,v 1.6 1996/11/15 22:38:45 jtc Exp $ */ /*- @@ -54,7 +54,11 @@ typedef struct { int offset; int pad; } __va_list; +#if defined(__GNUC__) && __GNUC__ >= 3 +#define _BSD_VA_LIST_ __builtin_va_list +#else #define _BSD_VA_LIST_ __va_list /* va_list */ +#endif #define _BSD_CLOCKID_T_ int #define _BSD_TIMER_T_ int diff --git a/sys/arch/hppa/include/ansi.h b/sys/arch/hppa/include/ansi.h index 571f7db9c4a..7c2e1ecd07a 100644 --- a/sys/arch/hppa/include/ansi.h +++ b/sys/arch/hppa/include/ansi.h @@ -1,4 +1,4 @@ -/* $OpenBSD: ansi.h,v 1.5 2003/06/02 23:27:46 millert Exp $ */ +/* $OpenBSD: ansi.h,v 1.6 2004/01/03 14:08:52 espie Exp $ */ /*- * Copyright (c) 1990, 1993 @@ -48,7 +48,11 @@ #define _BSD_SIZE_T_ unsigned int /* sizeof() */ #define _BSD_SSIZE_T_ int /* byte count or error */ #define _BSD_TIME_T_ int /* time() */ +#if defined(__GNUC__) && __GNUC__ >= 3 +#define _BSD_VA_LIST_ __builtin_va_list +#else #define _BSD_VA_LIST_ double * /* va_list */ +#endif #define _BSD_CLOCKID_T_ int #define _BSD_TIMER_T_ int diff --git a/sys/arch/i386/include/ansi.h b/sys/arch/i386/include/ansi.h index e8d2306844f..a996423ba2a 100644 --- a/sys/arch/i386/include/ansi.h +++ b/sys/arch/i386/include/ansi.h @@ -1,4 +1,4 @@ -/* $OpenBSD: ansi.h,v 1.8 2003/06/02 23:27:47 millert Exp $ */ +/* $OpenBSD: ansi.h,v 1.9 2004/01/03 14:08:52 espie Exp $ */ /* $NetBSD: ansi.h,v 1.7 1996/11/15 22:38:50 jtc Exp $ */ /*- @@ -49,7 +49,11 @@ #define _BSD_SIZE_T_ unsigned int /* sizeof() */ #define _BSD_SSIZE_T_ int /* byte count or error */ #define _BSD_TIME_T_ int /* time() */ +#if defined(__GNUC__) && __GNUC__ >= 3 +#define _BSD_VA_LIST_ __builtin_va_list +#else #define _BSD_VA_LIST_ char * /* va_list */ +#endif #define _BSD_CLOCKID_T_ int #define _BSD_TIMER_T_ int diff --git a/sys/arch/m68k/include/ansi.h b/sys/arch/m68k/include/ansi.h index 3f2ab4068c2..64051d75435 100644 --- a/sys/arch/m68k/include/ansi.h +++ b/sys/arch/m68k/include/ansi.h @@ -1,4 +1,4 @@ -/* $OpenBSD: ansi.h,v 1.7 2003/06/02 23:27:48 millert Exp $ */ +/* $OpenBSD: ansi.h,v 1.8 2004/01/03 14:08:52 espie Exp $ */ /* $NetBSD: ansi.h,v 1.7 1996/11/15 22:38:52 jtc Exp $ */ /*- @@ -49,7 +49,11 @@ #define _BSD_SIZE_T_ unsigned int /* sizeof() */ #define _BSD_SSIZE_T_ int /* byte count or error */ #define _BSD_TIME_T_ int /* time() */ +#if defined(__GNUC__) && __GNUC__ >= 3 +#define _BSD_VA_LIST_ __builtin_va_list +#else #define _BSD_VA_LIST_ char * /* va_list */ +#endif #define _BSD_CLOCKID_T_ int #define _BSD_TIMER_T_ int diff --git a/sys/arch/mvme88k/include/ansi.h b/sys/arch/mvme88k/include/ansi.h index 809c570acf5..2dc85b42359 100644 --- a/sys/arch/mvme88k/include/ansi.h +++ b/sys/arch/mvme88k/include/ansi.h @@ -1,4 +1,4 @@ -/* $OpenBSD: ansi.h,v 1.16 2003/10/11 22:08:57 miod Exp $ */ +/* $OpenBSD: ansi.h,v 1.17 2004/01/03 14:08:53 espie Exp $ */ /*- * Copyright (c) 1990, 1993 * The Regents of the University of California. All rights reserved. @@ -48,7 +48,11 @@ #define _BSD_SSIZE_T_ int /* byte count or error */ #define _BSD_TIME_T_ int /* time() */ struct __va_list_tag; -#define _BSD_VA_LIST_ struct __va_list_tag * /* va_list */ +#if defined(__GNUC__) && __GNUC__ >= 3 +#define _BSD_VA_LIST_ __builtin_va_list +#else +#define _BSD_VA_LIST_ struct __va_list_tag * /* va_list */ +#endif #define _BSD_CLOCKID_T_ int #define _BSD_TIMER_T_ int diff --git a/sys/arch/powerpc/include/ansi.h b/sys/arch/powerpc/include/ansi.h index 0fb5a29288a..8808d0210f7 100644 --- a/sys/arch/powerpc/include/ansi.h +++ b/sys/arch/powerpc/include/ansi.h @@ -1,4 +1,4 @@ -/* $OpenBSD: ansi.h,v 1.11 2003/08/10 00:14:12 miod Exp $ */ +/* $OpenBSD: ansi.h,v 1.12 2004/01/03 14:08:53 espie Exp $ */ /* $NetBSD: ansi.h,v 1.2 1996/11/15 22:38:57 jtc Exp $ */ /*- @@ -50,7 +50,11 @@ #define _BSD_SSIZE_T_ int /* byte count or error */ #define _BSD_TIME_T_ int /* time() */ struct __va_list_tag; +#if defined(__GNUC__) && __GNUC__ >= 3 +#define _BSD_VA_LIST_ __builtin_va_list +#else #define _BSD_VA_LIST_ struct __va_list_tag * /* va_list */ +#endif #define _BSD_CLOCKID_T_ int #define _BSD_TIMER_T_ int diff --git a/sys/arch/sparc/include/ansi.h b/sys/arch/sparc/include/ansi.h index a460cb30c1e..081b8fc5e3d 100644 --- a/sys/arch/sparc/include/ansi.h +++ b/sys/arch/sparc/include/ansi.h @@ -1,4 +1,4 @@ -/* $OpenBSD: ansi.h,v 1.8 2003/06/02 23:27:54 millert Exp $ */ +/* $OpenBSD: ansi.h,v 1.9 2004/01/03 14:08:53 espie Exp $ */ /* $NetBSD: ansi.h,v 1.6 1996/11/15 22:38:59 jtc Exp $ */ /*- @@ -49,7 +49,11 @@ #define _BSD_SIZE_T_ unsigned int /* sizeof() */ #define _BSD_SSIZE_T_ int /* byte count or error */ #define _BSD_TIME_T_ int /* time() */ +#if defined(__GNUC__) && __GNUC__ >= 3 +#define _BSD_VA_LIST_ __builtin_va_list +#else #define _BSD_VA_LIST_ char * /* va_list */ +#endif #define _BSD_CLOCKID_T_ int #define _BSD_TIMER_T_ int diff --git a/sys/arch/sparc64/include/ansi.h b/sys/arch/sparc64/include/ansi.h index 2c7380ccb86..b77b84a94e1 100644 --- a/sys/arch/sparc64/include/ansi.h +++ b/sys/arch/sparc64/include/ansi.h @@ -1,4 +1,4 @@ -/* $OpenBSD: ansi.h,v 1.3 2003/06/02 23:27:56 millert Exp $ */ +/* $OpenBSD: ansi.h,v 1.4 2004/01/03 14:08:53 espie Exp $ */ /* $NetBSD: ansi.h,v 1.7 2001/01/03 10:09:04 takemura Exp $ */ /*- @@ -51,7 +51,11 @@ #define _BSD_SIZE_T_ unsigned long /* sizeof() */ #define _BSD_SSIZE_T_ long /* byte count or error */ #define _BSD_TIME_T_ int /* time() */ +#if defined(__GNUC__) && __GNUC__ >= 3 +#define _BSD_VA_LIST_ __builtin_va_list +#else #define _BSD_VA_LIST_ char * /* va_list */ +#endif #define _BSD_CLOCKID_T_ int /* clockid_t */ #define _BSD_TIMER_T_ int /* timer_t */ diff --git a/sys/arch/vax/include/ansi.h b/sys/arch/vax/include/ansi.h index b45ca1ded65..57d0e3ea77b 100644 --- a/sys/arch/vax/include/ansi.h +++ b/sys/arch/vax/include/ansi.h @@ -1,4 +1,4 @@ -/* $OpenBSD: ansi.h,v 1.9 2003/06/02 23:27:57 millert Exp $ */ +/* $OpenBSD: ansi.h,v 1.10 2004/01/03 14:08:53 espie Exp $ */ /* $NetBSD: ansi.h,v 1.7 1998/04/27 17:39:11 kleink Exp $ */ /*- @@ -51,7 +51,11 @@ #define _BSD_SIZE_T_ unsigned int /* sizeof() */ #define _BSD_SSIZE_T_ int /* byte count or error */ #define _BSD_TIME_T_ int /* time() */ +#if defined(__GNUC__) && __GNUC__ >= 3 +#define _BSD_VA_LIST_ __builtin_va_list +#else #define _BSD_VA_LIST_ char * /* va_list */ +#endif #define _BSD_WCHAR_T_ int /* wchar_t */ #define _BSD_WINT_T_ int /* wint_t */ #define _BSD_CLOCKID_T_ int /* clockid_t */ diff --git a/sys/ddb/db_output.c b/sys/ddb/db_output.c index 724dfe64ce5..397c60aa793 100644 --- a/sys/ddb/db_output.c +++ b/sys/ddb/db_output.c @@ -1,4 +1,4 @@ -/* $OpenBSD: db_output.c,v 1.21 2002/07/10 23:38:09 art Exp $ */ +/* $OpenBSD: db_output.c,v 1.22 2004/01/03 14:08:53 espie Exp $ */ /* $NetBSD: db_output.c,v 1.13 1996/04/01 17:27:14 christos Exp $ */ /* @@ -33,7 +33,7 @@ #include <sys/param.h> #include <sys/proc.h> -#include <machine/stdarg.h> +#include <sys/stdarg.h> #include <dev/cons.h> diff --git a/sys/dev/ofw/ofcons.c b/sys/dev/ofw/ofcons.c index 65e7a49c00b..15167ce0324 100644 --- a/sys/dev/ofw/ofcons.c +++ b/sys/dev/ofw/ofcons.c @@ -1,4 +1,4 @@ -/* $OpenBSD: ofcons.c,v 1.11 2003/08/15 20:32:17 tedu Exp $ */ +/* $OpenBSD: ofcons.c,v 1.12 2004/01/03 14:08:53 espie Exp $ */ /* $NetBSD: ofcons.c,v 1.3 1996/10/13 01:38:11 christos Exp $ */ /* @@ -43,7 +43,7 @@ #include <dev/ofw/openfirm.h> -#include <machine/stdarg.h> +#include <sys/stdarg.h> struct ofc_softc { struct device of_dev; diff --git a/sys/kern/kern_kthread.c b/sys/kern/kern_kthread.c index 514ed93f923..27024a12974 100644 --- a/sys/kern/kern_kthread.c +++ b/sys/kern/kern_kthread.c @@ -1,4 +1,4 @@ -/* $OpenBSD: kern_kthread.c,v 1.20 2003/05/27 21:03:49 henning Exp $ */ +/* $OpenBSD: kern_kthread.c,v 1.21 2004/01/03 14:08:53 espie Exp $ */ /* $NetBSD: kern_kthread.c,v 1.3 1998/12/22 21:21:36 kleink Exp $ */ /*- @@ -54,7 +54,7 @@ * ansi and traditional c compilers. * XXX: this requires that stdarg.h define: va_alist and va_dcl */ -#include <machine/stdarg.h> +#include <sys/stdarg.h> /* * Fork a kernel thread. Any process can request this to be done. diff --git a/sys/kern/subr_prf.c b/sys/kern/subr_prf.c index f7d9f2e08bc..906ce028770 100644 --- a/sys/kern/subr_prf.c +++ b/sys/kern/subr_prf.c @@ -1,4 +1,4 @@ -/* $OpenBSD: subr_prf.c,v 1.57 2003/12/21 15:30:21 miod Exp $ */ +/* $OpenBSD: subr_prf.c,v 1.58 2004/01/03 14:08:53 espie Exp $ */ /* $NetBSD: subr_prf.c,v 1.45 1997/10/24 18:14:25 chuck Exp $ */ /*- @@ -59,7 +59,7 @@ * note that stdarg.h and the ansi style va_start macro is used for both * ansi and traditional c compilers. */ -#include <machine/stdarg.h> +#include <sys/stdarg.h> #ifdef KGDB #include <sys/kgdb.h> diff --git a/sys/lib/libsa/exit.c b/sys/lib/libsa/exit.c index db825baa9b4..6eb42fd31a5 100644 --- a/sys/lib/libsa/exit.c +++ b/sys/lib/libsa/exit.c @@ -1,4 +1,4 @@ -/* $OpenBSD: exit.c,v 1.8 2003/08/11 06:23:09 deraadt Exp $ */ +/* $OpenBSD: exit.c,v 1.9 2004/01/03 14:08:53 espie Exp $ */ /* $NetBSD: exit.c,v 1.11 1996/12/01 20:22:19 pk Exp $ */ /*- @@ -29,7 +29,7 @@ * POSSIBILITY OF SUCH DAMAGE. */ -#include <machine/stdarg.h> +#include <sys/stdarg.h> #include "stand.h" diff --git a/sys/lib/libsa/printf.c b/sys/lib/libsa/printf.c index 2abd62aa1f2..3eeba5e5b93 100644 --- a/sys/lib/libsa/printf.c +++ b/sys/lib/libsa/printf.c @@ -1,4 +1,4 @@ -/* $OpenBSD: printf.c,v 1.21 2003/08/11 06:23:09 deraadt Exp $ */ +/* $OpenBSD: printf.c,v 1.22 2004/01/03 14:08:53 espie Exp $ */ /* $NetBSD: printf.c,v 1.10 1996/11/30 04:19:21 gwr Exp $ */ /*- @@ -57,7 +57,7 @@ #include <sys/cdefs.h> #include <sys/types.h> -#include <machine/stdarg.h> +#include <sys/stdarg.h> #include "stand.h" diff --git a/sys/lib/libsa/snprintf.c b/sys/lib/libsa/snprintf.c index df17463e084..4a075d0b11a 100644 --- a/sys/lib/libsa/snprintf.c +++ b/sys/lib/libsa/snprintf.c @@ -1,4 +1,4 @@ -/* $OpenBSD: snprintf.c,v 1.3 2003/08/11 06:23:09 deraadt Exp $ */ +/* $OpenBSD: snprintf.c,v 1.4 2004/01/03 14:08:53 espie Exp $ */ /* $NetBSD: printf.c,v 1.10 1996/11/30 04:19:21 gwr Exp $ */ /*- @@ -34,7 +34,7 @@ #include <sys/cdefs.h> #include <sys/types.h> -#include <machine/stdarg.h> +#include <sys/stdarg.h> #include "stand.h" diff --git a/sys/lib/libsa/stand.h b/sys/lib/libsa/stand.h index 725a02abd77..e6522686309 100644 --- a/sys/lib/libsa/stand.h +++ b/sys/lib/libsa/stand.h @@ -1,4 +1,4 @@ -/* $OpenBSD: stand.h,v 1.42 2003/08/11 06:23:09 deraadt Exp $ */ +/* $OpenBSD: stand.h,v 1.43 2004/01/03 14:08:53 espie Exp $ */ /* $NetBSD: stand.h,v 1.18 1996/11/30 04:35:51 gwr Exp $ */ /*- @@ -35,7 +35,7 @@ #include <sys/types.h> #include <sys/cdefs.h> #include <sys/stat.h> -#include <machine/stdarg.h> +#include <sys/stdarg.h> #include "saioctl.h" #include "saerrno.h" diff --git a/sys/net/if_spppsubr.c b/sys/net/if_spppsubr.c index 3076cd69c21..c793012301a 100644 --- a/sys/net/if_spppsubr.c +++ b/sys/net/if_spppsubr.c @@ -1,4 +1,4 @@ -/* $OpenBSD: if_spppsubr.c,v 1.18 2003/05/06 07:28:39 deraadt Exp $ */ +/* $OpenBSD: if_spppsubr.c,v 1.19 2004/01/03 14:08:53 espie Exp $ */ /* * Synchronous PPP/Cisco link level subroutines. * Keepalive protocol implemented in both Cisco and PPP modes. @@ -77,7 +77,7 @@ #if defined (__NetBSD__) || defined (__OpenBSD__) #include <machine/cpu.h> /* XXX for softnet */ #endif -#include <machine/stdarg.h> +#include <sys/stdarg.h> #ifdef INET #include <netinet/in.h> diff --git a/sys/net/pf_osfp.c b/sys/net/pf_osfp.c index 08b29c72da0..52d9058fe35 100644 --- a/sys/net/pf_osfp.c +++ b/sys/net/pf_osfp.c @@ -1,4 +1,4 @@ -/* $OpenBSD: pf_osfp.c,v 1.5 2003/12/19 20:09:01 dhartmei Exp $ */ +/* $OpenBSD: pf_osfp.c,v 1.6 2004/01/03 14:08:53 espie Exp $ */ /* * Copyright (c) 2003 Mike Frantzen <frantzen@w4g.org> @@ -56,7 +56,7 @@ typedef struct pool pool_t; # define pool_init(pool, size, a, ao, f, m, p) (*(pool)) = (size) # ifdef PFDEBUG -# include <stdarg.h> +# include <sys/stdarg.h> # define DPFPRINTF(format, x...) fprintf(stderr, format , ##x) # else # define DPFPRINTF(format, x...) ((void)0) diff --git a/sys/net/raw_usrreq.c b/sys/net/raw_usrreq.c index 357e53c3fe5..039a3a06133 100644 --- a/sys/net/raw_usrreq.c +++ b/sys/net/raw_usrreq.c @@ -1,4 +1,4 @@ -/* $OpenBSD: raw_usrreq.c,v 1.9 2003/12/10 07:22:42 itojun Exp $ */ +/* $OpenBSD: raw_usrreq.c,v 1.10 2004/01/03 14:08:53 espie Exp $ */ /* $NetBSD: raw_usrreq.c,v 1.11 1996/02/13 22:00:43 christos Exp $ */ /* @@ -46,7 +46,7 @@ #include <net/netisr.h> #include <net/raw_cb.h> -#include <machine/stdarg.h> +#include <sys/stdarg.h> /* * Initialize raw connection block q. */ diff --git a/sys/net/rtsock.c b/sys/net/rtsock.c index 6b558ce5383..b8c07b9ef60 100644 --- a/sys/net/rtsock.c +++ b/sys/net/rtsock.c @@ -1,4 +1,4 @@ -/* $OpenBSD: rtsock.c,v 1.33 2003/12/10 07:22:42 itojun Exp $ */ +/* $OpenBSD: rtsock.c,v 1.34 2004/01/03 14:08:53 espie Exp $ */ /* $NetBSD: rtsock.c,v 1.18 1996/03/29 00:32:10 cgd Exp $ */ /* @@ -77,7 +77,7 @@ #include <net/route.h> #include <net/raw_cb.h> -#include <machine/stdarg.h> +#include <sys/stdarg.h> struct sockaddr route_dst = { 2, PF_ROUTE, }; struct sockaddr route_src = { 2, PF_ROUTE, }; diff --git a/sys/netccitt/hd_output.c b/sys/netccitt/hd_output.c index 88a5d39db5d..0840df685af 100644 --- a/sys/netccitt/hd_output.c +++ b/sys/netccitt/hd_output.c @@ -1,4 +1,4 @@ -/* $OpenBSD: hd_output.c,v 1.6 2003/12/10 07:22:42 itojun Exp $ */ +/* $OpenBSD: hd_output.c,v 1.7 2004/01/03 14:08:53 espie Exp $ */ /* $NetBSD: hd_output.c,v 1.7 1996/05/07 02:36:06 thorpej Exp $ */ /* @@ -55,7 +55,7 @@ #include <netccitt/x25.h> #include <netccitt/pk_extern.h> -#include <machine/stdarg.h> +#include <sys/stdarg.h> /* * HDLC OUTPUT INTERFACE diff --git a/sys/netccitt/llc_input.c b/sys/netccitt/llc_input.c index 9bdbca075c2..c57cc3c4fd1 100644 --- a/sys/netccitt/llc_input.c +++ b/sys/netccitt/llc_input.c @@ -1,4 +1,4 @@ -/* $OpenBSD: llc_input.c,v 1.5 2003/12/10 07:22:42 itojun Exp $ */ +/* $OpenBSD: llc_input.c,v 1.6 2004/01/03 14:08:53 espie Exp $ */ /* $NetBSD: llc_input.c,v 1.3 1996/02/13 22:04:44 christos Exp $ */ /* @@ -56,7 +56,7 @@ #include <netccitt/dll.h> #include <netccitt/llc_var.h> -#include <machine/stdarg.h> +#include <sys/stdarg.h> /* * This module implements LLC as specified by ISO 8802-2. diff --git a/sys/netccitt/llc_output.c b/sys/netccitt/llc_output.c index 4520c6b1527..635fe9ad001 100644 --- a/sys/netccitt/llc_output.c +++ b/sys/netccitt/llc_output.c @@ -1,4 +1,4 @@ -/* $OpenBSD: llc_output.c,v 1.6 2003/12/10 07:22:42 itojun Exp $ */ +/* $OpenBSD: llc_output.c,v 1.7 2004/01/03 14:08:53 espie Exp $ */ /* $NetBSD: llc_output.c,v 1.3 1996/02/13 22:04:47 christos Exp $ */ /* @@ -56,7 +56,7 @@ #include <netccitt/dll.h> #include <netccitt/llc_var.h> -#include <machine/stdarg.h> +#include <sys/stdarg.h> /* * llc_output() --- called by an upper layer (network layer) entity whenever diff --git a/sys/netccitt/pk_input.c b/sys/netccitt/pk_input.c index 2939d137b0f..0b353fe74d2 100644 --- a/sys/netccitt/pk_input.c +++ b/sys/netccitt/pk_input.c @@ -1,4 +1,4 @@ -/* $OpenBSD: pk_input.c,v 1.7 2003/12/10 07:22:42 itojun Exp $ */ +/* $OpenBSD: pk_input.c,v 1.8 2004/01/03 14:08:53 espie Exp $ */ /* $NetBSD: pk_input.c,v 1.7 1996/02/13 22:05:21 christos Exp $ */ /* @@ -65,7 +65,7 @@ #include <netccitt/hd_var.h> #endif -#include <machine/stdarg.h> +#include <sys/stdarg.h> struct pkcb_q pkcb_q = {&pkcb_q, &pkcb_q}; diff --git a/sys/netccitt/pk_subr.c b/sys/netccitt/pk_subr.c index 8634e5ce165..b4ee3efa907 100644 --- a/sys/netccitt/pk_subr.c +++ b/sys/netccitt/pk_subr.c @@ -1,4 +1,4 @@ -/* $OpenBSD: pk_subr.c,v 1.10 2003/12/21 15:30:21 miod Exp $ */ +/* $OpenBSD: pk_subr.c,v 1.11 2004/01/03 14:08:53 espie Exp $ */ /* $NetBSD: pk_subr.c,v 1.12 1996/03/30 21:54:33 christos Exp $ */ /* @@ -60,7 +60,7 @@ #include <netccitt/pk_var.h> #include <netccitt/pk_extern.h> -#include <machine/stdarg.h> +#include <sys/stdarg.h> int pk_sendspace = 1024 * 2 + 8; int pk_recvspace = 1024 * 2 + 8; diff --git a/sys/netinet/igmp.c b/sys/netinet/igmp.c index 977cbd381cc..8a0d237a4b9 100644 --- a/sys/netinet/igmp.c +++ b/sys/netinet/igmp.c @@ -1,4 +1,4 @@ -/* $OpenBSD: igmp.c,v 1.19 2003/12/10 07:22:43 itojun Exp $ */ +/* $OpenBSD: igmp.c,v 1.20 2004/01/03 14:08:53 espie Exp $ */ /* $NetBSD: igmp.c,v 1.15 1996/02/13 23:41:25 christos Exp $ */ /* @@ -28,7 +28,7 @@ #include <netinet/igmp_var.h> #include <dev/rndvar.h> -#include <machine/stdarg.h> +#include <sys/stdarg.h> #define IP_MULTICASTOPTS 0 diff --git a/sys/netinet/ip_mroute.c b/sys/netinet/ip_mroute.c index 7487aa0377a..1dc9123d359 100644 --- a/sys/netinet/ip_mroute.c +++ b/sys/netinet/ip_mroute.c @@ -1,4 +1,4 @@ -/* $OpenBSD: ip_mroute.c,v 1.34 2003/12/10 07:22:43 itojun Exp $ */ +/* $OpenBSD: ip_mroute.c,v 1.35 2004/01/03 14:08:53 espie Exp $ */ /* $NetBSD: ip_mroute.c,v 1.27 1996/05/07 02:40:50 thorpej Exp $ */ /* @@ -78,7 +78,7 @@ #include <netinet/igmp_var.h> #include <netinet/ip_mroute.h> -#include <machine/stdarg.h> +#include <sys/stdarg.h> #define IP_MULTICASTOPTS 0 #define M_PULLUP(m, len) \ diff --git a/sys/netinet6/raw_ip6.c b/sys/netinet6/raw_ip6.c index 1c25d12dccb..d6c5c1e100a 100644 --- a/sys/netinet6/raw_ip6.c +++ b/sys/netinet6/raw_ip6.c @@ -1,4 +1,4 @@ -/* $OpenBSD: raw_ip6.c,v 1.22 2003/12/21 14:57:19 markus Exp $ */ +/* $OpenBSD: raw_ip6.c,v 1.23 2004/01/03 14:08:54 espie Exp $ */ /* $KAME: raw_ip6.c,v 1.69 2001/03/04 15:55:44 itojun Exp $ */ /* @@ -90,7 +90,7 @@ #endif #include <netinet6/raw_ip6.h> -#include <machine/stdarg.h> +#include <sys/stdarg.h> #include "faith.h" diff --git a/sys/netipx/ipx_ip.c b/sys/netipx/ipx_ip.c index 4b93b77df68..249e23e699b 100644 --- a/sys/netipx/ipx_ip.c +++ b/sys/netipx/ipx_ip.c @@ -1,4 +1,4 @@ -/* $OpenBSD: ipx_ip.c,v 1.17 2003/12/10 07:22:43 itojun Exp $ */ +/* $OpenBSD: ipx_ip.c,v 1.18 2004/01/03 14:08:54 espie Exp $ */ /*- * @@ -71,7 +71,7 @@ #include <netipx/ipx_if.h> #include <netipx/ipx_ip.h> -#include <machine/stdarg.h> +#include <sys/stdarg.h> struct ifnet ipxipif; struct ifnet_en *ipxip_list; /* list of all hosts and gateways or broadcast addrs */ diff --git a/sys/netipx/ipx_usrreq.c b/sys/netipx/ipx_usrreq.c index f1a67bd7fb2..8e0db39f5af 100644 --- a/sys/netipx/ipx_usrreq.c +++ b/sys/netipx/ipx_usrreq.c @@ -1,4 +1,4 @@ -/* $OpenBSD: ipx_usrreq.c,v 1.13 2003/12/10 07:22:43 itojun Exp $ */ +/* $OpenBSD: ipx_usrreq.c,v 1.14 2004/01/03 14:08:54 espie Exp $ */ /*- * @@ -62,7 +62,7 @@ #include <netipx/ipx_var.h> #include <netipx/ipx_ip.h> -#include <machine/stdarg.h> +#include <sys/stdarg.h> /* * IPX protocol implementation. diff --git a/sys/netipx/spx_usrreq.c b/sys/netipx/spx_usrreq.c index b50f687dcf2..aaaa10f5bc1 100644 --- a/sys/netipx/spx_usrreq.c +++ b/sys/netipx/spx_usrreq.c @@ -1,4 +1,4 @@ -/* $OpenBSD: spx_usrreq.c,v 1.22 2003/12/10 07:22:43 itojun Exp $ */ +/* $OpenBSD: spx_usrreq.c,v 1.23 2004/01/03 14:08:54 espie Exp $ */ /*- * @@ -55,7 +55,7 @@ #include <netipx/spx_var.h> #include <netipx/spx_debug.h> -#include <machine/stdarg.h> +#include <sys/stdarg.h> /* * SPX protocol implementation. diff --git a/sys/netiso/clnp_input.c b/sys/netiso/clnp_input.c index 83e8fc32c15..c77d9c6947d 100644 --- a/sys/netiso/clnp_input.c +++ b/sys/netiso/clnp_input.c @@ -1,4 +1,4 @@ -/* $OpenBSD: clnp_input.c,v 1.7 2003/12/10 07:22:43 itojun Exp $ */ +/* $OpenBSD: clnp_input.c,v 1.8 2004/01/03 14:08:54 espie Exp $ */ /* $NetBSD: clnp_input.c,v 1.12 1996/04/13 01:34:26 cgd Exp $ */ /*- @@ -86,7 +86,7 @@ SOFTWARE. #include <netiso/clnp_stat.h> #include <netiso/argo_debug.h> -#include <machine/stdarg.h> +#include <sys/stdarg.h> #ifdef ISO u_char clnp_protox[ISOPROTO_MAX]; diff --git a/sys/netiso/clnp_output.c b/sys/netiso/clnp_output.c index 890c7b5de89..3a25b6a08b2 100644 --- a/sys/netiso/clnp_output.c +++ b/sys/netiso/clnp_output.c @@ -1,4 +1,4 @@ -/* $OpenBSD: clnp_output.c,v 1.6 2003/12/10 07:22:43 itojun Exp $ */ +/* $OpenBSD: clnp_output.c,v 1.7 2004/01/03 14:08:54 espie Exp $ */ /* $NetBSD: clnp_output.c,v 1.9 1996/04/13 01:34:32 cgd Exp $ */ /*- @@ -79,7 +79,7 @@ SOFTWARE. #include <netiso/clnp_stat.h> #include <netiso/argo_debug.h> -#include <machine/stdarg.h> +#include <sys/stdarg.h> static struct clnp_fixed dt_template = { ISO8473_CLNP, /* network identifier */ diff --git a/sys/netiso/clnp_raw.c b/sys/netiso/clnp_raw.c index 2bd0c5abcfb..77e5a4c6dd4 100644 --- a/sys/netiso/clnp_raw.c +++ b/sys/netiso/clnp_raw.c @@ -1,4 +1,4 @@ -/* $OpenBSD: clnp_raw.c,v 1.6 2003/12/10 07:22:43 itojun Exp $ */ +/* $OpenBSD: clnp_raw.c,v 1.7 2004/01/03 14:08:54 espie Exp $ */ /* $NetBSD: clnp_raw.c,v 1.9 1996/02/13 22:08:42 christos Exp $ */ /*- @@ -81,7 +81,7 @@ SOFTWARE. #include <netiso/tp_user.h> /* XXX -- defines SOL_NETWORK */ -#include <machine/stdarg.h> +#include <sys/stdarg.h> struct sockproto rclnp_proto = {PF_ISO, 0}; /* diff --git a/sys/netiso/cltp_usrreq.c b/sys/netiso/cltp_usrreq.c index a6aa9606e75..0115b3ca50f 100644 --- a/sys/netiso/cltp_usrreq.c +++ b/sys/netiso/cltp_usrreq.c @@ -1,4 +1,4 @@ -/* $OpenBSD: cltp_usrreq.c,v 1.6 2003/12/10 07:22:43 itojun Exp $ */ +/* $OpenBSD: cltp_usrreq.c,v 1.7 2004/01/03 14:08:54 espie Exp $ */ /* $NetBSD: cltp_usrreq.c,v 1.9 1996/02/13 22:08:59 christos Exp $ */ /* @@ -55,7 +55,7 @@ #include <netiso/tp_param.h> #include <netiso/tp_var.h> -#include <machine/stdarg.h> +#include <sys/stdarg.h> #endif diff --git a/sys/netiso/esis.c b/sys/netiso/esis.c index 0b2d4fe9e9d..b8537438b5d 100644 --- a/sys/netiso/esis.c +++ b/sys/netiso/esis.c @@ -1,4 +1,4 @@ -/* $OpenBSD: esis.c,v 1.9 2003/12/10 07:22:43 itojun Exp $ */ +/* $OpenBSD: esis.c,v 1.10 2004/01/03 14:08:54 espie Exp $ */ /* $NetBSD: esis.c,v 1.14 1996/05/07 02:45:04 thorpej Exp $ */ /*- @@ -87,7 +87,7 @@ SOFTWARE. #include <netiso/esis.h> #include <netiso/argo_debug.h> -#include <machine/stdarg.h> +#include <sys/stdarg.h> /* * Global variables to esis implementation * diff --git a/sys/netiso/idrp_usrreq.c b/sys/netiso/idrp_usrreq.c index d91fe88e3a7..027195535d9 100644 --- a/sys/netiso/idrp_usrreq.c +++ b/sys/netiso/idrp_usrreq.c @@ -1,4 +1,4 @@ -/* $OpenBSD: idrp_usrreq.c,v 1.5 2003/12/10 07:22:43 itojun Exp $ */ +/* $OpenBSD: idrp_usrreq.c,v 1.6 2004/01/03 14:08:54 espie Exp $ */ /* $NetBSD: idrp_usrreq.c,v 1.5 1996/02/13 22:09:33 christos Exp $ */ /* @@ -53,7 +53,7 @@ #include <netiso/iso_var.h> #include <netiso/idrp_var.h> -#include <machine/stdarg.h> +#include <sys/stdarg.h> struct isopcb idrp_isop; static struct sockaddr_iso idrp_addrs[2] = diff --git a/sys/netiso/if_eon.c b/sys/netiso/if_eon.c index ff83666fd1d..eeb0fd4636a 100644 --- a/sys/netiso/if_eon.c +++ b/sys/netiso/if_eon.c @@ -1,4 +1,4 @@ -/* $OpenBSD: if_eon.c,v 1.22 2003/12/10 07:22:44 itojun Exp $ */ +/* $OpenBSD: if_eon.c,v 1.23 2004/01/03 14:08:54 espie Exp $ */ /* $NetBSD: if_eon.c,v 1.15 1996/05/09 22:29:37 scottr Exp $ */ /*- @@ -103,7 +103,7 @@ SOFTWARE. #include <netiso/iso_errno.h> #include <netiso/eonvar.h> -#include <machine/stdarg.h> +#include <sys/stdarg.h> extern struct timeval time; diff --git a/sys/netiso/tp_cons.c b/sys/netiso/tp_cons.c index b323eb219f4..a072bb74b56 100644 --- a/sys/netiso/tp_cons.c +++ b/sys/netiso/tp_cons.c @@ -1,4 +1,4 @@ -/* $OpenBSD: tp_cons.c,v 1.10 2003/12/10 07:22:44 itojun Exp $ */ +/* $OpenBSD: tp_cons.c,v 1.11 2004/01/03 14:08:54 espie Exp $ */ /* $NetBSD: tp_cons.c,v 1.8 1996/02/14 21:32:37 christos Exp $ */ /*- @@ -105,7 +105,7 @@ SOFTWARE. #include <netccitt/pk_var.h> #include <netccitt/pk_extern.h> -#include <machine/stdarg.h> +#include <sys/stdarg.h> #include <netiso/if_cons.c> diff --git a/sys/netiso/tp_inet.c b/sys/netiso/tp_inet.c index 7d8351188ad..7d286a9d337 100644 --- a/sys/netiso/tp_inet.c +++ b/sys/netiso/tp_inet.c @@ -1,4 +1,4 @@ -/* $OpenBSD: tp_inet.c,v 1.13 2003/12/10 07:22:44 itojun Exp $ */ +/* $OpenBSD: tp_inet.c,v 1.14 2004/01/03 14:08:54 espie Exp $ */ /* $NetBSD: tp_inet.c,v 1.11 1996/03/16 23:13:49 christos Exp $ */ /*- @@ -100,7 +100,7 @@ SOFTWARE. #include <netiso/iso_chksum.c> #endif -#include <machine/stdarg.h> +#include <sys/stdarg.h> /* * NAME: in_getsufx() diff --git a/sys/netiso/tp_input.c b/sys/netiso/tp_input.c index ecc198b9a34..de376b60604 100644 --- a/sys/netiso/tp_input.c +++ b/sys/netiso/tp_input.c @@ -1,4 +1,4 @@ -/* $OpenBSD: tp_input.c,v 1.7 2003/12/10 07:22:44 itojun Exp $ */ +/* $OpenBSD: tp_input.c,v 1.8 2004/01/03 14:08:54 espie Exp $ */ /* $NetBSD: tp_input.c,v 1.9 1996/03/16 23:13:51 christos Exp $ */ /*- @@ -113,7 +113,7 @@ SOFTWARE. #include <netccitt/pk.h> #include <netccitt/pk_var.h> -#include <machine/stdarg.h> +#include <sys/stdarg.h> static struct socket *tp_newsocket(struct socket *, struct sockaddr *, caddr_t, u_int, u_int); diff --git a/sys/netiso/tp_iso.c b/sys/netiso/tp_iso.c index 0c0d7811e8b..8134e725e30 100644 --- a/sys/netiso/tp_iso.c +++ b/sys/netiso/tp_iso.c @@ -1,4 +1,4 @@ -/* $OpenBSD: tp_iso.c,v 1.8 2003/12/10 07:22:44 itojun Exp $ */ +/* $OpenBSD: tp_iso.c,v 1.9 2004/01/03 14:08:54 espie Exp $ */ /* $NetBSD: tp_iso.c,v 1.8 1996/03/16 23:13:54 christos Exp $ */ /*- @@ -108,7 +108,7 @@ SOFTWARE. #include <netiso/tuba_table.h> #endif -#include <machine/stdarg.h> +#include <sys/stdarg.h> /* * CALLED FROM: diff --git a/sys/netiso/tuba_subr.c b/sys/netiso/tuba_subr.c index 6749d59d8cb..fd67c5902fe 100644 --- a/sys/netiso/tuba_subr.c +++ b/sys/netiso/tuba_subr.c @@ -1,4 +1,4 @@ -/* $OpenBSD: tuba_subr.c,v 1.13 2003/12/10 07:22:44 itojun Exp $ */ +/* $OpenBSD: tuba_subr.c,v 1.14 2004/01/03 14:08:54 espie Exp $ */ /* $NetBSD: tuba_subr.c,v 1.7 1996/02/13 22:12:32 christos Exp $ */ /* @@ -67,7 +67,7 @@ #include <netiso/tuba_table.h> #include <dev/rndvar.h> -#include <machine/stdarg.h> +#include <sys/stdarg.h> static struct sockaddr_iso null_siso = {sizeof(null_siso), AF_ISO,}; extern int tuba_table_size, tcp_keepidle, tcp_keepintvl, tcp_maxidle; diff --git a/sys/netns/idp_usrreq.c b/sys/netns/idp_usrreq.c index 5cf3fd37af1..a6aea8af4b4 100644 --- a/sys/netns/idp_usrreq.c +++ b/sys/netns/idp_usrreq.c @@ -1,4 +1,4 @@ -/* $OpenBSD: idp_usrreq.c,v 1.7 2003/12/10 07:22:44 itojun Exp $ */ +/* $OpenBSD: idp_usrreq.c,v 1.8 2004/01/03 14:08:54 espie Exp $ */ /* $NetBSD: idp_usrreq.c,v 1.9 1996/02/13 22:13:43 christos Exp $ */ /* @@ -53,7 +53,7 @@ #include <netns/idp_var.h> #include <netns/ns_error.h> -#include <machine/stdarg.h> +#include <sys/stdarg.h> /* * IDP protocol implementation. diff --git a/sys/netns/ns_ip.c b/sys/netns/ns_ip.c index 2b785531c57..54cfa83aaeb 100644 --- a/sys/netns/ns_ip.c +++ b/sys/netns/ns_ip.c @@ -1,4 +1,4 @@ -/* $OpenBSD: ns_ip.c,v 1.19 2003/12/10 07:22:44 itojun Exp $ */ +/* $OpenBSD: ns_ip.c,v 1.20 2004/01/03 14:08:54 espie Exp $ */ /* $NetBSD: ns_ip.c,v 1.16 1996/05/09 22:29:40 scottr Exp $ */ /* @@ -64,7 +64,7 @@ #include <netns/ns_var.h> #include <netns/idp.h> -#include <machine/stdarg.h> +#include <sys/stdarg.h> struct ifnet_en { struct ifnet ifen_ifnet; diff --git a/sys/netns/ns_output.c b/sys/netns/ns_output.c index bb2103b6eba..f68b04aae1a 100644 --- a/sys/netns/ns_output.c +++ b/sys/netns/ns_output.c @@ -1,4 +1,4 @@ -/* $OpenBSD: ns_output.c,v 1.5 2003/12/10 07:22:44 itojun Exp $ */ +/* $OpenBSD: ns_output.c,v 1.6 2004/01/03 14:08:54 espie Exp $ */ /* $NetBSD: ns_output.c,v 1.8 1996/02/13 22:14:01 christos Exp $ */ /* @@ -49,7 +49,7 @@ #include <netns/idp.h> #include <netns/idp_var.h> -#include <machine/stdarg.h> +#include <sys/stdarg.h> int ns_hold_output = 0; int ns_copy_output = 0; diff --git a/sys/netns/spp_usrreq.c b/sys/netns/spp_usrreq.c index 0e5b6323796..2a112ee73c5 100644 --- a/sys/netns/spp_usrreq.c +++ b/sys/netns/spp_usrreq.c @@ -1,4 +1,4 @@ -/* $OpenBSD: spp_usrreq.c,v 1.17 2003/12/10 07:22:44 itojun Exp $ */ +/* $OpenBSD: spp_usrreq.c,v 1.18 2004/01/03 14:08:54 espie Exp $ */ /* $NetBSD: spp_usrreq.c,v 1.9 1996/02/13 22:14:13 christos Exp $ */ /* @@ -57,7 +57,7 @@ #include <netns/spp_var.h> #include <netns/spp_debug.h> -#include <machine/stdarg.h> +#include <sys/stdarg.h> /* * SP protocol implementation. diff --git a/sys/scsi/ses.c b/sys/scsi/ses.c index c60167450e2..49423c8681f 100644 --- a/sys/scsi/ses.c +++ b/sys/scsi/ses.c @@ -1,4 +1,4 @@ -/* $OpenBSD: ses.c,v 1.5 2003/08/06 21:08:07 millert Exp $ */ +/* $OpenBSD: ses.c,v 1.6 2004/01/03 14:08:54 espie Exp $ */ /* $NetBSD: ses.c,v 1.3 2000/01/21 21:19:57 mjacob Exp $ */ /* * Copyright (C) 2000 National Aeronautics & Space Administration @@ -49,7 +49,7 @@ #include <sys/proc.h> #include <sys/conf.h> #include <sys/vnode.h> -#include <machine/stdarg.h> +#include <sys/stdarg.h> #ifdef __NetBSD__ #include <dev/scsipi/scsipi_all.h> diff --git a/sys/sys/stdarg.h b/sys/sys/stdarg.h new file mode 100644 index 00000000000..6463fad346f --- /dev/null +++ b/sys/sys/stdarg.h @@ -0,0 +1,55 @@ +/* $OpenBSD: stdarg.h,v 1.1 2004/01/03 14:08:54 espie Exp $ */ +/* + * Copyright (c) 2003 Marc Espie. + * + * Redistribution and use in source and binary forms, with or without + * modification, are permitted provided that the following conditions + * are met: + * 1. Redistributions of source code must retain the above copyright + * notice, this list of conditions and the following disclaimer. + * 2. Redistributions in binary form must reproduce the above copyright + * notice, this list of conditions and the following disclaimer in the + * documentation and/or other materials provided with the distribution. + * + * THIS SOFTWARE IS PROVIDED BY THE OPENBSD PROJECT AND CONTRIBUTORS + * ``AS IS'' AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT + * LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR + * A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE OPENBSD + * PROJECT OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, + * SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT + * LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, + * DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY + * THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT + * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE + * OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. + */ +#ifndef _STDARG_H_ +#define _STDARG_H_ + +#if defined(__GNUC__) && __GNUC__ >= 3 +#include <machine/ansi.h> + +/* Define __gnuc_va_list. */ + +#ifndef __GNUC_VA_LIST +#define __GNUC_VA_LIST +typedef __builtin_va_list __gnuc_va_list; +#endif + +/* Note that the type used in va_arg is supposed to match the + actual type **after default promotions**. + Thus, va_arg (..., short) is not valid. */ + +#define va_start(v,l) __builtin_stdarg_start((v),l) +#define va_end __builtin_va_end +#define va_arg __builtin_va_arg +#define va_copy(d,s) __builtin_va_copy((d),(s)) + + +typedef __gnuc_va_list va_list; + +#else +#include <machine/stdarg.h> +#endif + +#endif /* not _STDARG_H_ */ diff --git a/sys/sys/systm.h b/sys/sys/systm.h index d42328131be..32dac8f1eab 100644 --- a/sys/sys/systm.h +++ b/sys/sys/systm.h @@ -1,4 +1,4 @@ -/* $OpenBSD: systm.h,v 1.58 2003/08/24 01:27:07 avsm Exp $ */ +/* $OpenBSD: systm.h,v 1.59 2004/01/03 14:08:54 espie Exp $ */ /* $NetBSD: systm.h,v 1.50 1996/06/09 04:55:09 briggs Exp $ */ /*- @@ -41,7 +41,7 @@ #define __SYSTM_H__ #include <sys/queue.h> -#include <machine/stdarg.h> +#include <sys/stdarg.h> /* * The `securelevel' variable controls the security level of the system. diff --git a/sys/sys/varargs.h b/sys/sys/varargs.h new file mode 100644 index 00000000000..61bed16367e --- /dev/null +++ b/sys/sys/varargs.h @@ -0,0 +1,64 @@ +/* $OpenBSD: varargs.h,v 1.1 2004/01/03 14:08:54 espie Exp $ */ +/* + * Copyright (c) 2003 Marc Espie. + * + * Redistribution and use in source and binary forms, with or without + * modification, are permitted provided that the following conditions + * are met: + * 1. Redistributions of source code must retain the above copyright + * notice, this list of conditions and the following disclaimer. + * 2. Redistributions in binary form must reproduce the above copyright + * notice, this list of conditions and the following disclaimer in the + * documentation and/or other materials provided with the distribution. + * + * THIS SOFTWARE IS PROVIDED BY THE OPENBSD PROJECT AND CONTRIBUTORS + * ``AS IS'' AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT + * LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR + * A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE OPENBSD + * PROJECT OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, + * SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT + * LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, + * DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY + * THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT + * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE + * OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. + */ +#ifndef _VARARGS_H_ +#define _VARARGS_H_ + +#if defined(__GNUC__) && __GNUC__ >= 3 +/* These macros implement traditional (non-ANSI) varargs + for GNU C. */ + +#define va_alist __builtin_va_alist + +#define __va_ellipsis ... + +/* ??? We don't process attributes correctly in K&R argument context. */ +typedef int __builtin_va_alist_t __attribute__((__mode__(__word__))); + +/* ??? It would be nice to get rid of the ellipsis here. It causes + current_function_varargs to be set in cc1. */ +#define va_dcl __builtin_va_alist_t __builtin_va_alist; ... + +/* Define __gnuc_va_list, just as in stdarg.h. */ + +#ifndef __GNUC_VA_LIST +#define __GNUC_VA_LIST +typedef __builtin_va_list __gnuc_va_list; +#endif + +#define va_start(v) __builtin_varargs_start((v)) +#define va_end __builtin_va_end +#define va_arg __builtin_va_arg +#define __va_copy(d,s) __builtin_va_copy((d),(s)) + +/* Define va_list from __gnuc_va_list. */ + +typedef __gnuc_va_list va_list; + +#else +#include <machine/varargs.h> +#endif + +#endif /* _VARARGS_H_ */ |