From d9c1a42a18f21ea8fa871c3d650cc139d586ce32 Mon Sep 17 00:00:00 2001 From: Jeroen Ruigrok/asmodai Date: Sun, 24 Apr 2005 10:58:19 +0000 Subject: [PATCH] Get rid off the wrappers around __va_copy(), they serve no real purpose. Wrap va_copy() in __ISO_C_VISIBLE. --- include/stdarg.h | 4 ++-- sys/amd64/include/stdarg.h | 8 +------- sys/cpu/i386/include/stdarg.h | 8 +------- sys/i386/include/stdarg.h | 8 +------- 4 files changed, 5 insertions(+), 23 deletions(-) diff --git a/include/stdarg.h b/include/stdarg.h index d06a364213..7c5cb3f41c 100644 --- a/include/stdarg.h +++ b/include/stdarg.h @@ -23,7 +23,7 @@ * OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF * SUCH DAMAGE. * - * $DragonFly: src/include/stdarg.h,v 1.2 2005/03/07 06:26:47 asmodai Exp $ + * $DragonFly: src/include/stdarg.h,v 1.3 2005/04/24 10:58:19 asmodai Exp $ */ #ifndef _STDARG_H_ @@ -37,7 +37,7 @@ typedef __va_list va_list; #define va_start(ap, last) __va_start(ap, last) #define va_arg(ap, type) __va_arg(ap, type) -#if _POSIX_VERSION >= 200112L || __STDC_VERSION__ >= 199900L +#if __ISO_C_VISIBLE >= 1999 #define va_copy(dest, src) __va_copy(dest, src) #endif #define va_end(ap) __va_end(ap) diff --git a/sys/amd64/include/stdarg.h b/sys/amd64/include/stdarg.h index 7a364c0ebb..d6819bb63c 100644 --- a/sys/amd64/include/stdarg.h +++ b/sys/amd64/include/stdarg.h @@ -32,7 +32,7 @@ * * @(#)stdarg.h 8.1 (Berkeley) 6/10/93 * $FreeBSD: src/sys/i386/include/stdarg.h,v 1.10 1999/08/28 00:44:26 peter Exp $ - * $DragonFly: src/sys/amd64/include/Attic/stdarg.h,v 1.2 2005/03/07 06:26:47 asmodai Exp $ + * $DragonFly: src/sys/amd64/include/Attic/stdarg.h,v 1.3 2005/04/24 10:58:19 asmodai Exp $ */ #ifndef _MACHINE_STDARG_H_ @@ -64,10 +64,8 @@ typedef __va_list __gnuc_va_list; /* compatibility w/GNU headers*/ ((ap) = (__va_list)__builtin_next_arg(last)) #define __va_arg(ap, type) \ (*(type *)((ap) += __va_size(type), (ap) - __va_size(type))) -#if _POSIX_VERSION >= 200112L || __STDC_VERSION__ >= 199900L #define __va_copy(dest, src) \ ((void)((dest) = (src))) -#endif #define __va_end(ap) #elif __GNUC__ >= 3 #if __GNUC_MINOR__ >= 0 && __GNUC_MINOR__ <= 2 @@ -79,10 +77,8 @@ typedef __va_list __gnuc_va_list; /* compatibility w/GNU headers*/ #endif #define __va_arg(ap, type) \ __builtin_va_arg((ap), type) -#if _POSIX_VERSION >= 200112L || __STDC_VERSION__ >= 199900L #define __va_copy(dest, src) \ __builtin_va_copy((dest), (src)) -#endif #define __va_end(ap) \ __builtin_va_end(ap) #endif @@ -94,11 +90,9 @@ typedef __va_list __gnuc_va_list; /* compatibility w/GNU headers*/ ((ap) = (__va_list)&(last) + __va_size(last)) #define __va_arg(ap, type) \ (*(type *)((ap) += __va_size(type), (ap) - __va_size(type))) -#if _POSIX_VERSION >= 200112L || __STDC_VERSION__ >= 199900L /* This assumes a typical stack machine */ #define __va_copy(dest, src) \ ((void)((dest) = (src))) -#endif #define __va_end(ap) #endif /* __GNUC__ */ diff --git a/sys/cpu/i386/include/stdarg.h b/sys/cpu/i386/include/stdarg.h index 88ffcb5e3b..c64092a965 100644 --- a/sys/cpu/i386/include/stdarg.h +++ b/sys/cpu/i386/include/stdarg.h @@ -32,7 +32,7 @@ * * @(#)stdarg.h 8.1 (Berkeley) 6/10/93 * $FreeBSD: src/sys/i386/include/stdarg.h,v 1.10 1999/08/28 00:44:26 peter Exp $ - * $DragonFly: src/sys/cpu/i386/include/stdarg.h,v 1.5 2005/03/07 06:26:47 asmodai Exp $ + * $DragonFly: src/sys/cpu/i386/include/stdarg.h,v 1.6 2005/04/24 10:58:19 asmodai Exp $ */ #ifndef _MACHINE_STDARG_H_ @@ -64,10 +64,8 @@ typedef __va_list __gnuc_va_list; /* compatibility w/GNU headers*/ ((ap) = (__va_list)__builtin_next_arg(last)) #define __va_arg(ap, type) \ (*(type *)((ap) += __va_size(type), (ap) - __va_size(type))) -#if _POSIX_VERSION >= 200112L || __STDC_VERSION__ >= 199900L #define __va_copy(dest, src) \ ((void)((dest) = (src))) -#endif #define __va_end(ap) #elif __GNUC__ >= 3 #if __GNUC_MINOR__ >= 0 && __GNUC_MINOR__ <= 2 @@ -79,10 +77,8 @@ typedef __va_list __gnuc_va_list; /* compatibility w/GNU headers*/ #endif #define __va_arg(ap, type) \ __builtin_va_arg((ap), type) -#if _POSIX_VERSION >= 200112L || __STDC_VERSION__ >= 199900L #define __va_copy(dest, src) \ __builtin_va_copy((dest), (src)) -#endif #define __va_end(ap) \ __builtin_va_end(ap) #endif @@ -94,11 +90,9 @@ typedef __va_list __gnuc_va_list; /* compatibility w/GNU headers*/ ((ap) = (__va_list)&(last) + __va_size(last)) #define __va_arg(ap, type) \ (*(type *)((ap) += __va_size(type), (ap) - __va_size(type))) -#if _POSIX_VERSION >= 200112L || __STDC_VERSION__ >= 199900L /* This assumes a typical stack machine */ #define __va_copy(dest, src) \ ((void)((dest) = (src))) -#endif #define __va_end(ap) #endif /* __GNUC__ */ diff --git a/sys/i386/include/stdarg.h b/sys/i386/include/stdarg.h index ea61d2663c..d4ca5946bb 100644 --- a/sys/i386/include/stdarg.h +++ b/sys/i386/include/stdarg.h @@ -32,7 +32,7 @@ * * @(#)stdarg.h 8.1 (Berkeley) 6/10/93 * $FreeBSD: src/sys/i386/include/stdarg.h,v 1.10 1999/08/28 00:44:26 peter Exp $ - * $DragonFly: src/sys/i386/include/Attic/stdarg.h,v 1.5 2005/03/07 06:26:47 asmodai Exp $ + * $DragonFly: src/sys/i386/include/Attic/stdarg.h,v 1.6 2005/04/24 10:58:19 asmodai Exp $ */ #ifndef _MACHINE_STDARG_H_ @@ -64,10 +64,8 @@ typedef __va_list __gnuc_va_list; /* compatibility w/GNU headers*/ ((ap) = (__va_list)__builtin_next_arg(last)) #define __va_arg(ap, type) \ (*(type *)((ap) += __va_size(type), (ap) - __va_size(type))) -#if _POSIX_VERSION >= 200112L || __STDC_VERSION__ >= 199900L #define __va_copy(dest, src) \ ((void)((dest) = (src))) -#endif #define __va_end(ap) #elif __GNUC__ >= 3 #if __GNUC_MINOR__ >= 0 && __GNUC_MINOR__ <= 2 @@ -79,10 +77,8 @@ typedef __va_list __gnuc_va_list; /* compatibility w/GNU headers*/ #endif #define __va_arg(ap, type) \ __builtin_va_arg((ap), type) -#if _POSIX_VERSION >= 200112L || __STDC_VERSION__ >= 199900L #define __va_copy(dest, src) \ __builtin_va_copy((dest), (src)) -#endif #define __va_end(ap) \ __builtin_va_end(ap) #endif @@ -94,11 +90,9 @@ typedef __va_list __gnuc_va_list; /* compatibility w/GNU headers*/ ((ap) = (__va_list)&(last) + __va_size(last)) #define __va_arg(ap, type) \ (*(type *)((ap) += __va_size(type), (ap) - __va_size(type))) -#if _POSIX_VERSION >= 200112L || __STDC_VERSION__ >= 199900L /* This assumes a typical stack machine */ #define __va_copy(dest, src) \ ((void)((dest) = (src))) -#endif #define __va_end(ap) #endif /* __GNUC__ */ -- 2.41.0