#include <palacios/vmm_sprintf.h>
-#define NEED_SPRINTF 0
-#define NEED_SNPRINTF 0
-#define NEED_VSPRINTF 0
-#define NEED_VSNPRINTF 0
-#define NEED_VSNRPRINTF 1
typedef addr_t ptrdiff_t; /* ptr1 - ptr2 */
};
+
+#if defined(CONFIG_BUILT_IN_STDIO) && \
+ ( defined(CONFIG_BUILT_IN_SPRINTF) || \
+ defined(CONFIG_BUILT_IN_SNPRINTF) || \
+ defined(CONFIG_BUILT_IN_VSPRINTF) || \
+ defined(CONFIG_BUILT_IN_VSNPRINTF) || \
+ defined(CONFIG_BUILT_IN_VSNRPRINTF ))
+
static char * ksprintn(char * nbuf, uint64_t num, int base, int *len, int upper);
static void snprintf_func(int ch, void * arg);
static int kvprintf(char const * fmt, void (*func)(int, void *), void * arg, int radix, va_list ap);
-#if NEED_SPRINTF
+#ifdef CONFIG_BUILT_IN_SPRINTF
/*
* Scaled down version of sprintf(3).
*/
#endif
-#if NEED_VSPRINTF
+#ifdef CONFIG_BUILT_IN_VSPRINTF
/*
* Scaled down version of vsprintf(3).
*/
#endif
-#if NEED_SNPRINTF
+#ifdef CONFIG_BUILT_IN_SNPRINTF
/*
* Scaled down version of snprintf(3).
*/
#endif
-#if NEED_VSNPRINTF
+#ifdef CONFIG_BUILT_IN_VSNPRINTF
/*
* Scaled down version of vsnprintf(3).
*/
#endif
-#if NEED_VSNRPRINTF
+#ifdef CONFIG_BUILT_IN_VSNRPRINTF
/*
* Kernel version which takes radix argument vsnprintf(3).
*/
}
+#endif // CONFIG_BUILT_IN_STDIO
+
void v3_hexdump(const void * ptr, int length, const char * hdr, int flags) {