Module Name:    src
Committed By:   jakllsch
Date:           Mon Aug  8 23:44:06 UTC 2011

Modified Files:
        src/sys/compat/common: compat_mod.c

Log Message:
COMPAT_16 code only exists on amd64 in the presence of COMPAT_NETBSD32.


To generate a diff of this commit:
cvs rdiff -u -r1.13 -r1.14 src/sys/compat/common/compat_mod.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/compat/common/compat_mod.c
diff -u src/sys/compat/common/compat_mod.c:1.13 src/sys/compat/common/compat_mod.c:1.14
--- src/sys/compat/common/compat_mod.c:1.13	Sun Mar  6 17:08:33 2011
+++ src/sys/compat/common/compat_mod.c	Mon Aug  8 23:44:06 2011
@@ -1,4 +1,4 @@
-/*	$NetBSD: compat_mod.c,v 1.13 2011/03/06 17:08:33 bouyer Exp $	*/
+/*	$NetBSD: compat_mod.c,v 1.14 2011/08/08 23:44:06 jakllsch Exp $	*/
 
 /*-
  * Copyright (c) 2008 The NetBSD Foundation, Inc.
@@ -34,7 +34,7 @@
  */
 
 #include <sys/cdefs.h>
-__KERNEL_RCSID(0, "$NetBSD: compat_mod.c,v 1.13 2011/03/06 17:08:33 bouyer Exp $");
+__KERNEL_RCSID(0, "$NetBSD: compat_mod.c,v 1.14 2011/08/08 23:44:06 jakllsch Exp $");
 
 #ifdef _KERNEL_OPT
 #include "opt_compat_netbsd.h"
@@ -63,9 +63,11 @@
 int	ttcompat(struct tty *, u_long, void *, int, struct lwp *);
 
 #ifdef COMPAT_16
+#if !(defined(__amd64__) && !defined(COMPAT_NETBSD32))
 extern char sigcode[], esigcode[];
 struct uvm_object *emul_netbsd_object;
 #endif
+#endif
 
 extern krwlock_t exec_lock;
 extern krwlock_t ttcompat_lock;
@@ -157,9 +159,11 @@
 #endif
 
 #if defined(COMPAT_16)
+#if !(defined(__amd64__) && !defined(COMPAT_NETBSD32))
 	{ SYS_compat_16___sigaction14, 0, (sy_call_t *)compat_16_sys___sigaction14 },
 	{ SYS_compat_16___sigreturn14, 0, (sy_call_t *)compat_16_sys___sigreturn14 },
 #endif
+#endif
 
 #if defined(COMPAT_20)
 	{ SYS_compat_20_fhstatfs, 0, (sy_call_t *)compat_20_sys_fhstatfs },
@@ -254,6 +258,7 @@
 		ttcompatvec = ttcompat;
 #endif
 #ifdef COMPAT_16
+#if !(defined(__amd64__) && !defined(COMPAT_NETBSD32))
 		KASSERT(emul_netbsd.e_sigobject == NULL);
 		rw_enter(&exec_lock, RW_WRITER);
 		emul_netbsd.e_sigcode = sigcode;
@@ -263,6 +268,7 @@
 		KASSERT(sendsig_sigcontext_vec == NULL);
 		sendsig_sigcontext_vec = sendsig_sigcontext;
 #endif
+#endif
 #if defined(COMPAT_09) || defined(COMPAT_43)
 		compat_sysctl_init();
 #endif
@@ -305,6 +311,7 @@
 		}
 #endif
 #ifdef COMPAT_16
+#if !(defined(__amd64__) && !defined(COMPAT_NETBSD32))
 		/*
 		 * The sigobject may persist if still in use, but
 		 * is reference counted so will die eventually.
@@ -319,6 +326,7 @@
 		emul_netbsd.e_esigcode = NULL;
 		emul_netbsd.e_sigobject = NULL;
 		rw_exit(&exec_lock);
+#endif
 #endif	/* COMPAT_16 */
 #if defined(COMPAT_09) || defined(COMPAT_43)
 		compat_sysctl_fini();

Reply via email to