diff options
author | peter <peter@FreeBSD.org> | 1996-09-18 06:31:42 +0000 |
---|---|---|
committer | peter <peter@FreeBSD.org> | 1996-09-18 06:31:42 +0000 |
commit | f64632475d8f0911c59637bcbbf32dfc80c78aa6 (patch) | |
tree | 36318dd8536d1128cae51da6fd81f33ab3a2d989 /contrib/gcc/ginclude/stdarg.h | |
parent | bf917b585281f36dcd0b77776310bbed3d2afa75 (diff) | |
download | FreeBSD-src-f64632475d8f0911c59637bcbbf32dfc80c78aa6.zip FreeBSD-src-f64632475d8f0911c59637bcbbf32dfc80c78aa6.tar.gz |
Patches originally obtained from Bruce Evans <bde@freebsd.org> to make
gcc "do the right thing" when running standalone on FreeBSD
Diffstat (limited to 'contrib/gcc/ginclude/stdarg.h')
-rw-r--r-- | contrib/gcc/ginclude/stdarg.h | 15 |
1 files changed, 15 insertions, 0 deletions
diff --git a/contrib/gcc/ginclude/stdarg.h b/contrib/gcc/ginclude/stdarg.h index ca79a3e..166ca58 100644 --- a/contrib/gcc/ginclude/stdarg.h +++ b/contrib/gcc/ginclude/stdarg.h @@ -43,6 +43,15 @@ #else /* 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 #ifndef __GNUC_VA_LIST #define __GNUC_VA_LIST @@ -52,6 +61,7 @@ typedef char *__gnuc_va_list; typedef void *__gnuc_va_list; #endif #endif +#endif /* Define the standard macros for the user, if this invocation was from the user program. */ @@ -116,9 +126,14 @@ void va_end (__gnuc_va_list); /* Defined in libgcc.a */ #undef _VA_LIST #endif +#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 above). */ #ifdef _BSD_VA_LIST #undef _BSD_VA_LIST #endif +#endif #ifdef __svr4__ /* SVR4.2 uses _VA_LIST for an internal alias for va_list, |