At some point this bit was added to the system headers: # if __GNUC_PREREQ (4, 0) # define printf(...) \ __printf_chk (__USE_FORTIFY_LEVEL - 1, __VA_ARGS__) ... # endif which causes the 'printf' preprocessor symbol to be defined. This triggers some inappropriate redefines of printf to xf86printf, which should really only happen in Xserver/hw/xfree86/os-support/xf86_libc.h. Should go upstream, or even better the libc wrapper should get the knife. Kristian Høgsberg --- xc/programs/Xserver/hw/xfree86/common/xf86.h.battle-libc-wrapper 2004-01-29 03:08:26.000000000 -0500 +++ xc/programs/Xserver/hw/xfree86/common/xf86.h 2004-12-01 18:14:18.576882135 -0500 @@ -225,11 +225,6 @@ /* xf86Helper.c */ -#ifdef printf -#define printf_defined -#undef printf -#endif - void xf86AddDriver(DriverPtr driver, pointer module, int flags); void xf86DeleteDriver(int drvIndex); ScrnInfoPtr xf86AllocateScreen(DriverPtr drv, int flags); @@ -363,11 +358,6 @@ void xf86DeleteModuleInfo(int idx); #endif -#ifdef printf_defined -#define printf xf86printf -#undef printf_defined -#endif - /* xf86Debug.c */ #ifdef BUILDDEBUG void xf86Break1(void); --- xc/programs/Xserver/include/os.h.battle-libc-wrapper 2004-04-23 15:54:23.000000000 -0400 +++ xc/programs/Xserver/include/os.h 2004-12-01 18:20:24.853078836 -0500 @@ -502,16 +502,11 @@ /* XXX Need to check which GCC versions have the format(printf) attribute. */ #if defined(__GNUC__) && \ ((__GNUC__ > 2) || ((__GNUC__ == 2) && (__GNUC_MINOR__ > 4))) -#define _printf_attribute(a,b) __attribute((format(printf,a,b))) +#define _printf_attribute(a,b) __attribute((format(__printf__,a,b))) #else #define _printf_attribute(a,b) /**/ #endif -#ifdef printf -#define printf_defined -#undef printf -#endif - extern const char *LogInit(const char *fname, const char *backup); extern void LogClose(void); extern Bool LogSetParameter(LogParameter param, int value); @@ -544,10 +539,5 @@ extern int vsnprintf(char *str, size_t size, const char *format, va_list ap); #endif -#ifdef printf_defined -#define printf xf86printf -#undef printf_defined -#endif - #endif /* OS_H */