diff options
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, |