ia64/xen-unstable

diff xen/include/xen/lib.h @ 4654:ccc4ee412321

bitkeeper revision 1.1381 (426ccd3chFZ3jThNSK9--Zvf3r2fug)

No longer disable format checking for printf/printk statements. This
required a whole bunch of cleanups to get the build working again.
Signed-off-by: Keir Fraser <keir@xensource.com>
author kaf24@firebug.cl.cam.ac.uk
date Mon Apr 25 10:58:04 2005 +0000 (2005-04-25)
parents 75e466e245dc
children 251ac792d8c1 dff93c0ff33e 487de0451d2b ddd290cc8f0d
line diff
     1.1 --- a/xen/include/xen/lib.h	Mon Apr 25 09:04:02 2005 +0000
     1.2 +++ b/xen/include/xen/lib.h	Mon Apr 25 10:58:04 2005 +0000
     1.3 @@ -40,17 +40,20 @@ extern void debugtrace_printk(const char
     1.4  #define debugtrace_printk(_f, ...) ((void)0)
     1.5  #endif
     1.6  
     1.7 -#define printk printf
     1.8 -void printf(const char *format, ...);
     1.9 -void panic(const char *format, ...);
    1.10 -long vm_assist(struct domain *, unsigned int, unsigned int);
    1.11 +/* Allows us to use '%p' as general-purpose machine-word format char. */
    1.12 +#define _p(_x) ((void *)(unsigned long)(_x))
    1.13 +#define printk(_f , _a...) printf( _f , ## _a )
    1.14 +extern void printf(const char *format, ...)
    1.15 +    __attribute__ ((format (printf, 1, 2)));
    1.16 +extern void panic(const char *format, ...);
    1.17 +extern long vm_assist(struct domain *, unsigned int, unsigned int);
    1.18  
    1.19  /* vsprintf.c */
    1.20  extern int sprintf(char * buf, const char * fmt, ...)
    1.21 -	__attribute__ ((format (printf, 2, 3)));
    1.22 +    __attribute__ ((format (printf, 2, 3)));
    1.23  extern int vsprintf(char *buf, const char *, va_list);
    1.24  extern int snprintf(char * buf, size_t size, const char * fmt, ...)
    1.25 -	__attribute__ ((format (printf, 3, 4)));
    1.26 +    __attribute__ ((format (printf, 3, 4)));
    1.27  extern int vsnprintf(char *buf, size_t size, const char *fmt, va_list args);
    1.28  
    1.29  long simple_strtol(const char *cp,char **endp,unsigned int base);