#define XTF_LIBC_H
#include <xtf/types.h>
+#include <xtf/compiler.h>
/*
* Local declaration of bits of libc
void *memcpy(void *dst, const void *src, size_t n);
int memcmp(const void *s1, const void *s2, size_t n);
-int vsnprintf(char *buf, size_t size, const char *fmt, va_list args);
+int __printf(3, 0)
+ vsnprintf(char *buf, size_t size, const char *fmt, va_list args);
+
+static inline int __printf(3, 4)
+ snprintf(char *buf, size_t size, const char *fmt, ...)
+{
+ va_list args;
+ int rc;
+
+ va_start(args, fmt);
+ rc = vsnprintf(buf, size, fmt, args);
+ va_end(args);
+
+ return rc;
+}
#endif /* XTF_LIBC_H */