diff options
author | Mark Kettenis <kettenis@cvs.openbsd.org> | 2008-10-23 21:25:09 +0000 |
---|---|---|
committer | Mark Kettenis <kettenis@cvs.openbsd.org> | 2008-10-23 21:25:09 +0000 |
commit | 7491e407e812bfeeca3f37e3defa99a2da9f149f (patch) | |
tree | 6134cb09e98b5d8f002421216f34fe5dc2ca7b35 /sys | |
parent | 364005f7c07e04f6ee295584d5b7fa22a6e8b1c2 (diff) |
Move the va_copy define to <sys/stdrag.h> making sure it is uniformaly
protected by __ISO_C_VISIBLE > 1999. With a little help from miod@.
ok miod@
Diffstat (limited to 'sys')
-rw-r--r-- | sys/arch/alpha/include/stdarg.h | 7 | ||||
-rw-r--r-- | sys/arch/amd64/include/stdarg.h | 7 | ||||
-rw-r--r-- | sys/arch/arm/include/stdarg.h | 6 | ||||
-rw-r--r-- | sys/arch/hppa/include/stdarg.h | 7 | ||||
-rw-r--r-- | sys/arch/hppa64/include/stdarg.h | 7 | ||||
-rw-r--r-- | sys/arch/i386/include/stdarg.h | 7 | ||||
-rw-r--r-- | sys/arch/m68k/include/stdarg.h | 4 | ||||
-rw-r--r-- | sys/arch/m88k/include/va-m88k.h | 6 | ||||
-rw-r--r-- | sys/arch/mips64/include/stdarg.h | 5 | ||||
-rw-r--r-- | sys/arch/powerpc/include/va-ppc.h | 6 | ||||
-rw-r--r-- | sys/arch/sh/include/stdarg.h | 6 | ||||
-rw-r--r-- | sys/arch/sparc/include/stdarg.h | 4 | ||||
-rw-r--r-- | sys/arch/sparc64/include/stdarg.h | 7 | ||||
-rw-r--r-- | sys/arch/vax/include/stdarg.h | 4 | ||||
-rw-r--r-- | sys/sys/stdarg.h | 18 |
15 files changed, 28 insertions, 73 deletions
diff --git a/sys/arch/alpha/include/stdarg.h b/sys/arch/alpha/include/stdarg.h index d0af6ac6952..167d5cd44b8 100644 --- a/sys/arch/alpha/include/stdarg.h +++ b/sys/arch/alpha/include/stdarg.h @@ -1,4 +1,4 @@ -/* $OpenBSD: stdarg.h,v 1.10 2006/04/09 03:07:52 deraadt Exp $ */ +/* $OpenBSD: stdarg.h,v 1.11 2008/10/23 21:25:07 kettenis Exp $ */ /* $NetBSD: stdarg.h,v 1.4 1996/10/09 21:13:05 cgd Exp $ */ /*- @@ -59,11 +59,6 @@ typedef __va_list va_list; (*(type *)((ap).offset += __va_size(type), \ (ap).base + (ap).offset + __va_arg_offset(ap, type))) -#if __ISO_C_VISIBLE >= 1999 -#define va_copy(dest, src) \ - ((dest) = (src)) -#endif - #define va_end(ap) #endif /* !_ALPHA_STDARG_H_ */ diff --git a/sys/arch/amd64/include/stdarg.h b/sys/arch/amd64/include/stdarg.h index a95768f3134..c6826fae588 100644 --- a/sys/arch/amd64/include/stdarg.h +++ b/sys/arch/amd64/include/stdarg.h @@ -1,4 +1,4 @@ -/* $OpenBSD: stdarg.h,v 1.5 2006/04/09 03:07:52 deraadt Exp $ */ +/* $OpenBSD: stdarg.h,v 1.6 2008/10/23 21:25:07 kettenis Exp $ */ /* $NetBSD: stdarg.h,v 1.2 2003/04/28 23:16:17 bjh21 Exp $ */ /*- @@ -57,11 +57,6 @@ typedef __va_list va_list; #define va_arg(ap, type) \ (*(type *)((ap) += __va_size(type), (ap) - __va_size(type))) -#if __ISO_C_VISIBLE >= 1999 -#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 ce8a4b7505d..32312c7ddb7 100644 --- a/sys/arch/arm/include/stdarg.h +++ b/sys/arch/arm/include/stdarg.h @@ -1,4 +1,4 @@ -/* $OpenBSD: stdarg.h,v 1.6 2006/04/09 03:07:52 deraadt Exp $ */ +/* $OpenBSD: stdarg.h,v 1.7 2008/10/23 21:25:07 kettenis Exp $ */ /* $NetBSD: stdarg.h,v 1.7 2003/08/07 16:26:53 agc Exp $ */ /* @@ -53,8 +53,4 @@ typedef __va_list va_list; #define va_end __builtin_va_end #define __va_copy(dest, src) __builtin_va_copy((dest), (src)) -#if __ISO_C_VISIBLE >= 1999 -#define va_copy(dest, src) __va_copy((dest), (src)) -#endif - #endif /* !_ARM32_STDARG_H_ */ diff --git a/sys/arch/hppa/include/stdarg.h b/sys/arch/hppa/include/stdarg.h index 84ee35f8f18..1fe03b6d9e6 100644 --- a/sys/arch/hppa/include/stdarg.h +++ b/sys/arch/hppa/include/stdarg.h @@ -1,4 +1,4 @@ -/* $OpenBSD: stdarg.h,v 1.8 2006/04/09 03:07:52 deraadt Exp $ */ +/* $OpenBSD: stdarg.h,v 1.9 2008/10/23 21:25:07 kettenis Exp $ */ /*- * Copyright (c) 1991, 1993 @@ -53,11 +53,6 @@ typedef __va_list va_list; (sizeof(type) > 4 ? ~0x7 : ~0x3))),\ (*((type *) (void *) ((char *)ap + ((8 - sizeof(type)) % 4)))))) -#if __ISO_C_VISIBLE >= 1999 -#define va_copy(dest, src) \ - ((dest) = (src)) -#endif - #define va_end(ap) #endif /* !_MACHINE_STDARG_H */ diff --git a/sys/arch/hppa64/include/stdarg.h b/sys/arch/hppa64/include/stdarg.h index 6d49717d9fb..34c0a91b7ce 100644 --- a/sys/arch/hppa64/include/stdarg.h +++ b/sys/arch/hppa64/include/stdarg.h @@ -1,4 +1,4 @@ -/* $OpenBSD: stdarg.h,v 1.5 2006/04/09 03:07:52 deraadt Exp $ */ +/* $OpenBSD: stdarg.h,v 1.6 2008/10/23 21:25:07 kettenis Exp $ */ /*- * Copyright (c) 1991, 1993 @@ -53,11 +53,6 @@ typedef __va_list va_list; (sizeof(type) > 4 ? ~0x7 : ~0x3))),\ (*((type *) (void *) ((char *)ap + ((8 - sizeof(type)) % 4)))))) -#if __ISO_C_VISIBLE >= 1999 -#define va_copy(dest, src) \ - ((dest) = (src)) -#endif - #define va_end(ap) #endif /* !_MACHINE_STDARG_H */ diff --git a/sys/arch/i386/include/stdarg.h b/sys/arch/i386/include/stdarg.h index 977861d646b..bad72654e06 100644 --- a/sys/arch/i386/include/stdarg.h +++ b/sys/arch/i386/include/stdarg.h @@ -1,4 +1,4 @@ -/* $OpenBSD: stdarg.h,v 1.12 2007/09/29 18:42:03 otto Exp $ */ +/* $OpenBSD: stdarg.h,v 1.13 2008/10/23 21:25:07 kettenis Exp $ */ /* $NetBSD: stdarg.h,v 1.12 1995/12/25 23:15:31 mycroft Exp $ */ /*- @@ -53,11 +53,6 @@ typedef __va_list va_list; #define va_arg(ap, type) \ (*(type *)((ap) += __va_size(type), (ap) - __va_size(type))) -#if __ISO_C_VISIBLE >= 1999 -#define va_copy(dest, src) \ - ((dest) = (src)) -#endif - #define va_end(ap) #endif /* !_I386_STDARG_H_ */ diff --git a/sys/arch/m68k/include/stdarg.h b/sys/arch/m68k/include/stdarg.h index d1b832d93e8..bde1c366e3c 100644 --- a/sys/arch/m68k/include/stdarg.h +++ b/sys/arch/m68k/include/stdarg.h @@ -1,4 +1,4 @@ -/* $OpenBSD: stdarg.h,v 1.10 2006/04/09 03:07:52 deraadt Exp $ */ +/* $OpenBSD: stdarg.h,v 1.11 2008/10/23 21:25:07 kettenis Exp $ */ /* $NetBSD: stdarg.h,v 1.14 1995/12/25 23:15:33 mycroft Exp $ */ /*- @@ -57,7 +57,7 @@ typedef __va_list va_list; sizeof(type) : __va_size(type)))) #if __ISO_C_VISIBLE >= 1999 -#define va_copy(dest, src) \ +#define __va_copy(dest, src) \ ((dest) = (src)) #endif diff --git a/sys/arch/m88k/include/va-m88k.h b/sys/arch/m88k/include/va-m88k.h index ffe4c857416..6fd984c913e 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.9 2006/04/09 03:07:53 deraadt Exp $ */ +/* $OpenBSD: va-m88k.h,v 1.10 2008/10/23 21:25:07 kettenis Exp $ */ /* Define __gnuc_va_list. */ @@ -95,8 +95,4 @@ __extension__ ({ \ *(dest) = *(src);\ }) -#if __ISO_C_VISIBLE >= 1999 -#define va_copy(dest, src) __va_copy(dest, src) -#endif - #endif /* defined (_STDARG_H) || defined (_VARARGS_H) */ diff --git a/sys/arch/mips64/include/stdarg.h b/sys/arch/mips64/include/stdarg.h index 769a7f9dc7b..5e8769beca7 100644 --- a/sys/arch/mips64/include/stdarg.h +++ b/sys/arch/mips64/include/stdarg.h @@ -1,4 +1,4 @@ -/* $OpenBSD: stdarg.h,v 1.6 2006/05/14 21:11:07 robert Exp $ */ +/* $OpenBSD: stdarg.h,v 1.7 2008/10/23 21:25:07 kettenis Exp $ */ /*- * Copyright (c) 1992, 1993 @@ -243,8 +243,5 @@ void va_end (__gnuc_va_list); /* Defined in libgcc.a */ /* Copy __gnuc_va_list into another variable of this type. */ #define __va_copy(dest, src) (dest) = (src) -#if __ISO_C_VISIBLE >= 1999 -#define va_copy __va_copy -#endif #endif /* !_MIPS_STDARG_H_ */ diff --git a/sys/arch/powerpc/include/va-ppc.h b/sys/arch/powerpc/include/va-ppc.h index 46e20c5d6c7..32e819535aa 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.13 2006/04/09 03:07:53 deraadt Exp $ */ +/* $OpenBSD: va-ppc.h,v 1.14 2008/10/23 21:25:07 kettenis Exp $ */ /* GNU C varargs support for the PowerPC with either the V.4 or Windows NT calling sequences */ #include <sys/cdefs.h> @@ -210,10 +210,6 @@ __extension__ ({ \ *(dest) = *(src);\ }) -#if __ISO_C_VISIBLE >= 1999 -#define va_copy(dest, src) __va_copy(dest, src) -#endif - #endif /* __VA_PPC_H__ */ #endif /* defined (_STDARG_H) || defined (_VARARGS_H) */ diff --git a/sys/arch/sh/include/stdarg.h b/sys/arch/sh/include/stdarg.h index b6a7a3f7f88..d5b02372f46 100644 --- a/sys/arch/sh/include/stdarg.h +++ b/sys/arch/sh/include/stdarg.h @@ -1,4 +1,4 @@ -/* $OpenBSD: stdarg.h,v 1.1 2006/10/06 21:02:55 miod Exp $ */ +/* $OpenBSD: stdarg.h,v 1.2 2008/10/23 21:25:07 kettenis Exp $ */ /* $NetBSD: stdarg.h,v 1.9 2006/05/21 22:39:04 uwe Exp $ */ /* @@ -53,8 +53,4 @@ typedef __va_list va_list; #define va_end __builtin_va_end #define __va_copy(dest, src) __builtin_va_copy((dest), (src)) -#if __ISO_C_VISIBLE >= 1999 -#define va_copy(dest, src) __va_copy((dest), (src)) -#endif - #endif /* !_SH_STDARG_H_ */ diff --git a/sys/arch/sparc/include/stdarg.h b/sys/arch/sparc/include/stdarg.h index 954f7a5533d..45366503699 100644 --- a/sys/arch/sparc/include/stdarg.h +++ b/sys/arch/sparc/include/stdarg.h @@ -1,4 +1,4 @@ -/* $OpenBSD: stdarg.h,v 1.13 2006/04/09 03:07:53 deraadt Exp $ */ +/* $OpenBSD: stdarg.h,v 1.14 2008/10/23 21:25:08 kettenis Exp $ */ /* $NetBSD: stdarg.h,v 1.10 1996/12/27 20:55:28 pk Exp $ */ /* @@ -99,7 +99,7 @@ typedef __va_list va_list; __va_8byte(ap, type) : __va_arg(ap, type)) #if __ISO_C_VISIBLE >= 1999 -#define va_copy(dest, src) \ +#define __va_copy(dest, src) \ ((dest) = (src)) #endif diff --git a/sys/arch/sparc64/include/stdarg.h b/sys/arch/sparc64/include/stdarg.h index a8d36aac808..159be232467 100644 --- a/sys/arch/sparc64/include/stdarg.h +++ b/sys/arch/sparc64/include/stdarg.h @@ -1,4 +1,4 @@ -/* $OpenBSD: stdarg.h,v 1.6 2006/04/09 03:07:53 deraadt Exp $ */ +/* $OpenBSD: stdarg.h,v 1.7 2008/10/23 21:25:08 kettenis Exp $ */ /* $NetBSD: stdarg.h,v 1.11 2000/07/23 21:36:56 mycroft Exp $ */ /* @@ -62,11 +62,6 @@ typedef __va_list va_list; (__builtin_next_arg(last), (ap) = (va_list)__builtin_saveregs()) #endif /* lint */ -#if __BSD_VISIBLE -#define va_copy(dest, src) \ - ((dest) = (src)) -#endif - #define va_end(ap) /* diff --git a/sys/arch/vax/include/stdarg.h b/sys/arch/vax/include/stdarg.h index aabf5629563..73e6fcd1558 100644 --- a/sys/arch/vax/include/stdarg.h +++ b/sys/arch/vax/include/stdarg.h @@ -1,4 +1,4 @@ -/* $OpenBSD: stdarg.h,v 1.9 2006/04/09 03:07:53 deraadt Exp $ */ +/* $OpenBSD: stdarg.h,v 1.10 2008/10/23 21:25:08 kettenis Exp $ */ /* $NetBSD: stdarg.h,v 1.11 1999/05/03 16:30:34 christos Exp $ */ /*- @@ -58,7 +58,7 @@ typedef __va_list va_list; (*(type *)(void *)((ap) += __va_size(type), (ap) - __va_size(type))) #if __BSD_VISIBLE -#define va_copy(dest, src) \ +#define __va_copy(dest, src) \ ((dest) = (src)) #endif diff --git a/sys/sys/stdarg.h b/sys/sys/stdarg.h index f1d3bc13d39..4b7786bb1a2 100644 --- a/sys/sys/stdarg.h +++ b/sys/sys/stdarg.h @@ -1,4 +1,4 @@ -/* $OpenBSD: stdarg.h,v 1.4 2006/01/06 18:53:06 millert Exp $ */ +/* $OpenBSD: stdarg.h,v 1.5 2008/10/23 21:25:08 kettenis Exp $ */ /* * Copyright (c) 2003, 2004 Marc espie <espie@openbsd.org> * @@ -18,6 +18,8 @@ #ifndef _STDARG_H_ #define _STDARG_H_ +#include <sys/cdefs.h> + #if defined(__GNUC__) && __GNUC__ >= 3 /* Define __gnuc_va_list. */ @@ -31,12 +33,10 @@ typedef __builtin_va_list __gnuc_va_list; 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)) -#define __va_copy(d,s) __builtin_va_copy((d),(s)) - +#define va_start(ap, last) __builtin_stdarg_start((ap), last) +#define va_end __builtin_va_end +#define va_arg __builtin_va_arg +#define __va_copy(dst, src) __builtin_va_copy((dst),(src)) typedef __gnuc_va_list va_list; @@ -44,4 +44,8 @@ typedef __gnuc_va_list va_list; #include <machine/stdarg.h> #endif +#if __ISO_C_VISIBLE >= 1999 +#define va_copy(dst, src) __va_copy((dst), (src)) +#endif + #endif /* not _STDARG_H_ */ |