aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--osdep-freebsd.c4
-rw-r--r--osdep-netbsd.c2
-rw-r--r--osdep-openbsd.c4
-rw-r--r--tmux.h4
4 files changed, 11 insertions, 3 deletions
diff --git a/osdep-freebsd.c b/osdep-freebsd.c
index 92139565..3c67c779 100644
--- a/osdep-freebsd.c
+++ b/osdep-freebsd.c
@@ -1,4 +1,4 @@
-/* $Id: osdep-freebsd.c,v 1.15 2009-04-29 23:07:35 nicm Exp $ */
+/* $Id: osdep-freebsd.c,v 1.16 2009-06-26 15:31:15 nicm Exp $ */
/*
* Copyright (c) 2009 Nicholas Marriott <nicm@users.sourceforge.net>
@@ -31,7 +31,9 @@
char *osdep_get_name(int, char *);
+#ifndef nitems
#define nitems(_a) (sizeof((_a)) / sizeof((_a)[0]))
+#endif
#define is_runnable(p) \
((p)->ki_stat == SRUN || (p)->ki_stat == SIDL)
diff --git a/osdep-netbsd.c b/osdep-netbsd.c
index 96fd892a..2102277a 100644
--- a/osdep-netbsd.c
+++ b/osdep-netbsd.c
@@ -26,7 +26,9 @@
#include <string.h>
#include <unistd.h>
+#ifndef nitems
#define nitems(_a) (sizeof((_a)) / sizeof((_a)[0]))
+#endif
#define is_runnable(p) \
((p)->p_stat == LSRUN || (p)->p_stat == SIDL)
diff --git a/osdep-openbsd.c b/osdep-openbsd.c
index 243018f2..57a67371 100644
--- a/osdep-openbsd.c
+++ b/osdep-openbsd.c
@@ -1,4 +1,4 @@
-/* $Id: osdep-openbsd.c,v 1.15 2009-04-29 23:07:35 nicm Exp $ */
+/* $Id: osdep-openbsd.c,v 1.16 2009-06-26 15:31:15 nicm Exp $ */
/*
* Copyright (c) 2009 Nicholas Marriott <nicm@users.sourceforge.net>
@@ -25,7 +25,9 @@
#include <string.h>
#include <unistd.h>
+#ifndef nitems
#define nitems(_a) (sizeof((_a)) / sizeof((_a)[0]))
+#endif
#define is_runnable(p) \
((p)->p_stat == SRUN || (p)->p_stat == SIDL || (p)->p_stat == SONPROC)
diff --git a/tmux.h b/tmux.h
index 53941da4..fdb649df 100644
--- a/tmux.h
+++ b/tmux.h
@@ -1,4 +1,4 @@
-/* $Id: tmux.h,v 1.344 2009-06-25 17:02:59 nicm Exp $ */
+/* $Id $ */
/*
* Copyright (c) 2007 Nicholas Marriott <nicm@users.sourceforge.net>
@@ -72,7 +72,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)