Module Name: src Committed By: pooka Date: Thu Jul 19 22:34:54 UTC 2012
Modified Files: src/sys/sys: stdarg.h Log Message: Make the condition for __builtin_va_start more accurate. To generate a diff of this commit: cvs rdiff -u -r1.1 -r1.2 src/sys/sys/stdarg.h Please note that diffs are not public domain; they are subject to the copyright notices on the relevant files.
Modified files: Index: src/sys/sys/stdarg.h diff -u src/sys/sys/stdarg.h:1.1 src/sys/sys/stdarg.h:1.2 --- src/sys/sys/stdarg.h:1.1 Sun Jul 17 20:54:54 2011 +++ src/sys/sys/stdarg.h Thu Jul 19 22:34:54 2012 @@ -1,4 +1,4 @@ -/* $NetBSD: stdarg.h,v 1.1 2011/07/17 20:54:54 joerg Exp $ */ +/* $NetBSD: stdarg.h,v 1.2 2012/07/19 22:34:54 pooka Exp $ */ /*- * Copyright (c) 1991, 1993 @@ -43,8 +43,6 @@ #define __builtin_va_arg(a, t) ((a) ? (t) 0 : (t) 0) #define __builtin_va_end(a) /* nothing */ #define __builtin_va_copy(d, s) ((d) = (s)) -#elif !__GNUC_PREREQ__(4, 5) -#define __builtin_va_start(ap, last) __builtin_stdarg_start((ap), (last)) #endif #ifndef __VA_LIST_DECLARED @@ -52,7 +50,11 @@ typedef __va_list va_list; #define __VA_LIST_DECLARED #endif +#if __GNUC_PREREQ__(4, 5) || (__GNUC_PREREQ__(4, 4) && __GNUC_PATCHLEVEL__ > 2) #define va_start(ap, last) __builtin_va_start((ap), (last)) +#else +#define va_start(ap, last) __builtin_stdarg_start((ap), (last)) +#endif #define va_arg __builtin_va_arg #define va_end(ap) __builtin_va_end(ap) #define __va_copy(dest, src) __builtin_va_copy((dest), (src))