svn commit: r549100 - in head/devel/got: . files files/openbsd-compat/sys
Christian Weisgerber
naddy at FreeBSD.org
Sun Sep 20 12:37:23 UTC 2020
Author: naddy
Date: Sun Sep 20 12:37:22 2020
New Revision: 549100
URL: https://svnweb.freebsd.org/changeset/ports/549100
Log:
Map SIMPLEQ to STAILQ macros. Same thing, different name.
No need to copy OpenBSD's SIMPLEQ implementation.
Modified:
head/devel/got/Makefile
head/devel/got/files/openbsd-compat/sys/queue.h
head/devel/got/files/patch-lib_utf8.c
Modified: head/devel/got/Makefile
==============================================================================
--- head/devel/got/Makefile Sun Sep 20 12:36:06 2020 (r549099)
+++ head/devel/got/Makefile Sun Sep 20 12:37:22 2020 (r549100)
@@ -2,7 +2,7 @@
PORTNAME= got
PORTVERSION= 0.39
-PORTREVISION= 1
+PORTREVISION= 2
CATEGORIES= devel
MASTER_SITES= https://gameoftrees.org/releases/
Modified: head/devel/got/files/openbsd-compat/sys/queue.h
==============================================================================
--- head/devel/got/files/openbsd-compat/sys/queue.h Sun Sep 20 12:36:06 2020 (r549099)
+++ head/devel/got/files/openbsd-compat/sys/queue.h Sun Sep 20 12:37:22 2020 (r549100)
@@ -1,119 +1,39 @@
-/* $OpenBSD: queue.h,v 1.45 2018/07/12 14:22:54 sashan 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 _OPENBSD_COMPAT_SYS_QUEUE_H_
#define _OPENBSD_COMPAT_SYS_QUEUE_H_
#include_next <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_HEAD_INITIALIZER(head) \
- { NULL, &(head).sqh_first }
-
-#define SIMPLEQ_ENTRY(type) \
-struct { \
- struct type *sqe_next; /* next element */ \
-}
-
-/*
- * Simple queue access methods.
- */
-#define SIMPLEQ_FIRST(head) ((head)->sqh_first)
-#define SIMPLEQ_END(head) NULL
-#define SIMPLEQ_EMPTY(head) (SIMPLEQ_FIRST(head) == SIMPLEQ_END(head))
-#define SIMPLEQ_NEXT(elm, field) ((elm)->field.sqe_next)
-
-#define SIMPLEQ_FOREACH(var, head, field) \
- for((var) = SIMPLEQ_FIRST(head); \
- (var) != SIMPLEQ_END(head); \
- (var) = SIMPLEQ_NEXT(var, field))
-
-#define SIMPLEQ_FOREACH_SAFE(var, head, field, tvar) \
- for ((var) = SIMPLEQ_FIRST(head); \
- (var) && ((tvar) = SIMPLEQ_NEXT(var, field), 1); \
- (var) = (tvar))
-
-/*
- * Simple queue functions.
- */
-#define SIMPLEQ_INIT(head) do { \
- (head)->sqh_first = NULL; \
- (head)->sqh_last = &(head)->sqh_first; \
-} while (0)
-
-#define SIMPLEQ_INSERT_HEAD(head, elm, field) do { \
- if (((elm)->field.sqe_next = (head)->sqh_first) == NULL) \
- (head)->sqh_last = &(elm)->field.sqe_next; \
- (head)->sqh_first = (elm); \
-} while (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 (0)
-
-#define SIMPLEQ_INSERT_AFTER(head, listelm, elm, field) do { \
- if (((elm)->field.sqe_next = (listelm)->field.sqe_next) == NULL)\
- (head)->sqh_last = &(elm)->field.sqe_next; \
- (listelm)->field.sqe_next = (elm); \
-} while (0)
-
-#define SIMPLEQ_REMOVE_HEAD(head, field) do { \
- if (((head)->sqh_first = (head)->sqh_first->field.sqe_next) == NULL) \
- (head)->sqh_last = &(head)->sqh_first; \
-} while (0)
-
-#define SIMPLEQ_REMOVE_AFTER(head, elm, field) do { \
- if (((elm)->field.sqe_next = (elm)->field.sqe_next->field.sqe_next) \
- == NULL) \
- (head)->sqh_last = &(elm)->field.sqe_next; \
-} while (0)
-
-#define SIMPLEQ_CONCAT(head1, head2) do { \
- if (!SIMPLEQ_EMPTY((head2))) { \
- *(head1)->sqh_last = (head2)->sqh_first; \
- (head1)->sqh_last = (head2)->sqh_last; \
- SIMPLEQ_INIT((head2)); \
- } \
-} while (0)
+#define SIMPLEQ_HEAD(name, type) \
+ STAILQ_HEAD(name, type)
+#define SIMPLEQ_HEAD_INITIALIZER(head) \
+ STAILQ_HEAD_INITIALIZER(head)
+#define SIMPLEQ_ENTRY(type) \
+ STAILQ_ENTRY(type)
+#define SIMPLEQ_FIRST(head) \
+ STAILQ_FIRST(head)
+#define SIMPLEQ_END(head) \
+ NULL
+#define SIMPLEQ_EMPTY(head) \
+ STAILQ_EMPTY(head)
+#define SIMPLEQ_NEXT(elm, field) \
+ STAILQ_NEXT(elm, field)
+#define SIMPLEQ_FOREACH(var, head, field) \
+ STAILQ_FOREACH(var, head, field)
+#define SIMPLEQ_FOREACH_SAFE(var, head, field, tvar) \
+ STAILQ_FOREACH_SAFE(var, head, field, tvar)
+#define SIMPLEQ_INIT(head) \
+ STAILQ_INIT(head)
+#define SIMPLEQ_INSERT_HEAD(head, elm, field) \
+ STAILQ_INSERT_HEAD(head, elm, field)
+#define SIMPLEQ_INSERT_TAIL(head, elm, field) \
+ STAILQ_INSERT_TAIL(head, elm, field)
+#define SIMPLEQ_INSERT_AFTER(head, listelm, elm, field) \
+ STAILQ_INSERT_AFTER(head, listelm, elm, field)
+#define SIMPLEQ_REMOVE_HEAD(head, field) \
+ STAILQ_REMOVE_HEAD(head, field)
+#define SIMPLEQ_REMOVE_AFTER(head, elm, field) \
+ STAILQ_REMOVE_AFTER(head, elm, field)
+#define SIMPLEQ_CONCAT(head1, head2) \
+ STAILQ_CONCAT(head1, head2)
#endif
Modified: head/devel/got/files/patch-lib_utf8.c
==============================================================================
--- head/devel/got/files/patch-lib_utf8.c Sun Sep 20 12:36:06 2020 (r549099)
+++ head/devel/got/files/patch-lib_utf8.c Sun Sep 20 12:37:22 2020 (r549100)
@@ -1,3 +1,4 @@
+XXX remove after 0.39
--- lib/utf8.c.orig 2020-09-10 16:01:39 UTC
+++ lib/utf8.c
@@ -15,6 +15,8 @@
More information about the svn-ports-head
mailing list