diff options
author | Nicholas Marriott <nicm@cvs.openbsd.org> | 2009-06-25 22:08:16 +0000 |
---|---|---|
committer | Nicholas Marriott <nicm@cvs.openbsd.org> | 2009-06-25 22:08:16 +0000 |
commit | 572f976ee6c37c434fa35c9b5b4ad1cccc07feaa (patch) | |
tree | c0ab8b0b85ab95dad8e7b8f3dda8b2b8ce31fdfc /usr.bin/tmux | |
parent | 429f9268a4fee3d872a0b78ec118e0bb0843d87a (diff) |
#ifndef nitems to avoid redefining it if it is already in a header.
Diffstat (limited to 'usr.bin/tmux')
-rw-r--r-- | usr.bin/tmux/tmux.h | 4 |
1 files changed, 3 insertions, 1 deletions
diff --git a/usr.bin/tmux/tmux.h b/usr.bin/tmux/tmux.h index a0c040385ac..17956e9d41d 100644 --- a/usr.bin/tmux/tmux.h +++ b/usr.bin/tmux/tmux.h @@ -1,4 +1,4 @@ -/* $OpenBSD: tmux.h,v 1.13 2009/06/25 06:23:10 nicm Exp $ */ +/* $OpenBSD: tmux.h,v 1.14 2009/06/25 22:08:15 nicm Exp $ */ /* * Copyright (c) 2007 Nicholas Marriott <nicm@users.sourceforge.net> @@ -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) |