diff -r 31dc4ec8710c -r 7802a7d5584f include/unix/applicfg.h --- a/include/unix/applicfg.h Tue Feb 12 09:42:56 2008 +0100 +++ b/include/unix/applicfg.h Tue Feb 12 09:44:55 2008 +0100 @@ -23,9 +23,13 @@ #ifndef __APPLICFG_LINUX__ #define __APPLICFG_LINUX__ +#ifndef __KERNEL__ #include #include #include +#else +#include +#endif /* Define the architecture : little_endian or big_endian ----------------------------------------------------- @@ -72,15 +76,18 @@ /* Definition of error and warning macros */ /* -------------------------------------- */ -#if defined DEBUG_ERR_CONSOLE_ON || defined DEBUG_WAR_CONSOLE_ON -#include +#ifndef __KERNEL__ +# include +# define MSG(...) printf (__VA_ARGS__) +#else +# define MSG(...) printk (__VA_ARGS__) #endif /* Definition of MSG_ERR */ /* --------------------- */ #ifdef DEBUG_ERR_CONSOLE_ON # define MSG_ERR(num, str, val) \ - printf("%s,%d : 0X%x %s 0X%x \n",__FILE__, __LINE__,num, str, val); + MSG("%s,%d : 0X%x %s 0X%x \n",__FILE__, __LINE__,num, str, val); #else # define MSG_ERR(num, str, val) #endif @@ -89,7 +96,7 @@ /* --------------------- */ #ifdef DEBUG_WAR_CONSOLE_ON # define MSG_WAR(num, str, val) \ - printf("%s,%d : 0X%x %s 0X%x \n",__FILE__, __LINE__,num, str, val); + MSG("%s,%d : 0X%x %s 0X%x \n",__FILE__, __LINE__,num, str, val); #else # define MSG_WAR(num, str, val) #endif