Source-Changes-HG archive
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index][Old Index]
[src/trunk]: src/sys/compat build the netbsd32_compat* objects into libcompat...
details: https://anonhg.NetBSD.org/src/rev/f89c38b09193
branches: trunk
changeset: 526251:f89c38b09193
user: mrg <mrg%NetBSD.org@localhost>
date: Mon Apr 29 09:53:39 2002 +0000
description:
build the netbsd32_compat* objects into libcompat.a, so they are available
to emulations not just netbsd itself. rename the compat_10 functions to
match everything else. fixes a problem reported by julian coleman.
diffstat:
sys/compat/common/Makefile | 13 +++++++++++--
sys/compat/netbsd32/files.netbsd32 | 8 +-------
sys/compat/netbsd32/netbsd32_compat_10.c | 25 ++++++++++++-------------
sys/compat/netbsd32/syscalls.master | 27 ++++++++++-----------------
sys/compat/sunos32/syscalls.master | 8 ++++----
5 files changed, 38 insertions(+), 43 deletions(-)
diffs (213 lines):
diff -r 2a7cab2aa57e -r f89c38b09193 sys/compat/common/Makefile
--- a/sys/compat/common/Makefile Mon Apr 29 09:33:30 2002 +0000
+++ b/sys/compat/common/Makefile Mon Apr 29 09:53:39 2002 +0000
@@ -1,4 +1,4 @@
-# $NetBSD: Makefile,v 1.27 2001/12/12 01:50:03 tv Exp $
+# $NetBSD: Makefile,v 1.28 2002/04/29 09:53:39 mrg Exp $
LIB= compat
NOPIC= # defined
@@ -27,10 +27,19 @@
SRCS+= sysv_ipc_14.c sysv_msg_14.c sysv_shm_14.c sysv_sem_14.c
# really, all machines where sizeof(int) != sizeof(long) (LP64)
-.if (${MACHINE_ARCH} != "alpha")
+.if (${MACHINE_ARCH} != "alpha" && ${MACHINE_ARCH} != "sparc64" \
+ && ${MACHINE_ARCH} != "x86_64")
SRCS+= kern_ipc_10.c
.endif
+# Compatibility code for 32-bit emulations on 64-bit platforms
+.if (${MACHINE_ARCH} == "sparc64" || ${MACHINE_ARCH} == "x86_64")
+SRCS+= netbsd32_compat_09.c netbsd32_compat_10.c netbsd32_compat_10.c \
+ netbsd32_compat_12.c netbsd32_compat_13.c netbsd32_compat_14.c \
+ netbsd32_compat_43.c
+.PATH.c: ${COMPATDIR}/../netbsd32
+.endif
+
# only needed during build
libinstall::
diff -r 2a7cab2aa57e -r f89c38b09193 sys/compat/netbsd32/files.netbsd32
--- a/sys/compat/netbsd32/files.netbsd32 Mon Apr 29 09:33:30 2002 +0000
+++ b/sys/compat/netbsd32/files.netbsd32 Mon Apr 29 09:53:39 2002 +0000
@@ -1,4 +1,4 @@
-# $NetBSD: files.netbsd32,v 1.11 2001/12/08 00:35:26 thorpej Exp $
+# $NetBSD: files.netbsd32,v 1.12 2002/04/29 09:53:40 mrg Exp $
#
# config file description for machine-independent netbsd32 compat code.
# included by ports that need it.
@@ -21,10 +21,4 @@
file compat/netbsd32/netbsd32_time.c compat_netbsd32
file compat/netbsd32/netbsd32_wait.c compat_netbsd32
file compat/netbsd32/netbsd32_sysent.c compat_netbsd32
-file compat/netbsd32/netbsd32_compat_09.c compat_netbsd32 & (compat_09 | compat_sunos)
-file compat/netbsd32/netbsd32_compat_10.c compat_netbsd32 & compat_10
-file compat/netbsd32/netbsd32_compat_12.c compat_netbsd32 & compat_12
-file compat/netbsd32/netbsd32_compat_13.c compat_netbsd32 & compat_13
-file compat/netbsd32/netbsd32_compat_14.c compat_netbsd32 & compat_14
-file compat/netbsd32/netbsd32_compat_43.c compat_netbsd32 & compat_43
file compat/netbsd32/netbsd32_syscalls.c compat_netbsd32 & syscall_debug
diff -r 2a7cab2aa57e -r f89c38b09193 sys/compat/netbsd32/netbsd32_compat_10.c
--- a/sys/compat/netbsd32/netbsd32_compat_10.c Mon Apr 29 09:33:30 2002 +0000
+++ b/sys/compat/netbsd32/netbsd32_compat_10.c Mon Apr 29 09:53:39 2002 +0000
@@ -1,4 +1,4 @@
-/* $NetBSD: netbsd32_compat_10.c,v 1.12 2002/03/16 20:43:54 christos Exp $ */
+/* $NetBSD: netbsd32_compat_10.c,v 1.13 2002/04/29 09:53:41 mrg Exp $ */
/*
* Copyright (c) 1994 Adam Glass and Charles M. Hannum. All rights reserved.
@@ -31,11 +31,10 @@
*/
#include <sys/cdefs.h>
-__KERNEL_RCSID(0, "$NetBSD: netbsd32_compat_10.c,v 1.12 2002/03/16 20:43:54 christos Exp $");
+__KERNEL_RCSID(0, "$NetBSD: netbsd32_compat_10.c,v 1.13 2002/04/29 09:53:41 mrg Exp $");
-#if defined(_KERNEL_OPT)
+#ifdef _KERNEL_OPT
#include "opt_sysv.h"
-#include "opt_compat_netbsd.h"
#endif
#include <sys/param.h>
@@ -51,14 +50,14 @@
#include <compat/netbsd32/netbsd32.h>
#include <compat/netbsd32/netbsd32_syscallargs.h>
-#if (defined(SYSVSEM) || !defined(_KERNEL)) && !defined(alpha) && defined(COMPAT_10)
+#if defined(SYSVSEM) || !defined(_KERNEL)
int
-netbsd32_compat_10_sys_semsys(p, v, retval)
+compat_10_netbsd32_sys_semsys(p, v, retval)
struct proc *p;
void *v;
register_t *retval;
{
- struct netbsd32_compat_10_sys_semsys_args /* {
+ struct compat_10_netbsd32_sys_semsys_args /* {
syscallarg(int) which;
syscallarg(int) a2;
syscallarg(int) a3;
@@ -120,14 +119,14 @@
}
#endif
-#if (defined(SYSVSHM) || !defined(_KERNEL)) && !defined(alpha) && defined(COMPAT_10)
+#if defined(SYSVSHM) || !defined(_KERNEL)
int
-netbsd32_compat_10_sys_shmsys(p, v, retval)
+compat_10_netbsd32_sys_shmsys(p, v, retval)
struct proc *p;
void *v;
register_t *retval;
{
- struct netbsd32_compat_10_sys_shmsys_args /* {
+ struct compat_10_netbsd32_sys_shmsys_args /* {
syscallarg(int) which;
syscallarg(int) a2;
syscallarg(int) a3;
@@ -182,14 +181,14 @@
}
#endif
-#if (defined(SYSVMSG) || !defined(_KERNEL)) && !defined(alpha) && defined(COMPAT_10)
+#if defined(SYSVMSG) || !defined(_KERNEL)
int
-netbsd32_compat_10_sys_msgsys(p, v, retval)
+compat_10_netbsd32_sys_msgsys(p, v, retval)
struct proc *p;
void *v;
register_t *retval;
{
- struct netbsd32_compat_10_sys_msgsys_args /* {
+ struct compat_10_netbsd32_sys_msgsys_args /* {
syscallarg(int) which;
syscallarg(int) a2;
syscallarg(int) a3;
diff -r 2a7cab2aa57e -r f89c38b09193 sys/compat/netbsd32/syscalls.master
--- a/sys/compat/netbsd32/syscalls.master Mon Apr 29 09:33:30 2002 +0000
+++ b/sys/compat/netbsd32/syscalls.master Mon Apr 29 09:53:39 2002 +0000
@@ -1,4 +1,4 @@
- $NetBSD: syscalls.master,v 1.20 2001/05/30 11:37:29 mrg Exp $
+ $NetBSD: syscalls.master,v 1.21 2002/04/29 09:53:41 mrg Exp $
; from: NetBSD: syscalls.master,v 1.81 1998/07/05 08:49:50 jonathan Exp
; @(#)syscalls.master 8.2 (Berkeley) 1/13/94
@@ -124,11 +124,7 @@
52 COMPAT_13 { int sys_sigpending(void); } sigpending13
53 COMPAT_13 { int netbsd32_sigaltstack13(const netbsd32_sigaltstack13p_t nss, netbsd32_sigaltstack13p_t oss); }
54 STD { int netbsd32_ioctl(int fd, netbsd32_u_long com, ... netbsd32_voidp data); }
-#ifdef COMPAT_12
55 COMPAT_12 { int netbsd32_reboot(int opt); }
-#else
-55 OBSOL oreboot
-#endif
56 STD { int netbsd32_revoke(const netbsd32_charp path); }
57 STD { int netbsd32_symlink(const netbsd32_charp path, const netbsd32_charp link); }
58 STD { int netbsd32_readlink(const netbsd32_charp path, netbsd32_charp buf, netbsd32_size_t count); }
@@ -269,23 +265,20 @@
166 UNIMPL
167 UNIMPL
168 UNIMPL
-; XXX more generally, never on machines where sizeof(netbsd32_voidp ) != sizeof(int)
-#if (defined(SYSVSEM) || !defined(_KERNEL)) && !defined(alpha) && defined(COMPAT_10)
-169 STD { int netbsd32_compat_10_sys_semsys(int which, int a2, int a3, int a4, int a5); } osemsys
+#if defined(SYSVSEM) || !defined(_KERNEL)
+169 COMPAT_10 { int netbsd32_sys_semsys(int which, int a2, int a3, int a4, int a5); } osemsys
#else
-169 EXCL 1.0 semsys
+169 EXCL netbsd32_sys_semsys
#endif
-; XXX more generally, never on machines where sizeof(netbsd32_voidp ) != sizeof(int)
-#if (defined(SYSVMSG) || !defined(_KERNEL)) && !defined(alpha) && defined(COMPAT_10)
-170 STD { int netbsd32_compat_10_sys_msgsys(int which, int a2, int a3, int a4, int a5, int a6); } omsgsys
+#if defined(SYSVMSG) || !defined(_KERNEL)
+170 COMPAT_10 { int netbsd32_sys_msgsys(int which, int a2, int a3, int a4, int a5, int a6); } omsgsys
#else
-170 EXCL 1.0 msgsys
+170 EXCL netbsd32_sys_msgsys
#endif
-; XXX more generally, never on machines where sizeof(netbsd32_voidp ) != sizeof(int)
-#if (defined(SYSVSHM) || !defined(_KERNEL)) && !defined(alpha) && defined(COMPAT_10)
-171 STD { int netbsd32_compat_10_sys_shmsys(int which, int a2, int a3, int a4); } oshmsys
+#if defined(SYSVSHM) || !defined(_KERNEL)
+171 COMPAT_10 { int netbsd32_sys_shmsys(int which, int a2, int a3, int a4); } oshmsys
#else
-171 EXCL 1.0 shmsys
+171 EXCL netbsd32_sys_shmsys
#endif
172 UNIMPL
173 STD { netbsd32_ssize_t netbsd32_pread(int fd, netbsd32_voidp buf, netbsd32_size_t nbyte, int pad, off_t offset); }
diff -r 2a7cab2aa57e -r f89c38b09193 sys/compat/sunos32/syscalls.master
--- a/sys/compat/sunos32/syscalls.master Mon Apr 29 09:33:30 2002 +0000
+++ b/sys/compat/sunos32/syscalls.master Mon Apr 29 09:53:39 2002 +0000
@@ -1,4 +1,4 @@
-; $NetBSD: syscalls.master,v 1.7 2002/01/03 15:28:43 mrg Exp $
+; $NetBSD: syscalls.master,v 1.8 2002/04/29 09:53:42 mrg Exp $
; from :NetBSD: syscalls.master,v 1.57 2000/12/09 07:10:36 mycroft Exp
@@ -280,19 +280,19 @@
168 STD { int sunos32_sys_ustat(int dev, \
sunos32_ustatp_t buf); }
#ifdef SYSVSEM
-169 NOARGS { int netbsd32_compat_10_sys_semsys(int which, int a2, int a3, \
+169 NOARGS { int compat_10_netbsd32_sys_semsys(int which, int a2, int a3, \
int a4, int a5); } osemsys
#else
169 UNIMPL semsys
#endif
#ifdef SYSVMSG
-170 NOARGS { int netbsd32_compat_10_sys_msgsys(int which, int a2, int a3, \
+170 NOARGS { int compat_10_netbsd32_sys_msgsys(int which, int a2, int a3, \
int a4, int a5, int a6); } omsgsys
#else
170 UNIMPL msgsys
#endif
#ifdef SYSVSHM
-171 NOARGS { int netbsd32_compat_10_sys_shmsys(int which, int a2, int a3, \
+171 NOARGS { int compat_10_netbsd32_sys_shmsys(int which, int a2, int a3, \
int a4); } oshmsys
#else
171 UNIMPL shmsys
Home |
Main Index |
Thread Index |
Old Index