From dbf8a02e8f719390cc862866414781801d602ecf Mon Sep 17 00:00:00 2001 From: Michael Brown Date: Mon, 24 Mar 2008 00:23:11 +0000 Subject: [libc] Use __builtin_va_list et al in stdarg.h The home-grown versions don't work properly for static variadic functions, when gcc can choose to use a non-standard calling convention. --- src/include/stdarg.h | 10 ++++++++++ 1 file changed, 10 insertions(+) create mode 100644 src/include/stdarg.h (limited to 'src/include') diff --git a/src/include/stdarg.h b/src/include/stdarg.h new file mode 100644 index 000000000..a4eb711d0 --- /dev/null +++ b/src/include/stdarg.h @@ -0,0 +1,10 @@ +#ifndef _STDARG_H +#define _STDARG_H + +typedef __builtin_va_list va_list; +#define va_start( ap, last ) __builtin_va_start ( ap, last ) +#define va_arg( ap, type ) __builtin_va_arg ( ap, type ) +#define va_end( ap ) __builtin_va_end ( ap ) +#define va_copy( dest, src ) __builtin_va_copy ( dest, src ) + +#endif /* _STDARG_H */ -- cgit v1.2.3-55-g7522