-/* $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>
* 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>
-/* $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>
#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"
-/* $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>
* 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>
-/* $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>
* 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>
-/* $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>
* 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>
-/* $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>
* 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>
-/* $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>
#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.
-/* $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>
* 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>
-/* $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>
* 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>
-/* $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>
* 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>
-/* $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>
#include "ber.h"
#include "snmp.h"
+#ifndef nitems
+#define nitems(_a) (sizeof((_a)) / sizeof((_a)[0]))
+#endif
+
/*
* common definitions for snmpd
*/
-/* $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>
* 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>
-/* $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>
*/
#include <sys/queue.h>
-#include <sys/param.h> /* nitems */
#include <sys/socket.h>
#include <sys/socketvar.h>
#include <sys/stat.h>
-/* $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 $ */
/*
* SUCH DAMAGE.
*/
-#include <sys/param.h> /* nitems */
#include <sys/stat.h>
#include <dirent.h>
#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;