Source-Changes-HG archive

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index][Old Index]

[src/trunk]: src/sys/sys Make the condition for __builtin_va_start more accur...



details:   https://anonhg.NetBSD.org/src/rev/fbb07b549884
branches:  trunk
changeset: 780308:fbb07b549884
user:      pooka <pooka%NetBSD.org@localhost>
date:      Thu Jul 19 22:34:54 2012 +0000

description:
Make the condition for __builtin_va_start more accurate.

diffstat:

 sys/sys/stdarg.h |  8 +++++---
 1 files changed, 5 insertions(+), 3 deletions(-)

diffs (30 lines):

diff -r 13cea4d8e893 -r fbb07b549884 sys/sys/stdarg.h
--- a/sys/sys/stdarg.h  Thu Jul 19 22:22:53 2012 +0000
+++ b/sys/sys/stdarg.h  Thu Jul 19 22:34:54 2012 +0000
@@ -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 @@
 #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))



Home | Main Index | Thread Index | Old Index