Module Name:    src
Committed By:   christos
Date:           Sun Dec 14 21:27:49 UTC 2014

Modified Files:
        src/sys/arch/amd64/amd64: netbsd32_machdep.c
Added Files:
        src/sys/arch/amd64/amd64: compat_13_machdep.c compat_16_machdep.c

Log Message:
Move the empty sigreturn functions to their own files to allow the compat
module to load by itself.


To generate a diff of this commit:
cvs rdiff -u -r0 -r1.1 src/sys/arch/amd64/amd64/compat_13_machdep.c
cvs rdiff -u -r0 -r1.5 src/sys/arch/amd64/amd64/compat_16_machdep.c
cvs rdiff -u -r1.92 -r1.93 src/sys/arch/amd64/amd64/netbsd32_machdep.c

Please note that diffs are not public domain; they are subject to the
copyright notices on the relevant files.

Modified files:

Index: src/sys/arch/amd64/amd64/netbsd32_machdep.c
diff -u src/sys/arch/amd64/amd64/netbsd32_machdep.c:1.92 src/sys/arch/amd64/amd64/netbsd32_machdep.c:1.93
--- src/sys/arch/amd64/amd64/netbsd32_machdep.c:1.92	Sat Feb 15 17:20:41 2014
+++ src/sys/arch/amd64/amd64/netbsd32_machdep.c	Sun Dec 14 16:27:49 2014
@@ -1,4 +1,4 @@
-/*	$NetBSD: netbsd32_machdep.c,v 1.92 2014/02/15 22:20:41 dsl Exp $	*/
+/*	$NetBSD: netbsd32_machdep.c,v 1.93 2014/12/14 21:27:49 christos Exp $	*/
 
 /*
  * Copyright (c) 2001 Wasabi Systems, Inc.
@@ -36,7 +36,7 @@
  */
 
 #include <sys/cdefs.h>
-__KERNEL_RCSID(0, "$NetBSD: netbsd32_machdep.c,v 1.92 2014/02/15 22:20:41 dsl Exp $");
+__KERNEL_RCSID(0, "$NetBSD: netbsd32_machdep.c,v 1.93 2014/12/14 21:27:49 christos Exp $");
 
 #ifdef _KERNEL_OPT
 #include "opt_compat_netbsd.h"
@@ -106,19 +106,6 @@ cpu_exec_aout_makecmds(struct lwp *p, st
 }
 #endif
 
