--- zzzz-none-000/linux-2.4.17/include/linux/kernel.h 2001-11-22 19:46:18.000000000 +0000 +++ sangam-fb-401/linux-2.4.17/include/linux/kernel.h 2005-05-13 14:48:10.000000000 +0000 @@ -11,6 +11,7 @@ #include #include #include +#include /* Optimization barrier */ /* The "volatile" is due to gcc bugs */ @@ -79,8 +80,12 @@ extern int session_of_pgrp(int pgrp); -asmlinkage int printk(const char * fmt, ...) - __attribute__ ((format (printf, 1, 2))); +#if !defined(CONFIG_NO_PRINTK) +asmlinkage int printk(const char * fmt, ...) __attribute__ ((format (printf, 1, 2))); +#else /*--- #if !defined(CONFIG_NO_PRINTK) ---*/ +#define printk(...) +asmlinkage int __printk(const char * fmt, ...) __attribute__ ((format (printf, 1, 2))); +#endif /*--- #else ---*/ /*--- #if !defined(CONFIG_NO_PRINTK) ---*/ extern int console_loglevel; @@ -101,7 +106,8 @@ extern int tainted; extern const char *print_tainted(void); -#if DEBUG +#if !defined(CONFIG_NO_PRINTK) +#ifdef DEBUG #define pr_debug(fmt,arg...) \ printk(KERN_DEBUG fmt,##arg) #else @@ -111,6 +117,10 @@ #define pr_info(fmt,arg...) \ printk(KERN_INFO fmt,##arg) +#else /*--- #if !defined(CONFIG_NO_PRINTK) ---*/ +#define pr_info(...) +#define pr_debug(...) +#endif /*--- #else ---*/ /*--- #if !defined(CONFIG_NO_PRINTK) ---*/ /* * Display an IP address in readable format. @@ -176,4 +186,6 @@ char _f[20-2*sizeof(long)-sizeof(int)]; /* Padding: libc5 uses this.. */ }; -#endif +#define BUG_ON(condition) do { if (unlikely((condition)!=0)) BUG(); } while(0) + +#endif /* _LINUX_KERNEL_H */