From 4f1d81c4ce89440bd2f155cbb8002b622f13ce0b Mon Sep 17 00:00:00 2001 From: Nicholas Marriott Date: Mon, 24 Aug 2009 08:03:11 +0000 Subject: [PATCH] gcc2 doesn't understand attributes on function pointers. --- tmux.h | 7 +++++++ 1 file changed, 7 insertions(+) diff --git a/tmux.h b/tmux.h index a2d01ea0..1f3cf74d 100644 --- a/tmux.h +++ b/tmux.h @@ -990,9 +990,16 @@ struct cmd_ctx { struct msg_command_data *msgdata; + /* gcc2 doesn't understand attributes on function pointers... */ +#if defined(__GNUC__) && __GNUC__ >= 3 void printflike2 (*print)(struct cmd_ctx *, const char *, ...); void printflike2 (*info)(struct cmd_ctx *, const char *, ...); void printflike2 (*error)(struct cmd_ctx *, const char *, ...); +#else + void (*print)(struct cmd_ctx *, const char *, ...); + void (*info)(struct cmd_ctx *, const char *, ...); + void (*error)(struct cmd_ctx *, const char *, ...); +#endif }; struct cmd {