mirror of
https://github.com/ipxe/ipxe
synced 2025-12-12 14:32:49 +03:00
[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.
This commit is contained in:
@@ -1,22 +0,0 @@
|
||||
#ifndef _STDARG_H
|
||||
#define _STDARG_H
|
||||
|
||||
typedef void * va_list;
|
||||
|
||||
#define va_start( ap, last ) do { \
|
||||
ap = ( &last + 1 ); \
|
||||
} while ( 0 )
|
||||
|
||||
#define va_arg( ap, type ) ({ \
|
||||
type *_this = ap; \
|
||||
ap = ( _this + 1 ); \
|
||||
*(_this); \
|
||||
})
|
||||
|
||||
#define va_end( ap ) do { } while ( 0 )
|
||||
|
||||
#define va_copy( dest, src ) do { \
|
||||
dest = src; \
|
||||
} while ( 0 )
|
||||
|
||||
#endif /* _STDARG_H */
|
||||
Reference in New Issue
Block a user