diff options
Diffstat (limited to 'contrib/gcc/ginclude/varargs.h')
-rw-r--r-- | contrib/gcc/ginclude/varargs.h | 81 |
1 files changed, 49 insertions, 32 deletions
diff --git a/contrib/gcc/ginclude/varargs.h b/contrib/gcc/ginclude/varargs.h index e84d972..2aeee5b 100644 --- a/contrib/gcc/ginclude/varargs.h +++ b/contrib/gcc/ginclude/varargs.h @@ -1,43 +1,63 @@ /* Record that this is varargs.h; this turns off stdarg.h. */ +/* $FreeBSD$ */ + #ifndef _VARARGS_H #define _VARARGS_H #ifdef __sparc__ -#include <va-sparc.h> +#include "va-sparc.h" #else #ifdef __spur__ -#include <va-spur.h> +#include "va-spur.h" #else #ifdef __mips__ -#include <va-mips.h> +#include "va-mips.h" #else #ifdef __i860__ -#include <va-i860.h> +#include "va-i860.h" #else #ifdef __pyr__ -#include <va-pyr.h> +#include "va-pyr.h" #else #ifdef __clipper__ -#include <va-clipper.h> +#include "va-clipper.h" #else #ifdef __m88k__ -#include <va-m88k.h> +#include "va-m88k.h" #else #if defined(__hppa__) || defined(hp800) -#include <va-pa.h> +#include "va-pa.h" #else #ifdef __i960__ -#include <va-i960.h> +#include "va-i960.h" #else #ifdef __alpha__ -#include <va-alpha.h> +#include "va-alpha.h" +#else +#if defined (__H8300__) || defined (__H8300H__) || defined (__H8300S__) +#include "va-h8300.h" +#else +#if defined (__PPC__) && (defined (_CALL_SYSV) || defined (_WIN32)) +#include "va-ppc.h" +#else +#ifdef __arc__ +#include "va-arc.h" +#else +#ifdef __M32R__ +#include "va-m32r.h" +#else +#ifdef __sh__ +#include "va-sh.h" +#else +#ifdef __mn10300__ +#include "va-mn10300.h" #else -#if defined (__H8300__) || defined (__H8300H__) -#include <va-h8300.h> +#ifdef __mn10200__ +#include "va-mn10200.h" #else -#if defined (__PPC__) && defined (_CALL_SYSV) -#include <va-ppc.h> +#ifdef __v850__ +#include "va-v850.h" #else #ifdef __NeXT__ @@ -78,22 +98,12 @@ #ifndef __GNUC_VA_LIST #define __GNUC_VA_LIST -#if defined (__FreeBSD__) -/* This is the correct way to handle all BSD NET2 and BSD 4.4 systems. */ -#include <machine/ansi.h> -#ifdef _BSD_VA_LIST_ -typedef _BSD_VA_LIST_ __gnuc_va_list; -#else -typedef _VA_LIST_ __gnuc_va_list; -#endif -#else #if defined(__svr4__) || defined(_AIX) || defined(_M_UNIX) typedef char *__gnuc_va_list; #else typedef void *__gnuc_va_list; #endif #endif -#endif #define va_start(AP) AP=(char *) &__builtin_va_alist @@ -107,7 +117,7 @@ typedef void *__gnuc_va_list; (((sizeof (TYPE) + sizeof (int) - 1) / sizeof (int)) * sizeof (int)) #endif -#if defined (__arm__) || defined (__i386__) || defined (__i860__) || defined (__ns32000__) || defined (__vax__) +#if (defined (__arm__) && ! defined (__ARMEB__)) || defined (__i386__) || defined (__i860__) || defined (__ns32000__) || defined (__vax__) /* This is for little-endian machines; small args are padded upward. */ #define va_arg(AP, TYPE) \ (AP = (__gnuc_va_list) ((char *) (AP) + __va_rounded_size (TYPE)), \ @@ -121,6 +131,15 @@ typedef void *__gnuc_va_list; ? sizeof (TYPE) : __va_rounded_size (TYPE)))))) #endif /* big-endian */ +/* Copy __gnuc_va_list into another variable of this type. */ +#define __va_copy(dest, src) (dest) = (src) + +#endif /* not v850 */ +#endif /* not mn10200 */ +#endif /* not mn10300 */ +#endif /* not sh */ +#endif /* not m32r */ +#endif /* not arc */ #endif /* not powerpc with V.4 calling sequence */ #endif /* not h8300 */ #endif /* not alpha */ @@ -141,7 +160,7 @@ typedef void *__gnuc_va_list; #undef _VA_LIST #endif -#ifdef __svr4__ +#if defined(__svr4__) || (defined(_SCO_DS) && !defined(__VA_LIST)) /* SVR4.2 uses _VA_LIST for an internal alias for va_list, so we must avoid testing it and setting it here. SVR4 uses _VA_LIST as a flag in stdarg.h, but we should @@ -154,9 +173,12 @@ typedef void *__gnuc_va_list; #endif #endif /* __i860__ */ typedef __gnuc_va_list va_list; +#ifdef _SCO_DS +#define __VA_LIST +#endif #endif /* _VA_LIST_ */ -#else /* not __svr4__ */ +#else /* not __svr4__ || _SCO_DS */ /* The macro _VA_LIST_ is the same thing used by this file in Ultrix. But on BSD NET2 we must not test or define or undef it. @@ -195,11 +217,6 @@ typedef __gnuc_va_list va_list; /* The next BSD release (if there is one) wants this symbol to be undefined instead of _VA_LIST_. */ -#if 0 -/* BSD 4.4 actually spells the name _BSD_VA_LIST_ and requires it to be - * defined and usable in place of va_list when the latter name is not - * allowed (e.g., in stdio.h - see ginclude/stdarg.h). */ #ifdef _BSD_VA_LIST #undef _BSD_VA_LIST #endif -#endif |