summaryrefslogtreecommitdiff
path: root/usr.bin/tmux/tmux.h
diff options
context:
space:
mode:
authorNicholas Marriott <nicm@cvs.openbsd.org>2009-08-24 08:03:12 +0000
committerNicholas Marriott <nicm@cvs.openbsd.org>2009-08-24 08:03:12 +0000
commit1b341d04d4ab28c93dcc1e5f3a0dde8c68c53aa5 (patch)
tree816ba5ec30bb427608ec9f2bdd4214fbce4feace /usr.bin/tmux/tmux.h
parenta08e2162b5a07fa9cb452d9772ee010223455762 (diff)
gcc2 doesn't understand attributes on function pointers.
Diffstat (limited to 'usr.bin/tmux/tmux.h')
-rw-r--r--usr.bin/tmux/tmux.h9
1 files changed, 8 insertions, 1 deletions
diff --git a/usr.bin/tmux/tmux.h b/usr.bin/tmux/tmux.h
index d43a17764dd..b3bcd058427 100644
--- a/usr.bin/tmux/tmux.h
+++ b/usr.bin/tmux/tmux.h
@@ -1,4 +1,4 @@
-/* $OpenBSD: tmux.h,v 1.89 2009/08/23 17:29:51 nicm Exp $ */
+/* $OpenBSD: tmux.h,v 1.90 2009/08/24 08:03:11 nicm Exp $ */
/*
* Copyright (c) 2007 Nicholas Marriott <nicm@users.sourceforge.net>
@@ -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 {