From: Michael Brown Date: Sat, 9 Jun 2007 17:11:07 +0000 (+0100) Subject: Add our own trivial version of stdarg.h. This makes our build X-Git-Tag: v0.9.3~392 X-Git-Url: http://git.ipfire.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=1ae549b892327784141a828f00c68c0b9bc06142;p=thirdparty%2Fipxe.git Add our own trivial version of stdarg.h. This makes our build entirely self-hosted (which avoids problems when building the same tree on multiple systems - e.g. when you have /home NFS-mounted). Also saves around 50 bytes in total - not sure why. --- diff --git a/src/arch/i386/include/stdarg.h b/src/arch/i386/include/stdarg.h new file mode 100644 index 000000000..1742cb3f4 --- /dev/null +++ b/src/arch/i386/include/stdarg.h @@ -0,0 +1,22 @@ +#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 */