am 0ab5fd9a: Merge "Switch to OpenBSD insque/remque/killpg."
				
					
				
			* commit '0ab5fd9a5af4cd00572e4881f46c1e6f974f657c': Switch to OpenBSD insque/remque/killpg.
This commit is contained in:
		@@ -288,7 +288,6 @@ libc_upstream_netbsd_src_files := \
 | 
				
			|||||||
    upstream-netbsd/lib/libc/stdlib/div.c \
 | 
					    upstream-netbsd/lib/libc/stdlib/div.c \
 | 
				
			||||||
    upstream-netbsd/lib/libc/stdlib/drand48.c \
 | 
					    upstream-netbsd/lib/libc/stdlib/drand48.c \
 | 
				
			||||||
    upstream-netbsd/lib/libc/stdlib/erand48.c \
 | 
					    upstream-netbsd/lib/libc/stdlib/erand48.c \
 | 
				
			||||||
    upstream-netbsd/lib/libc/stdlib/insque.c \
 | 
					 | 
				
			||||||
    upstream-netbsd/lib/libc/stdlib/jrand48.c \
 | 
					    upstream-netbsd/lib/libc/stdlib/jrand48.c \
 | 
				
			||||||
    upstream-netbsd/lib/libc/stdlib/ldiv.c \
 | 
					    upstream-netbsd/lib/libc/stdlib/ldiv.c \
 | 
				
			||||||
    upstream-netbsd/lib/libc/stdlib/lldiv.c \
 | 
					    upstream-netbsd/lib/libc/stdlib/lldiv.c \
 | 
				
			||||||
@@ -297,14 +296,12 @@ libc_upstream_netbsd_src_files := \
 | 
				
			|||||||
    upstream-netbsd/lib/libc/stdlib/nrand48.c \
 | 
					    upstream-netbsd/lib/libc/stdlib/nrand48.c \
 | 
				
			||||||
    upstream-netbsd/lib/libc/stdlib/_rand48.c \
 | 
					    upstream-netbsd/lib/libc/stdlib/_rand48.c \
 | 
				
			||||||
    upstream-netbsd/lib/libc/stdlib/rand_r.c \
 | 
					    upstream-netbsd/lib/libc/stdlib/rand_r.c \
 | 
				
			||||||
    upstream-netbsd/lib/libc/stdlib/remque.c \
 | 
					 | 
				
			||||||
    upstream-netbsd/lib/libc/stdlib/seed48.c \
 | 
					    upstream-netbsd/lib/libc/stdlib/seed48.c \
 | 
				
			||||||
    upstream-netbsd/lib/libc/stdlib/srand48.c \
 | 
					    upstream-netbsd/lib/libc/stdlib/srand48.c \
 | 
				
			||||||
    upstream-netbsd/lib/libc/string/memccpy.c \
 | 
					    upstream-netbsd/lib/libc/string/memccpy.c \
 | 
				
			||||||
    upstream-netbsd/lib/libc/string/strcasestr.c \
 | 
					    upstream-netbsd/lib/libc/string/strcasestr.c \
 | 
				
			||||||
    upstream-netbsd/lib/libc/string/strcoll.c \
 | 
					    upstream-netbsd/lib/libc/string/strcoll.c \
 | 
				
			||||||
    upstream-netbsd/lib/libc/string/strxfrm.c \
 | 
					    upstream-netbsd/lib/libc/string/strxfrm.c \
 | 
				
			||||||
    upstream-netbsd/lib/libc/unistd/killpg.c \
 | 
					 | 
				
			||||||
 | 
					
 | 
				
			||||||
libc_upstream_openbsd_gdtoa_src_files := \
 | 
					libc_upstream_openbsd_gdtoa_src_files := \
 | 
				
			||||||
    upstream-openbsd/android/gdtoa_support.cpp \
 | 
					    upstream-openbsd/android/gdtoa_support.cpp \
 | 
				
			||||||
@@ -334,6 +331,7 @@ libc_upstream_openbsd_gdtoa_src_files_64 := \
 | 
				
			|||||||
    upstream-openbsd/lib/libc/gdtoa/strtorQ.c \
 | 
					    upstream-openbsd/lib/libc/gdtoa/strtorQ.c \
 | 
				
			||||||
 | 
					
 | 
				
			||||||
libc_upstream_openbsd_src_files := \
 | 
					libc_upstream_openbsd_src_files := \
 | 
				
			||||||
 | 
					    upstream-openbsd/lib/libc/compat-43/killpg.c \
 | 
				
			||||||
    upstream-openbsd/lib/libc/crypt/arc4random.c \
 | 
					    upstream-openbsd/lib/libc/crypt/arc4random.c \
 | 
				
			||||||
    upstream-openbsd/lib/libc/crypt/arc4random_uniform.c \
 | 
					    upstream-openbsd/lib/libc/crypt/arc4random_uniform.c \
 | 
				
			||||||
    upstream-openbsd/lib/libc/gen/alarm.c \
 | 
					    upstream-openbsd/lib/libc/gen/alarm.c \
 | 
				
			||||||