-#ifdef COMPAT_16
-/*
- * There is no NetBSD-1.6 compatibility for native code.
- * COMPAT_16 is useful for i386 emulation (COMPAT_NETBSD32) only.
- */
-int
-compat_16_sys___sigreturn14(struct lwp *l, const struct compat_16_sys___sigreturn14_args *uap, register_t *retval)
-{
-
-	return ENOSYS;
-}
-#endif
-
 void
 netbsd32_setregs(struct lwp *l, struct exec_package *pack, vaddr_t stack)
 {
@@ -954,12 +941,6 @@ netbsd32_vm_default_addr(struct proc *p,
 
 #ifdef COMPAT_13
 int
-compat_13_sys_sigreturn(struct lwp *l, const struct compat_13_sys_sigreturn_args *uap, register_t *retval)
-{
-	return ENOSYS;
-}
-
-int
 compat_13_netbsd32_sigreturn(struct lwp *l, const struct compat_13_netbsd32_sigreturn_args *uap, register_t *retval)
 {
 	/* {

Added files:

Index: src/sys/arch/amd64/amd64/compat_13_machdep.c
diff -u /dev/null src/sys/arch/amd64/amd64/compat_13_machdep.c:1.1
--- /dev/null	Sun Dec 14 16:27:49 2014
+++ src/sys/arch/amd64/amd64/compat_13_machdep.c	Sun Dec 14 16:27:49 2014
@@ -0,0 +1,63 @@
+/*	$NetBSD: compat_13_machdep.c,v 1.1 2014/12/14 21:27:49 christos Exp $	*/
+
+/*-
+ * Copyright (c) 2014 The NetBSD Foundation, Inc.
+ * All rights reserved.
+ *
+ * This code is derived from software contributed to The NetBSD Foundation
+ * by Christos Zoulas.
+ *
+ * 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.
+ *
+ * THIS SOFTWARE IS PROVIDED BY THE NETBSD FOUNDATION, INC. 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 FOUNDATION 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.
+ */
+#include <sys/cdefs.h>
+__KERNEL_RCSID(0, "$NetBSD: compat_13_machdep.c,v 1.1 2014/12/14 21:27:49 christos Exp $");
+
+#ifdef _KERNEL_OPT
+#include "opt_compat_netbsd.h"
+#endif
+
+#include <sys/param.h>
+#include <sys/systm.h>
+#include <sys/signalvar.h>
+#include <sys/kernel.h>
+#include <sys/proc.h>
+#include <sys/mount.h>
+#include <sys/syscallargs.h>
+
+#include <compat/sys/signal.h>
+#include <compat/sys/signalvar.h>
+
+#ifdef COMPAT_13
+
+int compat_13_sys_sigreturn(struct lwp *, const struct compat_13_sys_sigreturn_args *, register_t *);
+
+/*
+ * There is no NetBSD-1.6 compatibility for native code.
+ * COMPAT_13 is useful for i386 emulation (COMPAT_NETBSD32) only.
+ */
+int
+compat_13_sys_sigreturn(struct lwp *l, const struct compat_13_sys_sigreturn_args *uap, register_t *retval)
+{
+
+	return ENOSYS;
+}
+#endif

Index: src/sys/arch/amd64/amd64/compat_16_machdep.c
diff -u /dev/null src/sys/arch/amd64/amd64/compat_16_machdep.c:1.5
--- /dev/null	Sun Dec 14 16:27:49 2014
+++ src/sys/arch/amd64/amd64/compat_16_machdep.c	Sun Dec 14 16:27:49 2014
@@ -0,0 +1,63 @@
+/*	$NetBSD: compat_16_machdep.c,v 1.5 2014/12/14 21:27:49 christos Exp $	*/
+
+/*-
+ * Copyright (c) 2014 The NetBSD Foundation, Inc.
+ * All rights reserved.
+ *
+ * This code is derived from software contributed to The NetBSD Foundation
+ * by Christos Zoulas.
+ *
+ * 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.
+ *
+ * THIS SOFTWARE IS PROVIDED BY THE NETBSD FOUNDATION, INC. 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 FOUNDATION 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.
+ */
+#include <sys/cdefs.h>
+__KERNEL_RCSID(0, "$NetBSD: compat_16_machdep.c,v 1.5 2014/12/14 21:27:49 christos Exp $");
+
+#ifdef _KERNEL_OPT
+#include "opt_compat_netbsd.h"
+#endif
+
+#include <sys/param.h>
+#include <sys/systm.h>
+#include <sys/signalvar.h>
+#include <sys/kernel.h>
+#include <sys/proc.h>
+#include <sys/mount.h>
+#include <sys/syscallargs.h>
+
+#include <compat/sys/signal.h>
+#include <compat/sys/signalvar.h>
+
+#ifdef COMPAT_16
+
+int compat_16_sys___sigreturn14(struct lwp *, const struct compat_16_sys___sigreturn14_args *, register_t *);
+
+/*
+ * There is no NetBSD-1.6 compatibility for native code.
+ * COMPAT_16 is useful for i386 emulation (COMPAT_NETBSD32) only.
+ */
+int
+compat_16_sys___sigreturn14(struct lwp *l, const struct compat_16_sys___sigreturn14_args *uap, register_t *retval)
+{
+
+	return ENOSYS;
+}
+#endif

Reply via email to