Source-Changes-HG archive

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

[src/trunk]: src/sys/arch/i386/include use __builtin_va_start rather than __b...



details:   https://anonhg.NetBSD.org/src/rev/60e27bd23aec
branches:  trunk
changeset: 746711:60e27bd23aec
user:      drochner <drochner%NetBSD.org@localhost>
date:      Tue Aug 18 17:40:39 2009 +0000

description:
use __builtin_va_start rather than __builtin_stdarg_start for gcc>=4.1,
I don't know why it was made that inconsistent at that time, but
the in-tree gcc-4.1 works with that, and gcc-4.4.1 removes builtin
support for old style varargs.

diffstat:

 sys/arch/i386/include/stdarg.h |  9 +++++++--
 1 files changed, 7 insertions(+), 2 deletions(-)

diffs (23 lines):

diff -r dce6113f2721 -r 60e27bd23aec sys/arch/i386/include/stdarg.h
--- a/sys/arch/i386/include/stdarg.h    Tue Aug 18 17:40:31 2009 +0000
+++ b/sys/arch/i386/include/stdarg.h    Tue Aug 18 17:40:39 2009 +0000
@@ -1,4 +1,4 @@
-/*     $NetBSD: stdarg.h,v 1.22 2008/06/21 00:56:39 gmcgarry Exp $     */
+/*     $NetBSD: stdarg.h,v 1.23 2009/08/18 17:40:39 drochner Exp $     */
 
 /*-
  * Copyright (c) 1991, 1993
@@ -47,7 +47,12 @@
 #define        __builtin_va_copy(d, s)         ((d) = (s))
 #endif
 
-#if __GNUC_PREREQ__(2, 96)
+#if __GNUC_PREREQ__(4, 1)
+#define va_start(ap, last)     __builtin_va_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))
+#elif __GNUC_PREREQ__(2, 96)
 #define        va_start(ap, last)      __builtin_stdarg_start((ap), (last))
 #define        va_arg                  __builtin_va_arg
 #define        va_end                  __builtin_va_end



Home | Main Index | Thread Index | Old Index