Code: Select all
/* stdarg. This defines va_start, va_list, etc. */
#ifndef STDARG_H
#define STDARG_H
#define va_start(v,l) __builtin_va_start(v,l)
#define va_arg(v,l) __builtin_va_arg(v,l)
#define va_end(v) __builtin_va_end(v)
#define va_copy(d,s) __builtin_va_copy(d,s)
typedef __builtin_va_list va_list
#endif /* STDARG_H */
Code: Select all
/* Provides stdio-like routines for in-kernel use. */
#ifndef KSTDIO_H
#define KSTDIO_H
#include "stdarg.h"
#include "mpos.h"
/* As vsnprintf() in stdio.h. Prints up to n chars to buf, using fmt and args
as printf()-like arguments.
*/
u32int vsnprintf(char *buf, u32int n, char *fmt, va_list args); // Error on this line here
/* Uses vsnprintf() above to print to the screen. */
u32int printf(char *fmt, ...);
u32int sprintx(char *, u32int);
u32int sprintd(char *, u32int);
u32int atoi(char *);
#endif /* KSTDIO_H */
Code: Select all
In file included from kernel.c:15:
kstdio.h:12: error: expected '=', ',', ';', 'asm' or '__attribute__' before 'u32int'