diff options
| -rwxr-xr-x | arch/i386/bits/alltypes.h.sh | 5 | ||||
| -rw-r--r-- | arch/x86_64/bits/stdarg.h | 1 | ||||
| -rw-r--r-- | include/stdarg.h | 7 | 
3 files changed, 12 insertions, 1 deletions
diff --git a/arch/i386/bits/alltypes.h.sh b/arch/i386/bits/alltypes.h.sh index 9d94c911..335c0957 100755 --- a/arch/i386/bits/alltypes.h.sh +++ b/arch/i386/bits/alltypes.h.sh @@ -19,7 +19,12 @@ union \1 \2;\  TYPEDEF unsigned size_t;  TYPEDEF int ssize_t;  TYPEDEF long ptrdiff_t; + +#if __GNUC__ >= 3 +TYPEDEF __builtin_va_list va_list; +#else  TYPEDEF struct __va_list * va_list; +#endif  TYPEDEF long wchar_t;  TYPEDEF long wint_t; diff --git a/arch/x86_64/bits/stdarg.h b/arch/x86_64/bits/stdarg.h index 24b679c9..fde37814 100644 --- a/arch/x86_64/bits/stdarg.h +++ b/arch/x86_64/bits/stdarg.h @@ -2,4 +2,3 @@  #define va_end(v)       __builtin_va_end(v)  #define va_arg(v,l)     __builtin_va_arg(v,l)  #define va_copy(d,s)    __builtin_va_copy(d,s) -#define __va_copy(d,s)  __builtin_va_copy(d,s) diff --git a/include/stdarg.h b/include/stdarg.h index 2e18e5f5..60d4e2af 100644 --- a/include/stdarg.h +++ b/include/stdarg.h @@ -9,7 +9,14 @@ extern "C" {  #include <bits/alltypes.h> +#if __GNUC__ >= 3 +#define va_start(v,l)   __builtin_va_start(v,l) +#define va_end(v)       __builtin_va_end(v) +#define va_arg(v,l)     __builtin_va_arg(v,l) +#define va_copy(d,s)    __builtin_va_copy(d,s) +#else  #include <bits/stdarg.h> +#endif  #ifdef __cplusplus  }  | 
