From 375dab8418e5b0ddbaed1e66620de9a4e3011123 Mon Sep 17 00:00:00 2001 From: Earnie Boyd Date: Wed, 29 Aug 2001 13:43:59 +0000 Subject: * include/stdarg.h (va_list): Typedef as __builtin_va_list if __GNUC__ >= 3. * include/varargs.h (va_list): Ditto. * include/stdio.h (va_list): Ditto. --- winsup/mingw/ChangeLog | 7 +++++++ winsup/mingw/include/stdarg.h | 5 ++++- winsup/mingw/include/stdio.h | 9 ++++++--- winsup/mingw/include/varargs.h | 8 ++++++-- 4 files changed, 23 insertions(+), 6 deletions(-) diff --git a/winsup/mingw/ChangeLog b/winsup/mingw/ChangeLog index 81b6655..ba5cfa7 100644 --- a/winsup/mingw/ChangeLog +++ b/winsup/mingw/ChangeLog @@ -1,3 +1,10 @@ +2001-08-29 Danny Smith + + * include/stdarg.h (va_list): Typedef as __builtin_va_list if + __GNUC__ >= 3. + * include/varargs.h (va_list): Ditto. + * include/stdio.h (va_list): Ditto. + 2001-08-01 Danny Smith * include/stdlib.h (_wpgmptr): Don't declare ifndef __MSVCRT__. diff --git a/winsup/mingw/include/stdarg.h b/winsup/mingw/include/stdarg.h index 6db01aa..9d08ee8 100644 --- a/winsup/mingw/include/stdarg.h +++ b/winsup/mingw/include/stdarg.h @@ -52,9 +52,12 @@ #ifndef _VA_LIST #define _VA_LIST +#if defined __GNUC__ && __GNUC__ >= 3 +typedef __builtin_va_list va_list; +#else typedef char* va_list; #endif - +#endif /* * Amount of space required in an argument list (ie. the stack) for an diff --git a/winsup/mingw/include/stdio.h b/winsup/mingw/include/stdio.h index d288f00..a5a3e7c9 100644 --- a/winsup/mingw/include/stdio.h +++ b/winsup/mingw/include/stdio.h @@ -127,11 +127,14 @@ * functions later on in the file which use va_list. That conflicts with * using stdio.h and varargs.h in the same file, so I do the typedef myself. */ -#ifndef _VA_LIST +#ifndef _VA_LIST #define _VA_LIST -typedef char* va_list; +#if defined __GNUC__ && __GNUC__ >= 3 +typedef __builtin_va_list va_list; +#else +typedef char* va_list; +#endif #endif - /* * The structure underlying the FILE type. * diff --git a/winsup/mingw/include/varargs.h b/winsup/mingw/include/varargs.h index 48e203b..5370344 100644 --- a/winsup/mingw/include/varargs.h +++ b/winsup/mingw/include/varargs.h @@ -52,10 +52,14 @@ #ifndef RC_INVOKED -#ifndef _VA_LIST -#define _VA_LIST +#ifndef _VA_LIST +#define _VA_LIST +#if defined __GNUC__ && __GNUC__ >= 3 +typedef __builtin_va_list va_list; +#else typedef char* va_list; #endif +#endif /* * Amount of space required in an argument list (ie. the stack) for an -- cgit v1.1