mirror of
https://github.com/frida/tinycc
synced 2024-12-24 22:16:49 +03:00
245f6a0d13
This makes available the __builtin_va_list type and __builtin variants of va_start, va_arg, va_copy and va_end. We do this via a header file that's prepended to all compilations always (except if merely preprocessing): tcc_predefs.h. That header could also be used for predefining other builtins in the future. We don't need the define hacks for musl anymore with this. Also fix x86_64 gfunc_prologue to reserve enoug space for the full va_list structure, not just 16 bytes.
15 lines
335 B
C
15 lines
335 B
C
#ifndef _STDARG_H
|
|
#define _STDARG_H
|
|
|
|
typedef __builtin_va_list va_list;
|
|
#define va_start __builtin_va_start
|
|
#define va_arg __builtin_va_arg
|
|
#define va_copy __builtin_va_copy
|
|
#define va_end __builtin_va_end
|
|
|
|
/* fix a buggy dependency on GCC in libio.h */
|
|
typedef va_list __gnuc_va_list;
|
|
#define _VA_LIST_DEFINED
|
|
|
|
#endif /* _STDARG_H */
|