@@ -480,7 +478,9 @@ libc_upstream_openbsd_src_files := \
 | 
				
			|||||||
    upstream-openbsd/lib/libc/stdlib/atoll.c \
 | 
					    upstream-openbsd/lib/libc/stdlib/atoll.c \
 | 
				
			||||||
    upstream-openbsd/lib/libc/stdlib/exit.c \
 | 
					    upstream-openbsd/lib/libc/stdlib/exit.c \
 | 
				
			||||||
    upstream-openbsd/lib/libc/stdlib/getenv.c \
 | 
					    upstream-openbsd/lib/libc/stdlib/getenv.c \
 | 
				
			||||||
 | 
					    upstream-openbsd/lib/libc/stdlib/insque.c \
 | 
				
			||||||
    upstream-openbsd/lib/libc/stdlib/lsearch.c \
 | 
					    upstream-openbsd/lib/libc/stdlib/lsearch.c \
 | 
				
			||||||
 | 
					    upstream-openbsd/lib/libc/stdlib/remque.c \
 | 
				
			||||||
    upstream-openbsd/lib/libc/stdlib/setenv.c \
 | 
					    upstream-openbsd/lib/libc/stdlib/setenv.c \
 | 
				
			||||||
    upstream-openbsd/lib/libc/stdlib/strtoimax.c \
 | 
					    upstream-openbsd/lib/libc/stdlib/strtoimax.c \
 | 
				
			||||||
    upstream-openbsd/lib/libc/stdlib/strtol.c \
 | 
					    upstream-openbsd/lib/libc/stdlib/strtol.c \
 | 
				
			||||||
 
 | 
				
			|||||||
@@ -1,8 +1,6 @@
 | 
				
			|||||||
/*	$NetBSD: killpg.c,v 1.8 2003/08/07 16:42:39 agc Exp $	*/
 | 
					 | 
				
			||||||
 | 
					 | 
				
			||||||
/*
 | 
					/*
 | 
				
			||||||
 * Copyright (c) 1989, 1993
 | 
					 * Copyright (c) 1989 The Regents of the University of California.
 | 
				
			||||||
 *	The Regents of the University of California.  All rights reserved.
 | 
					 * All rights reserved.
 | 
				
			||||||
 *
 | 
					 *
 | 
				
			||||||
 * Redistribution and use in source and binary forms, with or without
 | 
					 * Redistribution and use in source and binary forms, with or without
 | 
				
			||||||
 * modification, are permitted provided that the following conditions
 | 
					 * modification, are permitted provided that the following conditions
 | 
				
			||||||
@@ -29,15 +27,6 @@
 | 
				
			|||||||
 * SUCH DAMAGE.
 | 
					 * SUCH DAMAGE.
 | 
				
			||||||
 */
 | 
					 */
 | 
				
			||||||
 | 
					
 | 
				
			||||||
#include <sys/cdefs.h>
 | 
					 | 
				
			||||||
#if defined(LIBC_SCCS) && !defined(lint)
 | 
					 | 
				
			||||||
#if 0
 | 
					 | 
				
			||||||
static char sccsid[] = "@(#)killpg.c	8.1 (Berkeley) 6/2/93";
 | 
					 | 
				
			||||||
#else
 | 
					 | 
				
			||||||
__RCSID("$NetBSD: killpg.c,v 1.8 2003/08/07 16:42:39 agc Exp $");
 | 
					 | 
				
			||||||
#endif
 | 
					 | 
				
			||||||
#endif /* LIBC_SCCS and not lint */
 | 
					 | 
				
			||||||
 | 
					 | 
				
			||||||
#include <sys/types.h>
 | 
					#include <sys/types.h>
 | 
				
			||||||
#include <signal.h>
 | 
					#include <signal.h>
 | 
				
			||||||
#include <errno.h>
 | 
					#include <errno.h>
 | 
				
			||||||
@@ -1,3 +1,5 @@
 | 
				
			|||||||
 | 
					/*	$OpenBSD: insque.c,v 1.3 2014/08/15 04:14:36 guenther Exp $	*/
 | 
				
			||||||
 | 
					
 | 
				
			||||||
/*
 | 
					/*
 | 
				
			||||||
 *  Copyright (c) 1993 John Brezak
 | 
					 *  Copyright (c) 1993 John Brezak
 | 
				
			||||||
 *  All rights reserved.
 | 
					 *  All rights reserved.
 | 
				
			||||||
@@ -26,12 +28,7 @@
 | 
				
			|||||||
 * POSSIBILITY OF SUCH DAMAGE.
 | 
					 * POSSIBILITY OF SUCH DAMAGE.
 | 
				
			||||||
 */
 | 
					 */
 | 
				
			||||||
 | 
					
 | 
				
			||||||
#include <sys/cdefs.h>
 | 
					#include <stdlib.h>
 | 
				
			||||||
