summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--usr.sbin/httpd/httpd.c3
-rw-r--r--usr.sbin/httpd/httpd.h6
-rw-r--r--usr.sbin/httpd/logger.c3
-rw-r--r--usr.sbin/httpd/server.c3
-rw-r--r--usr.sbin/iscsictl/iscsictl.c3
-rw-r--r--usr.sbin/iscsid/iscsid.c3
-rw-r--r--usr.sbin/iscsid/iscsid.h6
-rw-r--r--usr.sbin/iscsid/util.c3
-rw-r--r--usr.sbin/iscsid/vscsi.c3
-rw-r--r--usr.sbin/snmpd/snmpd.c3
-rw-r--r--usr.sbin/snmpd/snmpd.h6
-rw-r--r--usr.sbin/snmpd/snmpe.c3
-rw-r--r--usr.sbin/snmpd/traphandler.c3
-rw-r--r--usr.sbin/syslogd/ttymsg.c7
14 files changed, 30 insertions, 25 deletions
diff --git a/usr.sbin/httpd/httpd.c b/usr.sbin/httpd/httpd.c
index fae7c53ad84..59ab347d62b 100644
--- a/usr.sbin/httpd/httpd.c
+++ b/usr.sbin/httpd/httpd.c
@@ -1,4 +1,4 @@
-/* $OpenBSD: httpd.c,v 1.56 2016/06/10 12:09:48 florian Exp $ */
+/* $OpenBSD: httpd.c,v 1.57 2016/08/16 18:41:57 tedu Exp $ */
/*
* Copyright (c) 2014 Reyk Floeter <reyk@openbsd.org>
@@ -16,7 +16,6 @@
* OR IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS SOFTWARE.
*/
-#include <sys/param.h> /* nitems */
#include <sys/types.h>
#include <sys/queue.h>
#include <sys/socket.h>
diff --git a/usr.sbin/httpd/httpd.h b/usr.sbin/httpd/httpd.h
index 595cce9caee..070b5d39124 100644
--- a/usr.sbin/httpd/httpd.h
+++ b/usr.sbin/httpd/httpd.h
@@ -1,4 +1,4 @@
-/* $OpenBSD: httpd.h,v 1.106 2016/08/15 16:12:34 jsing Exp $ */
+/* $OpenBSD: httpd.h,v 1.107 2016/08/16 18:41:57 tedu Exp $ */
/*
* Copyright (c) 2006 - 2015 Reyk Floeter <reyk@openbsd.org>
@@ -38,6 +38,10 @@
#include "patterns.h"
+#ifndef nitems
+#define nitems(_a) (sizeof((_a)) / sizeof((_a)[0]))
+#endif
+
#define CONF_FILE "/etc/httpd.conf"
#define HTTPD_SOCKET "/var/run/httpd.sock"
#define HTTPD_USER "www"
diff --git a/usr.sbin/httpd/logger.c b/usr.sbin/httpd/logger.c
index a212fb13068..01ba59fa663 100644
--- a/usr.sbin/httpd/logger.c
+++ b/usr.sbin/httpd/logger.c
@@ -1,4 +1,4 @@
-/* $OpenBSD: logger.c,v 1.15 2015/12/02 15:13:00 reyk Exp $ */
+/* $OpenBSD: logger.c,v 1.16 2016/08/16 18:41:57 tedu Exp $ */
/*
* Copyright (c) 2014 Reyk Floeter <reyk@openbsd.org>
@@ -16,7 +16,6 @@
* OR IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS SOFTWARE.
*/
-#include <sys/param.h> /* nitems */
#include <sys/types.h>
#include <sys/queue.h>
#include <sys/uio.h>
diff --git a/usr.sbin/httpd/server.c b/usr.sbin/httpd/server.c
index 9273e60c8a2..293655ed475 100644
--- a/usr.sbin/httpd/server.c
+++ b/usr.sbin/httpd/server.c
@@ -1,4 +1,4 @@
-/* $OpenBSD: server.c,v 1.90 2016/08/16 17:10:01 reyk Exp $ */
+/* $OpenBSD: server.c,v 1.91 2016/08/16 18:41:57 tedu Exp $ */
/*
* Copyright (c) 2006 - 2015 Reyk Floeter <reyk@openbsd.org>
@@ -16,7 +16,6 @@
* OR IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS SOFTWARE.
*/
-#include <sys/param.h> /* nitems */
#include <sys/types.h>
#include <sys/queue.h>
#include <sys/time.h>
diff --git a/usr.sbin/iscsictl/iscsictl.c b/usr.sbin/iscsictl/iscsictl.c
index 6c3460101e0..77f9c74abde 100644
--- a/usr.sbin/iscsictl/iscsictl.c
+++ b/usr.sbin/iscsictl/iscsictl.c
@@ -1,4 +1,4 @@
-/* $OpenBSD: iscsictl.c,v 1.10 2015/11/11 02:55:12 deraadt Exp $ */
+/* $OpenBSD: iscsictl.c,v 1.11 2016/08/16 18:41:57 tedu Exp $ */
/*
* Copyright (c) 2010 Claudio Jeker <claudio@openbsd.org>
@@ -16,7 +16,6 @@
* OR IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS SOFTWARE.
*/
-#include <sys/param.h> /* nitems */
#include <sys/queue.h>
#include <sys/socket.h>
#include <sys/uio.h>
diff --git a/usr.sbin/iscsid/iscsid.c b/usr.sbin/iscsid/iscsid.c
index 4a02c2aa387..ae8bb8b8525 100644
--- a/usr.sbin/iscsid/iscsid.c
+++ b/usr.sbin/iscsid/iscsid.c
@@ -1,4 +1,4 @@
-/* $OpenBSD: iscsid.c,v 1.18 2015/01/16 15:57:06 deraadt Exp $ */
+/* $OpenBSD: iscsid.c,v 1.19 2016/08/16 18:41:57 tedu Exp $ */
/*
* Copyright (c) 2009 Claudio Jeker <claudio@openbsd.org>
@@ -16,7 +16,6 @@
* OR IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS SOFTWARE.
*/
-#include <sys/param.h> /* nitems */
#include <sys/queue.h>
#include <sys/socket.h>
#include <sys/sysctl.h>
diff --git a/usr.sbin/iscsid/iscsid.h b/usr.sbin/iscsid/iscsid.h
index af5a57c0383..cf9497123df 100644
--- a/usr.sbin/iscsid/iscsid.h
+++ b/usr.sbin/iscsid/iscsid.h
@@ -1,4 +1,4 @@
-/* $OpenBSD: iscsid.h,v 1.14 2014/05/10 11:30:47 claudio Exp $ */
+/* $OpenBSD: iscsid.h,v 1.15 2016/08/16 18:41:57 tedu Exp $ */
/*
* Copyright (c) 2009 Claudio Jeker <claudio@openbsd.org>
@@ -38,6 +38,10 @@
#define PDU_LEN(x) ((((x) + 3) / 4) * 4)
+#ifndef nitems
+#define nitems(_a) (sizeof((_a)) / sizeof((_a)[0]))
+#endif
+
/*
* Common control message header.
* A message can consist of up to 3 parts with specified length.
diff --git a/usr.sbin/iscsid/util.c b/usr.sbin/iscsid/util.c
index 904365deb2a..ef9711c3e94 100644
--- a/usr.sbin/iscsid/util.c
+++ b/usr.sbin/iscsid/util.c
@@ -1,4 +1,4 @@
-/* $OpenBSD: util.c,v 1.7 2016/03/20 00:01:22 krw Exp $ */
+/* $OpenBSD: util.c,v 1.8 2016/08/16 18:41:57 tedu Exp $ */
/*
* Copyright (c) 2009 Claudio Jeker <claudio@openbsd.org>
@@ -16,7 +16,6 @@
* OR IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS SOFTWARE.
*/
-#include <sys/param.h> /* nitems */
#include <sys/queue.h>
#include <sys/socket.h>
#include <sys/uio.h>
diff --git a/usr.sbin/iscsid/vscsi.c b/usr.sbin/iscsid/vscsi.c
index 4ca0893528b..dc8d5ed67e0 100644
--- a/usr.sbin/iscsid/vscsi.c
+++ b/usr.sbin/iscsid/vscsi.c
@@ -1,4 +1,4 @@
-/* $OpenBSD: vscsi.c,v 1.16 2015/12/02 16:37:10 mmcc Exp $ */
+/* $OpenBSD: vscsi.c,v 1.17 2016/08/16 18:41:57 tedu Exp $ */
/*
* Copyright (c) 2009 Claudio Jeker <claudio@openbsd.org>
@@ -16,7 +16,6 @@
* OR IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS SOFTWARE.
*/
-#include <sys/param.h> /* for nitems */
#include <sys/ioctl.h>
#include <sys/queue.h>
#include <sys/socket.h>
diff --git a/usr.sbin/snmpd/snmpd.c b/usr.sbin/snmpd/snmpd.c
index fa9018df10f..f6f33f92bd3 100644
--- a/usr.sbin/snmpd/snmpd.c
+++ b/usr.sbin/snmpd/snmpd.c
@@ -1,4 +1,4 @@
-/* $OpenBSD: snmpd.c,v 1.32 2016/02/02 17:51:11 sthen Exp $ */
+/* $OpenBSD: snmpd.c,v 1.33 2016/08/16 18:41:57 tedu Exp $ */
/*
* Copyright (c) 2007, 2008, 2012 Reyk Floeter <reyk@openbsd.org>
@@ -16,7 +16,6 @@
* OR IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS SOFTWARE.
*/
-#include <sys/param.h> /* nitems */
#include <sys/types.h>
#include <sys/queue.h>
#include <sys/socket.h>
diff --git a/usr.sbin/snmpd/snmpd.h b/usr.sbin/snmpd/snmpd.h
index 32fa84134e5..8480541cbf5 100644
--- a/usr.sbin/snmpd/snmpd.h
+++ b/usr.sbin/snmpd/snmpd.h
@@ -1,4 +1,4 @@
-/* $OpenBSD: snmpd.h,v 1.66 2015/12/07 12:33:08 reyk Exp $ */
+/* $OpenBSD: snmpd.h,v 1.67 2016/08/16 18:41:57 tedu Exp $ */
/*
* Copyright (c) 2007, 2008, 2012 Reyk Floeter <reyk@openbsd.org>
@@ -36,6 +36,10 @@
#include "ber.h"
#include "snmp.h"
+#ifndef nitems
+#define nitems(_a) (sizeof((_a)) / sizeof((_a)[0]))
+#endif
+
/*
* common definitions for snmpd
*/
diff --git a/usr.sbin/snmpd/snmpe.c b/usr.sbin/snmpd/snmpe.c
index e32e2533d1e..06c07212a3a 100644
--- a/usr.sbin/snmpd/snmpe.c
+++ b/usr.sbin/snmpd/snmpe.c
@@ -1,4 +1,4 @@
-/* $OpenBSD: snmpe.c,v 1.41 2015/10/08 08:17:30 sthen Exp $ */
+/* $OpenBSD: snmpe.c,v 1.42 2016/08/16 18:41:57 tedu Exp $ */
/*
* Copyright (c) 2007, 2008, 2012 Reyk Floeter <reyk@openbsd.org>
@@ -16,7 +16,6 @@
* OR IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS SOFTWARE.
*/
-#include <sys/param.h> /* nitems */
#include <sys/queue.h>
#include <sys/types.h>
#include <sys/stat.h>
diff --git a/usr.sbin/snmpd/traphandler.c b/usr.sbin/snmpd/traphandler.c
index 7b3f42da127..76180906b72 100644
--- a/usr.sbin/snmpd/traphandler.c
+++ b/usr.sbin/snmpd/traphandler.c
@@ -1,4 +1,4 @@
-/* $OpenBSD: traphandler.c,v 1.4 2015/12/07 12:33:08 reyk Exp $ */
+/* $OpenBSD: traphandler.c,v 1.5 2016/08/16 18:41:57 tedu Exp $ */
/*
* Copyright (c) 2014 Bret Stephen Lambert <blambert@openbsd.org>
@@ -17,7 +17,6 @@
*/
#include <sys/queue.h>
-#include <sys/param.h> /* nitems */
#include <sys/socket.h>
#include <sys/socketvar.h>
#include <sys/stat.h>
diff --git a/usr.sbin/syslogd/ttymsg.c b/usr.sbin/syslogd/ttymsg.c
index e899c786973..e7c0738bb97 100644
--- a/usr.sbin/syslogd/ttymsg.c
+++ b/usr.sbin/syslogd/ttymsg.c
@@ -1,4 +1,4 @@
-/* $OpenBSD: ttymsg.c,v 1.10 2016/04/02 19:55:10 krw Exp $ */
+/* $OpenBSD: ttymsg.c,v 1.11 2016/08/16 18:41:57 tedu Exp $ */
/* $NetBSD: ttymsg.c,v 1.3 1994/11/17 07:17:55 jtc Exp $ */
/*
@@ -30,7 +30,6 @@
* SUCH DAMAGE.
*/
-#include <sys/param.h> /* nitems */
#include <sys/stat.h>
#include <dirent.h>
@@ -45,6 +44,10 @@
#include "syslogd.h"
+#ifndef nitems
+#define nitems(_a) (sizeof((_a)) / sizeof((_a)[0]))
+#endif
+
struct tty_delay {
struct event td_event;
size_t td_length;