aboutsummaryrefslogtreecommitdiff
path: root/tmux.h
diff options
context:
space:
mode:
authorNicholas Marriott <nicm@openbsd.org>2009-06-25 22:08:15 +0000
committerNicholas Marriott <nicm@openbsd.org>2009-06-25 22:08:15 +0000
commite225ce0fd71458cf8f03d0d122c6b3987162709f (patch)
tree94fe1795685a689285cc33a32c2b6abcb87a0dcb /tmux.h
parente8c10f5b342d4d2b0d905e8fc1cc1b7a8802c1ab (diff)
downloadrtmux-e225ce0fd71458cf8f03d0d122c6b3987162709f.tar.gz
rtmux-e225ce0fd71458cf8f03d0d122c6b3987162709f.tar.bz2
rtmux-e225ce0fd71458cf8f03d0d122c6b3987162709f.zip
#ifndef nitems to avoid redefining it if it is already in a header.
Diffstat (limited to 'tmux.h')
-rw-r--r--tmux.h2
1 files changed, 2 insertions, 0 deletions
diff --git a/tmux.h b/tmux.h
index 6ca1254d..4aa50b67 100644
--- a/tmux.h
+++ b/tmux.h
@@ -73,7 +73,9 @@ extern const char *__progname;
#define printflike5 __attribute__ ((format (printf, 5, 6)))
/* Number of items in array. */
+#ifndef nitems
#define nitems(_a) (sizeof((_a)) / sizeof((_a)[0]))
+#endif
/* Buffer macros. */
#define BUFFER_USED(b) ((b)->size)