From e225ce0fd71458cf8f03d0d122c6b3987162709f Mon Sep 17 00:00:00 2001 From: Nicholas Marriott Date: Thu, 25 Jun 2009 22:08:15 +0000 Subject: [PATCH] #ifndef nitems to avoid redefining it if it is already in a header. --- tmux.h | 2 ++ 1 file changed, 2 insertions(+) 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)