4 /* XXX let's pretend we don't have a libc to test our own code
16 void *memset(void *s, int c, unsigned long n);
17 void *memcpy(void *dest, const void *src, unsigned long n);
18 void *memmove(void *dest, const void *src, unsigned long n);
19 unsigned long strlen(const char *s);
20 int strcmp(const char *s1, const char *s2);
23 typedef __builtin_va_list va_list;
24 #define va_start(v,l) __builtin_va_start(v,l)
25 #define va_end(v) __builtin_va_end(v)
26 #define va_arg(v,l) __builtin_va_arg(v,l)
27 #else /* !def __GNUC__ */
28 #error "stdargs implementation for this compiler missing (libvisor/src/vilibc.h)"
31 int sprintf(char *buf, const char *fmt, ...);
32 int vsprintf(char *buf, const char *fmt, va_list ap);
33 int snprintf(char *buf, unsigned long sz, const char *fmt, ...);
34 int vsnprintf(char *buf, unsigned long sz, const char *fmt, va_list ap);
36 #endif /* !HAVE_LIBC */
39 void vi_error(struct visor *vi, const char *fmt, ...);
41 #endif /* VISOR_LIBC_H_ */