Source-Changes-HG archive

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index][Old Index]

[src/trunk]: src/libexec/httpd prepare for netbsd to be mastersrc for bozohttpd.



details:   https://anonhg.NetBSD.org/src/rev/b6f7b63f967c
branches:  trunk
changeset: 787886:b6f7b63f967c
user:      mrg <mrg%NetBSD.org@localhost>
date:      Thu Jul 11 08:24:47 2013 +0000

description:
prepare for netbsd to be mastersrc for bozohttpd.

diffstat:

 libexec/httpd/bozohttpd.h    |   4 +-
 libexec/httpd/netbsd_queue.h |  82 ++++++++++++++++++++++++++++++++++++++++++++
 2 files changed, 84 insertions(+), 2 deletions(-)

diffs (104 lines):

diff -r e5231e55db26 -r b6f7b63f967c libexec/httpd/bozohttpd.h
--- a/libexec/httpd/bozohttpd.h Thu Jul 11 08:19:56 2013 +0000
+++ b/libexec/httpd/bozohttpd.h Thu Jul 11 08:24:47 2013 +0000
@@ -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 -r e5231e55db26 -r b6f7b63f967c libexec/httpd/netbsd_queue.h
--- /dev/null   Thu Jan 01 00:00:00 1970 +0000
+++ b/libexec/httpd/netbsd_queue.h      Thu Jul 11 08:24:47 2013 +0000
@@ -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_ */



Home | Main Index | Thread Index | Old Index