diff options
-rw-r--r-- | sys/arch/alpha/include/stdarg.h | 6 | ||||
-rw-r--r-- | sys/arch/amd64/include/stdarg.h | 6 | ||||
-rw-r--r-- | sys/arch/arm/include/stdarg.h | 3 | ||||
-rw-r--r-- | sys/arch/hppa/include/stdarg.h | 10 | ||||
-rw-r--r-- | sys/arch/hppa64/include/stdarg.h | 10 | ||||
-rw-r--r-- | sys/arch/i386/include/stdarg.h | 11 | ||||
-rw-r--r-- | sys/arch/m68k/include/stdarg.h | 11 | ||||
-rw-r--r-- | sys/arch/m88k/include/va-m88k.h | 11 | ||||
-rw-r--r-- | sys/arch/powerpc/include/va-ppc.h | 10 | ||||
-rw-r--r-- | sys/arch/sparc/include/stdarg.h | 11 | ||||
-rw-r--r-- | sys/arch/sparc64/include/stdarg.h | 6 | ||||
-rw-r--r-- | sys/arch/vax/include/stdarg.h | 6 |
12 files changed, 64 insertions, 37 deletions
diff --git a/sys/arch/alpha/include/stdarg.h b/sys/arch/alpha/include/stdarg.h index 03b50b40166..d0af6ac6952 100644 --- a/sys/arch/alpha/include/stdarg.h +++ b/sys/arch/alpha/include/stdarg.h @@ -1,4 +1,4 @@ -/* $OpenBSD: stdarg.h,v 1.9 2006/01/06 18:53:04 millert Exp $ */ +/* $OpenBSD: stdarg.h,v 1.10 2006/04/09 03:07:52 deraadt Exp $ */ /* $NetBSD: stdarg.h,v 1.4 1996/10/09 21:13:05 cgd Exp $ */ /*- @@ -43,8 +43,12 @@ typedef __va_list va_list; #define __va_size(type) \ (((sizeof(type) + sizeof(long) - 1) / sizeof(long)) * sizeof(long)) +#ifdef lint +#define va_start(ap,lastarg) ((ap) = (ap)) +#else #define va_start(ap, last) \ (__builtin_next_arg(last), (ap) = *(va_list *)__builtin_saveregs(), (ap).pad = 0) +#endif /* lint */ #define __REAL_TYPE_CLASS 8 #define __va_arg_offset(ap, type) \ diff --git a/sys/arch/amd64/include/stdarg.h b/sys/arch/amd64/include/stdarg.h index feeb97970a7..a95768f3134 100644 --- a/sys/arch/amd64/include/stdarg.h +++ b/sys/arch/amd64/include/stdarg.h @@ -1,4 +1,4 @@ -/* $OpenBSD: stdarg.h,v 1.4 2006/01/06 18:53:05 millert Exp $ */ +/* $OpenBSD: stdarg.h,v 1.5 2006/04/09 03:07:52 deraadt Exp $ */ /* $NetBSD: stdarg.h,v 1.2 2003/04/28 23:16:17 bjh21 Exp $ */ /*- @@ -47,8 +47,12 @@ typedef __va_list va_list; #define __va_size(type) \ (((sizeof(type) + sizeof(long) - 1) / sizeof(long)) * sizeof(long)) +#ifdef lint +#define va_start(ap,lastarg) ((ap) = (ap)) +#else #define va_start(ap, last) \ ((ap) = (va_list)&(last) + __va_size(last)) +#endif /* lint */ #define va_arg(ap, type) \ (*(type *)((ap) += __va_size(type), (ap) - __va_size(type))) diff --git a/sys/arch/arm/include/stdarg.h b/sys/arch/arm/include/stdarg.h index ad025c06942..ce8a4b7505d 100644 --- a/sys/arch/arm/include/stdarg.h +++ b/sys/arch/arm/include/stdarg.h @@ -1,4 +1,4 @@ -/* $OpenBSD: stdarg.h,v 1.5 2006/01/06 18:53:05 millert Exp $ */ +/* $OpenBSD: stdarg.h,v 1.6 2006/04/09 03:07:52 deraadt Exp $ */ /* $NetBSD: stdarg.h,v 1.7 2003/08/07 16:26:53 agc Exp $ */ /* @@ -48,6 +48,7 @@ typedef __va_list va_list; #endif #define va_start(ap, last) __builtin_stdarg_start((ap), (last)) + #define va_arg __builtin_va_arg #define va_end __builtin_va_end #define __va_copy(dest, src) __builtin_va_copy((dest), (src)) diff --git a/sys/arch/hppa/include/stdarg.h b/sys/arch/hppa/include/stdarg.h index 712395bdcb5..84ee35f8f18 100644 --- a/sys/arch/hppa/include/stdarg.h +++ b/sys/arch/hppa/include/stdarg.h @@ -1,4 +1,4 @@ -/* $OpenBSD: stdarg.h,v 1.7 2006/01/06 18:53:05 millert Exp $ */ +/* $OpenBSD: stdarg.h,v 1.8 2006/04/09 03:07:52 deraadt Exp $ */ /*- * Copyright (c) 1991, 1993 @@ -39,11 +39,11 @@ typedef __va_list va_list; -#ifdef __GNUC__ -#define va_start(ap,lastarg) ((ap) = (va_list)__builtin_saveregs()) +#ifdef lint +#define va_start(ap,lastarg) ((ap) = (ap)) #else -#define va_start(ap,lastarg) __builtin_va_start(ap, &lastarg) -#endif +#define va_start(ap,lastarg) ((ap) = (va_list)__builtin_saveregs()) +#endif /* lint */ #define va_arg(ap,type) \ (sizeof(type) > 8 ? \ diff --git a/sys/arch/hppa64/include/stdarg.h b/sys/arch/hppa64/include/stdarg.h index 697d41a8b9f..6d49717d9fb 100644 --- a/sys/arch/hppa64/include/stdarg.h +++ b/sys/arch/hppa64/include/stdarg.h @@ -1,4 +1,4 @@ -/* $OpenBSD: stdarg.h,v 1.4 2006/01/06 18:53:05 millert Exp $ */ +/* $OpenBSD: stdarg.h,v 1.5 2006/04/09 03:07:52 deraadt Exp $ */ /*- * Copyright (c) 1991, 1993 @@ -39,11 +39,11 @@ typedef __va_list va_list; -#ifdef __GNUC__ -#define va_start(ap,lastarg) ((ap) = (va_list)__builtin_saveregs()) +#ifdef lint +#define va_start(ap,lastarg) ((ap) = (ap)) #else -#define va_start(ap,lastarg) __builtin_va_start(ap, &lastarg) -#endif +#define va_start(ap,lastarg) ((ap) = (va_list)__builtin_saveregs()) +#endif /* lint */ #define va_arg(ap,type) \ (sizeof(type) > 8 ? \ diff --git a/sys/arch/i386/include/stdarg.h b/sys/arch/i386/include/stdarg.h index 4df981d3d9a..84fdf9b377b 100644 --- a/sys/arch/i386/include/stdarg.h +++ b/sys/arch/i386/include/stdarg.h @@ -1,4 +1,4 @@ -/* $OpenBSD: stdarg.h,v 1.9 2006/01/06 18:53:05 millert Exp $ */ +/* $OpenBSD: stdarg.h,v 1.10 2006/04/09 03:07:52 deraadt Exp $ */ /* $NetBSD: stdarg.h,v 1.12 1995/12/25 23:15:31 mycroft Exp $ */ /*- @@ -43,13 +43,12 @@ typedef __va_list va_list; #define __va_size(type) \ (((sizeof(type) + sizeof(long) - 1) / sizeof(long)) * sizeof(long)) -#ifdef __GNUC__ +#ifdef lint +#define va_start(ap,lastarg) ((ap) = (ap)) +#else #define va_start(ap, last) \ ((ap) = (va_list)__builtin_next_arg(last)) -#else -#define va_start(ap, last) \ - ((ap) = (va_list)&(last) + __va_size(last)) -#endif +#endif /* lint */ #define va_arg(ap, type) \ (*(type *)((ap) += __va_size(type), (ap) - __va_size(type))) diff --git a/sys/arch/m68k/include/stdarg.h b/sys/arch/m68k/include/stdarg.h index b6bc860cbb5..d1b832d93e8 100644 --- a/sys/arch/m68k/include/stdarg.h +++ b/sys/arch/m68k/include/stdarg.h @@ -1,4 +1,4 @@ -/* $OpenBSD: stdarg.h,v 1.9 2006/01/06 18:53:05 millert Exp $ */ +/* $OpenBSD: stdarg.h,v 1.10 2006/04/09 03:07:52 deraadt Exp $ */ /* $NetBSD: stdarg.h,v 1.14 1995/12/25 23:15:33 mycroft Exp $ */ /*- @@ -43,13 +43,12 @@ typedef __va_list va_list; #define __va_size(type) \ (((sizeof(type) + sizeof(long) - 1) / sizeof(long)) * sizeof(long)) -#ifdef __GNUC__ +#ifdef lint +#define va_start(ap,lastarg) ((ap) = (ap)) +#else #define va_start(ap, last) \ ((ap) = (va_list)__builtin_next_arg(last)) -#else -#define va_start(ap, last) \ - ((ap) = (va_list)&(last) + __va_size(last)) -#endif +#endif /* lint */ #define va_arg(ap, type) \ (*(type *)((ap) += __va_size(type), \ diff --git a/sys/arch/m88k/include/va-m88k.h b/sys/arch/m88k/include/va-m88k.h index 3b9665803c0..ffe4c857416 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.8 2006/01/06 18:53:05 millert Exp $ */ +/* $OpenBSD: va-m88k.h,v 1.9 2006/04/09 03:07:53 deraadt Exp $ */ /* Define __gnuc_va_list. */ @@ -29,12 +29,21 @@ __extension__ ({ \ /* Calling __builtin_next_arg gives the proper error message if LASTARG is not indeed the last argument. */ +#ifdef lint +#define va_start(AP,LASGARG) ((AP) = (AP)) +#else #define va_start(AP,LASTARG) \ (__builtin_next_arg (LASTARG), __va_start_common (AP, 0)) +#endif /* lint */ #else /* varargs.h support */ +#ifdef lint +#define va_start(AP) ((AP) = (AP)) +#else #define va_start(AP) __va_start_common (AP, 1) +#endif /* lint */ + #define va_alist __va_1st_arg #define va_dcl register int va_alist; ... diff --git a/sys/arch/powerpc/include/va-ppc.h b/sys/arch/powerpc/include/va-ppc.h index 86353c6b2ef..46e20c5d6c7 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.12 2006/01/06 18:53:05 millert Exp $ */ +/* $OpenBSD: va-ppc.h,v 1.13 2006/04/09 03:07:53 deraadt Exp $ */ /* GNU C varargs support for the PowerPC with either the V.4 or Windows NT calling sequences */ #include <sys/cdefs.h> @@ -77,8 +77,12 @@ __extension__ ({ \ /* Calling __builtin_next_arg gives the proper error message if LASTARG is not indeed the last argument. */ +#ifdef lint +#define va_start(AP,LASTARG) ((AP) = (AP)) +#else #define va_start(AP,LASTARG) \ (__builtin_next_arg (LASTARG), __va_start_common (AP, 0)) +#endif /* lint */ #else /* varargs.h support */ @@ -196,7 +200,7 @@ __extension__ (*({ \ __ptr; \ })) -#define va_end(AP) ((void)0) +#define va_end(AP) /* Copy __gnuc_va_list into another variable of this type. */ #define __va_copy(dest, src) \ @@ -261,7 +265,7 @@ typedef char *__gnuc_va_list; + __va_rounded_size(TYPE))) \ - __va_rounded_size(TYPE))) -#define va_end(AP) ((void)0) +#define va_end(AP) /* Copy __gnuc_va_list into another variable of this type. */ #define __va_copy(dest, src) (dest) = (src) diff --git a/sys/arch/sparc/include/stdarg.h b/sys/arch/sparc/include/stdarg.h index fe878fec5d4..954f7a5533d 100644 --- a/sys/arch/sparc/include/stdarg.h +++ b/sys/arch/sparc/include/stdarg.h @@ -1,4 +1,4 @@ -/* $OpenBSD: stdarg.h,v 1.12 2006/01/06 18:53:05 millert Exp $ */ +/* $OpenBSD: stdarg.h,v 1.13 2006/04/09 03:07:53 deraadt Exp $ */ /* $NetBSD: stdarg.h,v 1.10 1996/12/27 20:55:28 pk Exp $ */ /* @@ -56,13 +56,12 @@ typedef __va_list va_list; #define __va_size(type) \ (((sizeof(type) + sizeof(long) - 1) / sizeof(long)) * sizeof(long)) -#if __GNUC__ > 2 || __GNUC_MINOR__ >= 6 -#define va_start(ap, last) \ - (__builtin_next_arg(last), (ap) = (va_list)__builtin_saveregs()) +#ifdef lint +#define va_start(ap,lastarg) ((ap) = (ap)) #else #define va_start(ap, last) \ - (__builtin_next_arg(), (ap) = (va_list)__builtin_saveregs()) -#endif + (__builtin_next_arg(last), (ap) = (va_list)__builtin_saveregs()) +#endif /* lint */ /* * va_arg picks up the next argument of type `type'. Appending an diff --git a/sys/arch/sparc64/include/stdarg.h b/sys/arch/sparc64/include/stdarg.h index cd01cc9b967..a8d36aac808 100644 --- a/sys/arch/sparc64/include/stdarg.h +++ b/sys/arch/sparc64/include/stdarg.h @@ -1,4 +1,4 @@ -/* $OpenBSD: stdarg.h,v 1.5 2006/01/06 18:53:05 millert Exp $ */ +/* $OpenBSD: stdarg.h,v 1.6 2006/04/09 03:07:53 deraadt Exp $ */ /* $NetBSD: stdarg.h,v 1.11 2000/07/23 21:36:56 mycroft Exp $ */ /* @@ -55,8 +55,12 @@ typedef __va_list va_list; +#ifdef lint +#define va_start(ap,lastarg) ((ap) = (ap)) +#else #define va_start(ap, last) \ (__builtin_next_arg(last), (ap) = (va_list)__builtin_saveregs()) +#endif /* lint */ #if __BSD_VISIBLE #define va_copy(dest, src) \ diff --git a/sys/arch/vax/include/stdarg.h b/sys/arch/vax/include/stdarg.h index b3aca7c0a8a..aabf5629563 100644 --- a/sys/arch/vax/include/stdarg.h +++ b/sys/arch/vax/include/stdarg.h @@ -1,4 +1,4 @@ -/* $OpenBSD: stdarg.h,v 1.8 2006/01/06 18:53:05 millert Exp $ */ +/* $OpenBSD: stdarg.h,v 1.9 2006/04/09 03:07:53 deraadt Exp $ */ /* $NetBSD: stdarg.h,v 1.11 1999/05/03 16:30:34 christos Exp $ */ /*- @@ -47,8 +47,12 @@ typedef __va_list va_list; #define __va_size(type) \ (((sizeof(type) + sizeof(long) - 1) / sizeof(long)) * sizeof(long)) +#ifdef lint +#define va_start(ap,lastarg) ((ap) = (ap)) +#else #define va_start(ap, last) \ ((ap) = (va_list)__builtin_next_arg(last)) +#endif /* lint */ #define va_arg(ap, type) \ (*(type *)(void *)((ap) += __va_size(type), (ap) - __va_size(type))) |