kern

diff src/klibc/stdarg.h @ 6:7e40f14617ed

forgot to add stdarg.h and stdlib.c
author John Tsiombikas <nuclear@member.fsf.org>
date Thu, 13 Jan 2011 20:24:10 +0200
parents
children
line diff
     1.1 --- /dev/null	Thu Jan 01 00:00:00 1970 +0000
     1.2 +++ b/src/klibc/stdarg.h	Thu Jan 13 20:24:10 2011 +0200
     1.3 @@ -0,0 +1,12 @@
     1.4 +#ifndef STDARG_H_
     1.5 +#define STDARG_H_
     1.6 +
     1.7 +/* Assumes that arguments are passed on the stack 4-byte aligned */
     1.8 +
     1.9 +typedef int* va_list;
    1.10 +
    1.11 +#define va_start(ap, last)	((ap) = (int*)&(last) + 1)
    1.12 +#define va_arg(ap, type)	(*(type*)(ap)++)
    1.13 +#define va_end(ap)
    1.14 +
    1.15 +#endif	/* STDARG_H_ */