Module Name: src
Committed By: mrg
Date: Thu Jul 11 08:24:47 UTC 2013
Modified Files:
src/libexec/httpd: bozohttpd.h
Added Files:
src/libexec/httpd: netbsd_queue.h
Log Message:
prepare for netbsd to be mastersrc for bozohttpd.
To generate a diff of this commit:
cvs rdiff -u -r1.26 -r1.27 src/libexec/httpd/bozohttpd.h
cvs rdiff -u -r0 -r1.1 src/libexec/httpd/netbsd_queue.h
Please note that diffs are not public domain; they are subject to the
copyright notices on the relevant files.
Modified files:
Index: src/libexec/httpd/bozohttpd.h
diff -u src/libexec/httpd/bozohttpd.h:1.26 src/libexec/httpd/bozohttpd.h:1.27
--- src/libexec/httpd/bozohttpd.h:1.26 Thu Jul 11 07:46:37 2013
+++ src/libexec/httpd/bozohttpd.h Thu Jul 11 08:24:47 2013
@@ -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>
Added files:
Index: src/libexec/httpd/netbsd_queue.h
diff -u /dev/null src/libexec/httpd/netbsd_queue.h:1.1
--- /dev/null Thu Jul 11 08:24:47 2013
+++ src/libexec/httpd/netbsd_queue.h Thu Jul 11 08:24:47 2013
@@ -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_ */