diff options
| author | David E. O'Brien <obrien@FreeBSD.org> | 2002-05-10 02:02:54 +0000 |
|---|---|---|
| committer | David E. O'Brien <obrien@FreeBSD.org> | 2002-05-10 02:02:54 +0000 |
| commit | fc336fdfbbe126c0a916e3e024c63632d2c97ec0 (patch) | |
| tree | b2c2da53a08934116f97d9b8df58bf01fd5f8452 /sys/alpha/include/stdarg.h | |
| parent | b0b7c2164ccd89c2c361b8b1c43a1143f1d0afa0 (diff) | |
Notes
Diffstat (limited to 'sys/alpha/include/stdarg.h')
| -rw-r--r-- | sys/alpha/include/stdarg.h | 25 |
1 files changed, 20 insertions, 5 deletions
diff --git a/sys/alpha/include/stdarg.h b/sys/alpha/include/stdarg.h index 2003b7bd4e1a..1632addaaf03 100644 --- a/sys/alpha/include/stdarg.h +++ b/sys/alpha/include/stdarg.h @@ -1,7 +1,5 @@ -/* $FreeBSD$ */ -/* From: NetBSD: stdarg.h,v 1.7 1997/04/06 08:47:44 cgd Exp */ - /*- + * Copyright (c) 2002 David E. O'Brien. All rights reserved. * Copyright (c) 1991, 1993 * The Regents of the University of California. All rights reserved. * @@ -34,6 +32,8 @@ * SUCH DAMAGE. * * @(#)stdarg.h 8.1 (Berkeley) 6/10/93 + * $NetBSD: stdarg.h,v 1.7 1997/04/06 08:47:44 cgd Exp $ + * $FreeBSD$ */ #ifndef _ALPHA_STDARG_H_ @@ -41,13 +41,26 @@ #include <machine/ansi.h> +typedef _BSD_VA_LIST_ va_list; + +#if defined(__GNUC__) && (__GNUC__ == 2 && __GNUC_MINOR__ > 95 || __GNUC__ >= 3) + +#define va_start(ap, last) \ + __builtin_stdarg_start((ap), (last)) + +#define va_arg(ap, type) \ + __builtin_va_arg((ap), type) + +#define va_end(ap) \ + __builtin_va_end(ap) + +#else /* ! __GNUC__ post GCC 2.95 */ + #ifdef __lint__ #define __builtin_saveregs() (0) #define __builtin_classify_type(t) (0) #endif -typedef _BSD_VA_LIST_ va_list; - #define __va_size(type) \ (((sizeof(type) + sizeof(long) - 1) / sizeof(long)) * sizeof(long)) @@ -65,4 +78,6 @@ typedef _BSD_VA_LIST_ va_list; #define va_end(ap) ((void)0) +#endif /* __GNUC__ post GCC 2.95 */ + #endif /* !_ALPHA_STDARG_H_ */ |
