summaryrefslogtreecommitdiffstats
path: root/lib/libcompat
diff options
context:
space:
mode:
authormillert <millert@openbsd.org>2003-05-08 23:26:30 +0000
committermillert <millert@openbsd.org>2003-05-08 23:26:30 +0000
commitcd087ff391bdbcbbdb7da34b396f13d637f24f78 (patch)
tree7333db3981c56e4ef99022d93be079d0dabe72ee /lib/libcompat
parentmove lsearch(3) and insque(3) from libcompat -> libc; they are now POSIX (diff)
downloadwireguard-openbsd-cd087ff391bdbcbbdb7da34b396f13d637f24f78.tar.xz
wireguard-openbsd-cd087ff391bdbcbbdb7da34b396f13d637f24f78.zip
move insque(3) and remque(3) from libcompat -> libc; they are now POSIX
Diffstat (limited to 'lib/libcompat')
-rw-r--r--lib/libcompat/4.3/insque.367
-rw-r--r--lib/libcompat/4.3/insque.c54
-rw-r--r--lib/libcompat/4.3/remque.c49
-rw-r--r--lib/libcompat/Makefile6
4 files changed, 2 insertions, 174 deletions
diff --git a/lib/libcompat/4.3/insque.3 b/lib/libcompat/4.3/insque.3
deleted file mode 100644
index 8c6b6d7cc02..00000000000
--- a/lib/libcompat/4.3/insque.3
+++ /dev/null
@@ -1,67 +0,0 @@
-.\" $OpenBSD: insque.3,v 1.6 2002/05/01 08:03:30 mpech Exp $
-.\" Copyright (c) 1993 John Brezak
-.\" 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. The name of the author may be used to endorse or promote products
-.\" derived from this software without specific prior written permission.
-.\"
-.\" THIS SOFTWARE IS PROVIDED BY THE AUTHOR `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 AUTHOR 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.
-.\"
-.\"
-.Dd August 12, 1993
-.Dt INSQUE 3
-.Os
-.Sh NAME
-.Nm insque ,
-.Nm remque
-.Nd insert/remove element from a queue
-.Sh SYNOPSIS
-.Fd #include <search.h>
-.Ft struct qelem {
-.br
-.Ft struct qelem *q_forw;
-.br
-.Ft struct qelem *q_back;
-.br
-.Ft char q_data[];
-.br
-.Ft };
-.br
-.br
-.Ft void
-.Fn insque "struct qelem *elem" "struct qelem *pred"
-.Ft void
-.Fn remque "struct qelem *elem"
-.Sh DESCRIPTION
-.Bf -symbolic
-These interfaces are available from the compatibility library, libcompat.
-.Ef
-.Pp
-.Fn insque
-and
-.Fn remque
-manipulate queues built from doubly linked lists.
-Each element in the queue
-must begin with a "struct qelem".
-.Sh DIAGNOSTICS
-These functions are not atomic unless that machine architecture allows it.
-.Sh HISTORY
-These are derived from the insque and remque instructions on a VAX.
diff --git a/lib/libcompat/4.3/insque.c b/lib/libcompat/4.3/insque.c
deleted file mode 100644
index d1c64842f1f..00000000000
--- a/lib/libcompat/4.3/insque.c
+++ /dev/null
@@ -1,54 +0,0 @@
-/* $OpenBSD: insque.c,v 1.2 2000/03/02 00:29:48 todd Exp $ */
-
-/*
- * Copyright (c) 1993 John Brezak
- * 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. The name of the author may be used to endorse or promote products
- * derived from this software without specific prior written permission.
- *
- * THIS SOFTWARE IS PROVIDED BY THE AUTHOR `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 AUTHOR 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.
- */
-
-#if defined(LIBC_SCCS) && !defined(lint)
-static char *rcsid = "$OpenBSD: insque.c,v 1.2 2000/03/02 00:29:48 todd Exp $";
-#endif /* LIBC_SCCS and not lint */
-
-#include <search.h>
-
-struct qelem {
- struct qelem *q_forw;
- struct qelem *q_back;
-};
-
-void
-insque(entry, pred)
- void *entry;
- void *pred;
-{
- struct qelem *e = (struct qelem *) entry;
- struct qelem *p = (struct qelem *) pred;
-
- e->q_forw = p->q_forw;
- e->q_back = p;
- p->q_forw->q_back = e;
- p->q_forw = e;
-}
diff --git a/lib/libcompat/4.3/remque.c b/lib/libcompat/4.3/remque.c
deleted file mode 100644
index e316e02868d..00000000000
--- a/lib/libcompat/4.3/remque.c
+++ /dev/null
@@ -1,49 +0,0 @@
-/* $OpenBSD: remque.c,v 1.2 2000/03/02 00:29:48 todd Exp $ */
-
-/*
- * Copyright (c) 1993 John Brezak
- * 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. The name of the author may be used to endorse or promote products
- * derived from this software without specific prior written permission.
- *
- * THIS SOFTWARE IS PROVIDED BY THE AUTHOR `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 AUTHOR 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.
- */
-
-#if defined(LIBC_SCCS) && !defined(lint)
-static char *rcsid = "$OpenBSD: remque.c,v 1.2 2000/03/02 00:29:48 todd Exp $";
-#endif /* LIBC_SCCS and not lint */
-
-#include <search.h>
-
-struct qelem {
- struct qelem *q_forw;
- struct qelem *q_back;
-};
-
-void
-remque(element)
- void *element;
-{
- struct qelem *e = (struct qelem *) element;
- e->q_forw->q_back = e->q_back;
- e->q_back->q_forw = e->q_forw;
-}
diff --git a/lib/libcompat/Makefile b/lib/libcompat/Makefile
index 477732655ef..c5e1cff1403 100644
--- a/lib/libcompat/Makefile
+++ b/lib/libcompat/Makefile
@@ -1,4 +1,4 @@
-# $OpenBSD: Makefile,v 1.9 2003/05/08 23:21:36 millert Exp $
+# $OpenBSD: Makefile,v 1.10 2003/05/08 23:26:30 millert Exp $
# $NetBSD: Makefile,v 1.15 1995/09/07 07:17:53 jtc Exp $
LIB= compat
@@ -28,11 +28,9 @@ MLINKS+=stty.3 gtty.3
# compat 4.3 sources
# missing: sibuf.c sobuf.c strout.c
SRCS+= regex.c rexec.c
-SRCS+= insque.c remque.c
-MAN+= insque.3 re_comp.3 rexec.3
+MAN+= re_comp.3 rexec.3
-MLINKS+=insque.3 remque.3
MLINKS+=re_comp.3 re_exec.3
# compat 4.4 sources