minix/common/include/ddekit/debug.h
Gianluca Guida f4814901af Move even more includes to common/include.
This patch moves more includes (most of them, to tell the truth) to
common/include directory. This completes the list of includes needed
to compile current trunk with the new libc (but to do that you need
more patches in queue).

This patch also contains some modification (for compilation with new
headers) to the common includes under __NBSD_LIBC, the define used
in mk script to specialize compilation with new includes.
2011-03-03 16:39:02 +00:00

41 lines
992 B
C

#ifndef DDEKIT_DEBUG_H
#define DDEKIT_DEBUG_H
#include <ddekit/ddekit.h>
#include <ddekit/printf.h>
#define DDEBUG_QUIET 0
#define DDEBUG_ERR 1
#define DDEBUG_WARN 2
#define DDEBUG_INFO 3
#define DDEBUG_VERBOSE 4
#define DDEBUG_MEM DDEBUG_INFO
#define DDEBUG_MSG_ERR(fmt, ...)
#define DDEBUG_MSG_WARN(fmt, ...)
#define DDEBUG_MSG_INFO(fmt, ...)
#define DDEBUG_MSG_VERBOSE(fmt, ...)
#if DDEBUG >= DDEBUG_ERR
#undef DDEBUG_MSG_ERR
#define DDEBUG_MSG_ERR(fmt, ...) ddekit_printf("%s : "fmt"\n", __func__, ##__VA_ARGS__ )
#endif
#if DDEBUG >= DDEBUG_WARN
#undef DDEBUG_MSG_WARN
#define DDEBUG_MSG_WARN(fmt, ...) ddekit_printf("%s: "fmt"\n", __func__, ##__VA_ARGS__ )
#endif
#if DDEBUG >= DDEBUG_INFO
#undef DDEBUG_MSG_INFO
#define DDEBUG_MSG_INFO(fmt, ...) ddekit_printf("%s: "fmt"\n", __func__, ##__VA_ARGS__ )
#endif
#if DDEBUG >= DDEBUG_VERBOSE
#undef DDEBUG_MSG_VERBOSE
#define DDEBUG_MSG_VERBOSE(fmt, ...) ddekit_printf("%s: "fmt"\n", __func__, ##__VA_ARGS__ )
#endif
#endif