summaryrefslogtreecommitdiff
path: root/libexec/httpd
diff options
context:
space:
mode:
authormrg <mrg@NetBSD.org>2013-07-11 08:24:47 +0000
committermrg <mrg@NetBSD.org>2013-07-11 08:24:47 +0000
commit2a184dcef9edb0956447c5289f8158bbdb5f4d93 (patch)
treeca53914ffcdf1d4f0e5c446f0329e5212a4d5f9a /libexec/httpd
parentf26145283e3c76e9716f8ed0d27d5f5e176b7178 (diff)
prepare for netbsd to be mastersrc for bozohttpd.
Diffstat (limited to 'libexec/httpd')
-rw-r--r--libexec/httpd/bozohttpd.h4
-rw-r--r--libexec/httpd/netbsd_queue.h82
2 files changed, 84 insertions, 2 deletions
diff --git a/libexec/httpd/bozohttpd.h b/libexec/httpd/bozohttpd.h
index d9886952543..0128870c351 100644
--- a/libexec/httpd/bozohttpd.h
+++ b/libexec/httpd/bozohttpd.h
@@ -1,4 +1,4 @@
-/* $NetBSD: bozohttpd.h,v 1.26 2013/07/11 07:46:37 mrg Exp $ */
+/* $NetBSD: bozohttpd.h,v 1.27 2013/07/11 08:24:47 mrg Exp $ */
/* $eterna: bozohttpd.h,v 1.39 2011/11/18 09:21:15 mrg Exp $ */
@@ -32,7 +32,7 @@
#ifndef BOZOHTTOPD_H_
#define BOZOHTTOPD_H_ 1
-#include <sys/queue.h>
+#include "netbsd_queue.h"
#include <sys/stat.h>
diff --git a/libexec/httpd/netbsd_queue.h b/libexec/httpd/netbsd_queue.h
new file mode 100644
index 00000000000..906f7314155
--- /dev/null
+++ b/libexec/httpd/netbsd_queue.h
@@ -0,0 +1,82 @@
+/* $eterna: queue.h,v 1.6 2009/04/18 08:36:03 mrg Exp $ */
+/* from: NetBSD: queue.h,v 1.51 2009/03/11 06:51:53 mrg Exp */
+
+/*
+ * Copyright (c) 1991, 1993
+ * The Regents of the University of California. All rights reserved.
+ *
+ * Redistribution and use in source and binary forms, with or without
+ * modification, are permitted provided that the following conditions
+ * are met:
+ * 1. Redistributions of source code must retain the above copyright
+ * notice, this list of conditions and the following disclaimer.
+ * 2. Redistributions in binary form must reproduce the above copyright
+ * notice, this list of conditions and the following disclaimer in the
+ * documentation and/or other materials provided with the distribution.
+ * 3. Neither the name of the University nor the names of its contributors
+ * may be used to endorse or promote products derived from this software
+ * without specific prior written permission.
+ *
+ * THIS SOFTWARE IS PROVIDED BY THE REGENTS AND CONTRIBUTORS ``AS IS'' AND
+ * ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
+ * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
+ * ARE DISCLAIMED. IN NO EVENT SHALL THE REGENTS OR CONTRIBUTORS BE LIABLE
+ * FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL
+ * DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS
+ * OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION)
+ * HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT
+ * LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY
+ * OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
+ * SUCH DAMAGE.
+ *
+ * @(#)queue.h 8.5 (Berkeley) 8/20/94
+ */
+
+#ifndef _SYS_QUEUE_H_
+#define _SYS_QUEUE_H_
+
+/*
+ * Simple queue definitions.
+ */
+#define SIMPLEQ_HEAD(name, type) \
+struct name { \
+ struct type *sqh_first; /* first element */ \
+ struct type **sqh_last; /* addr of last next element */ \
+}
+
+#define SIMPLEQ_ENTRY(type) \
+struct { \
+ struct type *sqe_next; /* next element */ \
+}
+
+/*
+ * Simple queue functions.
+ */
+#define SIMPLEQ_INIT(head) do { \
+ (head)->sqh_first = NULL; \
+ (head)->sqh_last = &(head)->sqh_first; \
+} while (/*CONSTCOND*/0)
+
+#define SIMPLEQ_INSERT_TAIL(head, elm, field) do { \
+ (elm)->field.sqe_next = NULL; \
+ *(head)->sqh_last = (elm); \
+ (head)->sqh_last = &(elm)->field.sqe_next; \
+} while (/*CONSTCOND*/0)
+
+#define SIMPLEQ_FOREACH(var, head, field) \
+ for ((var) = ((head)->sqh_first); \
+ (var); \
+ (var) = ((var)->field.sqe_next))
+
+#define SIMPLEQ_FOREACH_SAFE(var, head, field, next) \
+ for ((var) = ((head)->sqh_first); \
+ (var) && ((next = ((var)->field.sqe_next)), 1); \
+ (var) = (next))
+
+/*
+ * Simple queue access methods.
+ */
+#define SIMPLEQ_FIRST(head) ((head)->sqh_first)
+#define SIMPLEQ_NEXT(elm, field) ((elm)->field.sqe_next)
+
+#endif /* !_SYS_QUEUE_H_ */