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.
		
			
				
	
	
		
			14 lines
		
	
	
	
		
			335 B
		
	
	
	
		
			C
		
	
	
	
	
	
			
		
		
	
	
			14 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 */
 |