#if defined(LIBC_SCCS) && !defined(lint)
 | 
					 | 
				
			||||||
__RCSID("$NetBSD: insque.c,v 1.3 2012/06/25 22:32:45 abs Exp $");
 | 
					 | 
				
			||||||
#endif /* LIBC_SCCS and not lint */
 | 
					 | 
				
			||||||
 | 
					 | 
				
			||||||
#include <assert.h>
 | 
					 | 
				
			||||||
#include <search.h>
 | 
					#include <search.h>
 | 
				
			||||||
 | 
					
 | 
				
			||||||
struct qelem {
 | 
					struct qelem {
 | 
				
			||||||
@@ -42,17 +39,16 @@ struct qelem {
 | 
				
			|||||||
void
 | 
					void
 | 
				
			||||||
insque(void *entry, void *pred)
 | 
					insque(void *entry, void *pred)
 | 
				
			||||||
{
 | 
					{
 | 
				
			||||||
	struct qelem *e = (struct qelem *) entry;
 | 
						struct qelem *e = entry;
 | 
				
			||||||
	struct qelem *p = (struct qelem *) pred;
 | 
						struct qelem *p = pred;
 | 
				
			||||||
 | 
					
 | 
				
			||||||
	_DIAGASSERT(e != 0);
 | 
						if (p == NULL)
 | 
				
			||||||
 | 
							e->q_forw = e->q_back = NULL;
 | 
				
			||||||
	e->q_back = p;
 | 
						else {
 | 
				
			||||||
	if (p) {
 | 
					 | 
				
			||||||
		e->q_forw = p->q_forw;
 | 
							e->q_forw = p->q_forw;
 | 
				
			||||||
		if (p->q_forw)
 | 
							e->q_back = p;
 | 
				
			||||||
 | 
							if (p->q_forw != NULL)
 | 
				
			||||||
			p->q_forw->q_back = e;
 | 
								p->q_forw->q_back = e;
 | 
				
			||||||
		p->q_forw = e;
 | 
							p->q_forw = e;
 | 
				
			||||||
	} else
 | 
						}
 | 
				
			||||||
		e->q_forw = 0;
 | 
					 | 
				
			||||||
}
 | 
					}
 | 
				
			||||||
@@ -1,3 +1,5 @@
 | 
				
			|||||||
 | 
					/*	$OpenBSD: remque.c,v 1.3 2014/08/15 04:14:36 guenther Exp $	*/
 | 
				
			||||||
 | 
					
 | 
				
			||||||
/*
 | 
					/*
 | 
				
			||||||
 *  Copyright (c) 1993 John Brezak
 | 
					 *  Copyright (c) 1993 John Brezak
 | 
				
			||||||
 *  All rights reserved.
 | 
					 *  All rights reserved.
 | 
				
			||||||
@@ -26,12 +28,7 @@
 | 
				
			|||||||
 * POSSIBILITY OF SUCH DAMAGE.
 | 
					 * POSSIBILITY OF SUCH DAMAGE.
 | 
				
			||||||
 */
 | 
					 */
 | 
				
			||||||
 | 
					
 | 
				
			||||||
#include <sys/cdefs.h>
 | 
					#include <stdlib.h>
 | 
				
			||||||
#if defined(LIBC_SCCS) && !defined(lint)
 | 
					 | 
				
			||||||
__RCSID("$NetBSD: remque.c,v 1.3 2012/06/25 22:32:45 abs Exp $");
 | 
					 | 
				
			||||||
#endif /* LIBC_SCCS and not lint */
 | 
					 | 
				
			||||||
 | 
					 | 
				
			||||||
#include <assert.h>
 | 
					 | 
				
			||||||
#include <search.h>
 | 
					#include <search.h>
 | 
				
			||||||
 | 
					
 | 
				
			||||||
struct qelem {
 | 
					struct qelem {
 | 
				
			||||||
@@ -42,12 +39,10 @@ struct qelem {
 | 
				
			|||||||
void
 | 
					void
 | 
				
			||||||
remque(void *element)
 | 
					remque(void *element)
 | 
				
			||||||
{
 | 
					{
 | 
				
			||||||
	struct qelem *e = (struct qelem *) element;
 | 
						struct qelem *e = element;
 | 
				
			||||||
 | 
					
 | 
				
			||||||
	_DIAGASSERT(e != 0);
 | 
						if (e->q_forw != NULL)
 | 
				
			||||||
 | 
					 | 
				
			||||||
	if (e->q_forw)
 | 
					 | 
				
			||||||
		e->q_forw->q_back = e->q_back;
 | 
							e->q_forw->q_back = e->q_back;
 | 
				
			||||||
	if (e->q_back)
 | 
						if (e->q_back != NULL)
 | 
				
			||||||
		e->q_back->q_forw = e->q_forw;
 | 
							e->q_back->q_forw = e->q_forw;
 | 
				
			||||||
}
 | 
					}
 | 
				
			||||||
		Reference in New Issue
	
	Block a user