rl-attribute.dpatch by Do not redefine __attribute__, define macro __rl_attribute__ Index: b/readline.h =================================================================== --- a/readline.h +++ b/readline.h @@ -385,7 +385,7 @@ extern int rl_reset_line_state PARAMS((v extern int rl_crlf PARAMS((void)); #if defined (USE_VARARGS) && defined (PREFER_STDARG) -extern int rl_message (const char *, ...) __attribute__((__format__ (printf, 1, 2))); +extern int rl_message (const char *, ...) __rl_attribute__((__format__ (printf, 1, 2))); #else extern int rl_message (); #endif Index: b/rlstdc.h =================================================================== --- a/rlstdc.h +++ b/rlstdc.h @@ -36,10 +36,10 @@ # endif #endif -#ifndef __attribute__ -# if __GNUC__ < 2 || (__GNUC__ == 2 && __GNUC_MINOR__ < 8) -# define __attribute__(x) -# endif +#if defined(__GNUC__) && __GNUC__ >= 2 +# define __rl_attribute__(x) __attribute__(x) +#else +# define __rl_attribute__(x) #endif /* Moved from config.h.in because readline.h:rl_message depends on these