summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorguenther <guenther@openbsd.org>2010-06-29 20:30:31 +0000
committerguenther <guenther@openbsd.org>2010-06-29 20:30:31 +0000
commit0d99ae0cf8663366f11c96553fc49b49089bf394 (patch)
tree33735c6fb890e0bd098836c3d551e4fbdeb80ac0
parentWe always copy struct pcred when creating a new process, so the reference (diff)
downloadwireguard-openbsd-0d99ae0cf8663366f11c96553fc49b49089bf394.tar.xz
wireguard-openbsd-0d99ae0cf8663366f11c96553fc49b49089bf394.zip
Remove COMPAT_HPUX. No one wanted to support it and its fewmets were
blocking other cleanups ok miod@
-rw-r--r--bin/systrace/openbsd-syscalls.c11
-rw-r--r--etc/etc.hp300/sysctl.conf1
-rw-r--r--etc/etc.hppa/sysctl.conf1
-rw-r--r--etc/etc.hppa64/sysctl.conf1
-rw-r--r--etc/etc.mvme68k/sysctl.conf1
-rw-r--r--share/man/man4/options.410
-rw-r--r--share/man/man7/hier.73
-rw-r--r--share/man/man8/Makefile4
-rw-r--r--share/man/man8/compat_hpux.8179
-rw-r--r--sys/arch/hp300/conf/GENERIC3
-rw-r--r--sys/arch/hp300/conf/files.hp3008
-rw-r--r--sys/arch/hp300/hp300/hpux_machdep.c701
-rw-r--r--sys/arch/hp300/hp300/locore.s37
-rw-r--r--sys/arch/hp300/hp300/machdep.c5
-rw-r--r--sys/arch/hp300/hp300/trap.c55
-rw-r--r--sys/arch/hp300/include/hpux_machdep.h76
-rw-r--r--sys/arch/hppa/conf/GENERIC3
-rw-r--r--sys/arch/hppa/conf/files.hppa4
-rw-r--r--sys/arch/hppa/hppa/hpux_machdep.c149
-rw-r--r--sys/arch/hppa/hppa/locore.S16
-rw-r--r--sys/arch/hppa/hppa/machdep.c158
-rw-r--r--sys/arch/hppa/include/hpux_machdep.h82
-rw-r--r--sys/arch/hppa/include/param.h14
-rw-r--r--sys/arch/hppa/include/pcb.h7
-rw-r--r--sys/arch/hppa64/conf/GENERIC3
-rw-r--r--sys/arch/hppa64/conf/files.hppa644
-rw-r--r--sys/arch/hppa64/hppa64/machdep.c9
-rw-r--r--sys/arch/m68k/include/param.h16
-rw-r--r--sys/arch/m68k/include/pcb.h7
-rw-r--r--sys/arch/m68k/include/pmap_motorola.h6
-rw-r--r--sys/arch/m68k/include/vmparam.h7
-rw-r--r--sys/arch/m68k/m68k/cachectl.c9
-rw-r--r--sys/arch/m68k/m68k/pmap_motorola.c43
-rw-r--r--sys/arch/mac68k/mac68k/locore.s26
-rw-r--r--sys/arch/mvme68k/conf/GENERIC3
-rw-r--r--sys/arch/mvme68k/conf/MVME1473
-rw-r--r--sys/arch/mvme68k/conf/MVME1623
-rw-r--r--sys/arch/mvme68k/conf/MVME1673
-rw-r--r--sys/arch/mvme68k/conf/MVME1773
-rw-r--r--sys/arch/mvme68k/conf/files.mvme68k8
-rw-r--r--sys/arch/mvme68k/include/hpux_machdep.h73
-rw-r--r--sys/arch/mvme68k/mvme68k/hpux_machdep.c739
-rw-r--r--sys/arch/mvme68k/mvme68k/locore.s8
-rw-r--r--sys/arch/mvme68k/mvme68k/trap.c56
-rw-r--r--sys/compat/hpux/hppa/Makefile7
-rw-r--r--sys/compat/hpux/hppa/files.hpux17
-rw-r--r--sys/compat/hpux/hppa/hpux_exec.c244
-rw-r--r--sys/compat/hpux/hppa/hpux_exec.h98
-rw-r--r--sys/compat/hpux/hppa/hpux_sig2.c85
-rw-r--r--sys/compat/hpux/hppa/hpux_syscall.h442
-rw-r--r--sys/compat/hpux/hppa/hpux_syscallargs.h511
-rw-r--r--sys/compat/hpux/hppa/hpux_syscalls.c573
-rw-r--r--sys/compat/hpux/hppa/hpux_sysent.c1127
-rw-r--r--sys/compat/hpux/hppa/syscalls.conf12
-rw-r--r--sys/compat/hpux/hppa/syscalls.master667
-rw-r--r--sys/compat/hpux/hpux.h367
-rw-r--r--sys/compat/hpux/hpux_compat.c1360
-rw-r--r--sys/compat/hpux/hpux_exec.h9
-rw-r--r--sys/compat/hpux/hpux_file.c874
-rw-r--r--sys/compat/hpux/hpux_sig.c408
-rw-r--r--sys/compat/hpux/hpux_sig.h60
-rw-r--r--sys/compat/hpux/hpux_syscall.h9
-rw-r--r--sys/compat/hpux/hpux_syscallargs.h7
-rw-r--r--sys/compat/hpux/hpux_syscalls.c9
-rw-r--r--sys/compat/hpux/hpux_termio.h202
-rw-r--r--sys/compat/hpux/hpux_tty.c556
-rw-r--r--sys/compat/hpux/hpux_util.h50
-rw-r--r--sys/compat/hpux/m68k/Makefile7
-rw-r--r--sys/compat/hpux/m68k/files.hpux17
-rw-r--r--sys/compat/hpux/m68k/hpux_exec.c329
-rw-r--r--sys/compat/hpux/m68k/hpux_exec.h120
-rw-r--r--sys/compat/hpux/m68k/hpux_net.c314
-rw-r--r--sys/compat/hpux/m68k/hpux_sig2.c95
-rw-r--r--sys/compat/hpux/m68k/hpux_syscall.h442
-rw-r--r--sys/compat/hpux/m68k/hpux_syscallargs.h545
-rw-r--r--sys/compat/hpux/m68k/hpux_syscalls.c372
-rw-r--r--sys/compat/hpux/m68k/hpux_sysent.c725
-rw-r--r--sys/compat/hpux/m68k/syscalls.conf13
-rw-r--r--sys/compat/hpux/m68k/syscalls.master464
-rw-r--r--sys/conf/files12
-rw-r--r--sys/kern/Makefile4
-rw-r--r--sys/kern/exec_conf.c11
-rw-r--r--sys/sys/socket.h5
-rw-r--r--usr.bin/kdump/kdump.c11
84 files changed, 54 insertions, 13684 deletions
diff --git a/bin/systrace/openbsd-syscalls.c b/bin/systrace/openbsd-syscalls.c
index c0ae20a1616..4e8dbb73742 100644
--- a/bin/systrace/openbsd-syscalls.c
+++ b/bin/systrace/openbsd-syscalls.c
@@ -1,4 +1,4 @@
-/* $OpenBSD: openbsd-syscalls.c,v 1.33 2010/06/29 17:32:51 tedu Exp $ */
+/* $OpenBSD: openbsd-syscalls.c,v 1.34 2010/06/29 20:30:32 guenther Exp $ */
/*
* Copyright 2002 Niels Provos <provos@citi.umich.edu>
* All rights reserved.
@@ -35,9 +35,6 @@
#include <compat/bsdos/bsdos_syscall.h>
#include <compat/freebsd/freebsd_syscall.h>
-#if defined(__hppa__) || defined(__m68k__)
-#include <compat/hpux/hpux_syscall.h>
-#endif
#include <compat/ibcs2/ibcs2_syscall.h>
#include <compat/linux/linux_syscall.h>
#include <compat/osf1/osf1_syscall.h>
@@ -57,9 +54,6 @@
#include <compat/bsdos/bsdos_syscalls.c>
#include <compat/freebsd/freebsd_syscalls.c>
-#if defined(__hppa__) || defined(__m68k__)
-#include <compat/hpux/hpux_syscalls.c>
-#endif
#include <compat/ibcs2/ibcs2_syscalls.c>
#include <compat/linux/linux_syscalls.c>
#include <compat/osf1/osf1_syscalls.c>
@@ -98,9 +92,6 @@ struct emulation {
static struct emulation emulations[] = {
{ "native", syscallnames, SYS_MAXSYSCALL },
{ "aout", syscallnames, SYS_MAXSYSCALL },
-#if defined(__hppa__) || defined(__m68k__)
- { "hpux", hpux_syscallnames, HPUX_SYS_MAXSYSCALL },
-#endif
{ "ibcs2", ibcs2_syscallnames, IBCS2_SYS_MAXSYSCALL },
{ "linux", linux_syscallnames, LINUX_SYS_MAXSYSCALL },
{ "osf1", osf1_syscallnames, OSF1_SYS_MAXSYSCALL },
diff --git a/etc/etc.hp300/sysctl.conf b/etc/etc.hp300/sysctl.conf
index dd7f62856cc..06256a46022 100644
--- a/etc/etc.hp300/sysctl.conf
+++ b/etc/etc.hp300/sysctl.conf
@@ -1,2 +1 @@
-#kern.emul.hpux=1 # enable running HP/UX binaries
#kern.emul.sunos=1 # enable running SunOS binaries
diff --git a/etc/etc.hppa/sysctl.conf b/etc/etc.hppa/sysctl.conf
index 13a7bb997a8..30bf4367da7 100644
--- a/etc/etc.hppa/sysctl.conf
+++ b/etc/etc.hppa/sysctl.conf
@@ -1,3 +1,2 @@
#machdep.led_blink=1 # 1=make led(s) blink
-#kern.emul.hpux=1 # enable running HP/UX binaries
#kern.emul.linux=1 # enable running Linux binaries
diff --git a/etc/etc.hppa64/sysctl.conf b/etc/etc.hppa64/sysctl.conf
index 2ed7ae6a7bd..2af01f8f6dc 100644
--- a/etc/etc.hppa64/sysctl.conf
+++ b/etc/etc.hppa64/sysctl.conf
@@ -1,2 +1 @@
-#kern.emul.hpux=1 # enable running HP/UX binaries
#kern.emul.linux=1 # enable running Linux binaries
diff --git a/etc/etc.mvme68k/sysctl.conf b/etc/etc.mvme68k/sysctl.conf
index dd7f62856cc..06256a46022 100644
--- a/etc/etc.mvme68k/sysctl.conf
+++ b/etc/etc.mvme68k/sysctl.conf
@@ -1,2 +1 @@
-#kern.emul.hpux=1 # enable running HP/UX binaries
#kern.emul.sunos=1 # enable running SunOS binaries
diff --git a/share/man/man4/options.4 b/share/man/man4/options.4
index 09ae9211f26..f48e49ceb13 100644
--- a/share/man/man4/options.4
+++ b/share/man/man4/options.4
@@ -1,4 +1,4 @@
-.\" $OpenBSD: options.4,v 1.197 2010/06/29 18:50:23 tedu Exp $
+.\" $OpenBSD: options.4,v 1.198 2010/06/29 20:30:32 guenther Exp $
.\" $NetBSD: options.4,v 1.21 1997/06/25 03:13:00 thorpej Exp $
.\"
.\" Copyright (c) 1998 Theo de Raadt
@@ -110,14 +110,6 @@ applications built for the same architecture.
This option is available on the i386 architecture.
See
.Xr compat_freebsd 8 .
-.It Cd option COMPAT_HPUX
-On those architectures that support it, this enables binary
-compatibility with
-.Em HP-UX
-applications built for the same architecture.
-This option is available on some m68k and hppa architectures.
-See
-.Xr compat_hpux 8 .
.It Cd option COMPAT_IBCS2
On those architectures that support it, this enables binary
compatibility with
diff --git a/share/man/man7/hier.7 b/share/man/man7/hier.7
index ca1ebb99206..776c512b31c 100644
--- a/share/man/man7/hier.7
+++ b/share/man/man7/hier.7
@@ -1,4 +1,4 @@
-.\" $OpenBSD: hier.7,v 1.79 2010/06/29 18:50:23 tedu Exp $
+.\" $OpenBSD: hier.7,v 1.80 2010/06/29 20:30:32 guenther Exp $
.\" $NetBSD: hier.7,v 1.7 1994/11/30 19:07:10 jtc Exp $
.\"
.\" Copyright (c) 1990, 1993
@@ -81,7 +81,6 @@ and the system compat pages:
.Xr compat_aout 8 ,
.Xr compat_bsdos 8 ,
.Xr compat_freebsd 8 ,
-.Xr compat_hpux 8 ,
.Xr compat_ibcs2 8 ,
.Xr compat_linux 8 ,
.Xr compat_osf1 8 ,
diff --git a/share/man/man8/Makefile b/share/man/man8/Makefile
index a2c09d8aa25..a0e708189d0 100644
--- a/share/man/man8/Makefile
+++ b/share/man/man8/Makefile
@@ -1,9 +1,9 @@
-# $OpenBSD: Makefile,v 1.68 2010/06/29 18:50:23 tedu Exp $
+# $OpenBSD: Makefile,v 1.69 2010/06/29 20:30:31 guenther Exp $
# $NetBSD: Makefile,v 1.13 1996/03/28 21:36:40 mark Exp $
# @(#)Makefile 8.1 (Berkeley) 6/5/93
MAN= afterboot.8 boot_config.8 compat_aout.8 compat_bsdos.8 \
- compat_freebsd.8 compat_hpux.8 compat_ibcs2.8 \
+ compat_freebsd.8 compat_ibcs2.8 \
compat_linux.8 compat_osf1.8 compat_sunos.8 \
compat_svr4.8 crash.8 daily.8 dhcp.8 \
diskless.8 genassym.sh.8 intro.8 netstart.8 rc.8 \
diff --git a/share/man/man8/compat_hpux.8 b/share/man/man8/compat_hpux.8
deleted file mode 100644
index 36404046460..00000000000
--- a/share/man/man8/compat_hpux.8
+++ /dev/null
@@ -1,179 +0,0 @@
-.\" $OpenBSD: compat_hpux.8,v 1.10 2007/05/31 19:19:58 jmc Exp $
-.\" $NetBSD: compat_hpux.8,v 1.2 2001/12/16 23:47:19 wiz Exp $
-.\" from: compat_linux.8,v 1.23 2001/10/07 10:12:05 mbw Exp
-.\"
-.\" Copyright (c) 1995 Frank van der Linden
-.\" 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. All advertising materials mentioning features or use of this software
-.\" must display the following acknowledgement:
-.\" This product includes software developed for the NetBSD Project
-.\" by Frank van der Linden
-.\" 4. The name of the author may not 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 $Mdocdate: May 31 2007 $
-.Dt COMPAT_HPUX 8
-.Os
-.Sh NAME
-.Nm compat_hpux
-.Nd setup for running HP-UX binaries under emulation
-.Sh DESCRIPTION
-.Ox
-supports running HP-UX binaries.
-This applies to m68k (such as hp300) and hppa systems.
-Most programs should work, such as Matlab 4.2c on m68k platforms.
-Programs that will not work are fairly uncommon, and often involve very low
-level hardware access, such as the X11 server on hppa machines.
-.Pp
-The HP-UX compatibility feature is active
-for kernels compiled with the
-.Nm COMPAT_HPUX
-and
-.Nm COMPAT_M68K4K
-options and the kern.emul.hpux
-.Xr sysctl 8
-enabled.
-The
-.Nm COMPAT_M68K4K
-option is only required for m68k platforms.
-HP-UX for m68k uses 4 KB page sizes, and
-.Ox
-for all m68k platforms now uses 8 KB page sizes.
-.Pp
-A lot of programs are dynamically linked.
-This means that the HP-UX shared libraries that the programs
-depend on are also needed.
-Additionally, a "shadow root"
-directory for HP-UX binaries on the
-.Ox
-system will have to be created.
-This directory is named
-.Pa /emul/hpux .
-Any file operations done by HP-UX programs run under
-.Ox
-will look in this directory first.
-So, if a HP-UX program opens, for example,
-.Pa /etc/passwd ,
-.Ox
-will first try to open
-.Pa /emul/hpux/etc/passwd ,
-and if that does not exist open the
-.Sq real
-.Pa /etc/passwd
-file.
-It is recommended that HP-UX packages that include configuration
-files, etc., be installed under
-.Pa /emul/hpux ,
-to avoid naming conflicts with possible
-.Ox
-counterparts.
-Shared libraries should also be installed in the shadow tree.
-.Pp
-Generally, it will only be necessary to look for the shared libraries that
-HP-UX binaries depend on the first few times that HP-UX programs are
-installed on the
-.Ox
-system.
-After a while, there will be a sufficient set of HP-UX shared libraries on the
-system to be able to run newly imported HP-UX binaries without any extra work.
-.Ss Setting up shared libraries
-How to get to know which shared libraries HP-UX binaries need, and where to get
-them?
-Basically, there are 2 possibilities.
-(When following these instructions, root privileges are required on the
-.Ox
-system to perform the necessary installation steps).
-.Bl -enum
-.It
-Access to an HP-UX system:
-These instructions apply to HP-UX 9.10 (the latest version of HP-UX available
-for m68k-based systems), although the instructions should be similar for earlier
-versions of HP-UX.
-By far, the easiest method is to copy the essential files locally to the
-.Ox
-system.
-.Pp
-Use
-.Xr tar 1 ,
-or a similar utility, to collect the following files:
-.Pp
-.Bl -item -compact
-.It
-All files in the
-.Pa /usr/lib
-directory ending in
-.Li ".sl" .
-There should be about 46 files and two soft links.
-.It
-All files in the
-.Pa /lib
-directory ending in
-.Li ".sl" .
-There should be 5 files.
-.El
-.Pp
-Copy these files to the
-.Ox
-system, and extract them into
-.Pa /emul/hpux .
-The following files should be present:
-.Bd -unfilled -offset indent
-/emul/hpux/lib/dld.sl
-/emul/hpux/lib/libc.sl
-/emul/hpux/lib/libm.sl
-/emul/hpux/lib/libM.sl
-/emul/hpux/lib/libcurses.sl
-.Ed
-.Pp
-And a whole bunch of files in
-.Pa /emul/hpux/usr/lib .
-Overall, HP-UX 9.10 has about 10 MB of shared libraries that will need to
-be copied to the
-.Ox
-system.
-.It
-Access to an HP-UX system with its entire root drive exported via NFS:
-In this case, simply mount the entire HP-UX system under
-.Pa /emul/hpux .
-For example, on the
-.Ox
-system, mount it as:
-.Pp
-.Dl $ mount -t nfs hpux-host.test.net:/ /emul/hpux
-.Pp
-Note that, in this case, the HP-UX emulation will use the configuration files
-from the HP-UX system
-.Po
-.Pa /etc/passwd ,
-for example,
-.Pc
-and that might not be desirable.
-.El
-.Sh SEE ALSO
-.Xr options 4 ,
-.Xr config 8
-.Sh BUGS
-It might not be possible to run the X server on multiple framebuffers,
-even though both the X server and
-.Ox
-support them.
diff --git a/sys/arch/hp300/conf/GENERIC b/sys/arch/hp300/conf/GENERIC
index 84ac36e105c..31d29068872 100644
--- a/sys/arch/hp300/conf/GENERIC
+++ b/sys/arch/hp300/conf/GENERIC
@@ -1,4 +1,4 @@
-# $OpenBSD: GENERIC,v 1.47 2007/01/06 20:17:59 miod Exp $
+# $OpenBSD: GENERIC,v 1.48 2010/06/29 20:30:32 guenther Exp $
#
# For further information on compiling OpenBSD kernels, see the config(8)
# man page.
@@ -35,7 +35,6 @@ option USELEDS # make the lights twinkle
option WSDISPLAY_COMPAT_RAWKBD # provide raw scancodes; needed for X11
-option COMPAT_HPUX # HP-UX binary compatibility
option COMPAT_M68K4K # compat. with NetBSD/m68k4k binaries
option COMPAT_SUNOS # SunOS/sun3 binaries
diff --git a/sys/arch/hp300/conf/files.hp300 b/sys/arch/hp300/conf/files.hp300
index eeb8bda5f21..68ad296b964 100644
--- a/sys/arch/hp300/conf/files.hp300
+++ b/sys/arch/hp300/conf/files.hp300
@@ -1,4 +1,4 @@
-# $OpenBSD: files.hp300,v 1.32 2007/01/06 20:17:41 miod Exp $
+# $OpenBSD: files.hp300,v 1.33 2010/06/29 20:30:32 guenther Exp $
# $NetBSD: files.hp300,v 1.28 1997/05/12 08:23:28 thorpej Exp $
#
# hp300-specific configuration info
@@ -216,9 +216,3 @@ file arch/hp300/hp300/sys_machdep.c
file arch/hp300/hp300/trap.c
file arch/hp300/hp300/vm_machdep.c
file arch/hp300/dev/dma.c
-
-#
-# HP-UX binary compatibility
-#
-include "compat/hpux/m68k/files.hpux"
-file arch/hp300/hp300/hpux_machdep.c compat_hpux
diff --git a/sys/arch/hp300/hp300/hpux_machdep.c b/sys/arch/hp300/hp300/hpux_machdep.c
deleted file mode 100644
index 428e7cb3943..00000000000
--- a/sys/arch/hp300/hp300/hpux_machdep.c
+++ /dev/null
@@ -1,701 +0,0 @@
-/* $OpenBSD: hpux_machdep.c,v 1.24 2009/12/28 16:40:44 miod Exp $ */
-/* $NetBSD: hpux_machdep.c,v 1.19 1998/02/16 20:58:30 thorpej Exp $ */
-
-/*
- * Copyright (c) 1995, 1996, 1997 Jason R. Thorpe. All rights reserved.
- * Copyright (c) 1988 University of Utah.
- * Copyright (c) 1990, 1993
- * The Regents of the University of California. All rights reserved.
- *
- * This code is derived from software contributed to Berkeley by
- * the Systems Programming Group of the University of Utah Computer
- * Science Department.
- *
- * 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 not be used to endorse or promote products
- * derived from this software without specific prior written permission.
- *
- * THIS SOFTWARE IS PROVIDED BY THE REGENTS 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 REGENTS 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.
- */
-
-/*
- * Machine-dependent bits for HP-UX binary compatibility.
- */
-
-#include <sys/param.h>
-#include <sys/systm.h>
-#include <sys/buf.h>
-#include <sys/conf.h>
-#include <sys/device.h>
-#include <sys/exec.h>
-#include <sys/file.h>
-#include <sys/filedesc.h>
-#include <sys/ioctl.h>
-#include <sys/ipc.h>
-#include <sys/kernel.h>
-#include <sys/malloc.h>
-#include <sys/mman.h>
-#include <sys/mount.h>
-#include <sys/namei.h>
-#include <sys/poll.h>
-#include <sys/proc.h>
-#include <sys/ptrace.h>
-#include <sys/signalvar.h>
-#include <sys/stat.h>
-#include <sys/syslog.h>
-#include <sys/tty.h>
-#include <sys/user.h>
-#include <sys/vnode.h>
-#include <sys/wait.h>
-
-#include <machine/cpu.h>
-#include <machine/reg.h>
-#include <machine/psl.h>
-#include <machine/vmparam.h>
-
-#include <uvm/uvm_extern.h>
-
-#include <sys/syscallargs.h>
-
-#include <compat/hpux/hpux.h>
-#include <compat/hpux/hpux_sig.h>
-#include <compat/hpux/hpux_util.h>
-#include <compat/hpux/hpux_syscall.h>
-#include <compat/hpux/hpux_syscallargs.h>
-
-#include <machine/hpux_machdep.h>
-
-extern short exframesize[];
-
-struct valtostr {
- int val;
- const char *str;
-};
-
-/*
- * 6.0 and later context.
- * XXX what are the HP-UX "localroot" semantics? Should we handle
- * XXX diskless systems here?
- */
-static const char context_040[] =
- "standalone HP-MC68040 HP-MC68881 HP-MC68020 HP-MC68010 localroot default";
-
-static const char context_fpu[] =
- "standalone HP-MC68881 HP-MC68020 HP-MC68010 localroot default";
-
-static const char context_nofpu[] =
- "standalone HP-MC68020 HP-MC68010 localroot default";
-
-static struct valtostr context_table[] = {
- { FPU_68060, &context_040[0] },
- { FPU_68040, &context_040[0] },
- { FPU_68882, &context_fpu[0] },
- { FPU_68881, &context_fpu[0] },
- { 0, NULL },
-};
-
-#define UOFF(f) ((int)&((struct user *)0)->f)
-#define HPUOFF(f) ((int)&((struct hpux_user *)0)->f)
-
-/* simplified FP structure */
-struct bsdfp {
- int save[54];
- int reg[24];
- int ctrl[3];
-};
-
-/*
- * m68k-specific setup for HP-UX executables.
- */
-int
-hpux_cpu_makecmds(p, epp)
- struct proc *p;
- struct exec_package *epp;
-{
- /* struct hpux_exec *hpux_ep = epp->ep_hdr; */
-
- /* set up command for exec header */
- NEW_VMCMD(&epp->ep_vmcmds, hpux_cpu_vmcmd,
- sizeof(struct hpux_exec), (long)epp->ep_hdr, NULLVP, 0, 0);
- return (0);
-}
-
-/*
- * We need to setup pcb cacheability information correctly, so we define
- * this vmcmd to do it for us, since vmcmds are executed once
- * we're committed to the exec (i.e. the old program has been unmapped).
- */
-int
-hpux_cpu_vmcmd(p, ev)
- struct proc *p;
- struct exec_vmcmd *ev;
-{
- struct hpux_exec *execp = (struct hpux_exec *)ev->ev_addr;
-
- /* Deal with misc. HP-UX process attributes. */
- if (execp->ha_trsize & HPUXM_VALID) {
- if (execp->ha_trsize & HPUXM_DATAWT)
- p->p_md.md_flags &= ~MDP_CCBDATA;
-
- if (execp->ha_trsize & HPUXM_STKWT)
- p->p_md.md_flags &= ~MDP_CCBSTACK;
- }
-
- return (0);
-}
-
-/*
- * Return arch-type for hpux_sys_sysconf()
- */
-int
-hpux_cpu_sysconf_arch()
-{
-
- switch (cputype) {
- case CPU_68020:
- return (HPUX_SYSCONF_CPUM020);
-
- case CPU_68030:
- return (HPUX_SYSCONF_CPUM030);
-
- default:
- return (HPUX_SYSCONF_CPUM040);
- }
- /* NOTREACHED */
-}
-
-/*
- * HP-UX advise(2) system call.
- */
-int
-hpux_sys_advise(p, v, retval)
- struct proc *p;
- void *v;
- register_t *retval;
-{
- struct hpux_sys_advise_args *uap = v;
- int error = 0;
-
- switch (SCARG(uap, arg)) {
- case 0:
- p->p_md.md_flags |= MDP_HPUXMMAP;
- break;
-
- case 1:
- ICIA();
- break;
-
- case 2:
- DCIA();
- break;
-
- default:
- error = EINVAL;
- break;
- }
-
- return (error);
-}
-
-/*
- * HP-UX getcontext(2) system call.
- * Man page lies, behaviour here is based on observed behaviour.
- */
-int
-hpux_sys_getcontext(p, v, retval)
- struct proc *p;
- void *v;
- register_t *retval;
-{
- struct hpux_sys_getcontext_args *uap = v;
- const char *str;
- int l, i, error = 0;
- int len;
-
- if (SCARG(uap, len) <= 0)
- return (EINVAL);
-
- for (i = 0; context_table[i].str != NULL; i++)
- if (context_table[i].val == fputype)
- break;
- if (context_table[i].str == NULL)
- str = &context_nofpu[0];
- else
- str = context_table[i].str;
-
- /* + 1 ... count the terminating \0. */
- l = strlen(str) + 1;
- len = min(SCARG(uap, len), l);
-
- if (len)
- error = copyout(str, SCARG(uap, buf), len);
- if (error == 0)
- *retval = l;
- return (0);
-}
-
-/*
- * Brutal hack! Map HP-UX u-area offsets into BSD k-stack offsets.
- * XXX This probably doesn't work anymore, BTW. --thorpej
- */
-int
-hpux_to_bsd_uoff(off, isps, p)
- int *off, *isps;
- struct proc *p;
-{
- int *ar0 = p->p_md.md_regs;
- struct hpux_fp *hp;
- struct bsdfp *bp;
- u_int raddr;
-
- *isps = 0;
-
- /* u_ar0 field; procxmt puts in U_ar0 */
- if ((int)off == HPUOFF(hpuxu_ar0))
- return(UOFF(U_ar0));
-
- if (fputype) {
- /* FP registers from PCB */
- hp = (struct hpux_fp *)HPUOFF(hpuxu_fp);
- bp = (struct bsdfp *)UOFF(u_pcb.pcb_fpregs);
-
- if (off >= hp->hpfp_ctrl && off < &hp->hpfp_ctrl[3])
- return((int)&bp->ctrl[off - hp->hpfp_ctrl]);
-
- if (off >= hp->hpfp_reg && off < &hp->hpfp_reg[24])
- return((int)&bp->reg[off - hp->hpfp_reg]);
- }
-
- /*
- * Everything else we recognize comes from the kernel stack,
- * so we convert off to an absolute address (if not already)
- * for simplicity.
- */
- if (off < (int *)ptoa(UPAGES))
- off = (int *)((u_int)off + (u_int)p->p_addr); /* XXX */
-
- /*
- * General registers.
- * We know that the HP-UX registers are in the same order as ours.
- * The only difference is that their PS is 2 bytes instead of a
- * padded 4 like ours throwing the alignment off.
- */
- if (off >= ar0 && off < &ar0[18]) {
- /*
- * PS: return low word and high word of PC as HP-UX would
- * (e.g. &u.u_ar0[16.5]).
- *
- * XXX we don't do this since HP-UX adb doesn't rely on
- * it and passing such an offset to procxmt will cause
- * it to fail anyway. Instead, we just set the offset
- * to PS and let hpux_ptrace() shift up the value returned.
- */
- if (off == &ar0[PS]) {
-#if 0
- raddr = (u_int) &((short *)ar0)[PS*2+1];
-#else
- raddr = (u_int) &ar0[(int)(off - ar0)];
-#endif
- *isps = 1;
- }
- /*
- * PC: off will be &u.u_ar0[16.5] since HP-UX saved PS
- * is only 16 bits.
- */
- else if (off == (int *)&(((short *)ar0)[PS*2+1]))
- raddr = (u_int) &ar0[PC];
- /*
- * D0-D7, A0-A7: easy
- */
- else
- raddr = (u_int) &ar0[(int)(off - ar0)];
- return((int)(raddr - (u_int)p->p_addr)); /* XXX */
- }
-
- /* everything else */
- return (-1);
-}
-
-#define HSS_RTEFRAME 0x01
-#define HSS_FPSTATE 0x02
-#define HSS_USERREGS 0x04
-
-struct hpuxsigstate {
- int hss_flags; /* which of the following are valid */
- struct frame hss_frame; /* original exception frame */
- struct fpframe hss_fpstate; /* 68881/68882 state info */
-};
-
-/*
- * WARNING: code in locore.s assumes the layout shown here for hsf_signum
- * thru hsf_handler so... don't screw with them!
- */
-struct hpuxsigframe {
- int hsf_signum; /* signo for handler */
- int hsf_code; /* additional info for handler */
- struct hpuxsigcontext *hsf_scp; /* context ptr for handler */
- sig_t hsf_handler; /* handler addr for u_sigc */
- struct hpuxsigstate hsf_sigstate; /* state of the hardware */
- struct hpuxsigcontext hsf_sc; /* actual context */
-};
-
-#ifdef DEBUG
-int hpuxsigdebug = 0;
-int hpuxsigpid = 0;
-#define SDB_FOLLOW 0x01
-#define SDB_KSTACK 0x02
-#define SDB_FPSTATE 0x04
-#endif
-
-/*
- * Send an interrupt to process.
- */
-/* ARGSUSED */
-void
-hpux_sendsig(catcher, sig, mask, code, type, val)
- sig_t catcher;
- int sig, mask;
- u_long code;
- int type;
- union sigval val;
-{
- struct proc *p = curproc;
- struct hpuxsigframe *kfp, *fp;
- struct frame *frame;
- struct sigacts *psp = p->p_sigacts;
- short ft;
- int oonstack, fsize;
-
- frame = (struct frame *)p->p_md.md_regs;
- ft = frame->f_format;
- oonstack = psp->ps_sigstk.ss_flags & SS_ONSTACK;
-
- /*
- * Allocate and validate space for the signal handler
- * context. Note that if the stack is in P0 space, the
- * call to grow() is a nop, and the useracc() check
- * will fail if the process has not already allocated
- * the space with a `brk'.
- */
- fsize = sizeof(struct hpuxsigframe);
- if ((psp->ps_flags & SAS_ALTSTACK) && !oonstack &&
- (psp->ps_sigonstack & sigmask(sig))) {
- fp = (struct hpuxsigframe *)(psp->ps_sigstk.ss_sp +
- psp->ps_sigstk.ss_size - fsize);
- psp->ps_sigstk.ss_flags |= SS_ONSTACK;
- } else
- fp = (struct hpuxsigframe *)(frame->f_regs[SP] - fsize);
- if ((unsigned)fp <= USRSTACK - ptoa(p->p_vmspace->vm_ssize))
- (void)uvm_grow(p, (unsigned)fp);
-
-#ifdef DEBUG
- if ((hpuxsigdebug & SDB_KSTACK) && p->p_pid == hpuxsigpid)
- printf("hpux_sendsig(%d): sig %d ssp %p usp %p scp %p ft %d\n",
- p->p_pid, sig, &oonstack, fp, &fp->hsf_sc, ft);
-#endif
-
- kfp = (struct hpuxsigframe *)malloc((u_long)fsize, M_TEMP,
- M_WAITOK | M_CANFAIL);
- if (kfp == NULL) {
- /* Better halt the process in its track than panicing */
- sigexit(p, SIGILL);
- /* NOTREACHED */
- }
-
- /*
- * Build the argument list for the signal handler.
- */
- kfp->hsf_signum = bsdtohpuxsig(sig);
- kfp->hsf_code = code;
- kfp->hsf_scp = &fp->hsf_sc;
- kfp->hsf_handler = catcher;
-
- /*
- * Save necessary hardware state. Currently this includes:
- * - general registers
- * - original exception frame (if not a "normal" frame)
- * - FP coprocessor state
- */
- kfp->hsf_sigstate.hss_flags = HSS_USERREGS;
- bcopy((caddr_t)frame->f_regs,
- (caddr_t)kfp->hsf_sigstate.hss_frame.f_regs, sizeof frame->f_regs);
- if (ft >= FMT7) {
-#ifdef DEBUG
- if (ft > 15 || exframesize[ft] < 0)
- panic("hpux_sendsig: bogus frame type");
-#endif
- kfp->hsf_sigstate.hss_flags |= HSS_RTEFRAME;
- kfp->hsf_sigstate.hss_frame.f_format = frame->f_format;
- kfp->hsf_sigstate.hss_frame.f_vector = frame->f_vector;
- bcopy((caddr_t)&frame->F_u,
- (caddr_t)&kfp->hsf_sigstate.hss_frame.F_u, exframesize[ft]);
-
- /*
- * Leave an indicator that we need to clean up the kernel
- * stack. We do this by setting the "pad word" above the
- * hardware stack frame to the amount the stack must be
- * adjusted by.
- *
- * N.B. we increment rather than just set f_stackadj in
- * case we are called from syscall when processing a
- * sigreturn. In that case, f_stackadj may be non-zero.
- */
- frame->f_stackadj += exframesize[ft];
- frame->f_format = frame->f_vector = 0;
-#ifdef DEBUG
- if (hpuxsigdebug & SDB_FOLLOW)
- printf("hpux_sendsig(%d): copy out %d of frame %d\n",
- p->p_pid, exframesize[ft], ft);
-#endif
- }
- if (fputype) {
- kfp->hsf_sigstate.hss_flags |= HSS_FPSTATE;
- m68881_save(&kfp->hsf_sigstate.hss_fpstate);
- }
-
-#ifdef DEBUG
- if ((hpuxsigdebug & SDB_FPSTATE) &&
- *(char *)&kfp->hsf_sigstate.hss_fpstate)
- printf("hpux_sendsig(%d): copy out FP state (%x) to %p\n",
- p->p_pid, *(u_int *)&kfp->hsf_sigstate.hss_fpstate,
- &kfp->hsf_sigstate.hss_fpstate);
-#endif
-
- /*
- * Build the signal context to be used by hpux_sigreturn.
- */
- kfp->hsf_sc.hsc_syscall = 0; /* XXX */
- kfp->hsf_sc.hsc_action = 0; /* XXX */
- kfp->hsf_sc.hsc_pad1 = kfp->hsf_sc.hsc_pad2 = 0;
- kfp->hsf_sc.hsc_onstack = oonstack;
- kfp->hsf_sc.hsc_mask = mask;
- kfp->hsf_sc.hsc_sp = frame->f_regs[SP];
- kfp->hsf_sc.hsc_ps = frame->f_sr;
- kfp->hsf_sc.hsc_pc = frame->f_pc;
-
- /* How amazingly convenient! */
- kfp->hsf_sc._hsc_pad = 0;
- kfp->hsf_sc._hsc_ap = (int)&fp->hsf_sigstate;
-
- if (copyout((caddr_t)kfp, (caddr_t)fp, fsize) != 0) {
-#ifdef DEBUG
- if ((hpuxsigdebug & SDB_KSTACK) && p->p_pid == hpuxsigpid)
- printf("hpux_sendsig(%d): copyout failed on sig %d\n",
- p->p_pid, sig);
-#endif
- /*
- * Process has trashed its stack; give it an illegal
- * instruction to halt it in its tracks.
- */
- free((caddr_t)kfp, M_TEMP);
- sigexit(p, SIGILL);
- /* NOTREACHED */
- }
- frame->f_regs[SP] = (int)fp;
-
-#ifdef DEBUG
- if (hpuxsigdebug & SDB_FOLLOW) {
- printf(
- "hpux_sendsig(%d): sig %d scp %p fp %p sc_sp %x sc_ap %x\n",
- p->p_pid, sig, kfp->hsf_scp, fp,
- kfp->hsf_sc.hsc_sp, kfp->hsf_sc._hsc_ap);
- }
-#endif
-
- /*
- * Signal trampoline code is at base of user stack.
- */
- frame->f_pc = p->p_sigcode;
-#ifdef DEBUG
- if ((hpuxsigdebug & SDB_KSTACK) && p->p_pid == hpuxsigpid)
- printf("hpux_sendsig(%d): sig %d returns\n",
- p->p_pid, sig);
-#endif
- free((caddr_t)kfp, M_TEMP);
-}
-
-/*
- * System call to cleanup state after a signal
- * has been taken. Reset signal mask and
- * stack state from context left by sendsig (above).
- * Return to previous pc and psl as specified by
- * context left by sendsig. Check carefully to
- * make sure that the user has not modified the
- * psl to gain improper privileges or to cause
- * a machine fault.
- */
-/* ARGSUSED */
-int
-hpux_sys_sigreturn(p, v, retval)
- struct proc *p;
- void *v;
- register_t *retval;
-{
- struct hpux_sys_sigreturn_args /* {
- syscallarg(struct hpuxsigcontext *) sigcntxp;
- } */ *uap = v;
- struct hpuxsigcontext *scp;
- struct frame *frame;
- int rf;
- struct hpuxsigcontext tsigc;
- struct hpuxsigstate tstate;
- int flags;
-
- scp = SCARG(uap, sigcntxp);
-#ifdef DEBUG
- if (hpuxsigdebug & SDB_FOLLOW)
- printf("sigreturn: pid %d, scp %p\n", p->p_pid, scp);
-#endif
- if ((int)scp & 1)
- return (EINVAL);
-
- /*
- * Fetch and test the HP-UX context structure.
- * We grab it all at once for speed.
- */
- if (copyin((caddr_t)scp, (caddr_t)&tsigc, sizeof tsigc))
- return (EINVAL);
- scp = &tsigc;
- if ((scp->hsc_ps & PSL_USERCLR) != 0 ||
- (scp->hsc_ps & PSL_USERSET) != PSL_USERSET)
- return (EINVAL);
-
- /*
- * Restore the user supplied information
- */
- if (scp->hsc_onstack & 01)
- p->p_sigacts->ps_sigstk.ss_flags |= SS_ONSTACK;
- else
- p->p_sigacts->ps_sigstk.ss_flags &= ~SS_ONSTACK;
- p->p_sigmask = scp->hsc_mask &~ sigcantmask;
- frame = (struct frame *) p->p_md.md_regs;
- frame->f_regs[SP] = scp->hsc_sp;
- frame->f_pc = scp->hsc_pc;
- frame->f_sr = scp->hsc_ps;
-
- /*
- * Grab a pointer to the hpuxsigstate.
- * If zero, the user is probably doing a longjmp.
- * (This will never happen, really, since HP-UX doesn't
- * know/care about the state pointer.)
- */
- if ((rf = scp->_hsc_ap) == 0)
- return (EJUSTRETURN);
-
- /*
- * See if there is anything to do before we go to the
- * expense of copying in close to 1/2K of data
- */
- if (copyin((caddr_t)rf, &flags, sizeof(int)) != 0)
- return (EINVAL);
-#ifdef DEBUG
- if (hpuxsigdebug & SDB_FOLLOW)
- printf("sigreturn(%d): sc_ap %x flags %x\n",
- p->p_pid, rf, flags);
-#endif
- if (flags == 0 || copyin((caddr_t)rf, (caddr_t)&tstate, sizeof tstate))
- return (EJUSTRETURN);
-#ifdef DEBUG
- if ((hpuxsigdebug & SDB_KSTACK) && p->p_pid == hpuxsigpid)
- printf("sigreturn(%d): ssp %p usp %x scp %p ft %d\n",
- p->p_pid, &flags, scp->hsc_sp, SCARG(uap, sigcntxp),
- (flags & HSS_RTEFRAME) ? tstate.hss_frame.f_format : -1);
-#endif
- /*
- * Restore most of the users registers except for A6 and SP
- * which were handled above.
- */
- if (flags & HSS_USERREGS)
- bcopy((caddr_t)tstate.hss_frame.f_regs,
- (caddr_t)frame->f_regs, sizeof(frame->f_regs)-2*sizeof(int));
-
- /*
- * Restore long stack frames. Note that we do not copy
- * back the saved SR or PC, they were picked up above from
- * the sigcontext structure.
- */
- if (flags & HSS_RTEFRAME) {
- int sz;
-
- /* grab frame type and validate */
- sz = tstate.hss_frame.f_format;
- if (sz > 15 || (sz = exframesize[sz]) < 0)
- return (EINVAL);
- frame->f_stackadj -= sz;
- frame->f_format = tstate.hss_frame.f_format;
- frame->f_vector = tstate.hss_frame.f_vector;
- bcopy((caddr_t)&tstate.hss_frame.F_u,
- (caddr_t)&frame->F_u, sz);
-#ifdef DEBUG
- if (hpuxsigdebug & SDB_FOLLOW)
- printf("sigreturn(%d): copy in %d of frame type %d\n",
- p->p_pid, sz, tstate.hss_frame.f_format);
-#endif
- }
-
- /*
- * Finally we restore the original FP context
- */
- if (flags & HSS_FPSTATE)
- m68881_restore(&tstate.hss_fpstate);
-
-#ifdef DEBUG
- if ((hpuxsigdebug & SDB_FPSTATE) && *(char *)&tstate.hss_fpstate)
- printf("sigreturn(%d): copied in FP state (%x) at %p\n",
- p->p_pid, *(u_int *)&tstate.hss_fpstate,
- &tstate.hss_fpstate);
-
- if ((hpuxsigdebug & SDB_FOLLOW) ||
- ((hpuxsigdebug & SDB_KSTACK) && p->p_pid == hpuxsigpid))
- printf("sigreturn(%d): returns\n", p->p_pid);
-#endif
- return (EJUSTRETURN);
-}
-
-/*
- * Set registers on exec.
- * XXX Should clear registers except sp, pc.
- */
-void
-hpux_setregs(p, pack, stack, retval)
- struct proc *p;
- struct exec_package *pack;
- u_long stack;
- register_t *retval;
-{
- struct frame *frame = (struct frame *)p->p_md.md_regs;
-
- frame->f_pc = pack->ep_entry & ~1;
- frame->f_regs[SP] = stack;
- frame->f_regs[A2] = (int)PS_STRINGS;
-
- /* restore a null state frame */
- p->p_addr->u_pcb.pcb_fpregs.fpf_null = 0;
- if (fputype)
- m68881_restore(&p->p_addr->u_pcb.pcb_fpregs);
-
- p->p_md.md_flags &= ~MDP_HPUXMMAP;
- frame->f_regs[A0] = 0; /* not 68010 (bit 31), no FPA (30) */
- retval[0] = 0; /* no float card */
- if (fputype)
- retval[1] = 1; /* yes 68881 */
- else
- retval[1] = 0; /* no 68881 */
-}
diff --git a/sys/arch/hp300/hp300/locore.s b/sys/arch/hp300/hp300/locore.s
index d62a4f32b61..523dac45382 100644
--- a/sys/arch/hp300/hp300/locore.s
+++ b/sys/arch/hp300/hp300/locore.s
@@ -1,4 +1,4 @@
-/* $OpenBSD: locore.s,v 1.64 2009/03/15 20:40:23 miod Exp $ */
+/* $OpenBSD: locore.s,v 1.65 2010/06/29 20:30:31 guenther Exp $ */
/* $NetBSD: locore.s,v 1.91 1998/11/11 06:41:25 thorpej Exp $ */
/*
@@ -1030,7 +1030,7 @@ ENTRY_NOPROFILE(trap2)
jra _C_LABEL(trace)
/*
- * Trap 12 is the entry point for the cachectl "syscall" (both HPUX & BSD)
+ * Trap 12 is the entry point for the cachectl "syscall"
* cachectl(command, addr, length)
* command in d0, addr in a1, length in d1
*/
@@ -1567,39 +1567,6 @@ Lhpmmu5:
#endif
rts
-#if defined(COMPAT_HPUX)
-/*
- * Invalidate user side of TLB
- */
-ENTRY(TBIAU)
-#if defined(M68040)
- cmpl #MMU_68040,_C_LABEL(mmutype) | 68040?
- jne Lmotommu6 | no, skip
- .word 0xf518 | yes, pflusha (for now) XXX
- rts
-Lmotommu6:
-#endif
-#if defined(M68K_MMU_MOTOROLA)
- tstl _C_LABEL(mmutype) | HP MMU?
- jeq Lhpmmu8 | yes, skip
- jpl Lmc68851d | 68851?
- pflush #0,#4 | flush user TLB entries
- movl #DC_CLEAR,d0
- movc d0,cacr | invalidate on-chip d-cache
- rts
-Lmc68851d:
- pflushs #0,#4 | flush user TLB entries
- rts
-Lhpmmu8:
-#endif
-#if defined(M68K_MMU_HP)
- MMUADDR(a0)
- moveq #0,d0 | more
- movl d0,a0@(MMUTBINVAL) | HP magic
-#endif
- rts
-#endif /* COMPAT_HPUX */
-
/*
* Invalidate instruction cache
*/
diff --git a/sys/arch/hp300/hp300/machdep.c b/sys/arch/hp300/hp300/machdep.c
index bec60a33c4d..eb953f37bfb 100644
--- a/sys/arch/hp300/hp300/machdep.c
+++ b/sys/arch/hp300/hp300/machdep.c
@@ -1,4 +1,4 @@
-/* $OpenBSD: machdep.c,v 1.127 2010/06/27 03:03:48 thib Exp $ */
+/* $OpenBSD: machdep.c,v 1.128 2010/06/29 20:30:31 guenther Exp $ */
/* $NetBSD: machdep.c,v 1.121 1999/03/26 23:41:29 mycroft Exp $ */
/*
@@ -127,9 +127,6 @@ int safepri = PSL_LOWIPL;
extern u_int lowram;
extern short exframesize[];
-#ifdef COMPAT_HPUX
-extern struct emul emul_hpux;
-#endif
#ifdef COMPAT_SUNOS
extern struct emul emul_sunos;
#endif
diff --git a/sys/arch/hp300/hp300/trap.c b/sys/arch/hp300/hp300/trap.c
index e2d7e8f6a3c..b516a8e580e 100644
--- a/sys/arch/hp300/hp300/trap.c
+++ b/sys/arch/hp300/hp300/trap.c
@@ -1,4 +1,4 @@
-/* $OpenBSD: trap.c,v 1.54 2009/03/15 20:40:23 miod Exp $ */
+/* $OpenBSD: trap.c,v 1.55 2010/06/29 20:30:31 guenther Exp $ */
/* $NetBSD: trap.c,v 1.57 1998/02/16 20:58:31 thorpej Exp $ */
/*
@@ -93,11 +93,6 @@
#include <dev/cons.h>
-#ifdef COMPAT_HPUX
-#include <compat/hpux/hpux.h>
-extern struct emul emul_hpux;
-#endif
-
#ifdef COMPAT_SUNOS
#include <compat/sunos/sunos_syscall.h>
extern struct emul emul_sunos;
@@ -405,14 +400,6 @@ dopanic:
#endif
case T_ILLINST|T_USER: /* illegal instruction fault */
-#ifdef COMPAT_HPUX
- if (p->p_emul == &emul_hpux) {
- typ = 0;
- ucode = HPUX_ILL_ILLINST_TRAP;
- i = SIGILL;
- break;
- }
-#endif
ucode = frame.f_format; /* XXX was ILL_PRIVIN_FAULT */
typ = ILL_ILLOPC;
i = SIGILL;
@@ -420,11 +407,6 @@ dopanic:
break;
case T_PRIVINST|T_USER: /* privileged instruction fault */
-#ifdef COMPAT_HPUX
- if (p->p_emul == &emul_hpux)
- ucode = HPUX_ILL_PRIV_TRAP;
- else
-#endif
ucode = frame.f_format; /* XXX was ILL_PRIVIN_FAULT */
typ = ILL_PRVOPC;
i = SIGILL;
@@ -432,11 +414,6 @@ dopanic:
break;
case T_ZERODIV|T_USER: /* Divide by zero */
-#ifdef COMPAT_HPUX
- if (p->p_emul == &emul_hpux)
- ucode = HPUX_FPE_INTDIV_TRAP;
- else
-#endif
ucode = frame.f_format; /* XXX was FPE_INTDIV_TRAP */
typ = FPE_INTDIV;
i = SIGFPE;
@@ -444,14 +421,6 @@ dopanic:
break;
case T_CHKINST|T_USER: /* CHK instruction trap */
-#ifdef COMPAT_HPUX
- if (p->p_emul == &emul_hpux) {
- /* handled differently under hp-ux */
- i = SIGILL;
- ucode = HPUX_ILL_CHK_TRAP;
- break;
- }
-#endif
ucode = frame.f_format; /* XXX was FPE_SUBRNG_TRAP */
typ = FPE_FLTSUB;
i = SIGFPE;
@@ -459,14 +428,6 @@ dopanic:
break;
case T_TRAPVINST|T_USER: /* TRAPV instruction trap */
-#ifdef COMPAT_HPUX
- if (p->p_emul == &emul_hpux) {
- /* handled differently under hp-ux */
- i = SIGILL;
- ucode = HPUX_ILL_TRAPV_TRAP;
- break;
- }
-#endif
ucode = frame.f_format; /* XXX was FPE_INTOVF_TRAP */
typ = ILL_ILLTRP;
i = SIGILL;
@@ -608,20 +569,6 @@ dopanic:
goto dopanic;
}
-#ifdef COMPAT_HPUX
- if (ISHPMMADDR(p, va)) {
- int pmap_mapmulti(pmap_t, vaddr_t);
- vaddr_t bva;
-
- rv = pmap_mapmulti(map->pmap, va);
- if (rv) {
- bva = HPMMBASEADDR(va);
- rv = uvm_fault(map, bva, 0, ftype);
- if (rv == 0)
- (void)pmap_mapmulti(map->pmap, va);
- }
- } else
-#endif
rv = uvm_fault(map, va, 0, ftype);
#ifdef DEBUG
if (rv && MDB_ISPID(p->p_pid))
diff --git a/sys/arch/hp300/include/hpux_machdep.h b/sys/arch/hp300/include/hpux_machdep.h
deleted file mode 100644
index 9367cc8b0f7..00000000000
--- a/sys/arch/hp300/include/hpux_machdep.h
+++ /dev/null
@@ -1,76 +0,0 @@
-/* $OpenBSD: hpux_machdep.h,v 1.9 2008/06/26 05:42:10 ray Exp $ */
-/* $NetBSD: hpux_machdep.h,v 1.8 1997/04/27 21:38:58 thorpej Exp $ */
-
-/*-
- * Copyright (c) 1996, 1997 The NetBSD Foundation, Inc.
- * All rights reserved.
- *
- * This code is derived from software contributed to The NetBSD Foundation
- * by Jason R. Thorpe.
- *
- * 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 REGENTS 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.
- */
-
-#ifndef _MACHINE_HPUX_MACHDEP_H_
-#define _MACHINE_HPUX_MACHDEP_H_
-
-/*
- * Information pushed on stack when a signal is delivered.
- * This is used by the kernel to restore state following
- * execution of the signal handler. It is also made available
- * to the handler to allow it to restore state properly if
- * a non-standard exit is performed.
- */
-struct hpuxsigcontext {
- int hsc_syscall; /* ??? (syscall number?) */
- char hsc_action; /* ??? */
- char hsc_pad1;
- char hsc_pad2;
- char hsc_onstack; /* sigstack state to restore */
- int hsc_mask; /* signal mask to restore */
- int hsc_sp; /* sp to restore */
- short hsc_ps; /* psl to restore */
- int hsc_pc; /* pc to restore */
-
- /*
- * The following are not actually used by HP-UX. They exist
- * for the convenience of the compatibility code.
- */
- short _hsc_pad;
- int _hsc_ap; /* pointer to hpuxsigstate */
-};
-
-#ifdef _KERNEL
-struct exec_package;
-struct exec_vmcmd;
-
-int hpux_cpu_makecmds(struct proc *, struct exec_package *);
-int hpux_cpu_vmcmd(struct proc *, struct exec_vmcmd *);
-int hpux_cpu_sysconf_arch(void);
-int hpux_to_bsd_uoff(int *, int *, struct proc *);
-
-void hpux_sendsig(sig_t, int, int, u_long, int, union sigval);
-void hpux_setregs(struct proc *, struct exec_package *,
- u_long, register_t *);
-#endif /* _KERNEL */
-
-#endif /* ! _MACHINE_HPUX_MACHDEP_H_ */
diff --git a/sys/arch/hppa/conf/GENERIC b/sys/arch/hppa/conf/GENERIC
index 6f5474d0deb..c1bbd6e2d3f 100644
--- a/sys/arch/hppa/conf/GENERIC
+++ b/sys/arch/hppa/conf/GENERIC
@@ -1,4 +1,4 @@
-# $OpenBSD: GENERIC,v 1.133 2010/03/03 20:57:28 mk Exp $
+# $OpenBSD: GENERIC,v 1.134 2010/06/29 20:30:32 guenther Exp $
#
# For further information on compiling OpenBSD kernels, see the config(8)
# man page.
@@ -29,7 +29,6 @@ option FPEMUL
option USELEDS # blink 'em
option USER_PCICONF # user-space PCI configuration
-option COMPAT_HPUX
#option COMPAT_LINUX
#option PROCFS # /proc
diff --git a/sys/arch/hppa/conf/files.hppa b/sys/arch/hppa/conf/files.hppa
index ec867b7af24..b933b2efb4b 100644
--- a/sys/arch/hppa/conf/files.hppa
+++ b/sys/arch/hppa/conf/files.hppa
@@ -1,4 +1,4 @@
-# $OpenBSD: files.hppa,v 1.83 2010/06/29 04:03:21 jsing Exp $
+# $OpenBSD: files.hppa,v 1.84 2010/06/29 20:30:32 guenther Exp $
#
# hppa-specific configuration info
@@ -290,8 +290,6 @@ include "dev/pckbc/files.pckbc"
#
# Compatibility
#
-include "compat/hpux/hppa/files.hpux"
-file arch/hppa/hppa/hpux_machdep.c compat_hpux
include "compat/osf1/files.osf1"
file arch/hppa/hppa/osf1_machdep.c compat_osf1
include "compat/linux/files.linux"
diff --git a/sys/arch/hppa/hppa/hpux_machdep.c b/sys/arch/hppa/hppa/hpux_machdep.c
deleted file mode 100644
index fdfbe0b17ef..00000000000
--- a/sys/arch/hppa/hppa/hpux_machdep.c
+++ /dev/null
@@ -1,149 +0,0 @@
-/* $OpenBSD: hpux_machdep.c,v 1.6 2010/06/29 04:03:21 jsing Exp $ */
-
-/*
- * Copyright (c) 2005 Michael Shalayeff
- * 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.
- *
- * 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 OR HIS RELATIVES 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 MIND, 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/param.h>
-#include <sys/proc.h>
-#include <sys/user.h>
-#include <sys/exec.h>
-#include <sys/signalvar.h>
-
-#include <compat/hpux/hpux.h>
-#include <compat/hpux/hpux_sig.h>
-#include <compat/hpux/hpux_util.h>
-#include <compat/hpux/hpux_syscallargs.h>
-
-#include <machine/cpufunc.h>
-#include <machine/fpu.h>
-#include <machine/frame.h>
-#include <machine/hpux_machdep.h>
-
-int
-hpux_cpu_sysconf_arch(void)
-{
- extern int cpu_model_hpux; /* machdep.c */
-
- return cpu_model_hpux;
-}
-
-int
-hpux_sys_getcontext(struct proc *p, void *v, register_t *retval)
-{
- struct hpux_sys_getcontext_args *uap = v;
- int len = SCARG(uap, len);
-
- if (len <= 0)
- return (EINVAL);
-
- if (len > 4)
- len = 4;
-
- if (!copyout("FPU", SCARG(uap, buf), len))
- *retval = len;
-
- return (0);
-}
-
-void
-hpux_setregs(struct proc *p, struct exec_package *pack, u_long stack,
- register_t *retval)
-{
- extern int cpu_model_hpux; /* machdep.c */
- extern u_int fpu_version; /* from machdep.c */
- struct ps_strings arginfo; /* XXX copy back in from the stack */
- struct hpux_keybits {
- int kb_cpuver;
- int kb_fpustat;
- int kb_nbits;
- int kb_bits[2];
- } hpux_keybits;
- struct trapframe *tf = p->p_md.md_regs;
- struct pcb *pcb = &p->p_addr->u_pcb;
- register_t zero;
-
- if (copyin((char *)PS_STRINGS, &arginfo, sizeof(arginfo)))
- sigexit(p, SIGILL);
-
- stack = (stack + 0x1f) & ~0x1f;
- hpux_keybits.kb_cpuver = cpu_model_hpux;
- hpux_keybits.kb_fpustat = fpu_version;
- hpux_keybits.kb_nbits = 1;
- hpux_keybits.kb_bits[0] = 0; /* TODO report half-word insns */
- hpux_keybits.kb_bits[1] = -1;
- if (copyout(&hpux_keybits, (void *)stack, sizeof(hpux_keybits)))
- sigexit(p, SIGILL);
-
- tf->tf_flags = TFF_SYS|TFF_LAST;
- tf->tf_iioq_tail = 4 +
- (tf->tf_iioq_head = pack->ep_entry | HPPA_PC_PRIV_USER);
- tf->tf_rp = 0;
- tf->tf_arg0 = (register_t)arginfo.ps_nargvstr;
- tf->tf_arg1 = (register_t)arginfo.ps_argvstr;
- tf->tf_arg2 = (register_t)arginfo.ps_envstr;
- tf->tf_arg3 = stack; /* keybits */
- stack += sizeof(hpux_keybits);
-
- /* setup terminal stack frame */
- stack = (stack + 0x1f) & ~0x1f;
- tf->tf_r3 = stack;
- tf->tf_sp = stack += HPPA_FRAME_SIZE;
- zero = 0;
- copyout(&zero, (caddr_t)(stack - HPPA_FRAME_SIZE), sizeof(register_t));
- copyout(&zero, (caddr_t)(stack + HPPA_FRAME_CRP), sizeof(register_t));
-
- /* reset any of the pending FPU exceptions */
- pcb->pcb_fpregs->fpr_regs[0] = ((u_int64_t)HPPA_FPU_INIT) << 32;
- pcb->pcb_fpregs->fpr_regs[1] = 0;
- pcb->pcb_fpregs->fpr_regs[2] = 0;
- pcb->pcb_fpregs->fpr_regs[3] = 0;
-
- fpu_proc_flush(p);
-
- retval[1] = 0;
-}
-
-int
-hpux_sigsetreturn(struct proc *p, void *v, register_t *retval)
-{
- struct hpux_sigsetreturn_args /* {
- syscallarg(caddr_t) addr;
- syscallarg(int) cookie;
- syscallarg(int) len;
- } */ *uap = v;
- struct pcb *pcb = &p->p_addr->u_pcb;
-
- /* XXX should fail on second call? */
-
- pcb->pcb_sigreturn = SCARG(uap, addr);
- pcb->pcb_srcookie = SCARG(uap, cookie);
- pcb->pcb_sclen = SCARG(uap, len);
-
-printf("hpux_sigsetreturn(%p, %x, %d)\n", SCARG(uap, addr), SCARG(uap, cookie), SCARG(uap, len));
-
- retval[0] = 0;
- return (0);
-}
diff --git a/sys/arch/hppa/hppa/locore.S b/sys/arch/hppa/hppa/locore.S
index 5d1726cd540..31fd515bd22 100644
--- a/sys/arch/hppa/hppa/locore.S
+++ b/sys/arch/hppa/hppa/locore.S
@@ -1,4 +1,4 @@
-/* $OpenBSD: locore.S,v 1.173 2010/06/29 00:50:40 jsing Exp $ */
+/* $OpenBSD: locore.S,v 1.174 2010/06/29 20:30:31 guenther Exp $ */
/*
* Copyright (c) 1998-2004 Michael Shalayeff
@@ -3070,20 +3070,6 @@ sigcode_call
ALTENTRY(esigcode)
EXIT(sigcode)
-#ifdef COMPAT_HPUX
-ENTRY(hpux_sigcode,0)
- bb,>=,n arg3, 30, hpux_sigcode_call
- dep r0, 31, 2, arg3
- ldw 4(arg3), r19
- ldw 0(arg3), arg3
-hpux_sigcode_call
- .call
- ble 0(sr0, arg3)
- nop /* rp has already been set */
-ALTENTRY(hpux_esigcode)
-EXIT(hpux_sigcode)
-#endif /* COMPAT_HPUX */
-
#ifdef COMPAT_LINUX
ENTRY(linux_sigcode,0)
diff --git a/sys/arch/hppa/hppa/machdep.c b/sys/arch/hppa/hppa/machdep.c
index 628b605adff..6e939f30110 100644
--- a/sys/arch/hppa/hppa/machdep.c
+++ b/sys/arch/hppa/hppa/machdep.c
@@ -1,4 +1,4 @@
-/* $OpenBSD: machdep.c,v 1.191 2010/06/29 04:03:21 jsing Exp $ */
+/* $OpenBSD: machdep.c,v 1.192 2010/06/29 20:30:32 guenther Exp $ */
/*
* Copyright (c) 1999-2003 Michael Shalayeff
@@ -67,14 +67,6 @@
#include <machine/kcore.h>
#include <machine/fpu.h>
-#ifdef COMPAT_HPUX
-#include <compat/hpux/hpux.h>
-#include <compat/hpux/hpux_sig.h>
-#include <compat/hpux/hpux_util.h>
-#include <compat/hpux/hpux_syscallargs.h>
-#include <machine/hpux_machdep.h>
-#endif
-
#ifdef DDB
#include <machine/db_machdep.h>
#include <ddb/db_access.h>
@@ -136,9 +128,6 @@ enum hppa_cpu_type cpu_type;
const char *cpu_typename;
int cpu_hvers;
u_int fpu_version;
-#ifdef COMPAT_HPUX
-int cpu_model_hpux; /* contains HPUX_SYSCONF_CPU* kind of value */
-#endif
int led_blink;
@@ -601,15 +590,9 @@ cpuid()
default:
case 0:
q = "1.0";
-#ifdef COMPAT_HPUX
- cpu_model_hpux = HPUX_SYSCONF_CPUPA10;
-#endif
break;
case 4:
q = "1.1";
-#ifdef COMPAT_HPUX
- cpu_model_hpux = HPUX_SYSCONF_CPUPA11;
-#endif
/* this one is just a 100MHz pcxl */
if (lev == 0x10)
lev = 0xc;
@@ -619,9 +602,6 @@ cpuid()
break;
case 8:
q = "2.0";
-#ifdef COMPAT_HPUX
- cpu_model_hpux = HPUX_SYSCONF_CPUPA20;
-#endif
break;
}
}
@@ -1455,142 +1435,6 @@ sys_sigreturn(p, v, retval)
return (EJUSTRETURN);
}
-#ifdef COMPAT_HPUX
-void
-hpux_sendsig(sig_t catcher, int sig, int mask, u_long code, int type,
- union sigval val)
-{
- struct proc *p = curproc;
- struct pcb *pcb = &p->p_addr->u_pcb;
- struct trapframe *tf = p->p_md.md_regs;
- struct sigacts *psp = p->p_sigacts;
- struct hpux_sigcontext hsc;
- int sss;
- register_t scp;
-
-#ifdef DEBUG
- if ((sigdebug & SDB_FOLLOW) && (!sigpid || p->p_pid == sigpid))
- printf("hpux_sendsig: %s[%d] sig %d catcher %p\n",
- p->p_comm, p->p_pid, sig, catcher);
-#endif
- /* Save the FPU context first. */
- fpu_proc_save(p);
-
- bzero(&hsc, sizeof hsc);
- hsc.sc_onstack = psp->ps_sigstk.ss_flags & SS_ONSTACK;
- hsc.sc_omask = mask;
- /* sc_scact ??? */
-
- hsc.sc_ret0 = tf->tf_ret0;
- hsc.sc_ret1 = tf->tf_ret1;
-
- hsc.sc_frame[0] = hsc.sc_args[0] = sig;
- hsc.sc_frame[1] = hsc.sc_args[1] = NULL;
- hsc.sc_frame[2] = hsc.sc_args[2] = scp;
-
- /*
- * Allocate space for the signal handler context.
- */
- if ((psp->ps_flags & SAS_ALTSTACK) && !hsc.sc_onstack &&
- (psp->ps_sigonstack & sigmask(sig))) {
- scp = (register_t)psp->ps_sigstk.ss_sp;
- psp->ps_sigstk.ss_flags |= SS_ONSTACK;
- } else
- scp = (tf->tf_sp + 63) & ~63;
-
- sss = (sizeof(hsc) + 63) & ~63;
-
- if (tf->tf_flags & TFF_SYS) {
- hsc.sc_tfflags = HPUX_TFF_SYSCALL;
- hsc.sc_syscall = tf->tf_t1;
- } else if (tf->tf_flags & TFF_INTR)
- hsc.sc_tfflags = HPUX_TFF_INTR;
- else
- hsc.sc_tfflags = HPUX_TFF_TRAP;
-
- hsc.sc_regs[0] = tf->tf_r1;
- hsc.sc_regs[1] = tf->tf_rp;
- hsc.sc_regs[2] = tf->tf_r3;
- hsc.sc_regs[3] = tf->tf_r4;
- hsc.sc_regs[4] = tf->tf_r5;
- hsc.sc_regs[5] = tf->tf_r6;
- hsc.sc_regs[6] = tf->tf_r7;
- hsc.sc_regs[7] = tf->tf_r8;
- hsc.sc_regs[8] = tf->tf_r9;
- hsc.sc_regs[9] = tf->tf_r10;
- hsc.sc_regs[10] = tf->tf_r11;
- hsc.sc_regs[11] = tf->tf_r12;
- hsc.sc_regs[12] = tf->tf_r13;
- hsc.sc_regs[13] = tf->tf_r14;
- hsc.sc_regs[14] = tf->tf_r15;
- hsc.sc_regs[15] = tf->tf_r16;
- hsc.sc_regs[16] = tf->tf_r17;
- hsc.sc_regs[17] = tf->tf_r18;
- hsc.sc_regs[18] = tf->tf_t4;
- hsc.sc_regs[19] = tf->tf_t3;
- hsc.sc_regs[20] = tf->tf_t2;
- hsc.sc_regs[21] = tf->tf_t1;
- hsc.sc_regs[22] = tf->tf_arg3;
- hsc.sc_regs[23] = tf->tf_arg2;
- hsc.sc_regs[24] = tf->tf_arg1;
- hsc.sc_regs[25] = tf->tf_arg0;
- hsc.sc_regs[26] = tf->tf_dp;
- hsc.sc_regs[27] = tf->tf_ret0;
- hsc.sc_regs[28] = tf->tf_ret1;
- hsc.sc_regs[29] = tf->tf_sp;
- hsc.sc_regs[30] = tf->tf_r31;
- hsc.sc_regs[31] = tf->tf_sar;
- hsc.sc_regs[32] = tf->tf_iioq_head;
- hsc.sc_regs[33] = tf->tf_iisq_head;
- hsc.sc_regs[34] = tf->tf_iioq_tail;
- hsc.sc_regs[35] = tf->tf_iisq_tail;
- hsc.sc_regs[35] = tf->tf_eiem;
- hsc.sc_regs[36] = tf->tf_iir;
- hsc.sc_regs[37] = tf->tf_isr;
- hsc.sc_regs[38] = tf->tf_ior;
- hsc.sc_regs[39] = tf->tf_ipsw;
- hsc.sc_regs[40] = 0;
- hsc.sc_regs[41] = tf->tf_sr4;
- hsc.sc_regs[42] = tf->tf_sr0;
- hsc.sc_regs[43] = tf->tf_sr1;
- hsc.sc_regs[44] = tf->tf_sr2;
- hsc.sc_regs[45] = tf->tf_sr3;
- hsc.sc_regs[46] = tf->tf_sr5;
- hsc.sc_regs[47] = tf->tf_sr6;
- hsc.sc_regs[48] = tf->tf_sr7;
- hsc.sc_regs[49] = tf->tf_rctr;
- hsc.sc_regs[50] = tf->tf_pidr1;
- hsc.sc_regs[51] = tf->tf_pidr2;
- hsc.sc_regs[52] = tf->tf_ccr;
- hsc.sc_regs[53] = tf->tf_pidr3;
- hsc.sc_regs[54] = tf->tf_pidr4;
- /* hsc.sc_regs[55] = tf->tf_cr24; */
- hsc.sc_regs[56] = tf->tf_vtop;
- /* hsc.sc_regs[57] = tf->tf_cr26; */
- /* hsc.sc_regs[58] = tf->tf_cr27; */
- hsc.sc_regs[59] = 0;
- hsc.sc_regs[60] = 0;
- bcopy(p->p_addr->u_pcb.pcb_fpregs, hsc.sc_fpregs,
- sizeof(hsc.sc_fpregs));
-
- tf->tf_rp = (register_t)pcb->pcb_sigreturn;
- tf->tf_arg3 = (register_t)catcher;
- tf->tf_sp = scp + sss;
- tf->tf_ipsw &= ~(PSL_N|PSL_B);
- tf->tf_iioq_head = HPPA_PC_PRIV_USER | p->p_sigcode;
- tf->tf_iioq_tail = tf->tf_iioq_head + 4;
-
- if (copyout(&hsc, (void *)scp, sizeof(hsc)))
- sigexit(p, SIGILL);
-
-#ifdef DEBUG
- if ((sigdebug & SDB_FOLLOW) && (!sigpid || p->p_pid == sigpid))
- printf("sendsig(%d): pc 0x%x rp 0x%x\n", p->p_pid,
- tf->tf_iioq_head, tf->tf_rp);
-#endif
-}
-#endif
-
/*
* machine dependent system variables.
*/
diff --git a/sys/arch/hppa/include/hpux_machdep.h b/sys/arch/hppa/include/hpux_machdep.h
deleted file mode 100644
index a9241fbaf22..00000000000
--- a/sys/arch/hppa/include/hpux_machdep.h
+++ /dev/null
@@ -1,82 +0,0 @@
-/* $OpenBSD: hpux_machdep.h,v 1.2 2005/03/26 20:37:24 mickey Exp $ */
-
-/*
- * Copyright (c) 2005 Michael Shalayeff
- * 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.
- *
- * 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 OR HIS RELATIVES 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 MIND, 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.
- */
-
-#ifndef _HPPA_HPUX_MACHDEP_H_
-#define _HPPA_HPUX_MACHDEP_H_
-
-struct hpux_sigcontext {
- int sc_syscall;
- int sc_onstack;
- int sc_omask;
- char sc_scact; /* action to take on return from a syscall */
- char sc_eosys;
- u_short sc_err;
- register_t sc_ret0;
- register_t sc_ret1;
- register_t sc_args[4]; /* args for the handler */
-
- /* HP/UX trapframe kinda thing */
- int sc_tfflags;
- register_t sc_regs[62];
- int sc_pad;
- int sc_fpregs[64];
- int sc_resv[32];
-
-#if 0
- int sc_spare[8];
- u_int sc_flags;
- u_int sc_ctxptr;
- hpux_sigset_t sc_sigmask;
- hpux_stack_t sc_stack;
- hpux_siginfo_t sc_si;
-#endif
-
- /* call frame follows */
- register_t sc_frame[4+8];
-};
-
-#define HPUX_SIGCONTEXT_GETCTX 0x01 /* created by getcontext() */
-
-/* trapframe flags */
-#define HPUX_TFF_TRAP 0x0001
-#define HPUX_TFF_SYSCALL 0x0002
-#define HPUX_TFF_INTR 0x0004
-#define HPUX_TFF_ARGSVALID 0x0010
-#define HPUX_TFF_WIDEREGS 0x0040
-
-int hpux_cpu_makecmds(struct proc *p, struct exec_package *epp);
-int hpux_cpu_vmcmd(struct proc *p, struct exec_vmcmd *ev);
-int hpux_cpu_sysconf_arch(void);
-int hpux_sys_getcontext(struct proc *p, void *v, register_t *retval);
-int hpux_to_bsd_uoff(int *off, int *isps, struct proc *p);
-void hpux_setregs(struct proc *p, struct exec_package *pack,
- u_long stack, register_t *retval);
-void hpux_sendsig(sig_t catcher, int sig, int mask, u_long code,
- int type, union sigval val);
-
-#endif /* _HPPA_HPUX_MACHDEP_H_ */
diff --git a/sys/arch/hppa/include/param.h b/sys/arch/hppa/include/param.h
index 14cded0dece..d368f3fc811 100644
--- a/sys/arch/hppa/include/param.h
+++ b/sys/arch/hppa/include/param.h
@@ -1,4 +1,4 @@
-/* $OpenBSD: param.h,v 1.37 2007/09/22 09:57:40 martin Exp $ */
+/* $OpenBSD: param.h,v 1.38 2010/06/29 20:30:32 guenther Exp $ */
/*
* Copyright (c) 1988-1994, The University of Utah and
@@ -96,16 +96,4 @@
#define btodb(x) ((x) >> DEV_BSHIFT)
#define dbtob(x) ((x) << DEV_BSHIFT)
-#ifdef _KERNEL
-#ifdef COMPAT_HPUX
-/*
- * Constants/macros for HPUX multiple mapping of user address space.
- * Pages in the first 256Mb are mapped in at every 256Mb segment.
- */
-#define HPMMMASK 0xF0000000
-#define ISHPMMADDR(v) 0 /* XXX ...jef */
-#define HPMMBASEADDR(v) ((unsigned)(v) & ~HPMMMASK)
-#endif
-#endif
-
#define __SWAP_BROKEN
diff --git a/sys/arch/hppa/include/pcb.h b/sys/arch/hppa/include/pcb.h
index d6032d20412..392d217963c 100644
--- a/sys/arch/hppa/include/pcb.h
+++ b/sys/arch/hppa/include/pcb.h
@@ -1,4 +1,4 @@
-/* $OpenBSD: pcb.h,v 1.12 2009/07/29 18:31:11 kettenis Exp $ */
+/* $OpenBSD: pcb.h,v 1.13 2010/06/29 20:30:32 guenther Exp $ */
/*
* Copyright (c) 1999-2004 Michael Shalayeff
@@ -38,11 +38,6 @@ struct pcb {
u_int pcb_ksp; /* kernel sp for ctxsw */
u_int pcb_onfault; /* SW copy fault handler */
pa_space_t pcb_space; /* copy pmap_space, for asm's sake */
-
- /* things used for hpux emulation */
- void *pcb_sigreturn;
- u_int pcb_srcookie;
- u_int pcb_sclen;
};
struct md_coredump {
diff --git a/sys/arch/hppa64/conf/GENERIC b/sys/arch/hppa64/conf/GENERIC
index 07f2654679e..ca783d9daa0 100644
--- a/sys/arch/hppa64/conf/GENERIC
+++ b/sys/arch/hppa64/conf/GENERIC
@@ -1,4 +1,4 @@
-# $OpenBSD: GENERIC,v 1.17 2010/03/03 20:57:28 mk Exp $
+# $OpenBSD: GENERIC,v 1.18 2010/06/29 20:30:32 guenther Exp $
#
# For further information on compiling OpenBSD kernels, see the config(8)
# man page.
@@ -16,7 +16,6 @@ maxusers 80 # estimated number of users
option DEBUG
option USER_PCICONF # user-space PCI configuration
-#option COMPAT_HPUX
#option COMPAT_LINUX
#option PROCFS # /proc
diff --git a/sys/arch/hppa64/conf/files.hppa64 b/sys/arch/hppa64/conf/files.hppa64
index eaa17856c54..c2dd13f09f3 100644
--- a/sys/arch/hppa64/conf/files.hppa64
+++ b/sys/arch/hppa64/conf/files.hppa64
@@ -1,4 +1,4 @@
-# $OpenBSD: files.hppa64,v 1.8 2008/04/20 17:17:32 kettenis Exp $
+# $OpenBSD: files.hppa64,v 1.9 2010/06/29 20:30:32 guenther Exp $
#
# hppa64-specific configuration info
@@ -109,8 +109,6 @@ include "dev/pckbc/files.pckbc"
#
# Compatibility
#
-#include "compat/hpux/hppa64/files.hpux"
-#file arch/hppa64/hppa64/hpux_machdep.c compat_hpux
#include "compat/osf1/files.osf1"
#file arch/hppa64/hppa64/osf1_machdep.c compat_osf1
#include "compat/linux/files.linux"
diff --git a/sys/arch/hppa64/hppa64/machdep.c b/sys/arch/hppa64/hppa64/machdep.c
index 868781ee7ab..6a06021d5cf 100644
--- a/sys/arch/hppa64/hppa64/machdep.c
+++ b/sys/arch/hppa64/hppa64/machdep.c
@@ -1,4 +1,4 @@
-/* $OpenBSD: machdep.c,v 1.22 2010/06/09 15:44:17 miod Exp $ */
+/* $OpenBSD: machdep.c,v 1.23 2010/06/29 20:30:32 guenther Exp $ */
/*
* Copyright (c) 2005 Michael Shalayeff
@@ -57,10 +57,6 @@
#include <machine/autoconf.h>
#include <machine/kcore.h>
-#ifdef COMPAT_HPUX
-#include <compat/hpux/hpux.h>
-#endif
-
#ifdef DDB
#include <machine/db_machdep.h>
#include <ddb/db_access.h>
@@ -121,9 +117,6 @@ int cpu_hvers;
enum hppa_cpu_type cpu_type;
const char *cpu_typename;
u_int fpu_version;
-#ifdef COMPAT_HPUX
-int cpu_model_hpux; /* contains HPUX_SYSCONF_CPU* kind of value */
-#endif
dev_t bootdev;
int physmem, resvmem, resvphysmem, esym;
diff --git a/sys/arch/m68k/include/param.h b/sys/arch/m68k/include/param.h
index b571e1acde6..a1ba58becea 100644
--- a/sys/arch/m68k/include/param.h
+++ b/sys/arch/m68k/include/param.h
@@ -1,4 +1,4 @@
-/* $OpenBSD: param.h,v 1.23 2007/11/02 19:18:54 martin Exp $ */
+/* $OpenBSD: param.h,v 1.24 2010/06/29 20:30:32 guenther Exp $ */
/* $NetBSD: param.h,v 1.2 1997/06/10 18:21:23 veego Exp $ */
/*
@@ -129,20 +129,6 @@
#define m68k_trunc_seg(x) ((unsigned)(x) & ~SEGOFSET)
#define m68k_page_offset(x) ((unsigned)(x) & PGOFSET)
-#ifdef COMPAT_HPUX
-/*
- * Constants/macros for HPUX multiple mapping of user address space.
- * Pages in the first 256Mb are mapped in at every 256Mb segment.
- */
-#define HPMMMASK 0xF0000000
-#define ISHPMMADDR(p, v) \
- (((p)->p_md.md_flags & MDP_HPUXMMAP) && \
- ((unsigned)(v) & HPMMMASK) && \
- ((unsigned)(v) & HPMMMASK) != HPMMMASK)
-#define HPMMBASEADDR(v) \
- ((unsigned)(v) & ~HPMMMASK)
-#endif /* COMPAT_HPUX */
-
#include <machine/cpu.h>
#endif /* !_M68K_PARAM_H_ */
diff --git a/sys/arch/m68k/include/pcb.h b/sys/arch/m68k/include/pcb.h
index 8174c3175f3..d5298e83e90 100644
--- a/sys/arch/m68k/include/pcb.h
+++ b/sys/arch/m68k/include/pcb.h
@@ -1,4 +1,4 @@
-/* $OpenBSD: pcb.h,v 1.1 2003/10/09 21:48:47 miod Exp $ */
+/* $OpenBSD: pcb.h,v 1.2 2010/06/29 20:30:32 guenther Exp $ */
/* $NetBSD: pcb.h,v 1.8 1995/05/12 12:55:17 mycroft Exp $ */
/*
@@ -58,12 +58,9 @@ struct pcb {
};
/*
- * The pcb is augmented with machine-dependent additional data for
- * core dumps. For ports providing COMPAT_HPUX, this includes an HP-UX
- * exec header which is dumped for HP-UX processes.
+ * No additional data needed for core dumps.
*/
struct md_coredump {
- int md_exec[16]; /* exec structure for HP-UX core dumps */
};
#endif /* _M68K_PCB_H_ */
diff --git a/sys/arch/m68k/include/pmap_motorola.h b/sys/arch/m68k/include/pmap_motorola.h
index 2aba0a618a0..76073c481bb 100644
--- a/sys/arch/m68k/include/pmap_motorola.h
+++ b/sys/arch/m68k/include/pmap_motorola.h
@@ -1,4 +1,4 @@
-/* $OpenBSD: pmap_motorola.h,v 1.17 2007/12/28 18:57:28 miod Exp $ */
+/* $OpenBSD: pmap_motorola.h,v 1.18 2010/06/29 20:30:32 guenther Exp $ */
/*
* Copyright (c) 1987 Carnegie-Mellon University
@@ -144,10 +144,6 @@ void pmap_prefer(vaddr_t, vaddr_t *);
#define PMAP_PREFER(foff, vap) pmap_prefer((foff), (vap))
#endif
-#ifdef COMPAT_HPUX
-int pmap_mapmulti(pmap_t, vaddr_t);
-#endif
-
#endif /* _KERNEL */
#endif /* !_PMAP_MOTOROLA_H_ */
diff --git a/sys/arch/m68k/include/vmparam.h b/sys/arch/m68k/include/vmparam.h
index 82518ef3dc3..5910f5af32a 100644
--- a/sys/arch/m68k/include/vmparam.h
+++ b/sys/arch/m68k/include/vmparam.h
@@ -1,4 +1,4 @@
-/* $OpenBSD: vmparam.h,v 1.7 2008/07/25 21:25:25 miod Exp $ */
+/* $OpenBSD: vmparam.h,v 1.8 2010/06/29 20:30:32 guenther Exp $ */
/*
* Copyright (c) 1988 University of Utah.
@@ -45,9 +45,8 @@
* is the top (end) of the user stack.
*
* NOTE: the ONLY reason that USRSTACK is 0xfff00000 instead of -USIZE
- * is for HPUX compatibility. Why?? Because HPUX's debuggers
- * have the user's stack hard-wired at FFF00000 for post-mortems,
- * and we must be compatible...
+ * was for HPUX compatibility. That's been removed, so this could
+ * change now.
*/
#define USRTEXT 8192
#define USRSTACK 0xfff00000 /* Start of user stack */
diff --git a/sys/arch/m68k/m68k/cachectl.c b/sys/arch/m68k/m68k/cachectl.c
index b1a74ff90ef..e0bb39e0df2 100644
--- a/sys/arch/m68k/m68k/cachectl.c
+++ b/sys/arch/m68k/m68k/cachectl.c
@@ -1,4 +1,4 @@
-/* $OpenBSD: cachectl.c,v 1.1 2005/08/01 11:54:24 miod Exp $ */
+/* $OpenBSD: cachectl.c,v 1.2 2010/06/29 20:30:32 guenther Exp $ */
/* $NetBSD: sys_machdep.c,v 1.17 1997/05/19 10:15:00 veego Exp $ */
/*
@@ -63,13 +63,6 @@ cachectl(struct proc *p, int req, vaddr_t addr, int len)
int doall = 0;
paddr_t pa = 0;
vaddr_t end = 0;
-#ifdef COMPAT_HPUX
- extern struct emul emul_hpux;
-
- if ((p->p_emul == &emul_hpux) &&
- len != 16 && len != NBPG)
- doall = 1;
-#endif
if (addr == 0 ||
((req & ~CC_EXTPURGE) != CC_PURGE && len > 2*NBPG))
diff --git a/sys/arch/m68k/m68k/pmap_motorola.c b/sys/arch/m68k/m68k/pmap_motorola.c
index 781001f50f1..2b12a66b12a 100644
--- a/sys/arch/m68k/m68k/pmap_motorola.c
+++ b/sys/arch/m68k/m68k/pmap_motorola.c
@@ -1,4 +1,4 @@
-/* $OpenBSD: pmap_motorola.c,v 1.57 2010/06/26 23:24:43 guenther Exp $ */
+/* $OpenBSD: pmap_motorola.c,v 1.58 2010/06/29 20:30:32 guenther Exp $ */
/*
* Copyright (c) 1999 The NetBSD Foundation, Inc.
@@ -290,9 +290,6 @@ struct pool pmap_pmap_pool; /* memory pool for pmap structures */
*/
struct pv_entry *pmap_alloc_pv(void);
void pmap_free_pv(struct pv_entry *);
-#ifdef COMPAT_HPUX
-int pmap_mapmulti(pmap_t, vaddr_t);
-#endif
void pmap_remove_flags(pmap_t, vaddr_t, vaddr_t, int);
void pmap_remove_mapping(pmap_t, vaddr_t, pt_entry_t *, int);
boolean_t pmap_testbit(struct vm_page *, int);
@@ -2026,44 +2023,6 @@ pmap_prefer(foff, vap)
}
#endif /* M68K_MMU_HP */
-#ifdef COMPAT_HPUX
-/*
- * pmap_mapmulti:
- *
- * 'PUX hack for dealing with the so called multi-mapped address space.
- * The first 256mb is mapped in at every 256mb region from 0x10000000
- * up to 0xF0000000. This allows for 15 bits of tag information.
- *
- * We implement this at the segment table level, the machine independent
- * VM knows nothing about it.
- */
-int
-pmap_mapmulti(pmap, va)
- pmap_t pmap;
- vaddr_t va;
-{
- st_entry_t *ste, *bste;
-
-#ifdef PMAP_DEBUG
- if (pmapdebug & PDB_MULTIMAP) {
- ste = pmap_ste(pmap, HPMMBASEADDR(va));
- printf("pmap_mapmulti(%p, %lx): bste %p(%x)",
- pmap, va, ste, *ste);
- ste = pmap_ste(pmap, va);
- printf(" ste %p(%x)\n", ste, *ste);
- }
-#endif
- bste = pmap_ste(pmap, HPMMBASEADDR(va));
- ste = pmap_ste(pmap, va);
- if (!(*ste & SG_V) && (*bste & SG_V)) {
- *ste = *bste;
- TBIAU();
- return (0);
- }
- return (EFAULT);
-}
-#endif /* COMPAT_HPUX */
-
/*
* Miscellaneous support routines follow
*/
diff --git a/sys/arch/mac68k/mac68k/locore.s b/sys/arch/mac68k/mac68k/locore.s
index 9feb14dd59c..3d87bc3029c 100644
--- a/sys/arch/mac68k/mac68k/locore.s
+++ b/sys/arch/mac68k/mac68k/locore.s
@@ -1,4 +1,4 @@
-/* $OpenBSD: locore.s,v 1.62 2009/03/15 20:40:25 miod Exp $ */
+/* $OpenBSD: locore.s,v 1.63 2010/06/29 20:30:32 guenther Exp $ */
/* $NetBSD: locore.s,v 1.103 1998/07/09 06:02:50 scottr Exp $ */
/*
@@ -1171,30 +1171,6 @@ Ltbias851:
movc d0,cacr | invalidate on-chip d-cache
rts
-#if defined(COMPAT_HPUX)
-/*
- * Invalidate user side of TLB
- */
-ENTRY(TBIAU)
-#if defined(M68040)
- cmpl #MMU_68040,_C_LABEL(mmutype) | 68040?
- jne Lmotommu6 | no, skip
- .word 0xf518 | yes, pflusha (for now) XXX
-Lmotommu6:
-#endif
-#if defined(M68020)
- tstl _C_LABEL(mmutype)
- jle Ltbiau851
- pflush #0,#4 | flush user TLB entries
- rts
-Ltbiau851:
-#endif
- pflush #0,#4 | flush user TLB entries
- movl #DC_CLEAR,d0
- movc d0,cacr | invalidate on-chip d-cache
- rts
-#endif /* COMPAT_HPUX */
-
/*
* Invalidate instruction cache
*/
diff --git a/sys/arch/mvme68k/conf/GENERIC b/sys/arch/mvme68k/conf/GENERIC
index 608a568f4b1..7edadf1cd98 100644
--- a/sys/arch/mvme68k/conf/GENERIC
+++ b/sys/arch/mvme68k/conf/GENERIC
@@ -1,4 +1,4 @@
-# $OpenBSD: GENERIC,v 1.32 2009/03/01 22:08:13 miod Exp $
+# $OpenBSD: GENERIC,v 1.33 2010/06/29 20:30:33 guenther Exp $
#
# For further information on compiling OpenBSD kernels, see the config(8)
# man page.
@@ -28,7 +28,6 @@ option MVME172 # (requires M68060, 060SP, FPSP)
option MVME177 # includes 176 (requires M68060, 060SP, FPSP)
option COMPAT_SUNOS
-option COMPAT_HPUX
option COMPAT_M68K4K
config bsd swap generic
diff --git a/sys/arch/mvme68k/conf/MVME147 b/sys/arch/mvme68k/conf/MVME147
index ce91888d5b2..1652288e748 100644
--- a/sys/arch/mvme68k/conf/MVME147
+++ b/sys/arch/mvme68k/conf/MVME147
@@ -1,4 +1,4 @@
-# $OpenBSD: MVME147,v 1.22 2009/02/17 22:28:38 miod Exp $
+# $OpenBSD: MVME147,v 1.23 2010/06/29 20:30:33 guenther Exp $
machine mvme68k m68k
@@ -9,7 +9,6 @@ option M68030 # support for 030
option MVME147 # (requires M68030)
option COMPAT_SUNOS
-option COMPAT_HPUX
option COMPAT_M68K4K
maxusers 16
diff --git a/sys/arch/mvme68k/conf/MVME162 b/sys/arch/mvme68k/conf/MVME162
index fad150715ec..9bfd149cdb9 100644
--- a/sys/arch/mvme68k/conf/MVME162
+++ b/sys/arch/mvme68k/conf/MVME162
@@ -1,4 +1,4 @@
-# $OpenBSD: MVME162,v 1.25 2009/02/17 22:28:38 miod Exp $
+# $OpenBSD: MVME162,v 1.26 2010/06/29 20:30:33 guenther Exp $
machine mvme68k m68k
@@ -10,7 +10,6 @@ option FPSP # MC68040 floating point support
option MVME162 # (requires M68040, FPSP)
option COMPAT_SUNOS
-option COMPAT_HPUX
option COMPAT_M68K4K
maxusers 32
diff --git a/sys/arch/mvme68k/conf/MVME167 b/sys/arch/mvme68k/conf/MVME167
index 471399b5ec3..aeb7f9ead41 100644
--- a/sys/arch/mvme68k/conf/MVME167
+++ b/sys/arch/mvme68k/conf/MVME167
@@ -1,4 +1,4 @@
-# $OpenBSD: MVME167,v 1.25 2009/02/17 22:28:38 miod Exp $
+# $OpenBSD: MVME167,v 1.26 2010/06/29 20:30:33 guenther Exp $
machine mvme68k m68k
@@ -10,7 +10,6 @@ option FPSP # MC68040 floating point support
option MVME167 # includes 166 (requires M68040, FPSP)
option COMPAT_SUNOS
-option COMPAT_HPUX
option COMPAT_M68K4K
maxusers 32
diff --git a/sys/arch/mvme68k/conf/MVME177 b/sys/arch/mvme68k/conf/MVME177
index f34d230e1f6..536578aaac0 100644
--- a/sys/arch/mvme68k/conf/MVME177
+++ b/sys/arch/mvme68k/conf/MVME177
@@ -1,4 +1,4 @@
-# $OpenBSD: MVME177,v 1.14 2009/02/17 22:28:38 miod Exp $
+# $OpenBSD: MVME177,v 1.15 2010/06/29 20:30:33 guenther Exp $
machine mvme68k m68k
@@ -10,7 +10,6 @@ option M060SP # ...and MC68060 support package
option MVME177 # (requires M68060, 060SP, FPSP)
option COMPAT_SUNOS
-option COMPAT_HPUX
option COMPAT_M68K4K
maxusers 32
diff --git a/sys/arch/mvme68k/conf/files.mvme68k b/sys/arch/mvme68k/conf/files.mvme68k
index beae227173a..5d055dece26 100644
--- a/sys/arch/mvme68k/conf/files.mvme68k
+++ b/sys/arch/mvme68k/conf/files.mvme68k
@@ -1,4 +1,4 @@
-# $OpenBSD: files.mvme68k,v 1.33 2009/03/01 22:08:13 miod Exp $
+# $OpenBSD: files.mvme68k,v 1.34 2010/06/29 20:30:33 guenther Exp $
# config file for mvme68k
@@ -140,12 +140,6 @@ file dev/cninit.c
file arch/m68k/m68k/db_memrw.c ddb
-# Compatibility modules
-
-# HP-UX binary compatibility
-include "compat/hpux/m68k/files.hpux"
-file arch/mvme68k/mvme68k/hpux_machdep.c compat_hpux
-
device wl: tty
attach wl at vmes
file arch/mvme68k/dev/wl.c wl needs-count
diff --git a/sys/arch/mvme68k/include/hpux_machdep.h b/sys/arch/mvme68k/include/hpux_machdep.h
deleted file mode 100644
index 3acb34b1cd0..00000000000
--- a/sys/arch/mvme68k/include/hpux_machdep.h
+++ /dev/null
@@ -1,73 +0,0 @@
-/* $OpenBSD: hpux_machdep.h,v 1.3 2008/06/26 05:42:12 ray Exp $ */
-/* $NetBSD: hpux_machdep.h,v 1.6 1997/03/16 10:02:40 thorpej Exp $ */
-
-/*-
- * Copyright (c) 1996, 1997 The NetBSD Foundation, Inc.
- * All rights reserved.
- *
- * This code is derived from software contributed to The NetBSD Foundation
- * by Jason R. Thorpe.
- *
- * 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 REGENTS 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.
- */
-
-#ifndef _MVME68K_HPUX_MACHDEP_H_
-#define _MVME68K_HPUX_MACHDEP_H_
-
-/*
- * Information pushed on stack when a signal is delivered.
- * This is used by the kernel to restore state following
- * execution of the signal handler. It is also made available
- * to the handler to allow it to restore state properly if
- * a non-standard exit is performed.
- */
-struct hpuxsigcontext {
- int hsc_syscall; /* ??? (syscall number?) */
- char hsc_action; /* ??? */
- char hsc_pad1;
- char hsc_pad2;
- char hsc_onstack; /* sigstack state to restore */
- int hsc_mask; /* signal mask to restore */
- int hsc_sp; /* sp to restore */
- short hsc_ps; /* psl to restore */
- int hsc_pc; /* pc to restore */
-
- /*
- * The following are not actually used by HP-UX. They exist
- * for the convenience of the compatibility code.
- */
- short _hsc_pad;
- int _hsc_ap; /* pointer to hpuxsigstate */
-};
-
-int hpux_cpu_makecmds(struct proc *, struct exec_package *);
-int hpux_cpu_vmcmd(struct proc *, struct exec_vmcmd *);
-void hpux_cpu_bsd_to_hpux_stat(struct stat *, struct hpux_stat *);
-void hpux_cpu_uname(struct hpux_utsname *);
-int hpux_cpu_sysconf_arch(void);
-int hpux_to_bsd_uoff(int *, int *, struct proc *);
-
-void hpux_sendsig(sig_t, int, int, u_long, int, union sigval);
-void hpux_setregs(struct proc *, struct exec_package *,
- u_long, register_t *);
-
-#endif /* ! _MVME68K_HPUX_MACHDEP_H_ */
diff --git a/sys/arch/mvme68k/mvme68k/hpux_machdep.c b/sys/arch/mvme68k/mvme68k/hpux_machdep.c
deleted file mode 100644
index 9d64bca76e5..00000000000
--- a/sys/arch/mvme68k/mvme68k/hpux_machdep.c
+++ /dev/null
@@ -1,739 +0,0 @@
-/* $OpenBSD: hpux_machdep.c,v 1.18 2009/12/28 16:40:45 miod Exp $ */
-/* $NetBSD: hpux_machdep.c,v 1.9 1997/03/16 10:00:45 thorpej Exp $ */
-
-/*
- * Copyright (c) 1995, 1996, 1997 Jason R. Thorpe. All rights reserved.
- * Copyright (c) 1988 University of Utah.
- * Copyright (c) 1990, 1993
- * The Regents of the University of California. All rights reserved.
- *
- * This code is derived from software contributed to Berkeley by
- * the Systems Programming Group of the University of Utah Computer
- * Science Department.
- *
- * 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 not be used to endorse or promote products
- * derived from this software without specific prior written permission.
- *
- * THIS SOFTWARE IS PROVIDED BY THE REGENTS 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 REGENTS 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.
- */
-
-/*
- * Machine-dependent bits for HP-UX binary compatibility.
- */
-
-#include <sys/param.h>
-#include <sys/systm.h>
-#include <sys/signalvar.h>
-#include <sys/kernel.h>
-#include <sys/filedesc.h>
-#include <sys/proc.h>
-#include <sys/buf.h>
-#include <sys/wait.h>
-#include <sys/file.h>
-#include <sys/exec.h>
-#include <sys/namei.h>
-#include <sys/vnode.h>
-#include <sys/ioctl.h>
-#include <sys/ptrace.h>
-#include <sys/stat.h>
-#include <sys/syslog.h>
-#include <sys/malloc.h>
-#include <sys/mount.h>
-#include <sys/ipc.h>
-#include <sys/namei.h>
-#include <sys/user.h>
-#include <sys/mman.h>
-#include <sys/conf.h>
-
-#include <machine/cpu.h>
-#include <machine/reg.h>
-#include <machine/psl.h>
-#include <machine/vmparam.h>
-
-#include <uvm/uvm_extern.h>
-
-#include <machine/reg.h>
-
-#include <sys/syscallargs.h>
-
-#include <compat/hpux/hpux.h>
-#include <compat/hpux/hpux_sig.h>
-#include <compat/hpux/hpux_util.h>
-#include <compat/hpux/hpux_syscall.h>
-#include <compat/hpux/hpux_syscallargs.h>
-
-#include <machine/hpux_machdep.h>
-
-extern short exframesize[];
-
-struct valtostr {
- int val;
- const char *str;
-};
-
-static struct valtostr machine_table[] = {
- /* We approximate based on cputype. */
- { CPU_68020, "350" }, /* 68020 == 350. */
- { CPU_68030, "370" }, /* 68030 == 370. */
- { CPU_68040, "380" }, /* 68040 == 380. */
- { -1, "3?0" }, /* unknown system (???) */
-};
-
-/*
- * 6.0 and later context.
- * XXX what are the HP-UX "localroot" semantics? Should we handle
- * XXX diskless systems here?
- */
-static struct valtostr context_table[] = {
- { FPU_68040,
- "standalone HP-MC68040 HP-MC68881 HP-MC68020 HP-MC68010 localroot default"
- },
- { FPU_68881,
- "standalone HP-MC68881 HP-MC68020 HP-MC68010 localroot default"
- },
- { FPU_NONE,
- "standalone HP-MC68020 HP-MC68010 localroot default"
- },
- { 0, NULL },
-};
-
-#define UOFF(f) ((int)&((struct user *)0)->f)
-#define HPUOFF(f) ((int)&((struct hpux_user *)0)->f)
-
-/* simplified FP structure */
-struct bsdfp {
- int save[54];
- int reg[24];
- int ctrl[3];
-};
-
-/*
- * m68k-specific setup for HP-UX executables.
- * XXX m68k/m68k/hpux_machdep.c?
- */
-int
-hpux_cpu_makecmds(p, epp)
- struct proc *p;
- struct exec_package *epp;
-{
- /* struct hpux_exec *hpux_ep = epp->ep_hdr; */
-
- /* set up command for exec header */
- NEW_VMCMD(&epp->ep_vmcmds, hpux_cpu_vmcmd,
- sizeof(struct hpux_exec), (long)epp->ep_hdr, NULLVP, 0, 0);
- return (0);
-}
-
-/*
- * We need to setup pcb cacheability information correctly, so we define
- * this vmcmd to do it for us, since vmcmds are executed once
- * we're committed to the exec (i.e. the old program has been unmapped).
- */
-int
-hpux_cpu_vmcmd(p, ev)
- struct proc *p;
- struct exec_vmcmd *ev;
-{
- struct hpux_exec *execp = (struct hpux_exec *)ev->ev_addr;
-
- /* Deal with misc. HP-UX process attributes. */
- if (execp->ha_trsize & HPUXM_VALID) {
- if (execp->ha_trsize & HPUXM_DATAWT)
- p->p_md.md_flags &= ~MDP_CCBDATA;
-
- if (execp->ha_trsize & HPUXM_STKWT)
- p->p_md.md_flags &= ~MDP_CCBSTACK;
- }
-
- return (0);
-}
-
-/*
- * Machine-dependent stat structure conversion.
- */
-void
-hpux_cpu_bsd_to_hpux_stat(sb, hsb)
- struct stat *sb;
- struct hpux_stat *hsb;
-{
-}
-
-/*
- * Machine-dependent uname information.
- */
-void
-hpux_cpu_uname(ut)
- struct hpux_utsname *ut;
-{
- int i;
-
- bzero(ut->machine, sizeof(ut->machine));
-
- /*
- * Find the current machine-ID in the table and
- * copy the string into the uname.
- */
- for (i = 0; machine_table[i].val != -1; ++i)
- if (machine_table[i].val == cputype)
- break;
-
- snprintf(ut->machine, sizeof ut->machine, "9000/%s",
- machine_table[i].str);
-}
-
-/*
- * Return arch-type for hpux_sys_sysconf()
- */
-int
-hpux_cpu_sysconf_arch()
-{
-
- switch (cputype) {
- case CPU_68020:
- return (HPUX_SYSCONF_CPUM020);
-
- case CPU_68030:
- return (HPUX_SYSCONF_CPUM030);
-
- case CPU_68040:
- return (HPUX_SYSCONF_CPUM040);
-
- default:
- return (HPUX_SYSCONF_CPUM020); /* ??? */
- }
- /* NOTREACHED */
-}
-
-/*
- * HP-UX advise(2) system call.
- */
-int
-hpux_sys_advise(p, v, retval)
- struct proc *p;
- void *v;
- register_t *retval;
-{
- struct hpux_sys_advise_args *uap = v;
- int error = 0;
-
- switch (SCARG(uap, arg)) {
- case 0:
- p->p_md.md_flags |= MDP_HPUXMMAP;
- break;
-
- case 1:
- ICIA();
- break;
-
- case 2:
- DCIA();
- break;
-
- default:
- error = EINVAL;
- break;
- }
-
- return (error);
-}
-
-/*
- * HP-UX getcontext(2) system call.
- * Man page lies, behaviour here is based on observed behaviour.
- */
-int
-hpux_sys_getcontext(p, v, retval)
- struct proc *p;
- void *v;
- register_t *retval;
-{
- struct hpux_sys_getcontext_args *uap = v;
- int l, i, error = 0;
- register int len;
-
- for (i = 0; context_table[i].str != NULL; i++)
- if (context_table[i].val == fputype)
- break;
- if (context_table[i].str == NULL) {
- /*
- * XXX What else? It's not like this can happen...
- */
- return (EINVAL);
- }
-
- /* + 1 ... count the terminating \0. */
- l = strlen(context_table[i].str) + 1;
- len = min(SCARG(uap, len), l);
-
- if (len)
- error = copyout(context_table[i].str, SCARG(uap, buf), len);
- if (error == 0)
- *retval = l;
- return (0);
-}
-
-/*
- * Brutal hack! Map HP-UX u-area offsets into BSD k-stack offsets.
- * XXX This probably doesn't work anymore, BTW. --thorpej
- */
-int
-hpux_to_bsd_uoff(off, isps, p)
- int *off, *isps;
- struct proc *p;
-{
- register int *ar0 = p->p_md.md_regs;
- struct hpux_fp *hp;
- struct bsdfp *bp;
- register u_int raddr;
-
- *isps = 0;
-
- /* u_ar0 field; procxmt puts in U_ar0 */
- if ((int)off == HPUOFF(hpuxu_ar0))
- return(UOFF(U_ar0));
-
- if (fputype) {
- /* FP registers from PCB */
- hp = (struct hpux_fp *)HPUOFF(hpuxu_fp);
- bp = (struct bsdfp *)UOFF(u_pcb.pcb_fpregs);
-
- if (off >= hp->hpfp_ctrl && off < &hp->hpfp_ctrl[3])
- return((int)&bp->ctrl[off - hp->hpfp_ctrl]);
-
- if (off >= hp->hpfp_reg && off < &hp->hpfp_reg[24])
- return((int)&bp->reg[off - hp->hpfp_reg]);
- }
-
- /*
- * Everything else we recognize comes from the kernel stack,
- * so we convert off to an absolute address (if not already)
- * for simplicity.
- */
- if (off < (int *)ptoa(UPAGES))
- off = (int *)((u_int)off + (u_int)p->p_addr); /* XXX */
-
- /*
- * General registers.
- * We know that the HP-UX registers are in the same order as ours.
- * The only difference is that their PS is 2 bytes instead of a
- * padded 4 like ours throwing the alignment off.
- */
- if (off >= ar0 && off < &ar0[18]) {
- /*
- * PS: return low word and high word of PC as HP-UX would
- * (e.g. &u.u_ar0[16.5]).
- *
- * XXX we don't do this since HP-UX adb doesn't rely on
- * it and passing such an offset to procxmt will cause
- * it to fail anyway. Instead, we just set the offset
- * to PS and let hpux_ptrace() shift up the value returned.
- */
- if (off == &ar0[PS]) {
-#if 0
- raddr = (u_int) &((short *)ar0)[PS*2+1];
-#else
- raddr = (u_int) &ar0[(int)(off - ar0)];
-#endif
- *isps = 1;
- }
- /*
- * PC: off will be &u.u_ar0[16.5] since HP-UX saved PS
- * is only 16 bits.
- */
- else if (off == (int *)&(((short *)ar0)[PS*2+1]))
- raddr = (u_int) &ar0[PC];
- /*
- * D0-D7, A0-A7: easy
- */
- else
- raddr = (u_int) &ar0[(int)(off - ar0)];
- return((int)(raddr - (u_int)p->p_addr)); /* XXX */
- }
-
- /* everything else */
- return (-1);
-}
-
-#define HSS_RTEFRAME 0x01
-#define HSS_FPSTATE 0x02
-#define HSS_USERREGS 0x04
-
-struct hpuxsigstate {
- int hss_flags; /* which of the following are valid */
- struct frame hss_frame; /* original exception frame */
- struct fpframe hss_fpstate; /* 68881/68882 state info */
-};
-
-/*
- * WARNING: code in locore.s assumes the layout shown here for hsf_signum
- * thru hsf_handler so... don't screw with them!
- */
-struct hpuxsigframe {
- int hsf_signum; /* signo for handler */
- int hsf_code; /* additional info for handler */
- struct hpuxsigcontext *hsf_scp; /* context ptr for handler */
- sig_t hsf_handler; /* handler addr for u_sigc */
- struct hpuxsigstate hsf_sigstate; /* state of the hardware */
- struct hpuxsigcontext hsf_sc; /* actual context */
-};
-
-#ifdef DEBUG
-int hpuxsigdebug = 0;
-int hpuxsigpid = 0;
-#define SDB_FOLLOW 0x01
-#define SDB_KSTACK 0x02
-#define SDB_FPSTATE 0x04
-#endif
-
-/*
- * Send an interrupt to process.
- */
-/* ARGSUSED */
-void
-hpux_sendsig(catcher, sig, mask, code, type, val)
- sig_t catcher;
- int sig, mask;
- u_long code;
- int type;
- union sigval val;
-{
- register struct proc *p = curproc;
- register struct hpuxsigframe *kfp, *fp;
- register struct frame *frame;
- register struct sigacts *psp = p->p_sigacts;
- register short ft;
- int oonstack, fsize;
-
- frame = (struct frame *)p->p_md.md_regs;
- ft = frame->f_format;
- oonstack = psp->ps_sigstk.ss_flags & SS_ONSTACK;
-
- /*
- * Allocate and validate space for the signal handler
- * context. Note that if the stack is in P0 space, the
- * call to grow() is a nop, and the useracc() check
- * will fail if the process has not already allocated
- * the space with a `brk'.
- */
- fsize = sizeof(struct hpuxsigframe);
- if ((psp->ps_flags & SAS_ALTSTACK) && !oonstack &&
- (psp->ps_sigonstack & sigmask(sig))) {
- fp = (struct hpuxsigframe *)(psp->ps_sigstk.ss_sp +
- psp->ps_sigstk.ss_size - fsize);
- psp->ps_sigstk.ss_flags |= SS_ONSTACK;
- } else
- fp = (struct hpuxsigframe *)(frame->f_regs[SP] - fsize);
- if ((unsigned)fp <= USRSTACK - ptoa(p->p_vmspace->vm_ssize))
- (void)uvm_grow(p, (unsigned)fp);
-
-#ifdef DEBUG
- if ((hpuxsigdebug & SDB_KSTACK) && p->p_pid == hpuxsigpid)
- printf("hpux_sendsig(%d): sig %d ssp %x usp %x scp %x ft %d\n",
- p->p_pid, sig, &oonstack, fp, &fp->sf_sc, ft);
-#endif
-
- kfp = (struct hpuxsigframe *)malloc((u_long)fsize, M_TEMP,
- M_WAITOK | M_CANFAIL);
- if (kfp == NULL) {
- /* Better halt the process in its track than panicing */
- sigexit(p, SIGILL);
- /* NOTREACHED */
- }
-
- /*
- * Build the argument list for the signal handler.
- */
- kfp->hsf_signum = bsdtohpuxsig(sig);
- kfp->hsf_code = code;
- kfp->hsf_scp = &fp->hsf_sc;
- kfp->hsf_handler = catcher;
-
- /*
- * Save necessary hardware state. Currently this includes:
- * - general registers
- * - original exception frame (if not a "normal" frame)
- * - FP coprocessor state
- */
- kfp->hsf_sigstate.hss_flags = HSS_USERREGS;
- bcopy((caddr_t)frame->f_regs,
- (caddr_t)kfp->hsf_sigstate.hss_frame.f_regs, sizeof frame->f_regs);
- if (ft >= FMT7) {
-#ifdef DEBUG
- if (ft > 15 || exframesize[ft] < 0)
- panic("hpux_sendsig: bogus frame type");
-#endif
- kfp->hsf_sigstate.hss_flags |= HSS_RTEFRAME;
- kfp->hsf_sigstate.hss_frame.f_format = frame->f_format;
- kfp->hsf_sigstate.hss_frame.f_vector = frame->f_vector;
- bcopy((caddr_t)&frame->F_u,
- (caddr_t)&kfp->hsf_sigstate.hss_frame.F_u, exframesize[ft]);
-
- /*
- * Leave an indicator that we need to clean up the kernel
- * stack. We do this by setting the "pad word" above the
- * hardware stack frame to the amount the stack must be
- * adjusted by.
- *
- * N.B. we increment rather than just set f_stackadj in
- * case we are called from syscall when processing a
- * sigreturn. In that case, f_stackadj may be non-zero.
- */
- frame->f_stackadj += exframesize[ft];
- frame->f_format = frame->f_vector = 0;
-#ifdef DEBUG
- if (hpuxsigdebug & SDB_FOLLOW)
- printf("hpux_sendsig(%d): copy out %d of frame %d\n",
- p->p_pid, exframesize[ft], ft);
-#endif
- }
- if (fputype) {
- kfp->hsf_sigstate.hss_flags |= HSS_FPSTATE;
- m68881_save(&kfp->hsf_sigstate.hss_fpstate);
- }
-
-#ifdef DEBUG
- if ((hpuxsigdebug & SDB_FPSTATE) && *(char *)&kfp->sf_state.ss_fpstate)
- printf("hpux_sendsig(%d): copy out FP state (%x) to %x\n",
- p->p_pid, *(u_int *)&kfp->sf_state.ss_fpstate,
- &kfp->sf_state.ss_fpstate);
-#endif
-
- /*
- * Build the signal context to be used by hpux_sigreturn.
- */
- kfp->hsf_sc.hsc_syscall = 0; /* XXX */
- kfp->hsf_sc.hsc_action = 0; /* XXX */
- kfp->hsf_sc.hsc_pad1 = kfp->hsf_sc.hsc_pad2 = 0;
- kfp->hsf_sc.hsc_onstack = oonstack;
- kfp->hsf_sc.hsc_mask = mask;
- kfp->hsf_sc.hsc_sp = frame->f_regs[SP];
- kfp->hsf_sc.hsc_ps = frame->f_sr;
- kfp->hsf_sc.hsc_pc = frame->f_pc;
-
- /* How amazingly convenient! */
- kfp->hsf_sc._hsc_pad = 0;
- kfp->hsf_sc._hsc_ap = (int)&fp->hsf_sigstate;
-
- if (copyout((caddr_t)kfp, (caddr_t)fp, fsize) != 0) {
-#ifdef DEBUG
- if ((hpuxsigdebug & SDB_KSTACK) && p->p_pid == hpuxsigpid)
- printf("hpux_sendsig(%d): copyout failed on sig %d\n",
- p->p_pid, sig);
-#endif
- /*
- * Process has trashed its stack; give it an illegal
- * instruction to halt it in its tracks.
- */
- free((caddr_t)kfp, M_TEMP);
- sigexit(p, SIGILL);
- /* NOTREACHED */
- }
- frame->f_regs[SP] = (int)fp;
-
-#ifdef DEBUG
- if (hpuxsigdebug & SDB_FOLLOW) {
- printf(
- "hpux_sendsig(%d): sig %d scp %x fp %x sc_sp %x sc_ap %x\n",
- p->p_pid, sig, kfp->sf_scp, fp,
- kfp->sf_sc.sc_sp, kfp->sf_sc.sc_ap);
- }
-#endif
-
- /*
- * Signal trampoline code is at base of user stack.
- */
- frame->f_pc = p->p_sigcode;
-#ifdef DEBUG
- if ((hpuxsigdebug & SDB_KSTACK) && p->p_pid == hpuxsigpid)
- printf("hpux_sendsig(%d): sig %d returns\n",
- p->p_pid, sig);
-#endif
- free((caddr_t)kfp, M_TEMP);
-}
-
-/*
- * System call to cleanup state after a signal
- * has been taken. Reset signal mask and
- * stack state from context left by sendsig (above).
- * Return to previous pc and psl as specified by
- * context left by sendsig. Check carefully to
- * make sure that the user has not modified the
- * psl to gain improper privileges or to cause
- * a machine fault.
- */
-/* ARGSUSED */
-int
-hpux_sys_sigreturn(p, v, retval)
- struct proc *p;
- void *v;
- register_t *retval;
-{
- struct hpux_sys_sigreturn_args /* {
- syscallarg(struct hpuxsigcontext *) sigcntxp;
- } */ *uap = v;
- register struct hpuxsigcontext *scp;
- register struct frame *frame;
- register int rf;
- struct hpuxsigcontext tsigc;
- struct hpuxsigstate tstate;
- int flags;
-
- scp = SCARG(uap, sigcntxp);
-#ifdef DEBUG
- if (hpuxsigdebug & SDB_FOLLOW)
- printf("sigreturn: pid %d, scp %x\n", p->p_pid, scp);
-#endif
- if ((int)scp & 1)
- return (EINVAL);
-
- /*
- * Fetch and test the HP-UX context structure.
- * We grab it all at once for speed.
- */
- if (copyin((caddr_t)scp, (caddr_t)&tsigc, sizeof tsigc))
- return (EINVAL);
- scp = &tsigc;
- if ((scp->hsc_ps & PSL_USERCLR) != 0 ||
- (scp->hsc_ps & PSL_USERSET) != PSL_USERSET)
- return (EINVAL);
-
- /*
- * Restore the user supplied information
- */
- if (scp->hsc_onstack & 01)
- p->p_sigacts->ps_sigstk.ss_flags |= SS_ONSTACK;
- else
- p->p_sigacts->ps_sigstk.ss_flags &= ~SS_ONSTACK;
- p->p_sigmask = scp->hsc_mask &~ sigcantmask;
- frame = (struct frame *) p->p_md.md_regs;
- frame->f_regs[SP] = scp->hsc_sp;
- frame->f_pc = scp->hsc_pc;
- frame->f_sr = scp->hsc_ps;
-
- /*
- * Grab a pointer to the hpuxsigstate.
- * If zero, the user is probably doing a longjmp.
- * (This will never happen, really, since HP-UX doesn't
- * know/care about the state pointer.)
- */
- if ((rf = scp->_hsc_ap) == 0)
- return (EJUSTRETURN);
-
- /*
- * See if there is anything to do before we go to the
- * expense of copying in close to 1/2K of data
- */
- if (copyin((caddr_t)rf, &flags, sizeof(int)) != 0)
- return (EINVAL);
-#ifdef DEBUG
- if (hpuxsigdebug & SDB_FOLLOW)
- printf("sigreturn(%d): sc_ap %x flags %x\n",
- p->p_pid, rf, flags);
-#endif
- if (flags == 0 || copyin((caddr_t)rf, (caddr_t)&tstate, sizeof tstate))
- return (EJUSTRETURN);
-#ifdef DEBUG
- if ((hpuxsigdebug & SDB_KSTACK) && p->p_pid == hpuxsigpid)
- printf("sigreturn(%d): ssp %x usp %x scp %x ft %d\n",
- p->p_pid, &flags, scp->sc_sp, SCARG(uap, sigcntxp),
- (flags & HSS_RTEFRAME) ? tstate.ss_frame.f_format : -1);
-#endif
- /*
- * Restore most of the users registers except for A6 and SP
- * which were handled above.
- */
- if (flags & HSS_USERREGS)
- bcopy((caddr_t)tstate.hss_frame.f_regs,
- (caddr_t)frame->f_regs, sizeof(frame->f_regs)-2*sizeof(int));
-
- /*
- * Restore long stack frames. Note that we do not copy
- * back the saved SR or PC, they were picked up above from
- * the sigcontext structure.
- */
- if (flags & HSS_RTEFRAME) {
- register int sz;
-
- /* grab frame type and validate */
- sz = tstate.hss_frame.f_format;
- if (sz > 15 || (sz = exframesize[sz]) < 0)
- return (EINVAL);
- frame->f_stackadj -= sz;
- frame->f_format = tstate.hss_frame.f_format;
- frame->f_vector = tstate.hss_frame.f_vector;
- bcopy((caddr_t)&tstate.hss_frame.F_u,
- (caddr_t)&frame->F_u, sz);
-#ifdef DEBUG
- if (hpuxsigdebug & SDB_FOLLOW)
- printf("sigreturn(%d): copy in %d of frame type %d\n",
- p->p_pid, sz, tstate.ss_frame.f_format);
-#endif
- }
-
- /*
- * Finally we restore the original FP context
- */
- if (flags & HSS_FPSTATE)
- m68881_restore(&tstate.hss_fpstate);
-
-#ifdef DEBUG
- if ((hpuxsigdebug & SDB_FPSTATE) && *(char *)&tstate.ss_fpstate)
- printf("sigreturn(%d): copied in FP state (%x) at %x\n",
- p->p_pid, *(u_int *)&tstate.ss_fpstate,
- &tstate.ss_fpstate);
-
- if ((hpuxsigdebug & SDB_FOLLOW) ||
- ((hpuxsigdebug & SDB_KSTACK) && p->p_pid == hpuxsigpid))
- printf("sigreturn(%d): returns\n", p->p_pid);
-#endif
- return (EJUSTRETURN);
-}
-
-/*
- * Set registers on exec.
- * XXX Should clear registers except sp, pc.
- */
-void
-hpux_setregs(p, pack, stack, retval)
- register struct proc *p;
- struct exec_package *pack;
- u_long stack;
- register_t *retval;
-{
- struct frame *frame = (struct frame *)p->p_md.md_regs;
-
- frame->f_pc = pack->ep_entry & ~1;
- frame->f_regs[SP] = stack;
- frame->f_regs[A2] = (int)PS_STRINGS;
-
- /* restore a null state frame */
- p->p_addr->u_pcb.pcb_fpregs.fpf_null = 0;
- if (fputype)
- m68881_restore(&p->p_addr->u_pcb.pcb_fpregs);
-
- p->p_md.md_flags &= ~MDP_HPUXMMAP;
- frame->f_regs[A0] = 0; /* not 68010 (bit 31), no FPA (30) */
- retval[0] = 0; /* no float card */
- if (fputype)
- retval[1] = 1; /* yes 68881 */
- else
- retval[1] = 0; /* no 68881 */
-}
diff --git a/sys/arch/mvme68k/mvme68k/locore.s b/sys/arch/mvme68k/mvme68k/locore.s
index 6dc91bbe290..364155dd942 100644
--- a/sys/arch/mvme68k/mvme68k/locore.s
+++ b/sys/arch/mvme68k/mvme68k/locore.s
@@ -1,4 +1,4 @@
-/* $OpenBSD: locore.s,v 1.61 2009/03/15 20:40:25 miod Exp $ */
+/* $OpenBSD: locore.s,v 1.62 2010/06/29 20:30:32 guenther Exp $ */
/*
* Copyright (c) 1995 Theo de Raadt
@@ -1034,7 +1034,7 @@ ENTRY_NOPROFILE(trap2)
jra _C_LABEL(trace)
/*
- * Trap 12 is the entry point for the cachectl "syscall" (both HPUX & BSD)
+ * Trap 12 is the entry point for the cachectl "syscall"
* cachectl(command, addr, length)
* command in d0, addr in a1, length in d1
*/
@@ -1536,7 +1536,7 @@ ENTRY(TBIAS)
rts
#endif
-#if defined(COMPAT_HPUX) || defined(M68060)
+#if defined(M68060)
/*
* Invalidate user side of TLB
*/
@@ -1564,7 +1564,7 @@ Ltbiau040:
Ltbiauno60:
#endif
rts
-#endif /* defined(COMPAT_HPUX) || defined(M68060) */
+#endif /* defined(M68060) */
/*
* Invalidate instruction cache
diff --git a/sys/arch/mvme68k/mvme68k/trap.c b/sys/arch/mvme68k/mvme68k/trap.c
index aa9f371ebcf..1dc734f4804 100644
--- a/sys/arch/mvme68k/mvme68k/trap.c
+++ b/sys/arch/mvme68k/mvme68k/trap.c
@@ -1,4 +1,4 @@
-/* $OpenBSD: trap.c,v 1.68 2009/03/15 20:40:25 miod Exp $ */
+/* $OpenBSD: trap.c,v 1.69 2010/06/29 20:30:32 guenther Exp $ */
/*
* Copyright (c) 1995 Theo de Raadt
@@ -93,10 +93,6 @@ extern struct emul emul_sunos;
#include <uvm/uvm_extern.h>
#include <uvm/uvm_pmap.h>
-#ifdef COMPAT_HPUX
-#include <compat/hpux/hpux.h>
-#endif
-
int astpending;
int want_resched;
@@ -234,9 +230,6 @@ trap(type, code, v, frame)
register int i;
u_int ucode;
int typ = 0;
-#ifdef COMPAT_HPUX
- extern struct emul emul_hpux;
-#endif
#ifdef COMPAT_SUNOS
extern struct emul emul_sunos;
#endif
@@ -340,14 +333,6 @@ copyfault:
#endif
case T_ILLINST|T_USER: /* illegal instruction fault */
-#ifdef COMPAT_HPUX
- if (p->p_emul == &emul_hpux) {
- typ = 0;
- ucode = HPUX_ILL_ILLINST_TRAP;
- i = SIGILL;
- break;
- }
-#endif
ucode = frame.f_format; /* XXX was ILL_PRIVIN_FAULT */
typ = ILL_ILLOPC;
i = SIGILL;
@@ -355,11 +340,6 @@ copyfault:
break;
case T_PRIVINST|T_USER: /* privileged instruction fault */
-#ifdef COMPAT_HPUX
- if (p->p_emul == &emul_hpux)
- ucode = HPUX_ILL_PRIV_TRAP;
- else
-#endif
ucode = frame.f_format; /* XXX was ILL_PRIVIN_FAULT */
typ = ILL_PRVOPC;
i = SIGILL;
@@ -367,11 +347,6 @@ copyfault:
break;
case T_ZERODIV|T_USER: /* Divide by zero */
-#ifdef COMPAT_HPUX
- if (p->p_emul == &emul_hpux)
- ucode = HPUX_FPE_INTDIV_TRAP;
- else
-#endif
ucode = frame.f_format; /* XXX was FPE_INTDIV_TRAP */
typ = FPE_INTDIV;
i = SIGFPE;
@@ -379,14 +354,6 @@ copyfault:
break;
case T_CHKINST|T_USER: /* CHK instruction trap */
-#ifdef COMPAT_HPUX
- if (p->p_emul == &emul_hpux) {
- /* handled differently under hp-ux */
- i = SIGILL;
- ucode = HPUX_ILL_CHK_TRAP;
- break;
- }
-#endif
ucode = frame.f_format; /* XXX was FPE_SUBRNG_TRAP */
typ = FPE_FLTSUB;
i = SIGFPE;
@@ -394,14 +361,6 @@ copyfault:
break;
case T_TRAPVINST|T_USER: /* TRAPV instruction trap */
-#ifdef COMPAT_HPUX
- if (p->p_emul == &emul_hpux) {
- /* handled differently under hp-ux */
- i = SIGILL;
- ucode = HPUX_ILL_TRAPV_TRAP;
- break;
- }
-#endif
ucode = frame.f_format; /* XXX was FPE_INTOVF_TRAP */
typ = ILL_ILLTRP;
i = SIGILL;
@@ -540,19 +499,6 @@ copyfault:
printf("trap: bad kernel access at %x\n", v);
goto dopanic;
}
-#ifdef COMPAT_HPUX
- if (ISHPMMADDR(p, va)) {
- vaddr_t bva;
-
- rv = pmap_mapmulti(map->pmap, va);
- if (rv) {
- bva = HPMMBASEADDR(va);
- rv = uvm_fault(map, bva, 0, ftype);
- if (rv == 0)
- (void)pmap_mapmulti(map->pmap, va);
- }
- } else
-#endif
rv = uvm_fault(map, va, 0, ftype);
#ifdef DEBUG
if (rv && MDB_ISPID(p->p_pid))
diff --git a/sys/compat/hpux/hppa/Makefile b/sys/compat/hpux/hppa/Makefile
deleted file mode 100644
index 000caed040b..00000000000
--- a/sys/compat/hpux/hppa/Makefile
+++ /dev/null
@@ -1,7 +0,0 @@
-# $OpenBSD: Makefile,v 1.1 2004/07/09 21:48:21 mickey Exp $
-
-DEP= syscalls.conf syscalls.master ../../../kern/makesyscalls.sh
-OBJS= hpux_sysent.c hpux_syscalls.c hpux_syscall.h hpux_syscallargs.h
-
-${OBJS}: ${DEP}
- sh ../../../kern/makesyscalls.sh syscalls.conf syscalls.master
diff --git a/sys/compat/hpux/hppa/files.hpux b/sys/compat/hpux/hppa/files.hpux
deleted file mode 100644
index b0f6b7d5b6f..00000000000
--- a/sys/compat/hpux/hppa/files.hpux
+++ /dev/null
@@ -1,17 +0,0 @@
-# $OpenBSD: files.hpux,v 1.2 2004/09/19 21:56:18 mickey Exp $
-#
-# Config file description for machine-independent HPUX compat code.
-# Included by ports that need it.
-
-# ports should define any machine-specific files they need in their
-# own file lists.
-
-file compat/hpux/hpux_compat.c compat_hpux
-file compat/hpux/hpux_file.c compat_hpux
-file compat/hpux/hpux_tty.c compat_hpux
-file compat/hpux/hpux_sig.c compat_hpux
-file compat/hpux/hppa/hpux_sig2.c compat_hpux
-file compat/hpux/hppa/hpux_exec.c compat_hpux
-#file compat/hpux/hppa/hpux_net.c compat_hpux
-file compat/hpux/hppa/hpux_syscalls.c compat_hpux & syscall_debug
-file compat/hpux/hppa/hpux_sysent.c compat_hpux
diff --git a/sys/compat/hpux/hppa/hpux_exec.c b/sys/compat/hpux/hppa/hpux_exec.c
deleted file mode 100644
index 90783f6040b..00000000000
--- a/sys/compat/hpux/hppa/hpux_exec.c
+++ /dev/null
@@ -1,244 +0,0 @@
-/* $OpenBSD: hpux_exec.c,v 1.5 2010/06/26 23:24:44 guenther Exp $ */
-
-/*
- * Copyright (c) 2004 Michael Shalayeff. All rights reserved.
- * Copyright (c) 1995, 1997 Jason R. Thorpe. All rights reserved.
- * Copyright (c) 1993, 1994 Christopher G. Demetriou
- *
- * 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. All advertising materials mentioning features or use of this software
- * This product includes software developed by Christopher G. Demetriou.
- * 4. The name of the author may not 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.
- */
-
-/*
- * Glue for exec'ing HP-UX executables and the HP-UX execv() system call.
- * Based on sys/kern/exec_aout.c
- */
-
-#include <sys/param.h>
-#include <sys/systm.h>
-#include <sys/kernel.h>
-#include <sys/proc.h>
-#include <sys/malloc.h>
-#include <sys/mount.h>
-#include <sys/namei.h>
-#include <sys/vnode.h>
-#include <sys/mman.h>
-#include <sys/stat.h>
-#include <sys/core.h>
-
-#include <uvm/uvm_extern.h>
-
-#include <machine/cpu.h>
-#include <machine/reg.h>
-
-#include <sys/syscallargs.h>
-
-#include <compat/hpux/hpux.h>
-#include <compat/hpux/hpux_util.h>
-#include <compat/hpux/hppa/hpux_syscall.h>
-#include <compat/hpux/hppa/hpux_syscallargs.h>
-
-#include <machine/hpux_machdep.h>
-
-const char hpux_emul_path[] = "/emul/hpux";
-extern char hpux_sigcode[], hpux_esigcode[];
-extern struct sysent hpux_sysent[];
-#ifdef SYSCALL_DEBUG
-extern char *hpux_syscallnames[];
-#endif
-extern int bsdtohpuxerrnomap[];
-
-int exec_hpux_som_nmagic(struct proc *, struct exec_package *);
-int exec_hpux_som_zmagic(struct proc *, struct exec_package *);
-int exec_hpux_som_omagic(struct proc *, struct exec_package *);
-
-struct emul emul_hpux = {
- "hpux",
- bsdtohpuxerrnomap,
- hpux_sendsig,
- HPUX_SYS_syscall,
- HPUX_SYS_MAXSYSCALL,
- hpux_sysent,
-#ifdef SYSCALL_DEBUG
- hpux_syscallnames,
-#else
- NULL,
-#endif
- 0,
- copyargs,
- hpux_setregs,
- NULL,
- coredump_trad,
- hpux_sigcode,
- hpux_esigcode,
-};
-
-int
-exec_hpux_makecmds(p, epp)
- struct proc *p;
- struct exec_package *epp;
-{
- struct som_exec *som_ep = epp->ep_hdr;
- short sysid, magic;
- int error = ENOEXEC;
-
- sysid = HPUX_SYSID(som_ep);
- if (sysid != MID_HPUX800 && sysid != MID_HPPA11 && sysid != MID_HPPA20)
- return (error);
-
- /* XXX read in the aux header if it was not following the som header */
- if (sysid != MID_HPUX && (!(som_ep->som_version == HPUX_SOM_V0 ||
- som_ep->som_version == HPUX_SOM_V1) ||
- som_ep->som_auxhdr + sizeof(struct som_aux) > epp->ep_hdrvalid)) {
- return (error);
- }
-
- /*
- * HP-UX is a 4k page size system, and executables assume
- * this.
- */
- if (PAGE_SIZE != HPUX_LDPGSZ)
- return (error);
-
- magic = HPUX_MAGIC(som_ep);
- switch (magic) {
- case OMAGIC:
- error = exec_hpux_som_omagic(p, epp);
- break;
-
- case NMAGIC:
- error = exec_hpux_som_nmagic(p, epp);
- break;
-
- case ZMAGIC:
- error = exec_hpux_som_zmagic(p, epp);
- break;
- }
-
- if (error == 0) {
- /* set up our emulation information */
- epp->ep_emul = &emul_hpux;
- } else
- kill_vmcmds(&epp->ep_vmcmds);
-
- return (error);
-}
-
-int
-exec_hpux_som_nmagic(struct proc *p, struct exec_package *epp)
-{
- struct som_exec *execp = epp->ep_hdr;
- struct som_aux *auxp = epp->ep_hdr + execp->som_auxhdr;
-
- epp->ep_taddr = auxp->som_tmem;
- epp->ep_tsize = auxp->som_tsize;
- epp->ep_daddr = auxp->som_dmem;
- epp->ep_dsize = auxp->som_dsize + auxp->som_bsize;
- epp->ep_entry = auxp->som_entry;
-
- /* set up command for text segment */
- NEW_VMCMD(&epp->ep_vmcmds, vmcmd_map_readvn, epp->ep_tsize,
- epp->ep_taddr, epp->ep_vp, auxp->som_tfile,
- VM_PROT_READ|VM_PROT_EXECUTE);
-
- /* set up command for data segment */
- NEW_VMCMD(&epp->ep_vmcmds, vmcmd_map_readvn, auxp->som_dsize,
- epp->ep_daddr, epp->ep_vp, auxp->som_dfile,
- VM_PROT_READ|VM_PROT_WRITE|VM_PROT_EXECUTE);
-
- /* set up command for bss segment */
- if (auxp->som_bsize > 0)
- NEW_VMCMD(&epp->ep_vmcmds, vmcmd_map_zero, auxp->som_bsize,
- epp->ep_daddr + auxp->som_dsize,
- NULLVP, 0, VM_PROT_READ|VM_PROT_WRITE|VM_PROT_EXECUTE);
-
- return (exec_setup_stack(p, epp));
-}
-
-int
-exec_hpux_som_zmagic(struct proc *p, struct exec_package *epp)
-{
-
- return (exec_setup_stack(p, epp));
-}
-
-int
-exec_hpux_som_omagic(struct proc *p, struct exec_package *epp)
-{
-
- return (exec_setup_stack(p, epp));
-}
-
-/*
- * The HP-UX execv(2) system call.
- *
- * Just check the alternate emulation path, and pass it on to the NetBSD
- * execve().
- */
-int
-hpux_sys_execv(p, v, retval)
- struct proc *p;
- void *v;
- register_t *retval;
-{
- struct hpux_sys_execv_args /* {
- syscallarg(char *) path;
- syscallarg(char **) argv;
- } */ *uap = v;
- struct sys_execve_args ap;
- caddr_t sg;
-
- sg = stackgap_init(p->p_emul);
- HPUX_CHECK_ALT_EXIST(p, &sg, SCARG(uap, path));
-
- SCARG(&ap, path) = SCARG(uap, path);
- SCARG(&ap, argp) = SCARG(uap, argp);
- SCARG(&ap, envp) = NULL;
-
- return sys_execve(p, &ap, retval);
-}
-
-int
-hpux_sys_execve(p, v, retval)
- struct proc *p;
- void *v;
- register_t *retval;
-{
- struct hpux_sys_execve_args /* {
- syscallarg(char *) path;
- syscallarg(char **) argv;
- syscallarg(char **) envp;
- } */ *uap = v;
- struct sys_execve_args ap;
- caddr_t sg;
-
- sg = stackgap_init(p->p_emul);
- HPUX_CHECK_ALT_EXIST(p, &sg, SCARG(uap, path));
-
- SCARG(&ap, path) = SCARG(uap, path);
- SCARG(&ap, argp) = SCARG(uap, argp);
- SCARG(&ap, envp) = SCARG(uap, envp);
-
- return (sys_execve(p, &ap, retval));
-}
diff --git a/sys/compat/hpux/hppa/hpux_exec.h b/sys/compat/hpux/hppa/hpux_exec.h
deleted file mode 100644
index 169fe519308..00000000000
--- a/sys/compat/hpux/hppa/hpux_exec.h
+++ /dev/null
@@ -1,98 +0,0 @@
-/* $OpenBSD: hpux_exec.h,v 1.1 2004/07/09 21:48:21 mickey Exp $ */
-
-/*
- * Copyright (c) 2004 Michael Shalayeff. All rights reserved.
- * Copyright (c) 1995 Jason R. Thorpe. All rights reserved.
- * Copyright (c) 1988 University of Utah.
- * Copyright (c) 1990, 1993
- * The Regents of the University of California. All rights reserved.
- *
- * This code is derived from software contributed to Berkeley by
- * the Systems Programming Group of the University of Utah Computer
- * Science Department.
- *
- * 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. Neither the name of the University nor the names of its contributors
- * may be used to endorse or promote products derived from this software
- * without specific prior written permission.
- *
- * THIS SOFTWARE IS PROVIDED BY THE REGENTS 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 REGENTS 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.
- *
- * from: Utah $Hdr: hpux_exec.h 1.6 92/01/20$
- *
- * @(#)hpux_exec.h 8.1 (Berkeley) 6/10/93
- */
-
-#ifndef _HPUX_EXEC_H_
-#define _HPUX_EXEC_H_
-
-/*
- * HPUX SOM header format
- */
-struct som_exec {
- long ha_magic;
- long som_version;
- struct timespec som_time;
- long som_ep_space;
- long som_ep_subspace;
- long som_ep_offset;
- long som_auxhdr;
- long som_auxsize;
- long pad[22]; /* there is more but we do not care */
- long som_cksum;
-};
-
-struct som_aux {
- long som_flags;
- long som_length; /* of the rest */
- long som_tsize; /* .text size */
- long som_tmem; /* .text address */
- long som_tfile; /* .text offset in file */
- long som_dsize;
- long som_dmem;
- long som_dfile;
- long som_bsize;
- long som_entry;
- long som_ldflags;
- long som_bfill;
-};
-
-#define HPUX_EXEC_HDR_SIZE \
- (sizeof(struct som_exec) + sizeof(struct som_aux))
-
-#define HPUX_MAGIC(ha) ((ha)->ha_magic & 0xffff)
-#define HPUX_SYSID(ha) (((ha)->ha_magic >> 16) & 0xffff)
-
-/*
- * Additional values for HPUX_MAGIC()
- */
-#define HPUX_MAGIC_RELOC 0x0106 /* relocatable object */
-#define HPUX_MAGIC_DL 0x010d /* dynamic load library */
-#define HPUX_MAGIC_SHL 0x010e /* shared library */
-
-#define HPUX_SOM_V0 85082112
-#define HPUX_SOM_V1 87102412
-
-#define HPUX_LDPGSZ 4096 /* align to this */
-#define HPUX_LDPGSHIFT 12 /* log2(HPUX_LDPGSZ) */
-
-int exec_hpux_makecmds(struct proc *, struct exec_package *);
-
-#endif /* _HPUX_EXEC_H_ */
diff --git a/sys/compat/hpux/hppa/hpux_sig2.c b/sys/compat/hpux/hppa/hpux_sig2.c
deleted file mode 100644
index e7fbcff64f3..00000000000
--- a/sys/compat/hpux/hppa/hpux_sig2.c
+++ /dev/null
@@ -1,85 +0,0 @@
-/* $OpenBSD: hpux_sig2.c,v 1.1 2004/09/19 21:56:18 mickey Exp $ */
-
-/*
- * Copyright (c) 2004 Michael Shalayeff
- * 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.
- *
- * 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 OR HIS RELATIVES 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 MIND, 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/param.h>
-#include <sys/systm.h>
-#include <sys/proc.h>
-#include <sys/mount.h>
-#include <sys/signalvar.h>
-#include <sys/syscallargs.h>
-
-#include <compat/hpux/hpux.h>
-#include <compat/hpux/hpux_sig.h>
-#include <compat/hpux/hpux_util.h>
-#include <compat/hpux/hppa/hpux_syscallargs.h>
-
-int
-hpux_sys_sigaltstack(struct proc *p, void *v, register_t *retval)
-{
- struct hpux_sys_sigaltstack_args /* {
- syscallarg(struct hpux_sigaltstack *) nss;
- syscallarg(struct hpux_sigaltstack *) oss;
- } */ *uap = v;
- struct sys_sigaltstack_args saa;
- hpux_stack_t hsa;
- stack_t *psa, sa;
- caddr_t sg;
- int error;
-
- if ((error = copyin(SCARG(uap, nss), &hsa, sizeof hsa)))
- return (error);
-
- sa.ss_sp = hsa.ss_sp;
- sa.ss_size = hsa.ss_size;
- sa.ss_flags = hsa.ss_flags & SS_ONSTACK;
- if (hsa.ss_flags & HPUX_SS_DISABLE)
- sa.ss_flags |= SS_DISABLE;
-
- sg = stackgap_init(p->p_emul);
- psa = stackgap_alloc(&sg, 2 * sizeof(struct sigaltstack));
- SCARG(&saa, nss) = &psa[0];
- SCARG(&saa, oss) = &psa[1];
-
- if ((error = copyout(&sa, psa, sizeof sa)))
- return (error);
-
- if ((error = sys_sigaltstack(p, &saa, retval)))
- return (error);
-
- if ((error = copyin(SCARG(&saa, oss), &sa, sizeof sa)))
- return (error);
-
- hsa.ss_sp = sa.ss_sp;
- hsa.ss_flags = sa.ss_flags & SS_ONSTACK;
- if (sa.ss_flags & SS_DISABLE)
- hsa.ss_flags |= HPUX_SS_DISABLE;
- hsa.ss_size = sa.ss_size;
-
- return (copyout(&hsa, SCARG(uap, oss), sizeof hsa));
-}
diff --git a/sys/compat/hpux/hppa/hpux_syscall.h b/sys/compat/hpux/hppa/hpux_syscall.h
deleted file mode 100644
index d782bf43031..00000000000
--- a/sys/compat/hpux/hppa/hpux_syscall.h
+++ /dev/null
@@ -1,442 +0,0 @@
-/* $OpenBSD: hpux_syscall.h,v 1.10 2010/01/28 19:59:35 miod Exp $ */
-
-/*
- * System call numbers.
- *
- * DO NOT EDIT-- this file is automatically generated.
- * created from OpenBSD: syscalls.master,v 1.9 2010/01/28 19:59:09 miod Exp
- */
-
-/* syscall: "syscall" ret: "int" args: */
-#define HPUX_SYS_syscall 0
-
-/* syscall: "exit" ret: "int" args: "int" */
-#define HPUX_SYS_exit 1
-
-/* syscall: "fork" ret: "int" args: */
-#define HPUX_SYS_fork 2
-
-/* syscall: "read" ret: "int" args: "int" "char *" "u_int" */
-#define HPUX_SYS_read 3
-
-/* syscall: "write" ret: "int" args: "int" "char *" "u_int" */
-#define HPUX_SYS_write 4
-
-/* syscall: "open" ret: "int" args: "char *" "int" "int" */
-#define HPUX_SYS_open 5
-
-/* syscall: "close" ret: "int" args: "int" */
-#define HPUX_SYS_close 6
-
-/* syscall: "wait" ret: "int" args: "int *" */
-#define HPUX_SYS_wait 7
-
-/* syscall: "creat" ret: "int" args: "char *" "int" */
-#define HPUX_SYS_creat 8
-
-/* syscall: "link" ret: "int" args: "char *" "char *" */
-#define HPUX_SYS_link 9
-
-/* syscall: "unlink" ret: "int" args: "char *" */
-#define HPUX_SYS_unlink 10
-
-/* syscall: "execv" ret: "int" args: "char *" "char **" */
-#define HPUX_SYS_execv 11
-
-/* syscall: "chdir" ret: "int" args: "char *" */
-#define HPUX_SYS_chdir 12
-
-/* syscall: "time_6x" ret: "int" args: "time_t *" */
-#define HPUX_SYS_time_6x 13
-
-/* syscall: "mknod" ret: "int" args: "char *" "int" "int" */
-#define HPUX_SYS_mknod 14
-
-/* syscall: "chmod" ret: "int" args: "char *" "int" */
-#define HPUX_SYS_chmod 15
-
-/* syscall: "chown" ret: "int" args: "char *" "int" "int" */
-#define HPUX_SYS_chown 16
-
-/* syscall: "obreak" ret: "int" args: "char *" */
-#define HPUX_SYS_obreak 17
-
-/* syscall: "lseek" ret: "long" args: "int" "long" "int" */
-#define HPUX_SYS_lseek 19
-
-/* syscall: "getpid" ret: "pid_t" args: */
-#define HPUX_SYS_getpid 20
-
-/* syscall: "setuid" ret: "int" args: "uid_t" */
-#define HPUX_SYS_setuid 23
-
-/* syscall: "getuid" ret: "uid_t" args: */
-#define HPUX_SYS_getuid 24
-
-/* syscall: "stime_6x" ret: "int" args: "int" */
-#define HPUX_SYS_stime_6x 25
-
-/* syscall: "ptrace" ret: "int" args: "int" "int" "int *" "int" */
-#define HPUX_SYS_ptrace 26
-
-/* syscall: "alarm_6x" ret: "int" args: "int" */
-#define HPUX_SYS_alarm_6x 27
-
-/* syscall: "pause_6x" ret: "int" args: */
-#define HPUX_SYS_pause_6x 29
-
-/* syscall: "utime_6x" ret: "int" args: "char *" "time_t *" */
-#define HPUX_SYS_utime_6x 30
-
-/* syscall: "stty_6x" ret: "int" args: "int" "caddr_t" */
-#define HPUX_SYS_stty_6x 31
-
-/* syscall: "gtty_6x" ret: "int" args: "int" "caddr_t" */
-#define HPUX_SYS_gtty_6x 32
-
-/* syscall: "access" ret: "int" args: "char *" "int" */
-#define HPUX_SYS_access 33
-
-/* syscall: "nice_6x" ret: "int" args: "int" */
-#define HPUX_SYS_nice_6x 34
-
-/* syscall: "ftime_6x" ret: "int" args: "struct hpux_timeb *" */
-#define HPUX_SYS_ftime_6x 35
-
-/* syscall: "sync" ret: "int" args: */
-#define HPUX_SYS_sync 36
-
-/* syscall: "kill" ret: "int" args: "pid_t" "int" */
-#define HPUX_SYS_kill 37
-
-/* syscall: "stat" ret: "int" args: "char *" "struct hpux_stat *" */
-#define HPUX_SYS_stat 38
-
-/* syscall: "setpgrp_6x" ret: "int" args: */
-#define HPUX_SYS_setpgrp_6x 39
-
-/* syscall: "lstat" ret: "int" args: "char *" "struct hpux_stat *" */
-#define HPUX_SYS_lstat 40
-
-/* syscall: "dup" ret: "int" args: "int" */
-#define HPUX_SYS_dup 41
-
-/* syscall: "opipe" ret: "int" args: */
-#define HPUX_SYS_opipe 42
-
-/* syscall: "times_6x" ret: "int" args: "struct tms *" */
-#define HPUX_SYS_times_6x 43
-
-/* syscall: "profil" ret: "int" args: "caddr_t" "u_int" "u_int" "u_int" */
-#define HPUX_SYS_profil 44
-
-/* syscall: "setgid" ret: "int" args: "gid_t" */
-#define HPUX_SYS_setgid 46
-
-/* syscall: "getgid" ret: "gid_t" args: */
-#define HPUX_SYS_getgid 47
-
-/* syscall: "ioctl" ret: "int" args: "int" "int" "caddr_t" */
-#define HPUX_SYS_ioctl 54
-
-/* syscall: "symlink" ret: "int" args: "char *" "char *" */
-#define HPUX_SYS_symlink 56
-
-/* syscall: "utssys" ret: "int" args: "struct hpux_utsname *" "int" "int" */
-#define HPUX_SYS_utssys 57
-
-/* syscall: "readlink" ret: "int" args: "char *" "char *" "int" */
-#define HPUX_SYS_readlink 58
-
-/* syscall: "execve" ret: "int" args: "char *" "char **" "char **" */
-#define HPUX_SYS_execve 59
-
-/* syscall: "umask" ret: "int" args: "int" */
-#define HPUX_SYS_umask 60
-
-/* syscall: "chroot" ret: "int" args: "char *" */
-#define HPUX_SYS_chroot 61
-
-/* syscall: "fcntl" ret: "int" args: "int" "int" "int" */
-#define HPUX_SYS_fcntl 62
-
-/* syscall: "ulimit" ret: "int" args: "int" "int" */
-#define HPUX_SYS_ulimit 63
-
-/* syscall: "vfork" ret: "int" args: */
-#define HPUX_SYS_vfork 66
-
-/* syscall: "mmap" ret: "int" args: "caddr_t" "size_t" "int" "int" "int" "long" */
-#define HPUX_SYS_mmap 71
-
-/* syscall: "munmap" ret: "int" args: "caddr_t" "size_t" */
-#define HPUX_SYS_munmap 73
-
-/* syscall: "mprotect" ret: "int" args: "caddr_t" "size_t" "int" */
-#define HPUX_SYS_mprotect 74
-
-/* syscall: "madvise" ret: "int" args: "void *" "size_t" "int" */
-#define HPUX_SYS_madvise 75
-
-/* syscall: "getgroups" ret: "int" args: "u_int" "gid_t *" */
-#define HPUX_SYS_getgroups 79
-
-/* syscall: "setgroups" ret: "int" args: "u_int" "gid_t *" */
-#define HPUX_SYS_setgroups 80
-
-/* syscall: "getpgid" ret: "pid_t" args: "pid_t" */
-#define HPUX_SYS_getpgid 81
-
-/* syscall: "setpgrp2" ret: "int" args: "pid_t" "pid_t" */
-#define HPUX_SYS_setpgrp2 82
-
-/* syscall: "setitimer" ret: "int" args: "u_int" "struct itimerval *" "struct itimerval *" */
-#define HPUX_SYS_setitimer 83
-
-/* syscall: "wait3" ret: "int" args: "int *" "int" "int" */
-#define HPUX_SYS_wait3 84
-
-/* syscall: "getitimer" ret: "int" args: "u_int" "struct itimerval *" */
-#define HPUX_SYS_getitimer 86
-
-/* syscall: "dup2" ret: "int" args: "u_int" "u_int" */
-#define HPUX_SYS_dup2 90
-
-/* syscall: "fstat" ret: "int" args: "int" "struct hpux_stat *" */
-#define HPUX_SYS_fstat 92
-
-/* syscall: "select" ret: "int" args: "u_int" "fd_set *" "fd_set *" "fd_set *" "struct timeval *" */
-#define HPUX_SYS_select 93
-
-/* syscall: "fsync" ret: "int" args: "int" */
-#define HPUX_SYS_fsync 95
-
-/* syscall: "setpriority" ret: "int" args: "int" "id_t" "int" */
-#define HPUX_SYS_setpriority 96
-
-/* syscall: "getpriority" ret: "int" args: "int" "id_t" */
-#define HPUX_SYS_getpriority 100
-
-/* syscall: "sigvec" ret: "int" args: "int" "struct sigvec *" "struct sigvec *" */
-#define HPUX_SYS_sigvec 108
-
-/* syscall: "sigblock" ret: "int" args: "int" */
-#define HPUX_SYS_sigblock 109
-
-/* syscall: "sigsetmask" ret: "int" args: "int" */
-#define HPUX_SYS_sigsetmask 110
-
-/* syscall: "sigpause" ret: "int" args: "int" */
-#define HPUX_SYS_sigpause 111
-
-/* syscall: "sigstack" ret: "int" args: "struct sigstack *" "struct sigstack *" */
-#define HPUX_SYS_sigstack 112
-
-/* syscall: "gettimeofday" ret: "int" args: "struct timeval *" */
-#define HPUX_SYS_gettimeofday 116
-
-/* syscall: "readv" ret: "int" args: "int" "struct iovec *" "u_int" */
-#define HPUX_SYS_readv 120
-
-/* syscall: "writev" ret: "int" args: "int" "struct iovec *" "u_int" */
-#define HPUX_SYS_writev 121
-
-/* syscall: "settimeofday" ret: "int" args: "struct timeval *" "struct timezone *" */
-#define HPUX_SYS_settimeofday 122
-
-/* syscall: "fchown" ret: "int" args: "int" "int" "int" */
-#define HPUX_SYS_fchown 123
-
-/* syscall: "fchmod" ret: "int" args: "int" "int" */
-#define HPUX_SYS_fchmod 124
-
-/* syscall: "setresuid" ret: "int" args: "uid_t" "uid_t" "uid_t" */
-#define HPUX_SYS_setresuid 126
-
-/* syscall: "setresgid" ret: "int" args: "gid_t" "gid_t" "gid_t" */
-#define HPUX_SYS_setresgid 127
-
-/* syscall: "rename" ret: "int" args: "char *" "char *" */
-#define HPUX_SYS_rename 128
-
-/* syscall: "truncate" ret: "int" args: "char *" "long" */
-#define HPUX_SYS_truncate 129
-
-/* syscall: "ftruncate" ret: "int" args: "int" "long" */
-#define HPUX_SYS_ftruncate 130
-
-/* syscall: "sysconf" ret: "int" args: "int" */
-#define HPUX_SYS_sysconf 132
-
-/* syscall: "mkdir" ret: "int" args: "char *" "int" */
-#define HPUX_SYS_mkdir 136
-
-/* syscall: "rmdir" ret: "int" args: "char *" */
-#define HPUX_SYS_rmdir 137
-
-/* syscall: "getrlimit" ret: "int" args: "u_int" "struct ogetrlimit *" */
-#define HPUX_SYS_getrlimit 144
-
-/* syscall: "setrlimit" ret: "int" args: "u_int" "struct ogetrlimit *" */
-#define HPUX_SYS_setrlimit 145
-
-/* syscall: "rtprio" ret: "int" args: "pid_t" "int" */
-#define HPUX_SYS_rtprio 152
-
-/* syscall: "lockf" ret: "int" args: "int" "int" "long" */
-#define HPUX_SYS_lockf 155
-
-/* syscall: "semget" ret: "int" args: "key_t" "int" "int" */
-#define HPUX_SYS_semget 156
-
-/* syscall: "__semctl" ret: "int" args: "int" "int" "int" "union semun *" */
-#define HPUX_SYS___semctl 157
-
-/* syscall: "semop" ret: "int" args: "int" "struct sembuf *" "u_int" */
-#define HPUX_SYS_semop 158
-
-/* syscall: "msgget" ret: "int" args: "key_t" "int" */
-#define HPUX_SYS_msgget 159
-
-/* syscall: "msgctl" ret: "int" args: "int" "int" "struct msqid_ds *" */
-#define HPUX_SYS_msgctl 160
-
-/* syscall: "msgsnd" ret: "int" args: "int" "void *" "size_t" "int" */
-#define HPUX_SYS_msgsnd 161
-
-/* syscall: "msgrcv" ret: "int" args: "int" "void *" "size_t" "long" "int" */
-#define HPUX_SYS_msgrcv 162
-
-/* syscall: "shmget" ret: "int" args: "key_t" "int" "int" */
-#define HPUX_SYS_shmget 163
-
-/* syscall: "shmctl" ret: "int" args: "int" "int" "caddr_t" */
-#define HPUX_SYS_shmctl 164
-
-/* syscall: "shmat" ret: "int" args: "int" "void *" "int" */
-#define HPUX_SYS_shmat 165
-
-/* syscall: "shmdt" ret: "int" args: "void *" */
-#define HPUX_SYS_shmdt 166
-
-/* syscall: "getcontext" ret: "int" args: "char *" "int" */
-#define HPUX_SYS_getcontext 174
-
-/* syscall: "sigprocmask" ret: "int" args: "int" "hpux_sigset_t *" "hpux_sigset_t *" */
-#define HPUX_SYS_sigprocmask 185
-
-/* syscall: "sigpending" ret: "int" args: "hpux_sigset_t *" */
-#define HPUX_SYS_sigpending 186
-
-/* syscall: "sigsuspend" ret: "int" args: "hpux_sigset_t *" */
-#define HPUX_SYS_sigsuspend 187
-
-/* syscall: "sigaction" ret: "int" args: "int" "struct hpux_sigaction *" "struct hpux_sigaction *" */
-#define HPUX_SYS_sigaction 188
-
-/* syscall: "getdomainname" ret: "int" args: "char *" "int" */
-#define HPUX_SYS_getdomainname 192
-
-/* syscall: "setdomainname" ret: "int" args: "char *" "int" */
-#define HPUX_SYS_setdomainname 193
-
-/* syscall: "getdirentries" ret: "int" args: "int" "char *" "u_int" "long *" */
-#define HPUX_SYS_getdirentries 195
-
-/* syscall: "waitpid" ret: "int" args: "pid_t" "int *" "int" "struct rusage *" */
-#define HPUX_SYS_waitpid 200
-
-/* syscall: "hpux_sigsetreturn" ret: "void" args: "caddr_t" "int" "int" */
-#define HPUX_SYS_hpux_sigsetreturn 224
-
-/* syscall: "poll" ret: "int" args: "struct pollfd *" "u_int" "int" */
-#define HPUX_SYS_poll 269
-
-/* syscall: "fchdir" ret: "int" args: "int" */
-#define HPUX_SYS_fchdir 272
-
-/* syscall: "accept" ret: "int" args: "int" "caddr_t" "int *" */
-#define HPUX_SYS_accept 275
-
-/* syscall: "bind" ret: "int" args: "int" "caddr_t" "int" */
-#define HPUX_SYS_bind 276
-
-/* syscall: "connect" ret: "int" args: "int" "caddr_t" "int" */
-#define HPUX_SYS_connect 277
-
-/* syscall: "getpeername" ret: "int" args: "int" "caddr_t" "int *" */
-#define HPUX_SYS_getpeername 278
-
-/* syscall: "getsockname" ret: "int" args: "int" "caddr_t" "int *" */
-#define HPUX_SYS_getsockname 279
-
-/* syscall: "getsockopt" ret: "int" args: "int" "int" "int" "void *" "socklen_t *" */
-#define HPUX_SYS_getsockopt 280
-
-/* syscall: "listen" ret: "int" args: "int" "int" */
-#define HPUX_SYS_listen 281
-
-/* syscall: "recv" ret: "int" args: "int" "caddr_t" "int" "int" */
-#define HPUX_SYS_recv 282
-
-/* syscall: "recvfrom" ret: "int" args: "int" "caddr_t" "size_t" "int" "caddr_t" "int *" */
-#define HPUX_SYS_recvfrom 283
-
-/* syscall: "recvmsg" ret: "int" args: "int" "struct omsghdr *" "int" */
-#define HPUX_SYS_recvmsg 284
-
-/* syscall: "send" ret: "int" args: "int" "caddr_t" "int" "int" */
-#define HPUX_SYS_send 285
-
-/* syscall: "sendmsg" ret: "int" args: "int" "caddr_t" "int" */
-#define HPUX_SYS_sendmsg 286
-
-/* syscall: "sendto" ret: "int" args: "int" "caddr_t" "size_t" "int" "caddr_t" "int" */
-#define HPUX_SYS_sendto 287
-
-/* syscall: "setsockopt" ret: "int" args: "int" "int" "int" "const void *" "socklen_t" */
-#define HPUX_SYS_setsockopt 288
-
-/* syscall: "shutdown" ret: "int" args: "int" "int" */
-#define HPUX_SYS_shutdown 289
-
-/* syscall: "socket" ret: "int" args: "int" "int" "int" */
-#define HPUX_SYS_socket 290
-
-/* syscall: "socketpair" ret: "int" args: "int" "int" "int" "int *" */
-#define HPUX_SYS_socketpair 291
-
-/* syscall: "nsemctl" ret: "int" args: "int" "int" "int" "union semun *" */
-#define HPUX_SYS_nsemctl 312
-
-/* syscall: "nmsgctl" ret: "int" args: "int" "int" "struct msqid_ds *" */
-#define HPUX_SYS_nmsgctl 313
-
-/* syscall: "nshmctl" ret: "int" args: "int" "int" "caddr_t" */
-#define HPUX_SYS_nshmctl 314
-
-/* syscall: "msync" ret: "int" args: "void *" "size_t" "int" */
-#define HPUX_SYS_msync 320
-
-/* syscall: "lchown" ret: "int" args: "const char *" "uid_t" "gid_t" */
-#define HPUX_SYS_lchown 332
-
-/* syscall: "nanosleep" ret: "int" args: "const struct timespec *" "struct timespec *" */
-#define HPUX_SYS_nanosleep 353
-
-/* syscall: "sigaltstack" ret: "int" args: "const struct hpux_sigaltstack *" "struct hpux_sigaltstack *" */
-#define HPUX_SYS_sigaltstack 381
-
-/* syscall: "mlock" ret: "int" args: "const void *" "size_t" */
-#define HPUX_SYS_mlock 421
-
-/* syscall: "munlock" ret: "int" args: "const void *" "size_t" */
-#define HPUX_SYS_munlock 422
-
-/* syscall: "mlockall" ret: "int" args: "int" */
-#define HPUX_SYS_mlockall 423
-
-/* syscall: "munlockall" ret: "int" args: */
-#define HPUX_SYS_munlockall 424
-
-#define HPUX_SYS_MAXSYSCALL 526
diff --git a/sys/compat/hpux/hppa/hpux_syscallargs.h b/sys/compat/hpux/hppa/hpux_syscallargs.h
deleted file mode 100644
index 38800ffcb46..00000000000
--- a/sys/compat/hpux/hppa/hpux_syscallargs.h
+++ /dev/null
@@ -1,511 +0,0 @@
-/* $OpenBSD: hpux_syscallargs.h,v 1.10 2010/01/28 19:59:35 miod Exp $ */
-
-/*
- * System call argument lists.
- *
- * DO NOT EDIT-- this file is automatically generated.
- * created from OpenBSD: syscalls.master,v 1.9 2010/01/28 19:59:09 miod Exp
- */
-
-#ifdef syscallarg
-#undef syscallarg
-#endif
-
-#define syscallarg(x) \
- union { \
- register_t pad; \
- struct { x datum; } le; \
- struct { \
- int8_t pad[ (sizeof (register_t) < sizeof (x)) \
- ? 0 \
- : sizeof (register_t) - sizeof (x)]; \
- x datum; \
- } be; \
- }
-
-struct hpux_sys_read_args {
- syscallarg(int) fd;
- syscallarg(char *) buf;
- syscallarg(u_int) nbyte;
-};
-
-struct hpux_sys_write_args {
- syscallarg(int) fd;
- syscallarg(char *) buf;
- syscallarg(u_int) nbyte;
-};
-
-struct hpux_sys_open_args {
- syscallarg(char *) path;
- syscallarg(int) flags;
- syscallarg(int) mode;
-};
-
-struct hpux_sys_wait_args {
- syscallarg(int *) status;
-};
-
-struct hpux_sys_creat_args {
- syscallarg(char *) path;
- syscallarg(int) mode;
-};
-
-struct hpux_sys_unlink_args {
- syscallarg(char *) path;
-};
-
-struct hpux_sys_execv_args {
- syscallarg(char *) path;
- syscallarg(char **) argp;
-};
-
-struct hpux_sys_chdir_args {
- syscallarg(char *) path;
-};
-
-struct hpux_sys_time_6x_args {
- syscallarg(time_t *) t;
-};
-
-struct hpux_sys_mknod_args {
- syscallarg(char *) path;
- syscallarg(int) mode;
- syscallarg(int) dev;
-};
-
-struct hpux_sys_chmod_args {
- syscallarg(char *) path;
- syscallarg(int) mode;
-};
-
-struct hpux_sys_chown_args {
- syscallarg(char *) path;
- syscallarg(int) uid;
- syscallarg(int) gid;
-};
-
-struct hpux_sys_stime_6x_args {
- syscallarg(int) time;
-};
-
-struct hpux_sys_ptrace_args {
- syscallarg(int) req;
- syscallarg(int) pid;
- syscallarg(int *) addr;
- syscallarg(int) data;
-};
-
-struct hpux_sys_alarm_6x_args {
- syscallarg(int) deltat;
-};
-
-struct hpux_sys_utime_6x_args {
- syscallarg(char *) fname;
- syscallarg(time_t *) tptr;
-};
-
-struct hpux_sys_stty_6x_args {
- syscallarg(int) fd;
- syscallarg(caddr_t) arg;
-};
-
-struct hpux_sys_gtty_6x_args {
- syscallarg(int) fd;
- syscallarg(caddr_t) arg;
-};
-
-struct hpux_sys_access_args {
- syscallarg(char *) path;
- syscallarg(int) flags;
-};
-
-struct hpux_sys_nice_6x_args {
- syscallarg(int) nval;
-};
-
-struct hpux_sys_ftime_6x_args {
- syscallarg(struct hpux_timeb *) tp;
-};
-
-struct hpux_sys_kill_args {
- syscallarg(pid_t) pid;
- syscallarg(int) signo;
-};
-
-struct hpux_sys_stat_args {
- syscallarg(char *) path;
- syscallarg(struct hpux_stat *) sb;
-};
-
-struct hpux_sys_lstat_args {
- syscallarg(char *) path;
- syscallarg(struct hpux_stat *) sb;
-};
-
-struct hpux_sys_times_6x_args {
- syscallarg(struct tms *) tms;
-};
-
-struct hpux_sys_ioctl_args {
- syscallarg(int) fd;
- syscallarg(int) com;
- syscallarg(caddr_t) data;
-};
-
-struct hpux_sys_symlink_args {
- syscallarg(char *) path;
- syscallarg(char *) link;
-};
-
-struct hpux_sys_utssys_args {
- syscallarg(struct hpux_utsname *) uts;
- syscallarg(int) dev;
- syscallarg(int) request;
-};
-
-struct hpux_sys_readlink_args {
- syscallarg(char *) path;
- syscallarg(char *) buf;
- syscallarg(int) count;
-};
-
-struct hpux_sys_execve_args {
- syscallarg(char *) path;
- syscallarg(char **) argp;
- syscallarg(char **) envp;
-};
-
-struct hpux_sys_fcntl_args {
- syscallarg(int) fd;
- syscallarg(int) cmd;
- syscallarg(int) arg;
-};
-
-struct hpux_sys_ulimit_args {
- syscallarg(int) cmd;
- syscallarg(int) newlimit;
-};
-
-struct hpux_sys_mmap_args {
- syscallarg(caddr_t) addr;
- syscallarg(size_t) len;
- syscallarg(int) prot;
- syscallarg(int) flags;
- syscallarg(int) fd;
- syscallarg(long) pos;
-};
-
-struct hpux_sys_setpgrp2_args {
- syscallarg(pid_t) pid;
- syscallarg(pid_t) pgid;
-};
-
-struct hpux_sys_wait3_args {
- syscallarg(int *) status;
- syscallarg(int) options;
- syscallarg(int) rusage;
-};
-
-struct hpux_sys_fstat_args {
- syscallarg(int) fd;
- syscallarg(struct hpux_stat *) sb;
-};
-
-struct hpux_sys_sigvec_args {
- syscallarg(int) signo;
- syscallarg(struct sigvec *) nsv;
- syscallarg(struct sigvec *) osv;
-};
-
-struct hpux_sys_sigblock_args {
- syscallarg(int) mask;
-};
-
-struct hpux_sys_sigsetmask_args {
- syscallarg(int) mask;
-};
-
-struct hpux_sys_sigpause_args {
- syscallarg(int) mask;
-};
-
-struct hpux_sys_readv_args {
- syscallarg(int) fd;
- syscallarg(struct iovec *) iovp;
- syscallarg(u_int) iovcnt;
-};
-
-struct hpux_sys_writev_args {
- syscallarg(int) fd;
- syscallarg(struct iovec *) iovp;
- syscallarg(u_int) iovcnt;
-};
-
-struct hpux_sys_rename_args {
- syscallarg(char *) from;
- syscallarg(char *) to;
-};
-
-struct hpux_sys_truncate_args {
- syscallarg(char *) path;
- syscallarg(long) length;
-};
-
-struct hpux_sys_sysconf_args {
- syscallarg(int) name;
-};
-
-struct hpux_sys_mkdir_args {
- syscallarg(char *) path;
- syscallarg(int) mode;
-};
-
-struct hpux_sys_rmdir_args {
- syscallarg(char *) path;
-};
-
-struct hpux_sys_getrlimit_args {
- syscallarg(u_int) which;
- syscallarg(struct ogetrlimit *) rlp;
-};
-
-struct hpux_sys_setrlimit_args {
- syscallarg(u_int) which;
- syscallarg(struct ogetrlimit *) rlp;
-};
-
-struct hpux_sys_rtprio_args {
- syscallarg(pid_t) pid;
- syscallarg(int) prio;
-};
-
-struct hpux_sys_lockf_args {
- syscallarg(int) fd;
- syscallarg(int) func;
- syscallarg(long) size;
-};
-
-struct hpux_sys_shmctl_args {
- syscallarg(int) shmid;
- syscallarg(int) cmd;
- syscallarg(caddr_t) buf;
-};
-
-struct hpux_sys_getcontext_args {
- syscallarg(char *) buf;
- syscallarg(int) len;
-};
-
-struct hpux_sys_sigprocmask_args {
- syscallarg(int) how;
- syscallarg(hpux_sigset_t *) set;
- syscallarg(hpux_sigset_t *) oset;
-};
-
-struct hpux_sys_sigpending_args {
- syscallarg(hpux_sigset_t *) set;
-};
-
-struct hpux_sys_sigsuspend_args {
- syscallarg(hpux_sigset_t *) set;
-};
-
-struct hpux_sys_sigaction_args {
- syscallarg(int) signo;
- syscallarg(struct hpux_sigaction *) nsa;
- syscallarg(struct hpux_sigaction *) osa;
-};
-
-struct hpux_sys_waitpid_args {
- syscallarg(pid_t) pid;
- syscallarg(int *) status;
- syscallarg(int) options;
- syscallarg(struct rusage *) rusage;
-};
-
-struct hpux_sigsetreturn_args {
- syscallarg(caddr_t) addr;
- syscallarg(int) cookie;
- syscallarg(int) len;
-};
-
-struct hpux_sys_nshmctl_args {
- syscallarg(int) shmid;
- syscallarg(int) cmd;
- syscallarg(caddr_t) buf;
-};
-
-struct hpux_sys_sigaltstack_args {
- syscallarg(const struct hpux_sigaltstack *) nss;
- syscallarg(struct hpux_sigaltstack *) oss;
-};
-
-/*
- * System call prototypes.
- */
-
-int sys_nosys(struct proc *, void *, register_t *);
-int sys_exit(struct proc *, void *, register_t *);
-int hpux_sys_fork(struct proc *, void *, register_t *);
-int hpux_sys_read(struct proc *, void *, register_t *);
-int hpux_sys_write(struct proc *, void *, register_t *);
-int hpux_sys_open(struct proc *, void *, register_t *);
-int sys_close(struct proc *, void *, register_t *);
-int hpux_sys_wait(struct proc *, void *, register_t *);
-int hpux_sys_creat(struct proc *, void *, register_t *);
-int sys_link(struct proc *, void *, register_t *);
-int hpux_sys_unlink(struct proc *, void *, register_t *);
-int hpux_sys_execv(struct proc *, void *, register_t *);
-int hpux_sys_chdir(struct proc *, void *, register_t *);
-int hpux_sys_time_6x(struct proc *, void *, register_t *);
-int hpux_sys_mknod(struct proc *, void *, register_t *);
-int hpux_sys_chmod(struct proc *, void *, register_t *);
-int hpux_sys_chown(struct proc *, void *, register_t *);
-int sys_obreak(struct proc *, void *, register_t *);
-int compat_43_sys_lseek(struct proc *, void *, register_t *);
-int sys_getpid(struct proc *, void *, register_t *);
-int sys_setuid(struct proc *, void *, register_t *);
-int sys_getuid(struct proc *, void *, register_t *);
-int hpux_sys_stime_6x(struct proc *, void *, register_t *);
-#ifdef PTRACE
-int hpux_sys_ptrace(struct proc *, void *, register_t *);
-#else
-#endif
-int hpux_sys_alarm_6x(struct proc *, void *, register_t *);
-int hpux_sys_pause_6x(struct proc *, void *, register_t *);
-int hpux_sys_utime_6x(struct proc *, void *, register_t *);
-int hpux_sys_stty_6x(struct proc *, void *, register_t *);
-int hpux_sys_gtty_6x(struct proc *, void *, register_t *);
-int hpux_sys_access(struct proc *, void *, register_t *);
-int hpux_sys_nice_6x(struct proc *, void *, register_t *);
-int hpux_sys_ftime_6x(struct proc *, void *, register_t *);
-int sys_sync(struct proc *, void *, register_t *);
-int hpux_sys_kill(struct proc *, void *, register_t *);
-int hpux_sys_stat(struct proc *, void *, register_t *);
-int hpux_sys_setpgrp_6x(struct proc *, void *, register_t *);
-int hpux_sys_lstat(struct proc *, void *, register_t *);
-int sys_dup(struct proc *, void *, register_t *);
-int sys_opipe(struct proc *, void *, register_t *);
-int hpux_sys_times_6x(struct proc *, void *, register_t *);
-int sys_profil(struct proc *, void *, register_t *);
-int sys_setgid(struct proc *, void *, register_t *);
-int sys_getgid(struct proc *, void *, register_t *);
-int hpux_sys_ioctl(struct proc *, void *, register_t *);
-int hpux_sys_symlink(struct proc *, void *, register_t *);
-int hpux_sys_utssys(struct proc *, void *, register_t *);
-int hpux_sys_readlink(struct proc *, void *, register_t *);
-int hpux_sys_execve(struct proc *, void *, register_t *);
-int sys_umask(struct proc *, void *, register_t *);
-int sys_chroot(struct proc *, void *, register_t *);
-int hpux_sys_fcntl(struct proc *, void *, register_t *);
-int hpux_sys_ulimit(struct proc *, void *, register_t *);
-int hpux_sys_vfork(struct proc *, void *, register_t *);
-int hpux_sys_mmap(struct proc *, void *, register_t *);
-int sys_munmap(struct proc *, void *, register_t *);
-int sys_mprotect(struct proc *, void *, register_t *);
-int sys_madvise(struct proc *, void *, register_t *);
-int sys_getgroups(struct proc *, void *, register_t *);
-int sys_setgroups(struct proc *, void *, register_t *);
-int sys_getpgid(struct proc *, void *, register_t *);
-int hpux_sys_setpgrp2(struct proc *, void *, register_t *);
-int sys_setitimer(struct proc *, void *, register_t *);
-int hpux_sys_wait3(struct proc *, void *, register_t *);
-int sys_getitimer(struct proc *, void *, register_t *);
-int sys_dup2(struct proc *, void *, register_t *);
-int hpux_sys_fstat(struct proc *, void *, register_t *);
-int sys_select(struct proc *, void *, register_t *);
-int sys_fsync(struct proc *, void *, register_t *);
-int sys_setpriority(struct proc *, void *, register_t *);
-int sys_getpriority(struct proc *, void *, register_t *);
-int hpux_sys_sigvec(struct proc *, void *, register_t *);
-int hpux_sys_sigblock(struct proc *, void *, register_t *);
-int hpux_sys_sigsetmask(struct proc *, void *, register_t *);
-int hpux_sys_sigpause(struct proc *, void *, register_t *);
-int compat_43_sys_sigstack(struct proc *, void *, register_t *);
-int sys_gettimeofday(struct proc *, void *, register_t *);
-int hpux_sys_readv(struct proc *, void *, register_t *);
-int hpux_sys_writev(struct proc *, void *, register_t *);
-int sys_settimeofday(struct proc *, void *, register_t *);
-int sys_fchown(struct proc *, void *, register_t *);
-int sys_fchmod(struct proc *, void *, register_t *);
-int sys_setresuid(struct proc *, void *, register_t *);
-int sys_setresgid(struct proc *, void *, register_t *);
-int hpux_sys_rename(struct proc *, void *, register_t *);
-int hpux_sys_truncate(struct proc *, void *, register_t *);
-int compat_43_sys_ftruncate(struct proc *, void *, register_t *);
-int hpux_sys_sysconf(struct proc *, void *, register_t *);
-int hpux_sys_mkdir(struct proc *, void *, register_t *);
-int hpux_sys_rmdir(struct proc *, void *, register_t *);
-int hpux_sys_getrlimit(struct proc *, void *, register_t *);
-int hpux_sys_setrlimit(struct proc *, void *, register_t *);
-int hpux_sys_rtprio(struct proc *, void *, register_t *);
-int hpux_sys_lockf(struct proc *, void *, register_t *);
-#ifdef SYSVSEM
-int sys_semget(struct proc *, void *, register_t *);
-int sys___semctl(struct proc *, void *, register_t *);
-int sys_semop(struct proc *, void *, register_t *);
-#else
-#endif
-#ifdef SYSVMSG
-int sys_msgget(struct proc *, void *, register_t *);
-int sys_msgctl(struct proc *, void *, register_t *);
-int sys_msgsnd(struct proc *, void *, register_t *);
-int sys_msgrcv(struct proc *, void *, register_t *);
-#else
-#endif
-#ifdef SYSVSHM
-int sys_shmget(struct proc *, void *, register_t *);
-int hpux_sys_shmctl(struct proc *, void *, register_t *);
-int sys_shmat(struct proc *, void *, register_t *);
-int sys_shmdt(struct proc *, void *, register_t *);
-#else
-#endif
-int hpux_sys_getcontext(struct proc *, void *, register_t *);
-int hpux_sys_sigprocmask(struct proc *, void *, register_t *);
-int hpux_sys_sigpending(struct proc *, void *, register_t *);
-int hpux_sys_sigsuspend(struct proc *, void *, register_t *);
-int hpux_sys_sigaction(struct proc *, void *, register_t *);
-int compat_09_sys_getdomainname(struct proc *, void *, register_t *);
-int compat_09_sys_setdomainname(struct proc *, void *, register_t *);
-int compat_43_sys_getdirentries(struct proc *, void *, register_t *);
-int hpux_sys_waitpid(struct proc *, void *, register_t *);
-int hpux_sigsetreturn(struct proc *, void *, register_t *);
-int sys_poll(struct proc *, void *, register_t *);
-int sys_fchdir(struct proc *, void *, register_t *);
-int compat_43_sys_accept(struct proc *, void *, register_t *);
-int sys_bind(struct proc *, void *, register_t *);
-int sys_connect(struct proc *, void *, register_t *);
-int sys_getpeername(struct proc *, void *, register_t *);
-int sys_getsockname(struct proc *, void *, register_t *);
-int sys_getsockopt(struct proc *, void *, register_t *);
-int sys_listen(struct proc *, void *, register_t *);
-int compat_43_sys_recv(struct proc *, void *, register_t *);
-int compat_43_sys_recvfrom(struct proc *, void *, register_t *);
-int compat_43_sys_recvmsg(struct proc *, void *, register_t *);
-int compat_43_sys_send(struct proc *, void *, register_t *);
-int compat_43_sys_sendmsg(struct proc *, void *, register_t *);
-int sys_sendto(struct proc *, void *, register_t *);
-int sys_setsockopt(struct proc *, void *, register_t *);
-int sys_shutdown(struct proc *, void *, register_t *);
-int sys_socket(struct proc *, void *, register_t *);
-int sys_socketpair(struct proc *, void *, register_t *);
-#ifdef SYSVSEM
-int sys___semctl(struct proc *, void *, register_t *);
-#else
-#endif
-#ifdef SYSVMSG
-int sys_msgctl(struct proc *, void *, register_t *);
-#else
-#endif
-#ifdef SYSVSHM
-int hpux_sys_nshmctl(struct proc *, void *, register_t *);
-#else
-#endif
-int sys_msync(struct proc *, void *, register_t *);
-int sys_lchown(struct proc *, void *, register_t *);
-int sys_nanosleep(struct proc *, void *, register_t *);
-int hpux_sys_sigaltstack(struct proc *, void *, register_t *);
-int sys_mlock(struct proc *, void *, register_t *);
-int sys_munlock(struct proc *, void *, register_t *);
-int sys_mlockall(struct proc *, void *, register_t *);
-int sys_munlockall(struct proc *, void *, register_t *);
diff --git a/sys/compat/hpux/hppa/hpux_syscalls.c b/sys/compat/hpux/hppa/hpux_syscalls.c
deleted file mode 100644
index d6f09a9ab9a..00000000000
--- a/sys/compat/hpux/hppa/hpux_syscalls.c
+++ /dev/null
@@ -1,573 +0,0 @@
-/* $OpenBSD: hpux_syscalls.c,v 1.10 2010/01/28 19:59:35 miod Exp $ */
-
-/*
- * System call names.
- *
- * DO NOT EDIT-- this file is automatically generated.
- * created from OpenBSD: syscalls.master,v 1.9 2010/01/28 19:59:09 miod Exp
- */
-
-char *hpux_syscallnames[] = {
- "syscall", /* 0 = syscall */
- "exit", /* 1 = exit */
- "fork", /* 2 = fork */
- "read", /* 3 = read */
- "write", /* 4 = write */
- "open", /* 5 = open */
- "close", /* 6 = close */
- "wait", /* 7 = wait */
- "creat", /* 8 = creat */
- "link", /* 9 = link */
- "unlink", /* 10 = unlink */
- "execv", /* 11 = execv */
- "chdir", /* 12 = chdir */
- "time_6x", /* 13 = time_6x */
- "mknod", /* 14 = mknod */
- "chmod", /* 15 = chmod */
- "chown", /* 16 = chown */
- "obreak", /* 17 = obreak */
- "#18 (unimplemented lchmod)", /* 18 = unimplemented lchmod */
- "lseek", /* 19 = lseek */
- "getpid", /* 20 = getpid */
- "#21 (unimplemented mount)", /* 21 = unimplemented mount */
- "#22 (unimplemented umount)", /* 22 = unimplemented umount */
- "setuid", /* 23 = setuid */
- "getuid", /* 24 = getuid */
- "stime_6x", /* 25 = stime_6x */
-#ifdef PTRACE
- "ptrace", /* 26 = ptrace */
-#else
- "#26 (unimplemented ptrace)", /* 26 = unimplemented ptrace */
-#endif
- "alarm_6x", /* 27 = alarm_6x */
- "#28 (unimplemented cnx_lw_pmon_read)", /* 28 = unimplemented cnx_lw_pmon_read */
- "pause_6x", /* 29 = pause_6x */
- "utime_6x", /* 30 = utime_6x */
- "stty_6x", /* 31 = stty_6x */
- "gtty_6x", /* 32 = gtty_6x */
- "access", /* 33 = access */
- "nice_6x", /* 34 = nice_6x */
- "ftime_6x", /* 35 = ftime_6x */
- "sync", /* 36 = sync */
- "kill", /* 37 = kill */
- "stat", /* 38 = stat */
- "setpgrp_6x", /* 39 = setpgrp_6x */
- "lstat", /* 40 = lstat */
- "dup", /* 41 = dup */
- "opipe", /* 42 = opipe */
- "times_6x", /* 43 = times_6x */
- "profil", /* 44 = profil */
- "#45 (unimplemented ki_syscall)", /* 45 = unimplemented ki_syscall */
- "setgid", /* 46 = setgid */
- "getgid", /* 47 = getgid */
- "#48 (unimplemented)", /* 48 = unimplemented */
- "#49 (unimplemented reserved for USG)", /* 49 = unimplemented reserved for USG */
- "#50 (unimplemented reserved for USG)", /* 50 = unimplemented reserved for USG */
- "#51 (unimplemented acct)", /* 51 = unimplemented acct */
- "#52 (unimplemented set_userthreadid)", /* 52 = unimplemented set_userthreadid */
- "#53 (unimplemented lwp_mutex_unlock_2)", /* 53 = unimplemented lwp_mutex_unlock_2 */
- "ioctl", /* 54 = ioctl */
- "#55 (unimplemented reboot)", /* 55 = unimplemented reboot */
- "symlink", /* 56 = symlink */
- "utssys", /* 57 = utssys */
- "readlink", /* 58 = readlink */
- "execve", /* 59 = execve */
- "umask", /* 60 = umask */
- "chroot", /* 61 = chroot */
- "fcntl", /* 62 = fcntl */
- "ulimit", /* 63 = ulimit */
- "#64 (unimplemented)", /* 64 = unimplemented */
- "#65 (unimplemented)", /* 65 = unimplemented */
- "vfork", /* 66 = vfork */
- "#67 (unimplemented lwp_getprivate)", /* 67 = unimplemented lwp_getprivate */
- "#68 (unimplemented lwp_setprivate)", /* 68 = unimplemented lwp_setprivate */
- "#69 (unimplemented)", /* 69 = unimplemented */
- "#70 (unimplemented)", /* 70 = unimplemented */
- "mmap", /* 71 = mmap */
- "#72 (unimplemented)", /* 72 = unimplemented */
- "munmap", /* 73 = munmap */
- "mprotect", /* 74 = mprotect */
- "madvise", /* 75 = madvise */
- "#76 (unimplemented vhangup)", /* 76 = unimplemented vhangup */
- "#77 (unimplemented swapoff)", /* 77 = unimplemented swapoff */
- "#78 (unimplemented)", /* 78 = unimplemented */
- "getgroups", /* 79 = getgroups */
- "setgroups", /* 80 = setgroups */
- "getpgid", /* 81 = getpgid */
- "setpgrp2", /* 82 = setpgrp2 */
- "setitimer", /* 83 = setitimer */
- "wait3", /* 84 = wait3 */
- "#85 (unimplemented swapon)", /* 85 = unimplemented swapon */
- "getitimer", /* 86 = getitimer */
- "#87 (unimplemented)", /* 87 = unimplemented */
- "#88 (unimplemented)", /* 88 = unimplemented */
- "#89 (unimplemented)", /* 89 = unimplemented */
- "dup2", /* 90 = dup2 */
- "#91 (unimplemented)", /* 91 = unimplemented */
- "fstat", /* 92 = fstat */
- "select", /* 93 = select */
- "#94 (unimplemented)", /* 94 = unimplemented */
- "fsync", /* 95 = fsync */
- "setpriority", /* 96 = setpriority */
- "#97 (unimplemented)", /* 97 = unimplemented */
- "#98 (unimplemented)", /* 98 = unimplemented */
- "#99 (unimplemented)", /* 99 = unimplemented */
- "getpriority", /* 100 = getpriority */
- "#101 (unimplemented)", /* 101 = unimplemented */
- "#102 (unimplemented)", /* 102 = unimplemented */
- "#103 (unimplemented lf_send)", /* 103 = unimplemented lf_send */
- "#104 (unimplemented)", /* 104 = unimplemented */
- "#105 (unimplemented)", /* 105 = unimplemented */
- "#106 (unimplemented)", /* 106 = unimplemented */
- "#107 (unimplemented)", /* 107 = unimplemented */
- "sigvec", /* 108 = sigvec */
- "sigblock", /* 109 = sigblock */
- "sigsetmask", /* 110 = sigsetmask */
- "sigpause", /* 111 = sigpause */
- "sigstack", /* 112 = sigstack */
- "#113 (unimplemented)", /* 113 = unimplemented */
- "#114 (unimplemented)", /* 114 = unimplemented */
- "#115 (unimplemented regctl)", /* 115 = unimplemented regctl */
- "gettimeofday", /* 116 = gettimeofday */
- "#117 (unimplemented getrusage)", /* 117 = unimplemented getrusage */
- "#118 (unimplemented)", /* 118 = unimplemented */
- "#119 (unimplemented)", /* 119 = unimplemented */
- "readv", /* 120 = readv */
- "writev", /* 121 = writev */
- "settimeofday", /* 122 = settimeofday */
- "fchown", /* 123 = fchown */
- "fchmod", /* 124 = fchmod */
- "#125 (unimplemented)", /* 125 = unimplemented */
- "setresuid", /* 126 = setresuid */
- "setresgid", /* 127 = setresgid */
- "rename", /* 128 = rename */
- "truncate", /* 129 = truncate */
- "ftruncate", /* 130 = ftruncate */
- "#131 (unimplemented)", /* 131 = unimplemented */
- "sysconf", /* 132 = sysconf */
- "#133 (unimplemented)", /* 133 = unimplemented */
- "#134 (unimplemented)", /* 134 = unimplemented */
- "#135 (unimplemented)", /* 135 = unimplemented */
- "mkdir", /* 136 = mkdir */
- "rmdir", /* 137 = rmdir */
- "#138 (unimplemented)", /* 138 = unimplemented */
- "#139 (unimplemented sigcleanup)", /* 139 = unimplemented sigcleanup */
- "#140 (unimplemented setcore)", /* 140 = unimplemented setcore */
- "#141 (unimplemented)", /* 141 = unimplemented */
- "#142 (unimplemented)", /* 142 = unimplemented */
- "#143 (unimplemented)", /* 143 = unimplemented */
- "getrlimit", /* 144 = getrlimit */
- "setrlimit", /* 145 = setrlimit */
- "#146 (unimplemented)", /* 146 = unimplemented */
- "#147 (unimplemented lwp_self)", /* 147 = unimplemented lwp_self */
- "#148 (unimplemented quotactl)", /* 148 = unimplemented quotactl */
- "#149 (unimplemented get_sysinfo)", /* 149 = unimplemented get_sysinfo */
- "#150 (unimplemented)", /* 150 = unimplemented */
- "#151 (unimplemented privgrp)", /* 151 = unimplemented privgrp */
- "rtprio", /* 152 = rtprio */
- "#153 (unimplemented plock)", /* 153 = unimplemented plock */
- "#154 (unimplemented lf_next_scn)", /* 154 = unimplemented lf_next_scn */
- "lockf", /* 155 = lockf */
-#ifdef SYSVSEM
- "semget", /* 156 = semget */
- "__semctl", /* 157 = __semctl */
- "semop", /* 158 = semop */
-#else
- "#156 (unimplemented semget)", /* 156 = unimplemented semget */
- "#157 (unimplemented semctl)", /* 157 = unimplemented semctl */
- "#158 (unimplemented semop)", /* 158 = unimplemented semop */
-#endif
-#ifdef SYSVMSG
- "msgget", /* 159 = msgget */
- "msgctl", /* 160 = msgctl */
- "msgsnd", /* 161 = msgsnd */
- "msgrcv", /* 162 = msgrcv */
-#else
- "#159 (unimplemented msgget)", /* 159 = unimplemented msgget */
- "#160 (unimplemented msgctl)", /* 160 = unimplemented msgctl */
- "#161 (unimplemented msgsnd)", /* 161 = unimplemented msgsnd */
- "#162 (unimplemented msgrcv)", /* 162 = unimplemented msgrcv */
-#endif
-#ifdef SYSVSHM
- "shmget", /* 163 = shmget */
- "shmctl", /* 164 = shmctl */
- "shmat", /* 165 = shmat */
- "shmdt", /* 166 = shmdt */
-#else
- "#163 (unimplemented shmget)", /* 163 = unimplemented shmget */
- "#164 (unimplemented shmctl)", /* 164 = unimplemented shmctl */
- "#165 (unimplemented shmat)", /* 165 = unimplemented shmat */
- "#166 (unimplemented shmdt)", /* 166 = unimplemented shmdt */
-#endif
- "#167 (unimplemented set_mem_window)", /* 167 = unimplemented set_mem_window */
- "#168 (unimplemented nsp_init)", /* 168 = unimplemented nsp_init */
- "#169 (unimplemented)", /* 169 = unimplemented */
- "#170 (unimplemented mkrnod)", /* 170 = unimplemented mkrnod */
- "#171 (unimplemented test)", /* 171 = unimplemented test */
- "#172 (unimplemented unsp_open)", /* 172 = unimplemented unsp_open */
- "#173 (unimplemented)", /* 173 = unimplemented */
- "getcontext", /* 174 = getcontext */
- "#175 (unimplemented osetcontext)", /* 175 = unimplemented osetcontext */
- "#176 (unimplemented bigio)", /* 176 = unimplemented bigio */
- "#177 (unimplemented pipenode)", /* 177 = unimplemented pipenode */
- "#178 (unimplemented lsync)", /* 178 = unimplemented lsync */
- "#179 (unimplemented)", /* 179 = unimplemented */
- "#180 (unimplemented mysite)", /* 180 = unimplemented mysite */
- "#181 (unimplemented sitels)", /* 181 = unimplemented sitels */
- "#182 (unimplemented swapclients)", /* 182 = unimplemented swapclients */
- "#183 (unimplemented rmtprocess)", /* 183 = unimplemented rmtprocess */
- "#184 (unimplemented dskless_stats)", /* 184 = unimplemented dskless_stats */
- "sigprocmask", /* 185 = sigprocmask */
- "sigpending", /* 186 = sigpending */
- "sigsuspend", /* 187 = sigsuspend */
- "sigaction", /* 188 = sigaction */
- "#189 (unimplemented lw_get_thread_times)", /* 189 = unimplemented lw_get_thread_times */
- "#190 (unimplemented nfssvc)", /* 190 = unimplemented nfssvc */
- "#191 (unimplemented getfh)", /* 191 = unimplemented getfh */
- "getdomainname", /* 192 = getdomainname */
- "setdomainname", /* 193 = setdomainname */
- "#194 (unimplemented async_daemon)", /* 194 = unimplemented async_daemon */
- "getdirentries", /* 195 = getdirentries */
- "#196 (unimplemented statfs)", /* 196 = unimplemented statfs */
- "#197 (unimplemented fstatfs)", /* 197 = unimplemented fstatfs */
- "#198 (unimplemented vfsmount)", /* 198 = unimplemented vfsmount */
- "#199 (unimplemented qmml)", /* 199 = unimplemented qmml */
- "waitpid", /* 200 = waitpid */
- "#201 (unimplemented)", /* 201 = unimplemented */
- "#202 (unimplemented)", /* 202 = unimplemented */
- "#203 (unimplemented)", /* 203 = unimplemented */
- "#204 (unimplemented)", /* 204 = unimplemented */
- "#205 (unimplemented)", /* 205 = unimplemented */
- "#206 (unimplemented)", /* 206 = unimplemented */
- "#207 (unimplemented)", /* 207 = unimplemented */
- "#208 (unimplemented)", /* 208 = unimplemented */
- "#209 (unimplemented)", /* 209 = unimplemented */
- "#210 (unimplemented)", /* 210 = unimplemented */
- "#211 (unimplemented)", /* 211 = unimplemented */
- "#212 (unimplemented)", /* 212 = unimplemented */
- "#213 (unimplemented)", /* 213 = unimplemented */
- "#214 (unimplemented)", /* 214 = unimplemented */
- "#215 (unimplemented)", /* 215 = unimplemented */
- "#216 (unimplemented)", /* 216 = unimplemented */
- "#217 (unimplemented)", /* 217 = unimplemented */
- "#218 (unimplemented)", /* 218 = unimplemented */
- "#219 (unimplemented)", /* 219 = unimplemented */
- "#220 (unimplemented)", /* 220 = unimplemented */
- "#221 (unimplemented)", /* 221 = unimplemented */
- "#222 (unimplemented)", /* 222 = unimplemented */
- "#223 (unimplemented)", /* 223 = unimplemented */
- "hpux_sigsetreturn", /* 224 = hpux_sigsetreturn */
- "#225 (unimplemented sigsetstatemask)", /* 225 = unimplemented sigsetstatemask */
- "#226 (unimplemented)", /* 226 = unimplemented */
- "#227 (unimplemented cs)", /* 227 = unimplemented cs */
- "#228 (unimplemented cds)", /* 228 = unimplemented cds */
- "#229 (unimplemented set_no_trunc)", /* 229 = unimplemented set_no_trunc */
- "#230 (unimplemented pathconf)", /* 230 = unimplemented pathconf */
- "#231 (unimplemented fpathconf)", /* 231 = unimplemented fpathconf */
- "#232 (unimplemented)", /* 232 = unimplemented */
- "#233 (unimplemented)", /* 233 = unimplemented */
- "#234 (unimplemented nfs_fcntl)", /* 234 = unimplemented nfs_fcntl */
- "#235 (unimplemented ogetacl)", /* 235 = unimplemented ogetacl */
- "#236 (unimplemented ofgetctl)", /* 236 = unimplemented ofgetctl */
- "#237 (unimplemented osetacl)", /* 237 = unimplemented osetacl */
- "#238 (unimplemented ofsetacl)", /* 238 = unimplemented ofsetacl */
- "#239 (unimplemented pstat)", /* 239 = unimplemented pstat */
- "#240 (unimplemented getaudid)", /* 240 = unimplemented getaudid */
- "#241 (unimplemented setaudid)", /* 241 = unimplemented setaudid */
- "#242 (unimplemented getaudproc)", /* 242 = unimplemented getaudproc */
- "#243 (unimplemented setaudproc)", /* 243 = unimplemented setaudproc */
- "#244 (unimplemented getevent)", /* 244 = unimplemented getevent */
- "#245 (unimplemented setevent)", /* 245 = unimplemented setevent */
- "#246 (unimplemented audwrite)", /* 246 = unimplemented audwrite */
- "#247 (unimplemented audswitch)", /* 247 = unimplemented audswitch */
- "#248 (unimplemented audctl)", /* 248 = unimplemented audctl */
- "#249 (unimplemented ogetaccess)", /* 249 = unimplemented ogetaccess */
- "#250 (unimplemented fsctl)", /* 250 = unimplemented fsctl */
- "#251 (unimplemented)", /* 251 = unimplemented */
- "#252 (unimplemented getmount_entries)", /* 252 = unimplemented getmount_entries */
- "#253 (unimplemented lwp_mutex_init2)", /* 253 = unimplemented lwp_mutex_init2 */
- "#254 (unimplemented)", /* 254 = unimplemented */
- "#255 (unimplemented)", /* 255 = unimplemented */
- "#256 (unimplemented)", /* 256 = unimplemented */
- "#257 (unimplemented)", /* 257 = unimplemented */
- "#258 (unimplemented)", /* 258 = unimplemented */
- "#259 (unimplemented swapfs)", /* 259 = unimplemented swapfs */
- "#260 (unimplemented fss)", /* 260 = unimplemented fss */
- "#261 (unimplemented)", /* 261 = unimplemented */
- "#262 (unimplemented)", /* 262 = unimplemented */
- "#263 (unimplemented)", /* 263 = unimplemented */
- "#264 (unimplemented)", /* 264 = unimplemented */
- "#265 (unimplemented)", /* 265 = unimplemented */
- "#266 (unimplemented)", /* 266 = unimplemented */
- "#267 (unimplemented tsync)", /* 267 = unimplemented tsync */
- "#268 (unimplemented getnumfds)", /* 268 = unimplemented getnumfds */
- "poll", /* 269 = poll */
- "#270 (unimplemented getmsg)", /* 270 = unimplemented getmsg */
- "#271 (unimplemented putmsg)", /* 271 = unimplemented putmsg */
- "fchdir", /* 272 = fchdir */
- "#273 (unimplemented getmount_cnt)", /* 273 = unimplemented getmount_cnt */
- "#274 (unimplemented getmount_entry)", /* 274 = unimplemented getmount_entry */
- "accept", /* 275 = accept */
- "bind", /* 276 = bind */
- "connect", /* 277 = connect */
- "getpeername", /* 278 = getpeername */
- "getsockname", /* 279 = getsockname */
- "getsockopt", /* 280 = getsockopt */
- "listen", /* 281 = listen */
- "recv", /* 282 = recv */
- "recvfrom", /* 283 = recvfrom */
- "recvmsg", /* 284 = recvmsg */
- "send", /* 285 = send */
- "sendmsg", /* 286 = sendmsg */
- "sendto", /* 287 = sendto */
- "setsockopt", /* 288 = setsockopt */
- "shutdown", /* 289 = shutdown */
- "socket", /* 290 = socket */
- "socketpair", /* 291 = socketpair */
- "#292 (unimplemented proc_open)", /* 292 = unimplemented proc_open */
- "#293 (unimplemented proc_close)", /* 293 = unimplemented proc_close */
- "#294 (unimplemented proc_send)", /* 294 = unimplemented proc_send */
- "#295 (unimplemented proc_recv)", /* 295 = unimplemented proc_recv */
- "#296 (unimplemented proc_sendrecv)", /* 296 = unimplemented proc_sendrecv */
- "#297 (unimplemented proc_syscall)", /* 297 = unimplemented proc_syscall */
- "#298 (unimplemented)", /* 298 = unimplemented */
- "#299 (unimplemented)", /* 299 = unimplemented */
- "#300 (unimplemented)", /* 300 = unimplemented */
- "#301 (unimplemented)", /* 301 = unimplemented */
- "#302 (unimplemented)", /* 302 = unimplemented */
- "#303 (unimplemented)", /* 303 = unimplemented */
- "#304 (unimplemented)", /* 304 = unimplemented */
- "#305 (unimplemented)", /* 305 = unimplemented */
- "#306 (unimplemented)", /* 306 = unimplemented */
- "#307 (unimplemented)", /* 307 = unimplemented */
- "#308 (unimplemented)", /* 308 = unimplemented */
- "#309 (unimplemented)", /* 309 = unimplemented */
- "#310 (unimplemented)", /* 310 = unimplemented */
- "#311 (unimplemented)", /* 311 = unimplemented */
-#ifdef SYSVSEM
- "nsemctl", /* 312 = nsemctl */
-#else
- "#312 (unimplemented semctl)", /* 312 = unimplemented semctl */
-#endif
-#ifdef SYSVMSG
- "nmsgctl", /* 313 = nmsgctl */
-#else
- "#313 (unimplemented msgctl)", /* 313 = unimplemented msgctl */
-#endif
-#ifdef SYSVSHM
- "nshmctl", /* 314 = nshmctl */
-#else
- "#314 (unimplemented shmctl)", /* 314 = unimplemented shmctl */
-#endif
- "#315 (unimplemented mpctl)", /* 315 = unimplemented mpctl */
- "#316 (unimplemented exportfs)", /* 316 = unimplemented exportfs */
- "#317 (unimplemented getpmsg)", /* 317 = unimplemented getpmsg */
- "#318 (unimplemented putpmsg)", /* 318 = unimplemented putpmsg */
- "#319 (unimplemented)", /* 319 = unimplemented */
- "msync", /* 320 = msync */
- "#321 (unimplemented msleep)", /* 321 = unimplemented msleep */
- "#322 (unimplemented mwakeup)", /* 322 = unimplemented mwakeup */
- "#323 (unimplemented msem_init)", /* 323 = unimplemented msem_init */
- "#324 (unimplemented msem_remove)", /* 324 = unimplemented msem_remove */
- "#325 (unimplemented adjtime)", /* 325 = unimplemented adjtime */
- "#326 (unimplemented kload)", /* 326 = unimplemented kload */
- "#327 (unimplemented fattach)", /* 327 = unimplemented fattach */
- "#328 (unimplemented fdetach)", /* 328 = unimplemented fdetach */
- "#329 (unimplemented serialize)", /* 329 = unimplemented serialize */
- "#330 (unimplemented statvfs)", /* 330 = unimplemented statvfs */
- "#331 (unimplemented fstatvfs)", /* 331 = unimplemented fstatvfs */
- "lchown", /* 332 = lchown */
- "#333 (unimplemented getsid)", /* 333 = unimplemented getsid */
- "#334 (unimplemented sysfs)", /* 334 = unimplemented sysfs */
- "#335 (unimplemented)", /* 335 = unimplemented */
- "#336 (unimplemented)", /* 336 = unimplemented */
- "#337 (unimplemented sched_setparam)", /* 337 = unimplemented sched_setparam */
- "#338 (unimplemented sched_getparam)", /* 338 = unimplemented sched_getparam */
- "#339 (unimplemented sched_setscheduler)", /* 339 = unimplemented sched_setscheduler */
- "#340 (unimplemented sched_getscheduler)", /* 340 = unimplemented sched_getscheduler */
- "#341 (unimplemented sched_yield)", /* 341 = unimplemented sched_yield */
- "#342 (unimplemented sched_get_priority_max)", /* 342 = unimplemented sched_get_priority_max */
- "#343 (unimplemented sched_get_priority_min)", /* 343 = unimplemented sched_get_priority_min */
- "#344 (unimplemented sched_rr_get_interval)", /* 344 = unimplemented sched_rr_get_interval */
- "#345 (unimplemented clock_settime)", /* 345 = unimplemented clock_settime */
- "#346 (unimplemented clock_gettime)", /* 346 = unimplemented clock_gettime */
- "#347 (unimplemented clock_getres)", /* 347 = unimplemented clock_getres */
- "#348 (unimplemented timer_create)", /* 348 = unimplemented timer_create */
- "#349 (unimplemented timer_delete)", /* 349 = unimplemented timer_delete */
- "#350 (unimplemented timer_settime)", /* 350 = unimplemented timer_settime */
- "#351 (unimplemented timer_gettime)", /* 351 = unimplemented timer_gettime */
- "#352 (unimplemented timer_getoverrun)", /* 352 = unimplemented timer_getoverrun */
- "nanosleep", /* 353 = nanosleep */
- "#354 (unimplemented toolbox)", /* 354 = unimplemented toolbox */
- "#355 (unimplemented)", /* 355 = unimplemented */
- "#356 (unimplemented getdents)", /* 356 = unimplemented getdents */
- "#357 (unimplemented getcontext)", /* 357 = unimplemented getcontext */
- "#358 (unimplemented sysinfo)", /* 358 = unimplemented sysinfo */
- "#359 (unimplemented fcntl64)", /* 359 = unimplemented fcntl64 */
- "#360 (unimplemented ftruncate64)", /* 360 = unimplemented ftruncate64 */
- "#361 (unimplemented fstat64)", /* 361 = unimplemented fstat64 */
- "#362 (unimplemented getdirentries64)", /* 362 = unimplemented getdirentries64 */
- "#363 (unimplemented getrlimit64)", /* 363 = unimplemented getrlimit64 */
- "#364 (unimplemented lockf64)", /* 364 = unimplemented lockf64 */
- "#365 (unimplemented lseek64)", /* 365 = unimplemented lseek64 */
- "#366 (unimplemented lstat64)", /* 366 = unimplemented lstat64 */
- "#367 (unimplemented mmap64)", /* 367 = unimplemented mmap64 */
- "#368 (unimplemented setrlimit64)", /* 368 = unimplemented setrlimit64 */
- "#369 (unimplemented stat64)", /* 369 = unimplemented stat64 */
- "#370 (unimplemented truncate64)", /* 370 = unimplemented truncate64 */
- "#371 (unimplemented ulimit64)", /* 371 = unimplemented ulimit64 */
- "#372 (unimplemented pread)", /* 372 = unimplemented pread */
- "#373 (unimplemented preadv)", /* 373 = unimplemented preadv */
- "#374 (unimplemented pwrite)", /* 374 = unimplemented pwrite */
- "#375 (unimplemented pwritev)", /* 375 = unimplemented pwritev */
- "#376 (unimplemented pread64)", /* 376 = unimplemented pread64 */
- "#377 (unimplemented preadv64)", /* 377 = unimplemented preadv64 */
- "#378 (unimplemented pwrite64)", /* 378 = unimplemented pwrite64 */
- "#379 (unimplemented pwritev64)", /* 379 = unimplemented pwritev64 */
- "#380 (unimplemented setcontext)", /* 380 = unimplemented setcontext */
- "sigaltstack", /* 381 = sigaltstack */
- "#382 (unimplemented waitid)", /* 382 = unimplemented waitid */
- "#383 (unimplemented setpgrp)", /* 383 = unimplemented setpgrp */
- "#384 (unimplemented recvmsg2)", /* 384 = unimplemented recvmsg2 */
- "#385 (unimplemented sendmsg2)", /* 385 = unimplemented sendmsg2 */
- "#386 (unimplemented socket2)", /* 386 = unimplemented socket2 */
- "#387 (unimplemented socketpair2)", /* 387 = unimplemented socketpair2 */
- "#388 (unimplemented setregid)", /* 388 = unimplemented setregid */
- "#389 (unimplemented lwp_create)", /* 389 = unimplemented lwp_create */
- "#390 (unimplemented lwp_terminate)", /* 390 = unimplemented lwp_terminate */
- "#391 (unimplemented lwp_wait)", /* 391 = unimplemented lwp_wait */
- "#392 (unimplemented lwp_suspend)", /* 392 = unimplemented lwp_suspend */
- "#393 (unimplemented lwp_resume)", /* 393 = unimplemented lwp_resume */
- "#394 (unimplemented)", /* 394 = unimplemented */
- "#395 (unimplemented lwp_abort_syscall)", /* 395 = unimplemented lwp_abort_syscall */
- "#396 (unimplemented lwp_info)", /* 396 = unimplemented lwp_info */
- "#397 (unimplemented lwp_kill)", /* 397 = unimplemented lwp_kill */
- "#398 (unimplemented ksleep)", /* 398 = unimplemented ksleep */
- "#399 (unimplemented kwakeup)", /* 399 = unimplemented kwakeup */
- "#400 (unimplemented)", /* 400 = unimplemented */
- "#401 (unimplemented pstat_getlwp)", /* 401 = unimplemented pstat_getlwp */
- "#402 (unimplemented lwp_exit)", /* 402 = unimplemented lwp_exit */
- "#403 (unimplemented lwp_continue)", /* 403 = unimplemented lwp_continue */
- "#404 (unimplemented getacl)", /* 404 = unimplemented getacl */
- "#405 (unimplemented fgetacl)", /* 405 = unimplemented fgetacl */
- "#406 (unimplemented setacl)", /* 406 = unimplemented setacl */
- "#407 (unimplemented fsetacl)", /* 407 = unimplemented fsetacl */
- "#408 (unimplemented getaccess)", /* 408 = unimplemented getaccess */
- "#409 (unimplemented lwp_mutex_init)", /* 409 = unimplemented lwp_mutex_init */
- "#410 (unimplemented lwp_mutex_lock_sys)", /* 410 = unimplemented lwp_mutex_lock_sys */
- "#411 (unimplemented lwp_mutex_unlock)", /* 411 = unimplemented lwp_mutex_unlock */
- "#412 (unimplemented lwp_cond_init)", /* 412 = unimplemented lwp_cond_init */
- "#413 (unimplemented lwp_cond_signal)", /* 413 = unimplemented lwp_cond_signal */
- "#414 (unimplemented lwp_cond_broadcast)", /* 414 = unimplemented lwp_cond_broadcast */
- "#415 (unimplemented lwp_cond_wait_sys)", /* 415 = unimplemented lwp_cond_wait_sys */
- "#416 (unimplemented lwp_getscheduler)", /* 416 = unimplemented lwp_getscheduler */
- "#417 (unimplemented lwp_setscheduler)", /* 417 = unimplemented lwp_setscheduler */
- "#418 (unimplemented lwp_getstate)", /* 418 = unimplemented lwp_getstate */
- "#419 (unimplemented lwp_setstate)", /* 419 = unimplemented lwp_setstate */
- "#420 (unimplemented lwp_detach)", /* 420 = unimplemented lwp_detach */
- "mlock", /* 421 = mlock */
- "munlock", /* 422 = munlock */
- "mlockall", /* 423 = mlockall */
- "munlockall", /* 424 = munlockall */
- "#425 (unimplemented shm_open)", /* 425 = unimplemented shm_open */
- "#426 (unimplemented shm_unlink)", /* 426 = unimplemented shm_unlink */
- "#427 (unimplemented sigqueue)", /* 427 = unimplemented sigqueue */
- "#428 (unimplemented sigwaitinfo)", /* 428 = unimplemented sigwaitinfo */
- "#429 (unimplemented sigtimedwait)", /* 429 = unimplemented sigtimedwait */
- "#430 (unimplemented sigwait)", /* 430 = unimplemented sigwait */
- "#431 (unimplemented aio_read)", /* 431 = unimplemented aio_read */
- "#432 (unimplemented aio_write)", /* 432 = unimplemented aio_write */
- "#433 (unimplemented lio_listio)", /* 433 = unimplemented lio_listio */
- "#434 (unimplemented aio_error)", /* 434 = unimplemented aio_error */
- "#435 (unimplemented aio_return)", /* 435 = unimplemented aio_return */
- "#436 (unimplemented aio_cancel)", /* 436 = unimplemented aio_cancel */
- "#437 (unimplemented aio_suspend)", /* 437 = unimplemented aio_suspend */
- "#438 (unimplemented aio_fsync)", /* 438 = unimplemented aio_fsync */
- "#439 (unimplemented mq_open)", /* 439 = unimplemented mq_open */
- "#440 (unimplemented mq_close)", /* 440 = unimplemented mq_close */
- "#441 (unimplemented mq_unlink)", /* 441 = unimplemented mq_unlink */
- "#442 (unimplemented mq_send)", /* 442 = unimplemented mq_send */
- "#443 (unimplemented mq_receive)", /* 443 = unimplemented mq_receive */
- "#444 (unimplemented mq_notify)", /* 444 = unimplemented mq_notify */
- "#445 (unimplemented mq_setattr)", /* 445 = unimplemented mq_setattr */
- "#446 (unimplemented mq_getattr)", /* 446 = unimplemented mq_getattr */
- "#447 (unimplemented ksem_open)", /* 447 = unimplemented ksem_open */
- "#448 (unimplemented ksem_unlink)", /* 448 = unimplemented ksem_unlink */
- "#449 (unimplemented ksem_close)", /* 449 = unimplemented ksem_close */
- "#450 (unimplemented ksem_post)", /* 450 = unimplemented ksem_post */
- "#451 (unimplemented ksem_wait)", /* 451 = unimplemented ksem_wait */
- "#452 (unimplemented ksem_read)", /* 452 = unimplemented ksem_read */
- "#453 (unimplemented ksem_trywait)", /* 453 = unimplemented ksem_trywait */
- "#454 (unimplemented lwp_rwlock_init)", /* 454 = unimplemented lwp_rwlock_init */
- "#455 (unimplemented lwp_rwlock_destroy)", /* 455 = unimplemented lwp_rwlock_destroy */
- "#456 (unimplemented lwp_rwlock_rdlock_sys)", /* 456 = unimplemented lwp_rwlock_rdlock_sys */
- "#457 (unimplemented lwp_rwlock_wrlock_sys)", /* 457 = unimplemented lwp_rwlock_wrlock_sys */
- "#458 (unimplemented lwp_rwlock_tryrdlock)", /* 458 = unimplemented lwp_rwlock_tryrdlock */
- "#459 (unimplemented lwp_rwlock_trywrlock)", /* 459 = unimplemented lwp_rwlock_trywrlock */
- "#460 (unimplemented lwp_rwlock_unlock)", /* 460 = unimplemented lwp_rwlock_unlock */
- "#461 (unimplemented ttrace)", /* 461 = unimplemented ttrace */
- "#462 (unimplemented ttrace_wait)", /* 462 = unimplemented ttrace_wait */
- "#463 (unimplemented lf_wire_mem)", /* 463 = unimplemented lf_wire_mem */
- "#464 (unimplemented lf_unwire_mem)", /* 464 = unimplemented lf_unwire_mem */
- "#465 (unimplemented lf_send_pin_map)", /* 465 = unimplemented lf_send_pin_map */
- "#466 (unimplemented lf_free_buf)", /* 466 = unimplemented lf_free_buf */
- "#467 (unimplemented lf_wait_nq)", /* 467 = unimplemented lf_wait_nq */
- "#468 (unimplemented lf_wakeup_conn_q)", /* 468 = unimplemented lf_wakeup_conn_q */
- "#469 (unimplemented lf_unused)", /* 469 = unimplemented lf_unused */
- "#470 (unimplemented lwp_sema_init)", /* 470 = unimplemented lwp_sema_init */
- "#471 (unimplemented lwp_sema_post)", /* 471 = unimplemented lwp_sema_post */
- "#472 (unimplemented lwp_sema_wait)", /* 472 = unimplemented lwp_sema_wait */
- "#473 (unimplemented lwp_sema_trywait)", /* 473 = unimplemented lwp_sema_trywait */
- "#474 (unimplemented lwp_sema_destroy)", /* 474 = unimplemented lwp_sema_destroy */
- "#475 (unimplemented statvfs64)", /* 475 = unimplemented statvfs64 */
- "#476 (unimplemented fstatvfs64)", /* 476 = unimplemented fstatvfs64 */
- "#477 (unimplemented msh_register)", /* 477 = unimplemented msh_register */
- "#478 (unimplemented ptrace64)", /* 478 = unimplemented ptrace64 */
- "#479 (unimplemented sendfile)", /* 479 = unimplemented sendfile */
- "#480 (unimplemented sendpath)", /* 480 = unimplemented sendpath */
- "#481 (unimplemented sendfile64)", /* 481 = unimplemented sendfile64 */
- "#482 (unimplemented sendpath64)", /* 482 = unimplemented sendpath64 */
- "#483 (unimplemented modload)", /* 483 = unimplemented modload */
- "#484 (unimplemented moduload)", /* 484 = unimplemented moduload */
- "#485 (unimplemented modpath)", /* 485 = unimplemented modpath */
- "#486 (unimplemented getksym)", /* 486 = unimplemented getksym */
- "#487 (unimplemented modadm)", /* 487 = unimplemented modadm */
- "#488 (unimplemented modstat)", /* 488 = unimplemented modstat */
- "#489 (unimplemented lwp_detached_exit)", /* 489 = unimplemented lwp_detached_exit */
- "#490 (unimplemented crashconf)", /* 490 = unimplemented crashconf */
- "#491 (unimplemented siginhibit)", /* 491 = unimplemented siginhibit */
- "#492 (unimplemented sigenable)", /* 492 = unimplemented sigenable */
- "#493 (unimplemented spuctl)", /* 493 = unimplemented spuctl */
- "#494 (unimplemented zerokernelsum)", /* 494 = unimplemented zerokernelsum */
- "#495 (unimplemented nfs_kstat)", /* 495 = unimplemented nfs_kstat */
- "#496 (unimplemented aio_read64)", /* 496 = unimplemented aio_read64 */
- "#497 (unimplemented aio_write64)", /* 497 = unimplemented aio_write64 */
- "#498 (unimplemented aio_error64)", /* 498 = unimplemented aio_error64 */
- "#499 (unimplemented aio_return64)", /* 499 = unimplemented aio_return64 */
- "#500 (unimplemented aio_cancel64)", /* 500 = unimplemented aio_cancel64 */
- "#501 (unimplemented aio_suspend64)", /* 501 = unimplemented aio_suspend64 */
- "#502 (unimplemented aio_fsync64)", /* 502 = unimplemented aio_fsync64 */
- "#503 (unimplemented lio_listio64)", /* 503 = unimplemented lio_listio64 */
- "#504 (unimplemented recv2)", /* 504 = unimplemented recv2 */
- "#505 (unimplemented recvfrom2)", /* 505 = unimplemented recvfrom2 */
- "#506 (unimplemented send2)", /* 506 = unimplemented send2 */
- "#507 (unimplemented sendto2)", /* 507 = unimplemented sendto2 */
- "#508 (unimplemented acl)", /* 508 = unimplemented acl */
- "#509 (unimplemented __cnx_p2p_ctl)", /* 509 = unimplemented __cnx_p2p_ctl */
- "#510 (unimplemented __cnx_gsched_ctl)", /* 510 = unimplemented __cnx_gsched_ctl */
- "#511 (unimplemented __cnx_pmon_ctl)", /* 511 = unimplemented __cnx_pmon_ctl */
- "#512 (unimplemented mem_res_grp)", /* 512 = unimplemented mem_res_grp */
- "#513 (unimplemented fabric)", /* 513 = unimplemented fabric */
- "#514 (unimplemented diagsyscall)", /* 514 = unimplemented diagsyscall */
- "#515 (unimplemented tuneinfo)", /* 515 = unimplemented tuneinfo */
- "#516 (unimplemented gettune)", /* 516 = unimplemented gettune */
- "#517 (unimplemented settune)", /* 517 = unimplemented settune */
- "#518 (unimplemented pset_create)", /* 518 = unimplemented pset_create */
- "#519 (unimplemented pset_destroy)", /* 519 = unimplemented pset_destroy */
- "#520 (unimplemented pset_assign)", /* 520 = unimplemented pset_assign */
- "#521 (unimplemented pset_bind)", /* 521 = unimplemented pset_bind */
- "#522 (unimplemented pset_getattr)", /* 522 = unimplemented pset_getattr */
- "#523 (unimplemented pset_setattr)", /* 523 = unimplemented pset_setattr */
- "#524 (unimplemented pset_ctl)", /* 524 = unimplemented pset_ctl */
- "#525 (unimplemented pset_rtctl)", /* 525 = unimplemented pset_rtctl */
-};
diff --git a/sys/compat/hpux/hppa/hpux_sysent.c b/sys/compat/hpux/hppa/hpux_sysent.c
deleted file mode 100644
index 5297e5da85a..00000000000
--- a/sys/compat/hpux/hppa/hpux_sysent.c
+++ /dev/null
@@ -1,1127 +0,0 @@
-/* $OpenBSD: hpux_sysent.c,v 1.10 2010/01/28 19:59:35 miod Exp $ */
-
-/*
- * System call switch table.
- *
- * DO NOT EDIT-- this file is automatically generated.
- * created from OpenBSD: syscalls.master,v 1.9 2010/01/28 19:59:09 miod Exp
- */
-
-#include <sys/param.h>
-#include <sys/systm.h>
-#include <sys/signal.h>
-#include <sys/mount.h>
-#include <sys/exec.h>
-#include <sys/syscallargs.h>
-#include <compat/hpux/hpux.h>
-#include <compat/hpux/hppa/hpux_syscallargs.h>
-#include <machine/hpux_machdep.h>
-
-#define s(type) sizeof(type)
-
-struct sysent hpux_sysent[] = {
- { 0, 0, 0,
- sys_nosys }, /* 0 = syscall */
- { 1, s(struct sys_exit_args), 0,
- sys_exit }, /* 1 = exit */
- { 0, 0, 0,
- hpux_sys_fork }, /* 2 = fork */
- { 3, s(struct hpux_sys_read_args), 0,
- hpux_sys_read }, /* 3 = read */
- { 3, s(struct hpux_sys_write_args), 0,
- hpux_sys_write }, /* 4 = write */
- { 3, s(struct hpux_sys_open_args), 0,
- hpux_sys_open }, /* 5 = open */
- { 1, s(struct sys_close_args), 0,
- sys_close }, /* 6 = close */
- { 1, s(struct hpux_sys_wait_args), 0,
- hpux_sys_wait }, /* 7 = wait */
- { 2, s(struct hpux_sys_creat_args), 0,
- hpux_sys_creat }, /* 8 = creat */
- { 2, s(struct sys_link_args), 0,
- sys_link }, /* 9 = link */
- { 1, s(struct hpux_sys_unlink_args), 0,
- hpux_sys_unlink }, /* 10 = unlink */
- { 2, s(struct hpux_sys_execv_args), 0,
- hpux_sys_execv }, /* 11 = execv */
- { 1, s(struct hpux_sys_chdir_args), 0,
- hpux_sys_chdir }, /* 12 = chdir */
- { 1, s(struct hpux_sys_time_6x_args), 0,
- hpux_sys_time_6x }, /* 13 = time_6x */
- { 3, s(struct hpux_sys_mknod_args), 0,
- hpux_sys_mknod }, /* 14 = mknod */
- { 2, s(struct hpux_sys_chmod_args), 0,
- hpux_sys_chmod }, /* 15 = chmod */
- { 3, s(struct hpux_sys_chown_args), 0,
- hpux_sys_chown }, /* 16 = chown */
- { 1, s(struct sys_obreak_args), 0,
- sys_obreak }, /* 17 = obreak */
- { 0, 0, 0,
- sys_nosys }, /* 18 = unimplemented lchmod */
- { 3, s(struct compat_43_sys_lseek_args), 0,
- compat_43_sys_lseek }, /* 19 = lseek */
- { 0, 0, 0,
- sys_getpid }, /* 20 = getpid */
- { 0, 0, 0,
- sys_nosys }, /* 21 = unimplemented mount */
- { 0, 0, 0,
- sys_nosys }, /* 22 = unimplemented umount */
- { 1, s(struct sys_setuid_args), 0,
- sys_setuid }, /* 23 = setuid */
- { 0, 0, 0,
- sys_getuid }, /* 24 = getuid */
- { 1, s(struct hpux_sys_stime_6x_args), 0,
- hpux_sys_stime_6x }, /* 25 = stime_6x */
-#ifdef PTRACE
- { 4, s(struct hpux_sys_ptrace_args), 0,
- hpux_sys_ptrace }, /* 26 = ptrace */
-#else
- { 0, 0, 0,
- sys_nosys }, /* 26 = unimplemented ptrace */
-#endif
- { 1, s(struct hpux_sys_alarm_6x_args), 0,
- hpux_sys_alarm_6x }, /* 27 = alarm_6x */
- { 0, 0, 0,
- sys_nosys }, /* 28 = unimplemented cnx_lw_pmon_read */
- { 0, 0, 0,
- hpux_sys_pause_6x }, /* 29 = pause_6x */
- { 2, s(struct hpux_sys_utime_6x_args), 0,
- hpux_sys_utime_6x }, /* 30 = utime_6x */
- { 2, s(struct hpux_sys_stty_6x_args), 0,
- hpux_sys_stty_6x }, /* 31 = stty_6x */
- { 2, s(struct hpux_sys_gtty_6x_args), 0,
- hpux_sys_gtty_6x }, /* 32 = gtty_6x */
- { 2, s(struct hpux_sys_access_args), 0,
- hpux_sys_access }, /* 33 = access */
- { 1, s(struct hpux_sys_nice_6x_args), 0,
- hpux_sys_nice_6x }, /* 34 = nice_6x */
- { 1, s(struct hpux_sys_ftime_6x_args), 0,
- hpux_sys_ftime_6x }, /* 35 = ftime_6x */
- { 0, 0, 0,
- sys_sync }, /* 36 = sync */
- { 2, s(struct hpux_sys_kill_args), 0,
- hpux_sys_kill }, /* 37 = kill */
- { 2, s(struct hpux_sys_stat_args), 0,
- hpux_sys_stat }, /* 38 = stat */
- { 0, 0, 0,
- hpux_sys_setpgrp_6x }, /* 39 = setpgrp_6x */
- { 2, s(struct hpux_sys_lstat_args), 0,
- hpux_sys_lstat }, /* 40 = lstat */
- { 1, s(struct sys_dup_args), 0,
- sys_dup }, /* 41 = dup */
- { 0, 0, 0,
- sys_opipe }, /* 42 = opipe */
- { 1, s(struct hpux_sys_times_6x_args), 0,
- hpux_sys_times_6x }, /* 43 = times_6x */
- { 4, s(struct sys_profil_args), 0,
- sys_profil }, /* 44 = profil */
- { 0, 0, 0,
- sys_nosys }, /* 45 = unimplemented ki_syscall */
- { 1, s(struct sys_setgid_args), 0,
- sys_setgid }, /* 46 = setgid */
- { 0, 0, 0,
- sys_getgid }, /* 47 = getgid */
- { 0, 0, 0,
- sys_nosys }, /* 48 = unimplemented */
- { 0, 0, 0,
- sys_nosys }, /* 49 = unimplemented reserved for USG */
- { 0, 0, 0,
- sys_nosys }, /* 50 = unimplemented reserved for USG */
- { 0, 0, 0,
- sys_nosys }, /* 51 = unimplemented acct */
- { 0, 0, 0,
- sys_nosys }, /* 52 = unimplemented set_userthreadid */
- { 0, 0, 0,
- sys_nosys }, /* 53 = unimplemented lwp_mutex_unlock_2 */
- { 3, s(struct hpux_sys_ioctl_args), 0,
- hpux_sys_ioctl }, /* 54 = ioctl */
- { 0, 0, 0,
- sys_nosys }, /* 55 = unimplemented reboot */
- { 2, s(struct hpux_sys_symlink_args), 0,
- hpux_sys_symlink }, /* 56 = symlink */
- { 3, s(struct hpux_sys_utssys_args), 0,
- hpux_sys_utssys }, /* 57 = utssys */
- { 3, s(struct hpux_sys_readlink_args), 0,
- hpux_sys_readlink }, /* 58 = readlink */
- { 3, s(struct hpux_sys_execve_args), 0,
- hpux_sys_execve }, /* 59 = execve */
- { 1, s(struct sys_umask_args), 0,
- sys_umask }, /* 60 = umask */
- { 1, s(struct sys_chroot_args), 0,
- sys_chroot }, /* 61 = chroot */
- { 3, s(struct hpux_sys_fcntl_args), 0,
- hpux_sys_fcntl }, /* 62 = fcntl */
- { 2, s(struct hpux_sys_ulimit_args), 0,
- hpux_sys_ulimit }, /* 63 = ulimit */
- { 0, 0, 0,
- sys_nosys }, /* 64 = unimplemented */
- { 0, 0, 0,
- sys_nosys }, /* 65 = unimplemented */
- { 0, 0, 0,
- hpux_sys_vfork }, /* 66 = vfork */
- { 0, 0, 0,
- sys_nosys }, /* 67 = unimplemented lwp_getprivate */
- { 0, 0, 0,
- sys_nosys }, /* 68 = unimplemented lwp_setprivate */
- { 0, 0, 0,
- sys_nosys }, /* 69 = unimplemented */
- { 0, 0, 0,
- sys_nosys }, /* 70 = unimplemented */
- { 6, s(struct hpux_sys_mmap_args), 0,
- hpux_sys_mmap }, /* 71 = mmap */
- { 0, 0, 0,
- sys_nosys }, /* 72 = unimplemented */
- { 2, s(struct sys_munmap_args), 0,
- sys_munmap }, /* 73 = munmap */
- { 3, s(struct sys_mprotect_args), 0,
- sys_mprotect }, /* 74 = mprotect */
- { 3, s(struct sys_madvise_args), 0,
- sys_madvise }, /* 75 = madvise */
- { 0, 0, 0,
- sys_nosys }, /* 76 = unimplemented vhangup */
- { 0, 0, 0,
- sys_nosys }, /* 77 = unimplemented swapoff */
- { 0, 0, 0,
- sys_nosys }, /* 78 = unimplemented */
- { 2, s(struct sys_getgroups_args), 0,
- sys_getgroups }, /* 79 = getgroups */
- { 2, s(struct sys_setgroups_args), 0,
- sys_setgroups }, /* 80 = setgroups */
- { 1, s(struct sys_getpgid_args), 0,
- sys_getpgid }, /* 81 = getpgid */
- { 2, s(struct hpux_sys_setpgrp2_args), 0,
- hpux_sys_setpgrp2 }, /* 82 = setpgrp2 */
- { 3, s(struct sys_setitimer_args), 0,
- sys_setitimer }, /* 83 = setitimer */
- { 3, s(struct hpux_sys_wait3_args), 0,
- hpux_sys_wait3 }, /* 84 = wait3 */
- { 0, 0, 0,
- sys_nosys }, /* 85 = unimplemented swapon */
- { 2, s(struct sys_getitimer_args), 0,
- sys_getitimer }, /* 86 = getitimer */
- { 0, 0, 0,
- sys_nosys }, /* 87 = unimplemented */
- { 0, 0, 0,
- sys_nosys }, /* 88 = unimplemented */
- { 0, 0, 0,
- sys_nosys }, /* 89 = unimplemented */
- { 2, s(struct sys_dup2_args), 0,
- sys_dup2 }, /* 90 = dup2 */
- { 0, 0, 0,
- sys_nosys }, /* 91 = unimplemented */
- { 2, s(struct hpux_sys_fstat_args), 0,
- hpux_sys_fstat }, /* 92 = fstat */
- { 5, s(struct sys_select_args), 0,
- sys_select }, /* 93 = select */
- { 0, 0, 0,
- sys_nosys }, /* 94 = unimplemented */
- { 1, s(struct sys_fsync_args), 0,
- sys_fsync }, /* 95 = fsync */
- { 3, s(struct sys_setpriority_args), 0,
- sys_setpriority }, /* 96 = setpriority */
- { 0, 0, 0,
- sys_nosys }, /* 97 = unimplemented */
- { 0, 0, 0,
- sys_nosys }, /* 98 = unimplemented */
- { 0, 0, 0,
- sys_nosys }, /* 99 = unimplemented */
- { 2, s(struct sys_getpriority_args), 0,
- sys_getpriority }, /* 100 = getpriority */
- { 0, 0, 0,
- sys_nosys }, /* 101 = unimplemented */
- { 0, 0, 0,
- sys_nosys }, /* 102 = unimplemented */
- { 0, 0, 0,
- sys_nosys }, /* 103 = unimplemented lf_send */
- { 0, 0, 0,
- sys_nosys }, /* 104 = unimplemented */
- { 0, 0, 0,
- sys_nosys }, /* 105 = unimplemented */
- { 0, 0, 0,
- sys_nosys }, /* 106 = unimplemented */
- { 0, 0, 0,
- sys_nosys }, /* 107 = unimplemented */
- { 3, s(struct hpux_sys_sigvec_args), 0,
- hpux_sys_sigvec }, /* 108 = sigvec */
- { 1, s(struct hpux_sys_sigblock_args), 0,
- hpux_sys_sigblock }, /* 109 = sigblock */
- { 1, s(struct hpux_sys_sigsetmask_args), 0,
- hpux_sys_sigsetmask }, /* 110 = sigsetmask */
- { 1, s(struct hpux_sys_sigpause_args), 0,
- hpux_sys_sigpause }, /* 111 = sigpause */
- { 2, s(struct compat_43_sys_sigstack_args), 0,
- compat_43_sys_sigstack }, /* 112 = sigstack */
- { 0, 0, 0,
- sys_nosys }, /* 113 = unimplemented */
- { 0, 0, 0,
- sys_nosys }, /* 114 = unimplemented */
- { 0, 0, 0,
- sys_nosys }, /* 115 = unimplemented regctl */
- { 1, s(struct sys_gettimeofday_args), 0,
- sys_gettimeofday }, /* 116 = gettimeofday */
- { 0, 0, 0,
- sys_nosys }, /* 117 = unimplemented getrusage */
- { 0, 0, 0,
- sys_nosys }, /* 118 = unimplemented */
- { 0, 0, 0,
- sys_nosys }, /* 119 = unimplemented */
- { 3, s(struct hpux_sys_readv_args), 0,
- hpux_sys_readv }, /* 120 = readv */
- { 3, s(struct hpux_sys_writev_args), 0,
- hpux_sys_writev }, /* 121 = writev */
- { 2, s(struct sys_settimeofday_args), 0,
- sys_settimeofday }, /* 122 = settimeofday */
- { 3, s(struct sys_fchown_args), 0,
- sys_fchown }, /* 123 = fchown */
- { 2, s(struct sys_fchmod_args), 0,
- sys_fchmod }, /* 124 = fchmod */
- { 0, 0, 0,
- sys_nosys }, /* 125 = unimplemented */
- { 3, s(struct sys_setresuid_args), 0,
- sys_setresuid }, /* 126 = setresuid */
- { 3, s(struct sys_setresgid_args), 0,
- sys_setresgid }, /* 127 = setresgid */
- { 2, s(struct hpux_sys_rename_args), 0,
- hpux_sys_rename }, /* 128 = rename */
- { 2, s(struct hpux_sys_truncate_args), 0,
- hpux_sys_truncate }, /* 129 = truncate */
- { 2, s(struct compat_43_sys_ftruncate_args), 0,
- compat_43_sys_ftruncate }, /* 130 = ftruncate */
- { 0, 0, 0,
- sys_nosys }, /* 131 = unimplemented */
- { 1, s(struct hpux_sys_sysconf_args), 0,
- hpux_sys_sysconf }, /* 132 = sysconf */
- { 0, 0, 0,
- sys_nosys }, /* 133 = unimplemented */
- { 0, 0, 0,
- sys_nosys }, /* 134 = unimplemented */
- { 0, 0, 0,
- sys_nosys }, /* 135 = unimplemented */
- { 2, s(struct hpux_sys_mkdir_args), 0,
- hpux_sys_mkdir }, /* 136 = mkdir */
- { 1, s(struct hpux_sys_rmdir_args), 0,
- hpux_sys_rmdir }, /* 137 = rmdir */
- { 0, 0, 0,
- sys_nosys }, /* 138 = unimplemented */
- { 0, 0, 0,
- sys_nosys }, /* 139 = unimplemented sigcleanup */
- { 0, 0, 0,
- sys_nosys }, /* 140 = unimplemented setcore */
- { 0, 0, 0,
- sys_nosys }, /* 141 = unimplemented */
- { 0, 0, 0,
- sys_nosys }, /* 142 = unimplemented */
- { 0, 0, 0,
- sys_nosys }, /* 143 = unimplemented */
- { 2, s(struct hpux_sys_getrlimit_args), 0,
- hpux_sys_getrlimit }, /* 144 = getrlimit */
- { 2, s(struct hpux_sys_setrlimit_args), 0,
- hpux_sys_setrlimit }, /* 145 = setrlimit */
- { 0, 0, 0,
- sys_nosys }, /* 146 = unimplemented */
- { 0, 0, 0,
- sys_nosys }, /* 147 = unimplemented lwp_self */
- { 0, 0, 0,
- sys_nosys }, /* 148 = unimplemented quotactl */
- { 0, 0, 0,
- sys_nosys }, /* 149 = unimplemented get_sysinfo */
- { 0, 0, 0,
- sys_nosys }, /* 150 = unimplemented */
- { 0, 0, 0,
- sys_nosys }, /* 151 = unimplemented privgrp */
- { 2, s(struct hpux_sys_rtprio_args), 0,
- hpux_sys_rtprio }, /* 152 = rtprio */
- { 0, 0, 0,
- sys_nosys }, /* 153 = unimplemented plock */
- { 0, 0, 0,
- sys_nosys }, /* 154 = unimplemented lf_next_scn */
- { 3, s(struct hpux_sys_lockf_args), 0,
- hpux_sys_lockf }, /* 155 = lockf */
-#ifdef SYSVSEM
- { 3, s(struct sys_semget_args), 0,
- sys_semget }, /* 156 = semget */
- { 4, s(struct sys___semctl_args), 0,
- sys___semctl }, /* 157 = __semctl */
- { 3, s(struct sys_semop_args), 0,
- sys_semop }, /* 158 = semop */
-#else
- { 0, 0, 0,
- sys_nosys }, /* 156 = unimplemented semget */
- { 0, 0, 0,
- sys_nosys }, /* 157 = unimplemented semctl */
- { 0, 0, 0,
- sys_nosys }, /* 158 = unimplemented semop */
-#endif
-#ifdef SYSVMSG
- { 2, s(struct sys_msgget_args), 0,
- sys_msgget }, /* 159 = msgget */
- { 3, s(struct sys_msgctl_args), 0,
- sys_msgctl }, /* 160 = msgctl */
- { 4, s(struct sys_msgsnd_args), 0,
- sys_msgsnd }, /* 161 = msgsnd */
- { 5, s(struct sys_msgrcv_args), 0,
- sys_msgrcv }, /* 162 = msgrcv */
-#else
- { 0, 0, 0,
- sys_nosys }, /* 159 = unimplemented msgget */
- { 0, 0, 0,
- sys_nosys }, /* 160 = unimplemented msgctl */
- { 0, 0, 0,
- sys_nosys }, /* 161 = unimplemented msgsnd */
- { 0, 0, 0,
- sys_nosys }, /* 162 = unimplemented msgrcv */
-#endif
-#ifdef SYSVSHM
- { 3, s(struct sys_shmget_args), 0,
- sys_shmget }, /* 163 = shmget */
- { 3, s(struct hpux_sys_shmctl_args), 0,
- hpux_sys_shmctl }, /* 164 = shmctl */
- { 3, s(struct sys_shmat_args), 0,
- sys_shmat }, /* 165 = shmat */
- { 1, s(struct sys_shmdt_args), 0,
- sys_shmdt }, /* 166 = shmdt */
-#else
- { 0, 0, 0,
- sys_nosys }, /* 163 = unimplemented shmget */
- { 0, 0, 0,
- sys_nosys }, /* 164 = unimplemented shmctl */
- { 0, 0, 0,
- sys_nosys }, /* 165 = unimplemented shmat */
- { 0, 0, 0,
- sys_nosys }, /* 166 = unimplemented shmdt */
-#endif
- { 0, 0, 0,
- sys_nosys }, /* 167 = unimplemented set_mem_window */
- { 0, 0, 0,
- sys_nosys }, /* 168 = unimplemented nsp_init */
- { 0, 0, 0,
- sys_nosys }, /* 169 = unimplemented */
- { 0, 0, 0,
- sys_nosys }, /* 170 = unimplemented mkrnod */
- { 0, 0, 0,
- sys_nosys }, /* 171 = unimplemented test */
- { 0, 0, 0,
- sys_nosys }, /* 172 = unimplemented unsp_open */
- { 0, 0, 0,
- sys_nosys }, /* 173 = unimplemented */
- { 2, s(struct hpux_sys_getcontext_args), 0,
- hpux_sys_getcontext }, /* 174 = getcontext */
- { 0, 0, 0,
- sys_nosys }, /* 175 = unimplemented osetcontext */
- { 0, 0, 0,
- sys_nosys }, /* 176 = unimplemented bigio */
- { 0, 0, 0,
- sys_nosys }, /* 177 = unimplemented pipenode */
- { 0, 0, 0,
- sys_nosys }, /* 178 = unimplemented lsync */
- { 0, 0, 0,
- sys_nosys }, /* 179 = unimplemented */
- { 0, 0, 0,
- sys_nosys }, /* 180 = unimplemented mysite */
- { 0, 0, 0,
- sys_nosys }, /* 181 = unimplemented sitels */
- { 0, 0, 0,
- sys_nosys }, /* 182 = unimplemented swapclients */
- { 0, 0, 0,
- sys_nosys }, /* 183 = unimplemented rmtprocess */
- { 0, 0, 0,
- sys_nosys }, /* 184 = unimplemented dskless_stats */
- { 3, s(struct hpux_sys_sigprocmask_args), 0,
- hpux_sys_sigprocmask }, /* 185 = sigprocmask */
- { 1, s(struct hpux_sys_sigpending_args), 0,
- hpux_sys_sigpending }, /* 186 = sigpending */
- { 1, s(struct hpux_sys_sigsuspend_args), 0,
- hpux_sys_sigsuspend }, /* 187 = sigsuspend */
- { 3, s(struct hpux_sys_sigaction_args), 0,
- hpux_sys_sigaction }, /* 188 = sigaction */
- { 0, 0, 0,
- sys_nosys }, /* 189 = unimplemented lw_get_thread_times */
- { 0, 0, 0,
- sys_nosys }, /* 190 = unimplemented nfssvc */
- { 0, 0, 0,
- sys_nosys }, /* 191 = unimplemented getfh */
- { 2, s(struct compat_09_sys_getdomainname_args), 0,
- compat_09_sys_getdomainname }, /* 192 = getdomainname */
- { 2, s(struct compat_09_sys_setdomainname_args), 0,
- compat_09_sys_setdomainname }, /* 193 = setdomainname */
- { 0, 0, 0,
- sys_nosys }, /* 194 = unimplemented async_daemon */
- { 4, s(struct compat_43_sys_getdirentries_args), 0,
- compat_43_sys_getdirentries }, /* 195 = getdirentries */
- { 0, 0, 0,
- sys_nosys }, /* 196 = unimplemented statfs */
- { 0, 0, 0,
- sys_nosys }, /* 197 = unimplemented fstatfs */
- { 0, 0, 0,
- sys_nosys }, /* 198 = unimplemented vfsmount */
- { 0, 0, 0,
- sys_nosys }, /* 199 = unimplemented qmml */
- { 4, s(struct hpux_sys_waitpid_args), 0,
- hpux_sys_waitpid }, /* 200 = waitpid */
- { 0, 0, 0,
- sys_nosys }, /* 201 = unimplemented */
- { 0, 0, 0,
- sys_nosys }, /* 202 = unimplemented */
- { 0, 0, 0,
- sys_nosys }, /* 203 = unimplemented */
- { 0, 0, 0,
- sys_nosys }, /* 204 = unimplemented */
- { 0, 0, 0,
- sys_nosys }, /* 205 = unimplemented */
- { 0, 0, 0,
- sys_nosys }, /* 206 = unimplemented */
- { 0, 0, 0,
- sys_nosys }, /* 207 = unimplemented */
- { 0, 0, 0,
- sys_nosys }, /* 208 = unimplemented */
- { 0, 0, 0,
- sys_nosys }, /* 209 = unimplemented */
- { 0, 0, 0,
- sys_nosys }, /* 210 = unimplemented */
- { 0, 0, 0,
- sys_nosys }, /* 211 = unimplemented */
- { 0, 0, 0,
- sys_nosys }, /* 212 = unimplemented */
- { 0, 0, 0,
- sys_nosys }, /* 213 = unimplemented */
- { 0, 0, 0,
- sys_nosys }, /* 214 = unimplemented */
- { 0, 0, 0,
- sys_nosys }, /* 215 = unimplemented */
- { 0, 0, 0,
- sys_nosys }, /* 216 = unimplemented */
- { 0, 0, 0,
- sys_nosys }, /* 217 = unimplemented */
- { 0, 0, 0,
- sys_nosys }, /* 218 = unimplemented */
- { 0, 0, 0,
- sys_nosys }, /* 219 = unimplemented */
- { 0, 0, 0,
- sys_nosys }, /* 220 = unimplemented */
- { 0, 0, 0,
- sys_nosys }, /* 221 = unimplemented */
- { 0, 0, 0,
- sys_nosys }, /* 222 = unimplemented */
- { 0, 0, 0,
- sys_nosys }, /* 223 = unimplemented */
- { 3, s(struct hpux_sigsetreturn_args), 0,
- hpux_sigsetreturn }, /* 224 = hpux_sigsetreturn */
- { 0, 0, 0,
- sys_nosys }, /* 225 = unimplemented sigsetstatemask */
- { 0, 0, 0,
- sys_nosys }, /* 226 = unimplemented */
- { 0, 0, 0,
- sys_nosys }, /* 227 = unimplemented cs */
- { 0, 0, 0,
- sys_nosys }, /* 228 = unimplemented cds */
- { 0, 0, 0,
- sys_nosys }, /* 229 = unimplemented set_no_trunc */
- { 0, 0, 0,
- sys_nosys }, /* 230 = unimplemented pathconf */
- { 0, 0, 0,
- sys_nosys }, /* 231 = unimplemented fpathconf */
- { 0, 0, 0,
- sys_nosys }, /* 232 = unimplemented */
- { 0, 0, 0,
- sys_nosys }, /* 233 = unimplemented */
- { 0, 0, 0,
- sys_nosys }, /* 234 = unimplemented nfs_fcntl */
- { 0, 0, 0,
- sys_nosys }, /* 235 = unimplemented ogetacl */
- { 0, 0, 0,
- sys_nosys }, /* 236 = unimplemented ofgetctl */
- { 0, 0, 0,
- sys_nosys }, /* 237 = unimplemented osetacl */
- { 0, 0, 0,
- sys_nosys }, /* 238 = unimplemented ofsetacl */
- { 0, 0, 0,
- sys_nosys }, /* 239 = unimplemented pstat */
- { 0, 0, 0,
- sys_nosys }, /* 240 = unimplemented getaudid */
- { 0, 0, 0,
- sys_nosys }, /* 241 = unimplemented setaudid */
- { 0, 0, 0,
- sys_nosys }, /* 242 = unimplemented getaudproc */
- { 0, 0, 0,
- sys_nosys }, /* 243 = unimplemented setaudproc */
- { 0, 0, 0,
- sys_nosys }, /* 244 = unimplemented getevent */
- { 0, 0, 0,
- sys_nosys }, /* 245 = unimplemented setevent */
- { 0, 0, 0,
- sys_nosys }, /* 246 = unimplemented audwrite */
- { 0, 0, 0,
- sys_nosys }, /* 247 = unimplemented audswitch */
- { 0, 0, 0,
- sys_nosys }, /* 248 = unimplemented audctl */
- { 0, 0, 0,
- sys_nosys }, /* 249 = unimplemented ogetaccess */
- { 0, 0, 0,
- sys_nosys }, /* 250 = unimplemented fsctl */
- { 0, 0, 0,
- sys_nosys }, /* 251 = unimplemented */
- { 0, 0, 0,
- sys_nosys }, /* 252 = unimplemented getmount_entries */
- { 0, 0, 0,
- sys_nosys }, /* 253 = unimplemented lwp_mutex_init2 */
- { 0, 0, 0,
- sys_nosys }, /* 254 = unimplemented */
- { 0, 0, 0,
- sys_nosys }, /* 255 = unimplemented */
- { 0, 0, 0,
- sys_nosys }, /* 256 = unimplemented */
- { 0, 0, 0,
- sys_nosys }, /* 257 = unimplemented */
- { 0, 0, 0,
- sys_nosys }, /* 258 = unimplemented */
- { 0, 0, 0,
- sys_nosys }, /* 259 = unimplemented swapfs */
- { 0, 0, 0,
- sys_nosys }, /* 260 = unimplemented fss */
- { 0, 0, 0,
- sys_nosys }, /* 261 = unimplemented */
- { 0, 0, 0,
- sys_nosys }, /* 262 = unimplemented */
- { 0, 0, 0,
- sys_nosys }, /* 263 = unimplemented */
- { 0, 0, 0,
- sys_nosys }, /* 264 = unimplemented */
- { 0, 0, 0,
- sys_nosys }, /* 265 = unimplemented */
- { 0, 0, 0,
- sys_nosys }, /* 266 = unimplemented */
- { 0, 0, 0,
- sys_nosys }, /* 267 = unimplemented tsync */
- { 0, 0, 0,
- sys_nosys }, /* 268 = unimplemented getnumfds */
- { 3, s(struct sys_poll_args), 0,
- sys_poll }, /* 269 = poll */
- { 0, 0, 0,
- sys_nosys }, /* 270 = unimplemented getmsg */
- { 0, 0, 0,
- sys_nosys }, /* 271 = unimplemented putmsg */
- { 1, s(struct sys_fchdir_args), 0,
- sys_fchdir }, /* 272 = fchdir */
- { 0, 0, 0,
- sys_nosys }, /* 273 = unimplemented getmount_cnt */
- { 0, 0, 0,
- sys_nosys }, /* 274 = unimplemented getmount_entry */
- { 3, s(struct compat_43_sys_accept_args), 0,
- compat_43_sys_accept }, /* 275 = accept */
- { 3, s(struct sys_bind_args), 0,
- sys_bind }, /* 276 = bind */
- { 3, s(struct sys_connect_args), 0,
- sys_connect }, /* 277 = connect */
- { 3, s(struct sys_getpeername_args), 0,
- sys_getpeername }, /* 278 = getpeername */
- { 3, s(struct sys_getsockname_args), 0,
- sys_getsockname }, /* 279 = getsockname */
- { 5, s(struct sys_getsockopt_args), 0,
- sys_getsockopt }, /* 280 = getsockopt */
- { 2, s(struct sys_listen_args), 0,
- sys_listen }, /* 281 = listen */
- { 4, s(struct compat_43_sys_recv_args), 0,
- compat_43_sys_recv }, /* 282 = recv */
- { 6, s(struct compat_43_sys_recvfrom_args), 0,
- compat_43_sys_recvfrom }, /* 283 = recvfrom */
- { 3, s(struct compat_43_sys_recvmsg_args), 0,
- compat_43_sys_recvmsg }, /* 284 = recvmsg */
- { 4, s(struct compat_43_sys_send_args), 0,
- compat_43_sys_send }, /* 285 = send */
- { 3, s(struct compat_43_sys_sendmsg_args), 0,
- compat_43_sys_sendmsg }, /* 286 = sendmsg */
- { 6, s(struct sys_sendto_args), 0,
- sys_sendto }, /* 287 = sendto */
- { 5, s(struct sys_setsockopt_args), 0,
- sys_setsockopt }, /* 288 = setsockopt */
- { 2, s(struct sys_shutdown_args), 0,
- sys_shutdown }, /* 289 = shutdown */
- { 3, s(struct sys_socket_args), 0,
- sys_socket }, /* 290 = socket */
- { 4, s(struct sys_socketpair_args), 0,
- sys_socketpair }, /* 291 = socketpair */
- { 0, 0, 0,
- sys_nosys }, /* 292 = unimplemented proc_open */
- { 0, 0, 0,
- sys_nosys }, /* 293 = unimplemented proc_close */
- { 0, 0, 0,
- sys_nosys }, /* 294 = unimplemented proc_send */
- { 0, 0, 0,
- sys_nosys }, /* 295 = unimplemented proc_recv */
- { 0, 0, 0,
- sys_nosys }, /* 296 = unimplemented proc_sendrecv */
- { 0, 0, 0,
- sys_nosys }, /* 297 = unimplemented proc_syscall */
- { 0, 0, 0,
- sys_nosys }, /* 298 = unimplemented */
- { 0, 0, 0,
- sys_nosys }, /* 299 = unimplemented */
- { 0, 0, 0,
- sys_nosys }, /* 300 = unimplemented */
- { 0, 0, 0,
- sys_nosys }, /* 301 = unimplemented */
- { 0, 0, 0,
- sys_nosys }, /* 302 = unimplemented */
- { 0, 0, 0,
- sys_nosys }, /* 303 = unimplemented */
- { 0, 0, 0,
- sys_nosys }, /* 304 = unimplemented */
- { 0, 0, 0,
- sys_nosys }, /* 305 = unimplemented */
- { 0, 0, 0,
- sys_nosys }, /* 306 = unimplemented */
- { 0, 0, 0,
- sys_nosys }, /* 307 = unimplemented */
- { 0, 0, 0,
- sys_nosys }, /* 308 = unimplemented */
- { 0, 0, 0,
- sys_nosys }, /* 309 = unimplemented */
- { 0, 0, 0,
- sys_nosys }, /* 310 = unimplemented */
- { 0, 0, 0,
- sys_nosys }, /* 311 = unimplemented */
-#ifdef SYSVSEM
- { 4, s(struct sys___semctl_args), 0,
- sys___semctl }, /* 312 = nsemctl */
-#else
- { 0, 0, 0,
- sys_nosys }, /* 312 = unimplemented semctl */
-#endif
-#ifdef SYSVMSG
- { 3, s(struct sys_msgctl_args), 0,
- sys_msgctl }, /* 313 = nmsgctl */
-#else
- { 0, 0, 0,
- sys_nosys }, /* 313 = unimplemented msgctl */
-#endif
-#ifdef SYSVSHM
- { 3, s(struct hpux_sys_nshmctl_args), 0,
- hpux_sys_nshmctl }, /* 314 = nshmctl */
-#else
- { 0, 0, 0,
- sys_nosys }, /* 314 = unimplemented shmctl */
-#endif
- { 0, 0, 0,
- sys_nosys }, /* 315 = unimplemented mpctl */
- { 0, 0, 0,
- sys_nosys }, /* 316 = unimplemented exportfs */
- { 0, 0, 0,
- sys_nosys }, /* 317 = unimplemented getpmsg */
- { 0, 0, 0,
- sys_nosys }, /* 318 = unimplemented putpmsg */
- { 0, 0, 0,
- sys_nosys }, /* 319 = unimplemented */
- { 3, s(struct sys_msync_args), 0,
- sys_msync }, /* 320 = msync */
- { 0, 0, 0,
- sys_nosys }, /* 321 = unimplemented msleep */
- { 0, 0, 0,
- sys_nosys }, /* 322 = unimplemented mwakeup */
- { 0, 0, 0,
- sys_nosys }, /* 323 = unimplemented msem_init */
- { 0, 0, 0,
- sys_nosys }, /* 324 = unimplemented msem_remove */
- { 0, 0, 0,
- sys_nosys }, /* 325 = unimplemented adjtime */
- { 0, 0, 0,
- sys_nosys }, /* 326 = unimplemented kload */
- { 0, 0, 0,
- sys_nosys }, /* 327 = unimplemented fattach */
- { 0, 0, 0,
- sys_nosys }, /* 328 = unimplemented fdetach */
- { 0, 0, 0,
- sys_nosys }, /* 329 = unimplemented serialize */
- { 0, 0, 0,
- sys_nosys }, /* 330 = unimplemented statvfs */
- { 0, 0, 0,
- sys_nosys }, /* 331 = unimplemented fstatvfs */
- { 3, s(struct sys_lchown_args), 0,
- sys_lchown }, /* 332 = lchown */
- { 0, 0, 0,
- sys_nosys }, /* 333 = unimplemented getsid */
- { 0, 0, 0,
- sys_nosys }, /* 334 = unimplemented sysfs */
- { 0, 0, 0,
- sys_nosys }, /* 335 = unimplemented */
- { 0, 0, 0,
- sys_nosys }, /* 336 = unimplemented */
- { 0, 0, 0,
- sys_nosys }, /* 337 = unimplemented sched_setparam */
- { 0, 0, 0,
- sys_nosys }, /* 338 = unimplemented sched_getparam */
- { 0, 0, 0,
- sys_nosys }, /* 339 = unimplemented sched_setscheduler */
- { 0, 0, 0,
- sys_nosys }, /* 340 = unimplemented sched_getscheduler */
- { 0, 0, 0,
- sys_nosys }, /* 341 = unimplemented sched_yield */
- { 0, 0, 0,
- sys_nosys }, /* 342 = unimplemented sched_get_priority_max */
- { 0, 0, 0,
- sys_nosys }, /* 343 = unimplemented sched_get_priority_min */
- { 0, 0, 0,
- sys_nosys }, /* 344 = unimplemented sched_rr_get_interval */
- { 0, 0, 0,
- sys_nosys }, /* 345 = unimplemented clock_settime */
- { 0, 0, 0,
- sys_nosys }, /* 346 = unimplemented clock_gettime */
- { 0, 0, 0,
- sys_nosys }, /* 347 = unimplemented clock_getres */
- { 0, 0, 0,
- sys_nosys }, /* 348 = unimplemented timer_create */
- { 0, 0, 0,
- sys_nosys }, /* 349 = unimplemented timer_delete */
- { 0, 0, 0,
- sys_nosys }, /* 350 = unimplemented timer_settime */
- { 0, 0, 0,
- sys_nosys }, /* 351 = unimplemented timer_gettime */
- { 0, 0, 0,
- sys_nosys }, /* 352 = unimplemented timer_getoverrun */
- { 2, s(struct sys_nanosleep_args), 0,
- sys_nanosleep }, /* 353 = nanosleep */
- { 0, 0, 0,
- sys_nosys }, /* 354 = unimplemented toolbox */
- { 0, 0, 0,
- sys_nosys }, /* 355 = unimplemented */
- { 0, 0, 0,
- sys_nosys }, /* 356 = unimplemented getdents */
- { 0, 0, 0,
- sys_nosys }, /* 357 = unimplemented getcontext */
- { 0, 0, 0,
- sys_nosys }, /* 358 = unimplemented sysinfo */
- { 0, 0, 0,
- sys_nosys }, /* 359 = unimplemented fcntl64 */
- { 0, 0, 0,
- sys_nosys }, /* 360 = unimplemented ftruncate64 */
- { 0, 0, 0,
- sys_nosys }, /* 361 = unimplemented fstat64 */
- { 0, 0, 0,
- sys_nosys }, /* 362 = unimplemented getdirentries64 */
- { 0, 0, 0,
- sys_nosys }, /* 363 = unimplemented getrlimit64 */
- { 0, 0, 0,
- sys_nosys }, /* 364 = unimplemented lockf64 */
- { 0, 0, 0,
- sys_nosys }, /* 365 = unimplemented lseek64 */
- { 0, 0, 0,
- sys_nosys }, /* 366 = unimplemented lstat64 */
- { 0, 0, 0,
- sys_nosys }, /* 367 = unimplemented mmap64 */
- { 0, 0, 0,
- sys_nosys }, /* 368 = unimplemented setrlimit64 */
- { 0, 0, 0,
- sys_nosys }, /* 369 = unimplemented stat64 */
- { 0, 0, 0,
- sys_nosys }, /* 370 = unimplemented truncate64 */
- { 0, 0, 0,
- sys_nosys }, /* 371 = unimplemented ulimit64 */
- { 0, 0, 0,
- sys_nosys }, /* 372 = unimplemented pread */
- { 0, 0, 0,
- sys_nosys }, /* 373 = unimplemented preadv */
- { 0, 0, 0,
- sys_nosys }, /* 374 = unimplemented pwrite */
- { 0, 0, 0,
- sys_nosys }, /* 375 = unimplemented pwritev */
- { 0, 0, 0,
- sys_nosys }, /* 376 = unimplemented pread64 */
- { 0, 0, 0,
- sys_nosys }, /* 377 = unimplemented preadv64 */
- { 0, 0, 0,
- sys_nosys }, /* 378 = unimplemented pwrite64 */
- { 0, 0, 0,
- sys_nosys }, /* 379 = unimplemented pwritev64 */
- { 0, 0, 0,
- sys_nosys }, /* 380 = unimplemented setcontext */
- { 2, s(struct hpux_sys_sigaltstack_args), 0,
- hpux_sys_sigaltstack }, /* 381 = sigaltstack */
- { 0, 0, 0,
- sys_nosys }, /* 382 = unimplemented waitid */
- { 0, 0, 0,
- sys_nosys }, /* 383 = unimplemented setpgrp */
- { 0, 0, 0,
- sys_nosys }, /* 384 = unimplemented recvmsg2 */
- { 0, 0, 0,
- sys_nosys }, /* 385 = unimplemented sendmsg2 */
- { 0, 0, 0,
- sys_nosys }, /* 386 = unimplemented socket2 */
- { 0, 0, 0,
- sys_nosys }, /* 387 = unimplemented socketpair2 */
- { 0, 0, 0,
- sys_nosys }, /* 388 = unimplemented setregid */
- { 0, 0, 0,
- sys_nosys }, /* 389 = unimplemented lwp_create */
- { 0, 0, 0,
- sys_nosys }, /* 390 = unimplemented lwp_terminate */
- { 0, 0, 0,
- sys_nosys }, /* 391 = unimplemented lwp_wait */
- { 0, 0, 0,
- sys_nosys }, /* 392 = unimplemented lwp_suspend */
- { 0, 0, 0,
- sys_nosys }, /* 393 = unimplemented lwp_resume */
- { 0, 0, 0,
- sys_nosys }, /* 394 = unimplemented */
- { 0, 0, 0,
- sys_nosys }, /* 395 = unimplemented lwp_abort_syscall */
- { 0, 0, 0,
- sys_nosys }, /* 396 = unimplemented lwp_info */
- { 0, 0, 0,
- sys_nosys }, /* 397 = unimplemented lwp_kill */
- { 0, 0, 0,
- sys_nosys }, /* 398 = unimplemented ksleep */
- { 0, 0, 0,
- sys_nosys }, /* 399 = unimplemented kwakeup */
- { 0, 0, 0,
- sys_nosys }, /* 400 = unimplemented */
- { 0, 0, 0,
- sys_nosys }, /* 401 = unimplemented pstat_getlwp */
- { 0, 0, 0,
- sys_nosys }, /* 402 = unimplemented lwp_exit */
- { 0, 0, 0,
- sys_nosys }, /* 403 = unimplemented lwp_continue */
- { 0, 0, 0,
- sys_nosys }, /* 404 = unimplemented getacl */
- { 0, 0, 0,
- sys_nosys }, /* 405 = unimplemented fgetacl */
- { 0, 0, 0,
- sys_nosys }, /* 406 = unimplemented setacl */
- { 0, 0, 0,
- sys_nosys }, /* 407 = unimplemented fsetacl */
- { 0, 0, 0,
- sys_nosys }, /* 408 = unimplemented getaccess */
- { 0, 0, 0,
- sys_nosys }, /* 409 = unimplemented lwp_mutex_init */
- { 0, 0, 0,
- sys_nosys }, /* 410 = unimplemented lwp_mutex_lock_sys */
- { 0, 0, 0,
- sys_nosys }, /* 411 = unimplemented lwp_mutex_unlock */
- { 0, 0, 0,
- sys_nosys }, /* 412 = unimplemented lwp_cond_init */
- { 0, 0, 0,
- sys_nosys }, /* 413 = unimplemented lwp_cond_signal */
- { 0, 0, 0,
- sys_nosys }, /* 414 = unimplemented lwp_cond_broadcast */
- { 0, 0, 0,
- sys_nosys }, /* 415 = unimplemented lwp_cond_wait_sys */
- { 0, 0, 0,
- sys_nosys }, /* 416 = unimplemented lwp_getscheduler */
- { 0, 0, 0,
- sys_nosys }, /* 417 = unimplemented lwp_setscheduler */
- { 0, 0, 0,
- sys_nosys }, /* 418 = unimplemented lwp_getstate */
- { 0, 0, 0,
- sys_nosys }, /* 419 = unimplemented lwp_setstate */
- { 0, 0, 0,
- sys_nosys }, /* 420 = unimplemented lwp_detach */
- { 2, s(struct sys_mlock_args), 0,
- sys_mlock }, /* 421 = mlock */
- { 2, s(struct sys_munlock_args), 0,
- sys_munlock }, /* 422 = munlock */
- { 1, s(struct sys_mlockall_args), 0,
- sys_mlockall }, /* 423 = mlockall */
- { 0, 0, 0,
- sys_munlockall }, /* 424 = munlockall */
- { 0, 0, 0,
- sys_nosys }, /* 425 = unimplemented shm_open */
- { 0, 0, 0,
- sys_nosys }, /* 426 = unimplemented shm_unlink */
- { 0, 0, 0,
- sys_nosys }, /* 427 = unimplemented sigqueue */
- { 0, 0, 0,
- sys_nosys }, /* 428 = unimplemented sigwaitinfo */
- { 0, 0, 0,
- sys_nosys }, /* 429 = unimplemented sigtimedwait */
- { 0, 0, 0,
- sys_nosys }, /* 430 = unimplemented sigwait */
- { 0, 0, 0,
- sys_nosys }, /* 431 = unimplemented aio_read */
- { 0, 0, 0,
- sys_nosys }, /* 432 = unimplemented aio_write */
- { 0, 0, 0,
- sys_nosys }, /* 433 = unimplemented lio_listio */
- { 0, 0, 0,
- sys_nosys }, /* 434 = unimplemented aio_error */
- { 0, 0, 0,
- sys_nosys }, /* 435 = unimplemented aio_return */
- { 0, 0, 0,
- sys_nosys }, /* 436 = unimplemented aio_cancel */
- { 0, 0, 0,
- sys_nosys }, /* 437 = unimplemented aio_suspend */
- { 0, 0, 0,
- sys_nosys }, /* 438 = unimplemented aio_fsync */
- { 0, 0, 0,
- sys_nosys }, /* 439 = unimplemented mq_open */
- { 0, 0, 0,
- sys_nosys }, /* 440 = unimplemented mq_close */
- { 0, 0, 0,
- sys_nosys }, /* 441 = unimplemented mq_unlink */
- { 0, 0, 0,
- sys_nosys }, /* 442 = unimplemented mq_send */
- { 0, 0, 0,
- sys_nosys }, /* 443 = unimplemented mq_receive */
- { 0, 0, 0,
- sys_nosys }, /* 444 = unimplemented mq_notify */
- { 0, 0, 0,
- sys_nosys }, /* 445 = unimplemented mq_setattr */
- { 0, 0, 0,
- sys_nosys }, /* 446 = unimplemented mq_getattr */
- { 0, 0, 0,
- sys_nosys }, /* 447 = unimplemented ksem_open */
- { 0, 0, 0,
- sys_nosys }, /* 448 = unimplemented ksem_unlink */
- { 0, 0, 0,
- sys_nosys }, /* 449 = unimplemented ksem_close */
- { 0, 0, 0,
- sys_nosys }, /* 450 = unimplemented ksem_post */
- { 0, 0, 0,
- sys_nosys }, /* 451 = unimplemented ksem_wait */
- { 0, 0, 0,
- sys_nosys }, /* 452 = unimplemented ksem_read */
- { 0, 0, 0,
- sys_nosys }, /* 453 = unimplemented ksem_trywait */
- { 0, 0, 0,
- sys_nosys }, /* 454 = unimplemented lwp_rwlock_init */
- { 0, 0, 0,
- sys_nosys }, /* 455 = unimplemented lwp_rwlock_destroy */
- { 0, 0, 0,
- sys_nosys }, /* 456 = unimplemented lwp_rwlock_rdlock_sys */
- { 0, 0, 0,
- sys_nosys }, /* 457 = unimplemented lwp_rwlock_wrlock_sys */
- { 0, 0, 0,
- sys_nosys }, /* 458 = unimplemented lwp_rwlock_tryrdlock */
- { 0, 0, 0,
- sys_nosys }, /* 459 = unimplemented lwp_rwlock_trywrlock */
- { 0, 0, 0,
- sys_nosys }, /* 460 = unimplemented lwp_rwlock_unlock */
- { 0, 0, 0,
- sys_nosys }, /* 461 = unimplemented ttrace */
- { 0, 0, 0,
- sys_nosys }, /* 462 = unimplemented ttrace_wait */
- { 0, 0, 0,
- sys_nosys }, /* 463 = unimplemented lf_wire_mem */
- { 0, 0, 0,
- sys_nosys }, /* 464 = unimplemented lf_unwire_mem */
- { 0, 0, 0,
- sys_nosys }, /* 465 = unimplemented lf_send_pin_map */
- { 0, 0, 0,
- sys_nosys }, /* 466 = unimplemented lf_free_buf */
- { 0, 0, 0,
- sys_nosys }, /* 467 = unimplemented lf_wait_nq */
- { 0, 0, 0,
- sys_nosys }, /* 468 = unimplemented lf_wakeup_conn_q */
- { 0, 0, 0,
- sys_nosys }, /* 469 = unimplemented lf_unused */
- { 0, 0, 0,
- sys_nosys }, /* 470 = unimplemented lwp_sema_init */
- { 0, 0, 0,
- sys_nosys }, /* 471 = unimplemented lwp_sema_post */
- { 0, 0, 0,
- sys_nosys }, /* 472 = unimplemented lwp_sema_wait */
- { 0, 0, 0,
- sys_nosys }, /* 473 = unimplemented lwp_sema_trywait */
- { 0, 0, 0,
- sys_nosys }, /* 474 = unimplemented lwp_sema_destroy */
- { 0, 0, 0,
- sys_nosys }, /* 475 = unimplemented statvfs64 */
- { 0, 0, 0,
- sys_nosys }, /* 476 = unimplemented fstatvfs64 */
- { 0, 0, 0,
- sys_nosys }, /* 477 = unimplemented msh_register */
- { 0, 0, 0,
- sys_nosys }, /* 478 = unimplemented ptrace64 */
- { 0, 0, 0,
- sys_nosys }, /* 479 = unimplemented sendfile */
- { 0, 0, 0,
- sys_nosys }, /* 480 = unimplemented sendpath */
- { 0, 0, 0,
- sys_nosys }, /* 481 = unimplemented sendfile64 */
- { 0, 0, 0,
- sys_nosys }, /* 482 = unimplemented sendpath64 */
- { 0, 0, 0,
- sys_nosys }, /* 483 = unimplemented modload */
- { 0, 0, 0,
- sys_nosys }, /* 484 = unimplemented moduload */
- { 0, 0, 0,
- sys_nosys }, /* 485 = unimplemented modpath */
- { 0, 0, 0,
- sys_nosys }, /* 486 = unimplemented getksym */
- { 0, 0, 0,
- sys_nosys }, /* 487 = unimplemented modadm */
- { 0, 0, 0,
- sys_nosys }, /* 488 = unimplemented modstat */
- { 0, 0, 0,
- sys_nosys }, /* 489 = unimplemented lwp_detached_exit */
- { 0, 0, 0,
- sys_nosys }, /* 490 = unimplemented crashconf */
- { 0, 0, 0,
- sys_nosys }, /* 491 = unimplemented siginhibit */
- { 0, 0, 0,
- sys_nosys }, /* 492 = unimplemented sigenable */
- { 0, 0, 0,
- sys_nosys }, /* 493 = unimplemented spuctl */
- { 0, 0, 0,
- sys_nosys }, /* 494 = unimplemented zerokernelsum */
- { 0, 0, 0,
- sys_nosys }, /* 495 = unimplemented nfs_kstat */
- { 0, 0, 0,
- sys_nosys }, /* 496 = unimplemented aio_read64 */
- { 0, 0, 0,
- sys_nosys }, /* 497 = unimplemented aio_write64 */
- { 0, 0, 0,
- sys_nosys }, /* 498 = unimplemented aio_error64 */
- { 0, 0, 0,
- sys_nosys }, /* 499 = unimplemented aio_return64 */
- { 0, 0, 0,
- sys_nosys }, /* 500 = unimplemented aio_cancel64 */
- { 0, 0, 0,
- sys_nosys }, /* 501 = unimplemented aio_suspend64 */
- { 0, 0, 0,
- sys_nosys }, /* 502 = unimplemented aio_fsync64 */
- { 0, 0, 0,
- sys_nosys }, /* 503 = unimplemented lio_listio64 */
- { 0, 0, 0,
- sys_nosys }, /* 504 = unimplemented recv2 */
- { 0, 0, 0,
- sys_nosys }, /* 505 = unimplemented recvfrom2 */
- { 0, 0, 0,
- sys_nosys }, /* 506 = unimplemented send2 */
- { 0, 0, 0,
- sys_nosys }, /* 507 = unimplemented sendto2 */
- { 0, 0, 0,
- sys_nosys }, /* 508 = unimplemented acl */
- { 0, 0, 0,
- sys_nosys }, /* 509 = unimplemented __cnx_p2p_ctl */
- { 0, 0, 0,
- sys_nosys }, /* 510 = unimplemented __cnx_gsched_ctl */
- { 0, 0, 0,
- sys_nosys }, /* 511 = unimplemented __cnx_pmon_ctl */
- { 0, 0, 0,
- sys_nosys }, /* 512 = unimplemented mem_res_grp */
- { 0, 0, 0,
- sys_nosys }, /* 513 = unimplemented fabric */
- { 0, 0, 0,
- sys_nosys }, /* 514 = unimplemented diagsyscall */
- { 0, 0, 0,
- sys_nosys }, /* 515 = unimplemented tuneinfo */
- { 0, 0, 0,
- sys_nosys }, /* 516 = unimplemented gettune */
- { 0, 0, 0,
- sys_nosys }, /* 517 = unimplemented settune */
- { 0, 0, 0,
- sys_nosys }, /* 518 = unimplemented pset_create */
- { 0, 0, 0,
- sys_nosys }, /* 519 = unimplemented pset_destroy */
- { 0, 0, 0,
- sys_nosys }, /* 520 = unimplemented pset_assign */
- { 0, 0, 0,
- sys_nosys }, /* 521 = unimplemented pset_bind */
- { 0, 0, 0,
- sys_nosys }, /* 522 = unimplemented pset_getattr */
- { 0, 0, 0,
- sys_nosys }, /* 523 = unimplemented pset_setattr */
- { 0, 0, 0,
- sys_nosys }, /* 524 = unimplemented pset_ctl */
- { 0, 0, 0,
- sys_nosys }, /* 525 = unimplemented pset_rtctl */
-};
-
diff --git a/sys/compat/hpux/hppa/syscalls.conf b/sys/compat/hpux/hppa/syscalls.conf
deleted file mode 100644
index 32145033572..00000000000
--- a/sys/compat/hpux/hppa/syscalls.conf
+++ /dev/null
@@ -1,12 +0,0 @@
-# $OpenBSD: syscalls.conf,v 1.1 2004/07/09 21:48:21 mickey Exp $
-
-sysnames="hpux_syscalls.c"
-sysnumhdr="hpux_syscall.h"
-syssw="hpux_sysent.c"
-sysarghdr="hpux_syscallargs.h"
-compatopts=""
-libcompatopts=""
-
-switchname="hpux_sysent"
-namesname="hpux_syscallnames"
-constprefix="HPUX_SYS_"
diff --git a/sys/compat/hpux/hppa/syscalls.master b/sys/compat/hpux/hppa/syscalls.master
deleted file mode 100644
index c8299c9689e..00000000000
--- a/sys/compat/hpux/hppa/syscalls.master
+++ /dev/null
@@ -1,667 +0,0 @@
- $OpenBSD: syscalls.master,v 1.9 2010/01/28 19:59:09 miod Exp $
-
-; @(#)syscalls.master 8.1 (Berkeley) 7/19/93
-
-; OpenBSD COMPAT_HPUX system call name/number "master" file.
-; (See syscalls.conf to see what it is processed into.)
-;
-; Fields: number type [type-dependent ...]
-; number system call number, must be in order
-; type one of STD, OBSOL, UNIMPL, NODEF, NOARGS, or one of
-; the compatibility options defined in syscalls.conf.
-;
-; types:
-; STD always included
-; OBSOL obsolete, not included in system
-; UNIMPL unimplemented, not included in system
-; NODEF included, but don't define the syscall number
-; NOARGS included, but don't define the syscall args structure
-;
-; The compat options are defined in the syscalls.conf file, and the
-; compat option name is prefixed to the syscall name. Other than
-; that, they're like NODEF (for 'compat' options), or STD (for
-; 'libcompat' options).
-;
-; The type-dependent arguments are as follows:
-; For STD, NODEF, NOARGS, and compat syscalls:
-; { pseudo-proto } [alias]
-; For other syscalls:
-; [comment]
-;
-; #ifdef's, etc. may be included, and are copied to the output files.
-; #include's are copied to the syscall switch definition file only.
-;
-; hppa syscall names (some do not match)
-; http://lists.parisc-linux.org/pipermail/parisc-linux/2001-October/013957.html
-;
-
-#include <sys/param.h>
-#include <sys/systm.h>
-#include <sys/signal.h>
-#include <sys/mount.h>
-#include <sys/exec.h>
-#include <sys/syscallargs.h>
-
-#include <compat/hpux/hpux.h>
-#include <compat/hpux/hppa/hpux_syscallargs.h>
-
-#include <machine/hpux_machdep.h>
-
-0 NOARGS { int sys_nosys(void); } syscall
-1 NOARGS { int sys_exit(int rval); }
-2 STD { int hpux_sys_fork(void); }
-3 STD { int hpux_sys_read(int fd, char *buf, u_int nbyte); }
-4 STD { int hpux_sys_write(int fd, char *buf, u_int nbyte); }
-5 STD { int hpux_sys_open(char *path, int flags, int mode); }
-6 NOARGS { int sys_close(int fd); }
-7 STD { int hpux_sys_wait(int *status); }
-8 STD { int hpux_sys_creat(char *path, int mode); }
-9 NOARGS { int sys_link(char *path, char *link); }
-10 STD { int hpux_sys_unlink(char *path); }
-11 STD { int hpux_sys_execv(char * path, char * * argp); }
-12 STD { int hpux_sys_chdir(char *path); }
-13 STD { int hpux_sys_time_6x(time_t *t); }
-14 STD { int hpux_sys_mknod(char *path, int mode, int dev); }
-15 STD { int hpux_sys_chmod(char *path, int mode); }
-16 STD { int hpux_sys_chown(char *path, int uid, int gid); }
-17 NOARGS { int sys_obreak(char *nsize); }
-18 UNIMPL lchmod
-19 NOARGS { long compat_43_sys_lseek(int fd, long offset, \
- int whence); }
-20 NOARGS { pid_t sys_getpid(void); }
-21 UNIMPL mount
-22 UNIMPL umount
-23 NOARGS { int sys_setuid(uid_t uid); }
-24 NOARGS { uid_t sys_getuid(void); }
-25 STD { int hpux_sys_stime_6x(int time); }
-#ifdef PTRACE
-26 STD { int hpux_sys_ptrace(int req, int pid, int *addr, \
- int data); }
-#else
-26 UNIMPL ptrace
-#endif
-27 STD { int hpux_sys_alarm_6x(int deltat); }
-28 UNIMPL cnx_lw_pmon_read
-29 STD { int hpux_sys_pause_6x(void); }
-30 STD { int hpux_sys_utime_6x(char *fname, time_t *tptr); }
-31 STD { int hpux_sys_stty_6x(int fd, caddr_t arg); }
-32 STD { int hpux_sys_gtty_6x(int fd, caddr_t arg); }
-33 STD { int hpux_sys_access(char *path, int flags); }
-34 STD { int hpux_sys_nice_6x(int nval); }
-35 STD { int hpux_sys_ftime_6x(struct hpux_timeb *tp); }
-36 NOARGS { int sys_sync(void); }
-37 STD { int hpux_sys_kill(pid_t pid, int signo); }
-38 STD { int hpux_sys_stat(char *path, struct hpux_stat *sb); }
-39 STD { int hpux_sys_setpgrp_6x(void); }
-40 STD { int hpux_sys_lstat(char *path, struct hpux_stat *sb); }
-41 NOARGS { int sys_dup(int fd); }
-42 NOARGS { int sys_opipe(void); }
-43 STD { int hpux_sys_times_6x(struct tms *tms); }
-44 NOARGS { int sys_profil(caddr_t samples, u_int size, \
- u_int offset, u_int scale); }
-
-45 UNIMPL ki_syscall
-46 NOARGS { int sys_setgid(gid_t gid); }
-47 NOARGS { gid_t sys_getgid(void); }
-48 UNIMPL
-49 UNIMPL reserved for USG
-50 UNIMPL reserved for USG
-51 UNIMPL acct
-52 UNIMPL set_userthreadid
-53 UNIMPL lwp_mutex_unlock_2
-54 STD { int hpux_sys_ioctl(int fd, int com, caddr_t data); }
-55 UNIMPL reboot
-56 STD { int hpux_sys_symlink(char *path, char *link); }
-57 STD { int hpux_sys_utssys(struct hpux_utsname *uts, \
- int dev, int request); }
-58 STD { int hpux_sys_readlink(char *path, char *buf, \
- int count); }
-59 STD { int hpux_sys_execve(char *path, char **argp, \
- char **envp); }
-60 NOARGS { int sys_umask(int newmask); }
-61 NOARGS { int sys_chroot(char *path); }
-62 STD { int hpux_sys_fcntl(int fd, int cmd, int arg); }
-63 STD { int hpux_sys_ulimit(int cmd, int newlimit); }
-64 UNIMPL
-65 UNIMPL
-66 STD { int hpux_sys_vfork(void); }
-67 UNIMPL lwp_getprivate
-68 UNIMPL lwp_setprivate
-69 UNIMPL
-70 UNIMPL
-71 STD { int hpux_sys_mmap(caddr_t addr, size_t len, \
- int prot, int flags, int fd, long pos); }
-72 UNIMPL
-73 NOARGS { int sys_munmap(caddr_t addr, size_t len); }
-74 NOARGS { int sys_mprotect(caddr_t addr, size_t len, \
- int prot); }
-75 NOARGS { int sys_madvise(void *addr, size_t len, int behav); }
-76 UNIMPL vhangup
-77 UNIMPL swapoff
-78 UNIMPL
-79 NOARGS { int sys_getgroups(u_int gidsetsize, gid_t *gidset); }
-80 NOARGS { int sys_setgroups(u_int gidsetsize, gid_t *gidset); }
-81 NOARGS { pid_t sys_getpgid(pid_t pid); }
-82 STD { int hpux_sys_setpgrp2(pid_t pid, pid_t pgid); }
-83 NOARGS { int sys_setitimer(u_int which, \
- struct itimerval *itv, struct itimerval *oitv); }
-84 STD { int hpux_sys_wait3(int *status, int options, \
- int rusage); }
-85 UNIMPL swapon
-86 NOARGS { int sys_getitimer(u_int which, \
- struct itimerval *itv); }
-87 UNIMPL
-88 UNIMPL
-89 UNIMPL
-90 NOARGS { int sys_dup2(u_int from, u_int to); }
-91 UNIMPL
-92 STD { int hpux_sys_fstat(int fd, struct hpux_stat *sb); }
-93 NOARGS { int sys_select(u_int nd, fd_set *in, fd_set *ou, \
- fd_set *ex, struct timeval *tv); }
-94 UNIMPL
-95 NOARGS { int sys_fsync(int fd); }
-96 NOARGS { int sys_setpriority(int which, id_t who, int prio); }
-97 UNIMPL
-98 UNIMPL
-99 UNIMPL
-100 NOARGS { int sys_getpriority(int which, id_t who); }
-101 UNIMPL
-102 UNIMPL
-103 UNIMPL lf_send
-104 UNIMPL
-105 UNIMPL
-106 UNIMPL
-107 UNIMPL
-108 STD { int hpux_sys_sigvec(int signo, struct sigvec *nsv, \
- struct sigvec *osv); }
-109 STD { int hpux_sys_sigblock(int mask); }
-110 STD { int hpux_sys_sigsetmask(int mask); }
-111 STD { int hpux_sys_sigpause(int mask); }
-112 NOARGS { int compat_43_sys_sigstack(struct sigstack *nss, \
- struct sigstack *oss); }
-113 UNIMPL
-114 UNIMPL
-115 UNIMPL regctl
-116 NOARGS { int sys_gettimeofday(struct timeval *tp); }
-117 UNIMPL getrusage
-118 UNIMPL
-119 UNIMPL
-120 STD { int hpux_sys_readv(int fd, struct iovec *iovp, \
- u_int iovcnt); }
-121 STD { int hpux_sys_writev(int fd, struct iovec *iovp, \
- u_int iovcnt); }
-122 NOARGS { int sys_settimeofday(struct timeval *tv, \
- struct timezone *tzp); }
-123 NOARGS { int sys_fchown(int fd, int uid, int gid); }
-124 NOARGS { int sys_fchmod(int fd, int mode); }
-125 UNIMPL
-126 NOARGS { int sys_setresuid(uid_t ruid, uid_t uide, \
- uid_t suid); }
-127 NOARGS { int sys_setresgid(gid_t rgid, gid_t egid, \
- gid_t sgid); }
-128 STD { int hpux_sys_rename(char *from, char *to); }
-129 STD { int hpux_sys_truncate(char *path, long length); }
-130 NOARGS { int compat_43_sys_ftruncate(int fd, long length); }
-131 UNIMPL
-132 STD { int hpux_sys_sysconf(int name); }
-133 UNIMPL
-134 UNIMPL
-135 UNIMPL
-136 STD { int hpux_sys_mkdir(char *path, int mode); }
-137 STD { int hpux_sys_rmdir(char *path); }
-138 UNIMPL
-139 UNIMPL sigcleanup
-140 UNIMPL setcore
-141 UNIMPL
-142 UNIMPL
-143 UNIMPL
-144 STD { int hpux_sys_getrlimit(u_int which, \
- struct ogetrlimit *rlp); }
-145 STD { int hpux_sys_setrlimit(u_int which, \
- struct ogetrlimit *rlp); }
-146 UNIMPL
-147 UNIMPL lwp_self
-148 UNIMPL quotactl
-149 UNIMPL get_sysinfo
-150 UNIMPL
-151 UNIMPL privgrp
-152 STD { int hpux_sys_rtprio(pid_t pid, int prio); }
-153 UNIMPL plock
-154 UNIMPL lf_next_scn
-155 STD { int hpux_sys_lockf(int fd, int func, long size); }
-#ifdef SYSVSEM
-156 NOARGS { int sys_semget(key_t key, int nsems, int semflg); }
-157 NOARGS { int sys___semctl(int semid, int semnum, int cmd, \
- union semun *arg); }
-158 NOARGS { int sys_semop(int semid, struct sembuf *sops, \
- u_int nsops); }
-#else
-156 UNIMPL semget
-157 UNIMPL semctl
-158 UNIMPL semop
-#endif
-#ifdef SYSVMSG
-159 NOARGS { int sys_msgget(key_t key, int msgflg); }
-160 NOARGS { int sys_msgctl(int msqid, int cmd, \
- struct msqid_ds *buf); }
-161 NOARGS { int sys_msgsnd(int msqid, void *msgp, size_t msgsz, \
- int msgflg); }
-162 NOARGS { int sys_msgrcv(int msqid, void *msgp, size_t msgsz, \
- long msgtyp, int msgflg); }
-#else
-159 UNIMPL msgget
-160 UNIMPL msgctl
-161 UNIMPL msgsnd
-162 UNIMPL msgrcv
-#endif
-#ifdef SYSVSHM
-163 NOARGS { int sys_shmget(key_t key, int size, int shmflg); }
-164 STD { int hpux_sys_shmctl(int shmid, int cmd, \
- caddr_t buf); }
-165 NOARGS { int sys_shmat(int shmid, void *shmaddr, int shmflg); }
-166 NOARGS { int sys_shmdt(void *shmaddr); }
-#else
-163 UNIMPL shmget
-164 UNIMPL shmctl
-165 UNIMPL shmat
-166 UNIMPL shmdt
-#endif
-167 UNIMPL set_mem_window
-168 UNIMPL nsp_init
-169 UNIMPL
-170 UNIMPL mkrnod
-171 UNIMPL test
-172 UNIMPL unsp_open
-173 UNIMPL
-174 STD { int hpux_sys_getcontext(char *buf, int len); }
-175 UNIMPL osetcontext
-176 UNIMPL bigio
-177 UNIMPL pipenode
-178 UNIMPL lsync
-179 UNIMPL
-180 UNIMPL mysite
-181 UNIMPL sitels
-182 UNIMPL swapclients
-183 UNIMPL rmtprocess
-184 UNIMPL dskless_stats
-185 STD { int hpux_sys_sigprocmask(int how, \
- hpux_sigset_t *set, hpux_sigset_t *oset); }
-186 STD { int hpux_sys_sigpending(hpux_sigset_t *set); }
-187 STD { int hpux_sys_sigsuspend(hpux_sigset_t *set); }
-188 STD { int hpux_sys_sigaction(int signo, \
- struct hpux_sigaction *nsa, \
- struct hpux_sigaction *osa); }
-189 UNIMPL lw_get_thread_times
-190 UNIMPL nfssvc
-191 UNIMPL getfh
-192 NOARGS { int compat_09_sys_getdomainname(char *domainname, \
- int len); }
-193 NOARGS { int compat_09_sys_setdomainname(char *domainname, \
- int len); }
-194 UNIMPL async_daemon
-195 NOARGS { int compat_43_sys_getdirentries(int fd, char *buf, \
- u_int count, long *basep); }
-196 UNIMPL statfs
-197 UNIMPL fstatfs
-198 UNIMPL vfsmount
-199 UNIMPL qmml
-200 STD { int hpux_sys_waitpid(pid_t pid, int *status, \
- int options, struct rusage *rusage); }
-201 UNIMPL
-202 UNIMPL
-203 UNIMPL
-204 UNIMPL
-205 UNIMPL
-206 UNIMPL
-207 UNIMPL
-208 UNIMPL
-209 UNIMPL
-210 UNIMPL
-211 UNIMPL
-212 UNIMPL
-213 UNIMPL
-214 UNIMPL
-215 UNIMPL
-216 UNIMPL
-217 UNIMPL
-218 UNIMPL
-219 UNIMPL
-220 UNIMPL
-221 UNIMPL
-222 UNIMPL
-223 UNIMPL
-224 STD { void hpux_sigsetreturn(caddr_t addr, int cookie, int len); }
-225 UNIMPL sigsetstatemask
-226 UNIMPL
-227 UNIMPL cs
-228 UNIMPL cds
-229 UNIMPL set_no_trunc
-230 UNIMPL pathconf
-231 UNIMPL fpathconf
-232 UNIMPL
-233 UNIMPL
-234 UNIMPL nfs_fcntl
-235 UNIMPL ogetacl
-236 UNIMPL ofgetctl
-237 UNIMPL osetacl
-238 UNIMPL ofsetacl
-239 UNIMPL pstat
-240 UNIMPL getaudid
-241 UNIMPL setaudid
-242 UNIMPL getaudproc
-243 UNIMPL setaudproc
-244 UNIMPL getevent
-245 UNIMPL setevent
-246 UNIMPL audwrite
-247 UNIMPL audswitch
-248 UNIMPL audctl
-249 UNIMPL ogetaccess
-250 UNIMPL fsctl
-251 UNIMPL
-252 UNIMPL getmount_entries
-253 UNIMPL lwp_mutex_init2
-254 UNIMPL
-255 UNIMPL
-256 UNIMPL
-257 UNIMPL
-258 UNIMPL
-259 UNIMPL swapfs
-260 UNIMPL fss
-261 UNIMPL
-262 UNIMPL
-263 UNIMPL
-264 UNIMPL
-265 UNIMPL
-266 UNIMPL
-267 UNIMPL tsync
-268 UNIMPL getnumfds
-269 NOARGS { int sys_poll(struct pollfd *fds, u_int nfds, \
- int timeout); }
-270 UNIMPL getmsg
-271 UNIMPL putmsg
-272 NOARGS { int sys_fchdir(int fd); }
-273 UNIMPL getmount_cnt
-274 UNIMPL getmount_entry
-275 NOARGS { int compat_43_sys_accept(int s, caddr_t name, \
- int *anamelen); }
-276 NOARGS { int sys_bind(int s, caddr_t name, int namelen); }
-277 NOARGS { int sys_connect(int s, caddr_t name, int namelen); }
-278 NOARGS { int sys_getpeername(int fdes, caddr_t asa, \
- int *alen); }
-279 NOARGS { int sys_getsockname(int fdec, caddr_t asa, \
- int *alen); }
-280 NOARGS { int sys_getsockopt(int s, int level, int name, \
- void *val, socklen_t *avalsize); }
-281 NOARGS { int sys_listen(int s, int backlog); }
-282 NOARGS { int compat_43_sys_recv(int s, caddr_t buf, int len, \
- int flags); }
-283 NOARGS { int compat_43_sys_recvfrom(int s, caddr_t buf, \
- size_t len, int flags, caddr_t from, \
- int *fromlenaddr); }
-284 NOARGS { int compat_43_sys_recvmsg(int s, \
- struct omsghdr *msg, int flags); }
-285 NOARGS { int compat_43_sys_send(int s, caddr_t buf, int len, \
- int flags); }
-286 NOARGS { int compat_43_sys_sendmsg(int s, caddr_t msg, \
- int flags); }
-287 NOARGS { int sys_sendto(int s, caddr_t buf, size_t len, \
- int flags, caddr_t to, int tolen); }
-288 NOARGS { int sys_setsockopt(int s, int level, int name, \
- const void *val, socklen_t valsize); }
-289 NOARGS { int sys_shutdown(int s, int how); }
-290 NOARGS { int sys_socket(int domain, int type, int protocol); }
-291 NOARGS { int sys_socketpair(int domain, int type, \
- int protocol, int *rsv); }
-292 UNIMPL proc_open
-293 UNIMPL proc_close
-294 UNIMPL proc_send
-295 UNIMPL proc_recv
-296 UNIMPL proc_sendrecv
-297 UNIMPL proc_syscall
-298 UNIMPL
-299 UNIMPL
-300 UNIMPL
-301 UNIMPL
-302 UNIMPL
-303 UNIMPL
-304 UNIMPL
-305 UNIMPL
-306 UNIMPL
-307 UNIMPL
-308 UNIMPL
-309 UNIMPL
-310 UNIMPL
-311 UNIMPL
-#ifdef SYSVSEM
-312 NOARGS { int sys___semctl(int semid, int semnum, int cmd, \
- union semun *arg); } nsemctl
-#else
-312 UNIMPL semctl
-#endif
-#ifdef SYSVMSG
-313 NOARGS { int sys_msgctl(int msqid, int cmd, \
- struct msqid_ds *buf); } nmsgctl
-#else
-313 UNIMPL msgctl
-#endif
-#ifdef SYSVSHM
-314 STD { int hpux_sys_nshmctl(int shmid, int cmd, \
- caddr_t buf); }
-#else
-314 UNIMPL shmctl
-#endif
-315 UNIMPL mpctl
-316 UNIMPL exportfs
-317 UNIMPL getpmsg
-318 UNIMPL putpmsg
-319 UNIMPL
-; msync(2) sez hpux does no EBUSY and blocks XXX
-320 NOARGS { int sys_msync(void *addr, size_t len, int flags); }
-321 UNIMPL msleep
-322 UNIMPL mwakeup
-323 UNIMPL msem_init
-324 UNIMPL msem_remove
-325 UNIMPL adjtime
-326 UNIMPL kload
-327 UNIMPL fattach
-328 UNIMPL fdetach
-329 UNIMPL serialize
-330 UNIMPL statvfs
-331 UNIMPL fstatvfs
-332 NOARGS { int sys_lchown(const char *path, uid_t uid, gid_t gid); }
-333 UNIMPL getsid
-334 UNIMPL sysfs
-335 UNIMPL
-336 UNIMPL
-337 UNIMPL sched_setparam
-338 UNIMPL sched_getparam
-339 UNIMPL sched_setscheduler
-340 UNIMPL sched_getscheduler
-341 UNIMPL sched_yield
-342 UNIMPL sched_get_priority_max
-343 UNIMPL sched_get_priority_min
-344 UNIMPL sched_rr_get_interval
-345 UNIMPL clock_settime
-346 UNIMPL clock_gettime
-347 UNIMPL clock_getres
-348 UNIMPL timer_create
-349 UNIMPL timer_delete
-350 UNIMPL timer_settime
-351 UNIMPL timer_gettime
-352 UNIMPL timer_getoverrun
-353 NOARGS { int sys_nanosleep(const struct timespec *rqtp, \
- struct timespec *rmtp); }
-354 UNIMPL toolbox
-355 UNIMPL
-356 UNIMPL getdents
-357 UNIMPL getcontext
-358 UNIMPL sysinfo
-359 UNIMPL fcntl64
-360 UNIMPL ftruncate64
-361 UNIMPL fstat64
-362 UNIMPL getdirentries64
-363 UNIMPL getrlimit64
-364 UNIMPL lockf64
-365 UNIMPL lseek64
-366 UNIMPL lstat64
-367 UNIMPL mmap64
-368 UNIMPL setrlimit64
-369 UNIMPL stat64
-370 UNIMPL truncate64
-371 UNIMPL ulimit64
-372 UNIMPL pread
-373 UNIMPL preadv
-374 UNIMPL pwrite
-375 UNIMPL pwritev
-376 UNIMPL pread64
-377 UNIMPL preadv64
-378 UNIMPL pwrite64
-379 UNIMPL pwritev64
-380 UNIMPL setcontext
-381 STD { int hpux_sys_sigaltstack( \
- const struct hpux_sigaltstack *nss, \
- struct hpux_sigaltstack *oss); }
-382 UNIMPL waitid
-383 UNIMPL setpgrp
-384 UNIMPL recvmsg2
-385 UNIMPL sendmsg2
-386 UNIMPL socket2
-387 UNIMPL socketpair2
-388 UNIMPL setregid
-389 UNIMPL lwp_create
-390 UNIMPL lwp_terminate
-391 UNIMPL lwp_wait
-392 UNIMPL lwp_suspend
-393 UNIMPL lwp_resume
-394 UNIMPL
-395 UNIMPL lwp_abort_syscall
-396 UNIMPL lwp_info
-397 UNIMPL lwp_kill
-398 UNIMPL ksleep
-399 UNIMPL kwakeup
-400 UNIMPL
-401 UNIMPL pstat_getlwp
-402 UNIMPL lwp_exit
-403 UNIMPL lwp_continue
-404 UNIMPL getacl
-405 UNIMPL fgetacl
-406 UNIMPL setacl
-407 UNIMPL fsetacl
-408 UNIMPL getaccess
-409 UNIMPL lwp_mutex_init
-410 UNIMPL lwp_mutex_lock_sys
-411 UNIMPL lwp_mutex_unlock
-412 UNIMPL lwp_cond_init
-413 UNIMPL lwp_cond_signal
-414 UNIMPL lwp_cond_broadcast
-415 UNIMPL lwp_cond_wait_sys
-416 UNIMPL lwp_getscheduler
-417 UNIMPL lwp_setscheduler
-418 UNIMPL lwp_getstate
-419 UNIMPL lwp_setstate
-420 UNIMPL lwp_detach
-421 NOARGS { int sys_mlock(const void *addr, size_t len); }
-422 NOARGS { int sys_munlock(const void *addr, size_t len); }
-423 NOARGS { int sys_mlockall(int flags); }
-424 NOARGS { int sys_munlockall(void); }
-425 UNIMPL shm_open
-426 UNIMPL shm_unlink
-427 UNIMPL sigqueue
-428 UNIMPL sigwaitinfo
-429 UNIMPL sigtimedwait
-430 UNIMPL sigwait
-431 UNIMPL aio_read
-432 UNIMPL aio_write
-433 UNIMPL lio_listio
-434 UNIMPL aio_error
-435 UNIMPL aio_return
-436 UNIMPL aio_cancel
-437 UNIMPL aio_suspend
-438 UNIMPL aio_fsync
-439 UNIMPL mq_open
-440 UNIMPL mq_close
-441 UNIMPL mq_unlink
-442 UNIMPL mq_send
-443 UNIMPL mq_receive
-444 UNIMPL mq_notify
-445 UNIMPL mq_setattr
-446 UNIMPL mq_getattr
-447 UNIMPL ksem_open
-448 UNIMPL ksem_unlink
-449 UNIMPL ksem_close
-450 UNIMPL ksem_post
-451 UNIMPL ksem_wait
-452 UNIMPL ksem_read
-453 UNIMPL ksem_trywait
-454 UNIMPL lwp_rwlock_init
-455 UNIMPL lwp_rwlock_destroy
-456 UNIMPL lwp_rwlock_rdlock_sys
-457 UNIMPL lwp_rwlock_wrlock_sys
-458 UNIMPL lwp_rwlock_tryrdlock
-459 UNIMPL lwp_rwlock_trywrlock
-460 UNIMPL lwp_rwlock_unlock
-461 UNIMPL ttrace
-462 UNIMPL ttrace_wait
-463 UNIMPL lf_wire_mem
-464 UNIMPL lf_unwire_mem
-465 UNIMPL lf_send_pin_map
-466 UNIMPL lf_free_buf
-467 UNIMPL lf_wait_nq
-468 UNIMPL lf_wakeup_conn_q
-469 UNIMPL lf_unused
-470 UNIMPL lwp_sema_init
-471 UNIMPL lwp_sema_post
-472 UNIMPL lwp_sema_wait
-473 UNIMPL lwp_sema_trywait
-474 UNIMPL lwp_sema_destroy
-475 UNIMPL statvfs64
-476 UNIMPL fstatvfs64
-477 UNIMPL msh_register
-478 UNIMPL ptrace64
-479 UNIMPL sendfile
-480 UNIMPL sendpath
-481 UNIMPL sendfile64
-482 UNIMPL sendpath64
-483 UNIMPL modload
-484 UNIMPL moduload
-485 UNIMPL modpath
-486 UNIMPL getksym
-487 UNIMPL modadm
-488 UNIMPL modstat
-489 UNIMPL lwp_detached_exit
-490 UNIMPL crashconf
-491 UNIMPL siginhibit
-492 UNIMPL sigenable
-493 UNIMPL spuctl
-494 UNIMPL zerokernelsum
-495 UNIMPL nfs_kstat
-496 UNIMPL aio_read64
-497 UNIMPL aio_write64
-498 UNIMPL aio_error64
-499 UNIMPL aio_return64
-500 UNIMPL aio_cancel64
-501 UNIMPL aio_suspend64
-502 UNIMPL aio_fsync64
-503 UNIMPL lio_listio64
-504 UNIMPL recv2
-505 UNIMPL recvfrom2
-506 UNIMPL send2
-507 UNIMPL sendto2
-508 UNIMPL acl
-509 UNIMPL __cnx_p2p_ctl
-510 UNIMPL __cnx_gsched_ctl
-511 UNIMPL __cnx_pmon_ctl
-512 UNIMPL mem_res_grp
-513 UNIMPL fabric
-514 UNIMPL diagsyscall
-515 UNIMPL tuneinfo
-516 UNIMPL gettune
-517 UNIMPL settune
-518 UNIMPL pset_create
-519 UNIMPL pset_destroy
-520 UNIMPL pset_assign
-521 UNIMPL pset_bind
-522 UNIMPL pset_getattr
-523 UNIMPL pset_setattr
-524 UNIMPL pset_ctl
-525 UNIMPL pset_rtctl
diff --git a/sys/compat/hpux/hpux.h b/sys/compat/hpux/hpux.h
deleted file mode 100644
index da651d92d89..00000000000
--- a/sys/compat/hpux/hpux.h
+++ /dev/null
@@ -1,367 +0,0 @@
-/* $OpenBSD: hpux.h,v 1.14 2004/09/19 22:03:16 mickey Exp $ */
-/* $NetBSD: hpux.h,v 1.11 1997/04/01 19:58:58 scottr Exp $ */
-
-/*
- * Copyright (c) 1995 Jason R. Thorpe. All rights reserved.
- * Copyright (c) 1988 University of Utah.
- * Copyright (c) 1990, 1993
- * The Regents of the University of California. All rights reserved.
- *
- * This code is derived from software contributed to Berkeley by
- * the Systems Programming Group of the University of Utah Computer
- * Science Department.
- *
- * 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. Neither the name of the University nor the names of its contributors
- * may be used to endorse or promote products derived from this software
- * without specific prior written permission.
- *
- * THIS SOFTWARE IS PROVIDED BY THE REGENTS 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 REGENTS 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.
- *
- * from: Utah $Hdr: hpux.h 1.33 93/08/05$
- *
- * @(#)hpux.h 8.4 (Berkeley) 2/13/94
- */
-
-#include <compat/hpux/hpux_exec.h>
-
-/* HP-UX style UTSNAME struct used by uname syscall */
-
-struct hpux_utsname {
- char sysname[9];
- char nodename[9];
- char release[9];
- char version[9];
- char machine[9];
- char idnumber[15];
-};
-
-/* HP-UX style "old" IOCTLs */
-
-struct hpux_sgttyb {
- char sg_ispeed;
- char sg_ospeed;
- char sg_erase;
- char sg_kill;
- int sg_flags; /* only a short in BSD */
-};
-
-#define V7_HUPCL 00001
-#define V7_XTABS 00002
-#define V7_NOAL 04000
-
-#define HPUXTIOCGETP _IOR('t', 8, struct hpux_sgttyb)
-#define HPUXTIOCSETP _IOW('t', 9, struct hpux_sgttyb)
-
-/* 6.5 job control related ioctls which need to be mapped */
-
-#define HPUXTIOCSLTC _IOW('T', 23, struct ltchars)
-#define HPUXTIOCGLTC _IOR('T', 24, struct ltchars)
-#define HPUXTIOCLBIS _IOW('T', 25, int)
-#define HPUXTIOCLBIC _IOW('T', 26, int)
-#define HPUXTIOCLSET _IOW('T', 27, int)
-#define HPUXTIOCLGET _IOR('T', 28, int)
-# define HPUXLTOSTOP 0000001
-#define HPUXTIOCSPGRP _IOW('T', 29, int)
-#define HPUXTIOCGPGRP _IOR('T', 30, int)
-#define HPUXTIOCCONS _IO('t', 104)
-#define HPUXTIOCSWINSZ _IOW('t', 106, struct winsize)
-#define HPUXTIOCGWINSZ _IOR('t', 107, struct winsize)
-
-/* non-blocking IO--doesn't interfere with O_NDELAY */
-#define HPUXFIOSNBIO _IOW('f', 126, int)
-
-/* HP-UX stat structure */
-
-#define bsdtohpuxdev(d) ((major(d) << 24) | minor(d))
-
-struct hpux_stat {
- int hst_dev;
- u_int hst_ino;
- u_short hst_mode;
- short hst_nlink;
- u_short hst_old_uid; /* these have since moved */
- u_short hst_old_gid; /* ... */
- int hst_rdev;
- int hst_size;
- int hst_atime;
- int hst_spare1;
- int hst_mtime;
- int hst_spare2;
- int hst_ctime;
- int hst_spare3;
- int hst_blksize;
- int hst_blocks;
- u_int hst_remote;
- int hst_netdev;
- u_int hst_netino;
- u_short hst_cnode;
- u_short hst_rcnode;
- u_short hst_netsite;
- short hst_fstype;
- int hst_realdev;
- u_short hst_basemode;
- u_short hst_spareshort1;
- int hst_uid;
- int hst_gid;
- int hst_spare4[3];
-};
-
-struct hpux_stat64 {
- int hst_dev;
- u_quad_t hst_ino;
- u_short hst_mode;
- short hst_nlink;
- u_short hst_old_uid; /* these have since moved */
- u_short hst_old_gid; /* ... */
- int hst_rdev;
- quad_t hst_size;
- quad_t hst_atime;
- int hst_spare1;
- quad_t hst_mtime;
- int hst_spare2;
- quad_t hst_ctime;
- int hst_spare3;
- quad_t hst_blksize;
- quad_t hst_blocks;
- u_int hst_remote;
- int hst_netdev;
- u_quad_t hst_netino;
- u_short hst_cnode;
- u_short hst_rcnode;
- u_short hst_netsite;
- short hst_fstype;
- int hst_realdev;
- u_short hst_basemode;
- u_short hst_spareshort1;
- int hst_uid;
- int hst_gid;
- int hst_spare4[3];
-};
-
-#define HST_REMOTE_REMOTE 0x01 /* set if file is remote */
-#define HST_REMOTE_ACL 0x02 /* set if file has ACL entries */
-#define HST_REMOTE_ACLV 0x04 /* set if file has ACL v2 entries */
-
-/* from old timeb.h */
-struct hpux_otimeb {
- time_t time;
- u_short millitm;
- short timezone;
- short dstflag;
-};
-
-/* ye ole stat structure */
-struct hpux_ostat {
- u_short hst_dev;
- u_short hst_ino;
- u_short hst_mode;
- short hst_nlink;
- short hst_uid;
- short hst_gid;
- u_short hst_rdev;
- int hst_size;
- int hst_atime;
- int hst_mtime;
- int hst_ctime;
-};
-
-/* HP-UX compat file flags */
-#define HPUXNDELAY 00000004
-#define HPUXFCREAT 00000400
-#define HPUXFTRUNC 00001000
-#define HPUXFEXCL 00002000
-#define HPUXFSYNCIO 00100000
-#define HPUXNONBLOCK 00200000
-#define HPUXFREMOTE 01000000
-
-/* HP-UX fcntl file locking */
-struct hpux_flock {
- short hl_type;
- short hl_whence;
- long hl_start;
- long hl_len;
- long hl_pid;
-};
-
-#define HPUXF_GETLK 7
-#define HPUXF_SETLK 8
-#define HPUXF_SETLKW 9
-
-#define HPUXF_RDLCK 1
-#define HPUXF_WRLCK 2
-#define HPUXF_UNLCK 3
-
-/* HP-UX only sysV shmctl() commands */
-#define SHM_LOCK 3 /* Lock segment in core */
-#define SHM_UNLOCK 4 /* Unlock segment */
-
-/* SHM stuff reflecting POSIX types */
-struct hpux_ipc_perm {
- long uid; /* owner's user id */
- long gid; /* owner's group id */
- long cuid; /* creator's user id */
- long cgid; /* creator's group id */
- u_short mode; /* access modes */
- u_short seq; /* slot usage sequence number */
- long key; /* key */
-};
-
-struct hpux_shmid_ds {
- struct hpux_ipc_perm shm_perm; /* operation permission struct */
- int shm_segsz; /* segment size (bytes) */
- struct pte *shm_ptbl; /* ptr to associated page table */
- long shm_lpid; /* pid of last shmop */
- long shm_cpid; /* pid of creator */
- u_short shm_nattch; /* current # attached */
- u_short shm_cnattch; /* in memory # attached */
- time_t shm_atime; /* last shmat time */
- time_t shm_dtime; /* last shmdt time */
- time_t shm_ctime; /* last change time */
- /* actually longer */
-};
-
-/* HP-UX rtprio values */
-#define RTPRIO_MIN 0
-#define RTPRIO_MAX 127
-#define RTPRIO_NOCHG 1000
-#define RTPRIO_RTOFF 1001
-
-/* HP-UX only sigvec sv_flags values */
-#define HPUXSV_RESET 000000004
-
-/*
- * HP-UX returns SIGILL instead of SIGFPE for the CHK and TRAPV exceptions.
- * It also returns different u_code values for certain illegal instruction
- * and floating point exceptions. Here are the proper HP-UX u_code values
- * (numbers from hpux 6.2 manual pages).
- */
-
-/* SIGILL codes */
-#define HPUX_ILL_ILLINST_TRAP 0 /* T_ILLINST+USER */
-#define HPUX_ILL_CHK_TRAP 6 /* T_CHKINST+USER */
-#define HPUX_ILL_TRAPV_TRAP 7 /* T_TRAPVINST+USER */
-#define HPUX_ILL_PRIV_TRAP 8 /* T_PRIVINST+USER */
-
-/* SIGFPE codes */
-#define HPUX_FPE_INTDIV_TRAP 5 /* T_ZERODIV+USER */
-
-/* HP-UX POSIX signal stuff implementation */
-typedef struct __hpux_sigset_t { u_int sigset[8]; } hpux_sigset_t;
-struct hpux_sigaction {
- void (*sa__handler)(int);
- hpux_sigset_t sa_mask;
- int sa_flags;
-};
-#define HPUXSA_ONSTACK 1
-#define HPUXSA_RESETHAND 4
-#define HPUXSA_NOCLDSTOP 8
-#define HPUXSA_NODEFER 32
-#define HPUXSA_RESTART 64
-#define HPUXSA_NOCLDWAIT 128
-
-#define HPUXSIG_BLOCK 0 /* block specified signal set */
-#define HPUXSIG_UNBLOCK 1 /* unblock specified signal set */
-#define HPUXSIG_SETMASK 2 /* set specified signal set */
-
-/* sysconf stuff */
-#define HPUX_SYSCONF_CLKTICK 2
-#define HPUX_SYSCONF_OPENMAX 4
-#define HPUX_SYSCONF_CPUTYPE 10001
-#define HPUX_SYSCONF_CPUM020 0x20C
-#define HPUX_SYSCONF_CPUM030 0x20D
-#define HPUX_SYSCONF_CPUM040 0x20E
-#define HPUX_SYSCONF_CPUPA10 0x20B
-#define HPUX_SYSCONF_CPUPA11 0x210
-#define HPUX_SYSCONF_CPUPA20 0x214
-
-/* mmap stuff */
-#define HPUXMAP_FIXED 0x04
-#define HPUXMAP_REPLACE 0x08
-#define HPUXMAP_ANON 0x10
-
-/* rlimit stuff */
-#define HPUXRLIMIT_NOFILE 6
-
-/*
- * In BSD EAGAIN and EWOULDBLOCK are the same error code.
- * However, for HP-UX we must split them out to separate codes.
- * The easiest way to do this was to check the return value of
- * BSD routines which are known to return EAGAIN (but never
- * EWOULDBLOCK) and change it to the pseudo-code OEAGAIN when
- * we see it. The error translation table will them map that
- * code to the HP-UX EAGAIN value.
- */
-#define OEAGAIN 82
-
-/*
- * Extensions to the fd_ofileflags flags.
- */
-#define HPUX_UF_NONBLOCK_ON 0x10
-#define HPUX_UF_FNDELAY_ON 0x20
-#define HPUX_UF_FIONBIO_ON 0x40
-
-#ifdef __m68k__
-/*
- * Skeletal 6.X HP-UX user structure info for ptrace() mapping.
- * Yes, this is as bogus as it gets...
- */
-
-/* 6.0/6.2 offsets */
-#define ooHU_AROFF 0x004
-#define ooHU_TSOFF 0x092
-#define ooHU_EDOFF 0x91E
-#define ooHU_FPOFF 0xA66
-
-/* 6.5 offsets */
-#define oHU_AROFF 0x004
-#define oHU_TSOFF 0x0B2
-#define oHU_EDOFF 0x93A
-#define oHU_FPOFF 0xA86
-
-/* 7.X offsets */
-#define HU_AROFF 0x004
-#define HU_TSOFF 0x0B4
-#define HU_EDOFF 0x8C8
-#define HU_FPOFF 0xA28
-
-#define HU_PAD1 (HU_AROFF)
-#define HU_PAD2 (HU_TSOFF-HU_AROFF-4)
-#define HU_PAD3 (HU_EDOFF-HU_TSOFF-12)
-#define HU_PAD4 (HU_FPOFF-HU_EDOFF-sizeof(struct hpux_exec))
-
-struct hpux_user {
- u_char whocares1[HU_PAD1]; /* +0x000 */
- int *hpuxu_ar0; /* +0x004 */
- u_char whocares2[HU_PAD2]; /* +0x008 */
- int hpuxu_tsize; /* +0x0B2 */
- int hpuxu_dsize; /* +0x0B6 */
- int hpuxu_ssize; /* +0x0BA */
- u_char whocares3[HU_PAD3]; /* +0x0BE */
- struct hpux_exec hpuxu_exdata; /* +0x93A */
- u_char whocares4[HU_PAD4]; /* +0x95E */
- struct hpux_fp { /* +0xA66 */
- int hpfp_save[54];
- int hpfp_ctrl[3];
- int hpfp_reg[24];
- } hpuxu_fp;
- short hpuxu_dragon; /* +0xBCA */
- };
-#endif
diff --git a/sys/compat/hpux/hpux_compat.c b/sys/compat/hpux/hpux_compat.c
deleted file mode 100644
index d9c7ebd83c3..00000000000
--- a/sys/compat/hpux/hpux_compat.c
+++ /dev/null
@@ -1,1360 +0,0 @@
-/* $OpenBSD: hpux_compat.c,v 1.33 2010/06/26 23:24:44 guenther Exp $ */
-/* $NetBSD: hpux_compat.c,v 1.35 1997/05/08 16:19:48 mycroft Exp $ */
-
-/*
- * Copyright (c) 1988 University of Utah.
- * Copyright (c) 1990, 1993
- * The Regents of the University of California. All rights reserved.
- *
- * This code is derived from software contributed to Berkeley by
- * the Systems Programming Group of the University of Utah Computer
- * Science Department.
- *
- * 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. Neither the name of the University nor the names of its contributors
- * may be used to endorse or promote products derived from this software
- * without specific prior written permission.
- *
- * THIS SOFTWARE IS PROVIDED BY THE REGENTS 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 REGENTS 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.
- *
- * from: Utah $Hdr: hpux_compat.c 1.64 93/08/05$
- *
- * @(#)hpux_compat.c 8.4 (Berkeley) 2/13/94
- */
-
-/*
- * Various HP-UX compatibility routines
- */
-
-#ifndef COMPAT_43
-#define COMPAT_43
-#endif
-
-#include <sys/param.h>
-#include <sys/systm.h>
-#include <sys/signalvar.h>
-#include <sys/kernel.h>
-#include <sys/filedesc.h>
-#include <sys/proc.h>
-#include <sys/buf.h>
-#include <sys/wait.h>
-#include <sys/file.h>
-#include <sys/namei.h>
-#include <sys/vnode.h>
-#include <sys/ioctl.h>
-#include <sys/ptrace.h>
-#include <sys/stat.h>
-#include <sys/syslog.h>
-#include <sys/malloc.h>
-#include <sys/pool.h>
-#include <sys/mount.h>
-#include <sys/ipc.h>
-#include <sys/sysctl.h>
-#include <sys/mman.h>
-
-#include <machine/cpu.h>
-#include <machine/reg.h>
-#include <machine/psl.h>
-#include <machine/vmparam.h>
-
-#include <sys/syscallargs.h>
-
-#include <compat/hpux/hpux.h>
-#include <compat/hpux/hpux_sig.h>
-#include <compat/hpux/hpux_util.h>
-#include <compat/hpux/hpux_termio.h>
-#include <compat/hpux/hpux_syscall.h>
-#include <compat/hpux/hpux_syscallargs.h>
-
-#include <machine/hpux_machdep.h>
-
-#ifdef DEBUG
-int unimpresponse = 0;
-#endif
-
-#define NERR 83
-#define BERR 1000
-
-/* indexed by BSD errno */
-int bsdtohpuxerrnomap[NERR] = {
-/*00*/ 0, 1, 2, 3, 4, 5, 6, 7, 8, 9,
-/*10*/ 10, 45, 12, 13, 14, 15, 16, 17, 18, 19,
-/*20*/ 20, 21, 22, 23, 24, 25, 26, 27, 28, 29,
-/*30*/ 30, 31, 32, 33, 34, 246, 245, 244, 216, 217,
-/*40*/ 218, 219, 220, 221, 222, 223, 224, 225, 226, 227,
-/*50*/ 228, 229, 230, 231, 232, 233, 234, 235, 236, 237,
-/*60*/ 238, 239, 249, 248, 241, 242, 247,BERR,BERR,BERR,
-/*70*/ 70, 71,BERR,BERR,BERR,BERR,BERR, 46, 251,BERR,
-/*80*/ BERR,BERR, 11
-};
-
-extern char sigcode[], esigcode[];
-extern struct sysent hpux_sysent[];
-extern char *hpux_syscallnames[];
-
-int hpux_shmctl1(struct proc *, struct hpux_sys_shmctl_args *,
- register_t *, int);
-int hpuxtobsdioctl(u_long);
-
-static int hpux_scale(struct timeval *);
-
-/*
- * HP-UX fork and vfork need to map the EAGAIN return value appropriately.
- */
-int
-hpux_sys_fork(p, v, retval)
- struct proc *p;
- void *v;
- register_t *retval;
-{
- /* struct hpux_sys_fork_args *uap = v; */
- int error;
-
- error = sys_fork(p, v, retval);
- if (error == EAGAIN)
- error = OEAGAIN;
- return (error);
-}
-
-int
-hpux_sys_vfork(p, v, retval)
- struct proc *p;
- void *v;
- register_t *retval;
-{
- /* struct hpux_sys_vfork_args *uap = v; */
- int error;
-
- error = sys_vfork(p, v, retval);
- if (error == EAGAIN)
- error = OEAGAIN;
- return (error);
-}
-
-/*
- * HP-UX versions of wait and wait3 actually pass the parameters
- * (status pointer, options, rusage) into the kernel rather than
- * handling it in the C library stub. We also need to map any
- * termination signal from BSD to HP-UX.
- */
-int
-hpux_sys_wait3(p, v, retval)
- struct proc *p;
- void *v;
- register_t *retval;
-{
- struct hpux_sys_wait3_args *uap = v;
-
- /* rusage pointer must be zero */
- if (SCARG(uap, rusage))
- return (EINVAL);
-#ifdef m68k
- p->p_md.md_regs[PS] = PSL_ALLCC;
- p->p_md.md_regs[R0] = SCARG(uap, options);
- p->p_md.md_regs[R1] = SCARG(uap, rusage);
-#endif
-
- return (hpux_sys_wait(p, uap, retval));
-}
-
-int
-hpux_sys_wait(p, v, retval)
- struct proc *p;
- void *v;
- register_t *retval;
-{
- struct hpux_sys_wait_args *uap = v;
- struct sys_wait4_args w4;
- int error;
- int sig;
- size_t sz = sizeof(*SCARG(&w4, status));
- int status;
-
- SCARG(&w4, rusage) = NULL;
- SCARG(&w4, options) = 0;
-
- if (SCARG(uap, status) == NULL) {
- caddr_t sg = stackgap_init(p->p_emul);
- SCARG(&w4, status) = stackgap_alloc(&sg, sz);
- }
- else
- SCARG(&w4, status) = SCARG(uap, status);
-
- SCARG(&w4, pid) = WAIT_ANY;
-
- error = sys_wait4(p, &w4, retval);
- /*
- * HP-UX wait always returns EINTR when interrupted by a signal
- * (well, unless its emulating a BSD process, but we don't bother...)
- */
- if (error == ERESTART)
- error = EINTR;
- if (error)
- return error;
-
- if ((error = copyin(SCARG(&w4, status), &status, sizeof(status))) != 0)
- return error;
-
- sig = status & 0xFF;
- if (sig == WSTOPPED) {
- sig = (status >> 8) & 0xFF;
- retval[1] = (bsdtohpuxsig(sig) << 8) | WSTOPPED;
- } else if (sig)
- retval[1] = (status & 0xFF00) |
- bsdtohpuxsig(sig & 0x7F) | (sig & 0x80);
-
- if (SCARG(uap, status) == NULL)
- return error;
- else
- return copyout(&retval[1],
- SCARG(uap, status), sizeof(retval[1]));
-}
-
-int
-hpux_sys_waitpid(p, v, retval)
- struct proc *p;
- void *v;
- register_t *retval;
-{
- struct hpux_sys_waitpid_args *uap = v;
- int rv, sig, xstat, error;
-
- SCARG(uap, rusage) = 0;
- error = sys_wait4(p, uap, retval);
- /*
- * HP-UX wait always returns EINTR when interrupted by a signal
- * (well, unless its emulating a BSD process, but we don't bother...)
- */
- if (error == ERESTART)
- error = EINTR;
- if (error)
- return (error);
-
- if (SCARG(uap, status)) {
- /*
- * Wait4 already wrote the status out to user space,
- * pull it back, change the signal portion, and write
- * it back out.
- */
- if ((error = copyin((caddr_t)SCARG(uap, status), &rv,
- sizeof(int))) != 0)
- return error;
-
- if (WIFSTOPPED(rv)) {
- sig = WSTOPSIG(rv);
- rv = W_STOPCODE(bsdtohpuxsig(sig));
- } else if (WIFSIGNALED(rv)) {
- sig = WTERMSIG(rv);
- xstat = WEXITSTATUS(rv);
- rv = W_EXITCODE(xstat, bsdtohpuxsig(sig)) |
- WCOREDUMP(rv);
- }
- error = copyout(&rv, (caddr_t)SCARG(uap, status), sizeof(int));
- }
- return (error);
-}
-
-/*
- * Read and write calls. Same as BSD except for non-blocking behavior.
- * There are three types of non-blocking reads/writes in HP-UX checked
- * in the following order:
- *
- * O_NONBLOCK: return -1 and errno == EAGAIN
- * O_NDELAY: return 0
- * FIOSNBIO: return -1 and errno == EWOULDBLOCK
- */
-int
-hpux_sys_read(p, v, retval)
- struct proc *p;
- void *v;
- register_t *retval;
-{
- struct hpux_sys_read_args *uap = v;
- int error;
-
- error = sys_read(p, (struct sys_read_args *) uap, retval);
- if (error == EWOULDBLOCK) {
- char *fp = &p->p_fd->fd_ofileflags[SCARG(uap, fd)];
-
- if (*fp & HPUX_UF_NONBLOCK_ON) {
- *retval = -1;
- error = OEAGAIN;
- } else if (*fp & HPUX_UF_FNDELAY_ON) {
- *retval = 0;
- error = 0;
- }
- }
- return (error);
-}
-
-int
-hpux_sys_write(p, v, retval)
- struct proc *p;
- void *v;
- register_t *retval;
-{
- struct hpux_sys_write_args *uap = v;
- int error;
-
- error = sys_write(p, (struct sys_write_args *) uap, retval);
- if (error == EWOULDBLOCK) {
- char *fp = &p->p_fd->fd_ofileflags[SCARG(uap, fd)];
-
- if (*fp & HPUX_UF_NONBLOCK_ON) {
- *retval = -1;
- error = OEAGAIN;
- } else if (*fp & HPUX_UF_FNDELAY_ON) {
- *retval = 0;
- error = 0;
- }
- }
- return (error);
-}
-
-int
-hpux_sys_readv(p, v, retval)
- struct proc *p;
- void *v;
- register_t *retval;
-{
- struct hpux_sys_readv_args *uap = v;
- int error;
-
- error = sys_readv(p, (struct sys_readv_args *) uap, retval);
- if (error == EWOULDBLOCK) {
- char *fp = &p->p_fd->fd_ofileflags[SCARG(uap, fd)];
-
- if (*fp & HPUX_UF_NONBLOCK_ON) {
- *retval = -1;
- error = OEAGAIN;
- } else if (*fp & HPUX_UF_FNDELAY_ON) {
- *retval = 0;
- error = 0;
- }
- }
- return (error);
-}
-
-int
-hpux_sys_writev(p, v, retval)
- struct proc *p;
- void *v;
- register_t *retval;
-{
- struct hpux_sys_writev_args *uap = v;
- int error;
-
- error = sys_writev(p, (struct sys_writev_args *) uap, retval);
- if (error == EWOULDBLOCK) {
- char *fp = &p->p_fd->fd_ofileflags[SCARG(uap, fd)];
-
- if (*fp & HPUX_UF_NONBLOCK_ON) {
- *retval = -1;
- error = OEAGAIN;
- } else if (*fp & HPUX_UF_FNDELAY_ON) {
- *retval = 0;
- error = 0;
- }
- }
- return (error);
-}
-
-int
-hpux_sys_utssys(p, v, retval)
- struct proc *p;
- void *v;
- register_t *retval;
-{
- struct hpux_sys_utssys_args *uap = v;
- int i;
- int error;
- struct hpux_utsname ut;
- extern char hostname[], machine[];
-
- switch (SCARG(uap, request)) {
- /* uname */
- case 0:
- bzero(&ut, sizeof(ut));
-
- strlcpy(ut.sysname, ostype, sizeof(ut.sysname));
-
- /* copy hostname (sans domain) to nodename */
- for (i = 0; i < 8 && hostname[i] != '.'; i++)
- ut.nodename[i] = hostname[i];
- ut.nodename[i] = '\0';
-
- strlcpy(ut.release, osrelease, sizeof(ut.release));
- strlcpy(ut.version, version, sizeof(ut.version));
- strlcpy(ut.machine, machine, sizeof(ut.machine));
-
- error = copyout((caddr_t)&ut,
- (caddr_t)SCARG(uap, uts), sizeof(ut));
- break;
-
- /* gethostname */
- case 5:
- /* SCARG(uap, dev) is length */
- i = SCARG(uap, dev);
- if (i < 0) {
- error = EINVAL;
- break;
- }
- if (i > hostnamelen + 1)
- i = hostnamelen + 1;
- error = copyout((caddr_t)hostname, (caddr_t)SCARG(uap, uts), i);
- break;
-
- case 1: /* ?? */
- case 2: /* ustat */
- case 3: /* ?? */
- case 4: /* sethostname */
- default:
- error = EINVAL;
- break;
- }
- return (error);
-}
-
-int
-hpux_sys_sysconf(p, v, retval)
- struct proc *p;
- void *v;
- register_t *retval;
-{
- struct hpux_sys_sysconf_args *uap = v;
- switch (SCARG(uap, name)) {
-
- /* clock ticks per second */
- case HPUX_SYSCONF_CLKTICK:
- *retval = hz;
- break;
-
- /* open files */
- case HPUX_SYSCONF_OPENMAX:
- *retval = NOFILE;
- break;
-
- /* architecture */
- case HPUX_SYSCONF_CPUTYPE:
- *retval = hpux_cpu_sysconf_arch();
- break;
- default:
- /* XXX */
- uprintf("HP-UX sysconf(%d) not implemented\n",
- SCARG(uap, name));
- return (EINVAL);
- }
- return (0);
-}
-
-int
-hpux_sys_ulimit(p, v, retval)
- struct proc *p;
- void *v;
- register_t *retval;
-{
- struct hpux_sys_ulimit_args *uap = v;
- struct rlimit *limp;
- int error = 0;
-
- limp = &p->p_rlimit[RLIMIT_FSIZE];
- switch (SCARG(uap, cmd)) {
- case 2:
- SCARG(uap, newlimit) *= 512;
- if (SCARG(uap, newlimit) > limp->rlim_max &&
- (error = suser(p, 0)))
- break;
- limp->rlim_cur = limp->rlim_max = SCARG(uap, newlimit);
- /* else fall into... */
-
- case 1:
- *retval = limp->rlim_max / 512;
- break;
-
- case 3:
- limp = &p->p_rlimit[RLIMIT_DATA];
- *retval = ptoa(p->p_vmspace->vm_tsize) + limp->rlim_max;
- break;
-
- default:
- error = EINVAL;
- break;
- }
- return (error);
-}
-
-/*
- * Map "real time" priorities 0 (high) thru 127 (low) into nice
- * values -16 (high) thru -1 (low).
- */
-int
-hpux_sys_rtprio(cp, v, retval)
- struct proc *cp;
- void *v;
- register_t *retval;
-{
- struct hpux_sys_rtprio_args *uap = v;
- struct proc *p;
- int nice, error;
-
- if (SCARG(uap, prio) < RTPRIO_MIN && SCARG(uap, prio) > RTPRIO_MAX &&
- SCARG(uap, prio) != RTPRIO_NOCHG &&
- SCARG(uap, prio) != RTPRIO_RTOFF)
- return (EINVAL);
- if (SCARG(uap, pid) == 0)
- p = cp;
- else if ((p = pfind(SCARG(uap, pid))) == 0)
- return (ESRCH);
- nice = p->p_nice;
- if (nice < NZERO)
- *retval = (nice + 16) << 3;
- else
- *retval = RTPRIO_RTOFF;
- switch (SCARG(uap, prio)) {
-
- case RTPRIO_NOCHG:
- return (0);
-
- case RTPRIO_RTOFF:
- if (nice >= NZERO)
- return (0);
- nice = NZERO;
- break;
-
- default:
- nice = (SCARG(uap, prio) >> 3) - 16;
- break;
- }
- error = donice(cp, p, nice);
- if (error == EACCES)
- error = EPERM;
- return (error);
-}
-
-/* hpux_sys_advise() is found in hpux_machdep.c */
-
-#ifdef PTRACE
-
-int
-hpux_sys_ptrace(p, v, retval)
- struct proc *p;
- void *v;
- register_t *retval;
-{
- struct hpux_sys_ptrace_args *uap = v;
- int error;
-#if defined(PT_READ_U) || defined(PT_WRITE_U)
- int isps = 0;
- struct proc *cp;
-#endif
-
- switch (SCARG(uap, req)) {
- /* map signal */
-#if defined(PT_STEP) || defined(PT_CONTINUE)
-# ifdef PT_STEP
- case PT_STEP:
-# endif
-# ifdef PT_CONTINUE
- case PT_CONTINUE:
-# endif
- if (SCARG(uap, data)) {
- SCARG(uap, data) = hpuxtobsdsig(SCARG(uap, data));
- if (SCARG(uap, data) == 0)
- SCARG(uap, data) = NSIG;
- }
- break;
-#endif
- /* map u-area offset */
-#if defined(PT_READ_U) || defined(PT_WRITE_U)
-# ifdef PT_READ_U
- case PT_READ_U:
-# endif
-# ifdef PT_WRITE_U
- case PT_WRITE_U:
-# endif
- /*
- * Big, cheezy hack: hpux_to_bsd_uoff is really intended
- * to be called in the child context (procxmt) but we
- * do it here in the parent context to avoid hacks in
- * the MI sys_process.c file. This works only because
- * we can access the child's md_regs pointer and it
- * has the correct value (the child has already trapped
- * into the kernel).
- */
- if ((cp = pfind(SCARG(uap, pid))) == 0)
- return (ESRCH);
- SCARG(uap, addr) =
- (int *)hpux_to_bsd_uoff(SCARG(uap, addr), &isps, cp);
-
- /*
- * Since HP-UX PS is only 16-bits in ar0, requests
- * to write PS actually contain the PS in the high word
- * and the high half of the PC (the following register)
- * in the low word. Move the PS value to where BSD
- * expects it.
- */
- if (isps && SCARG(uap, req) == PT_WRITE_U)
- SCARG(uap, data) >>= 16;
- break;
-#endif
- }
-
- error = sys_ptrace(p, uap, retval);
- /*
- * Align PS as HP-UX expects it (see WRITE_U comment above).
- * Note that we do not return the high part of PC like HP-UX
- * would, but the HP-UX debuggers don't require it.
- */
-#ifdef PT_READ_U
- if (isps && error == 0 && SCARG(uap, req) == PT_READ_U)
- *retval <<= 16;
-#endif
- return (error);
-}
-
-#endif /* PTRACE */
-
-#ifdef SYSVSHM
-#include <sys/shm.h>
-
-int
-hpux_sys_shmctl(p, v, retval)
- struct proc *p;
- void *v;
- register_t *retval;
-{
- struct hpux_sys_shmctl_args *uap = v;
-
- return (hpux_shmctl1(p, (struct hpux_sys_shmctl_args *)uap, retval, 0));
-}
-
-int
-hpux_sys_nshmctl(p, v, retval)
- struct proc *p;
- void *v;
- register_t *retval; /* struct hpux_nshmctl_args * */
-{
- struct hpux_sys_nshmctl_args *uap = v;
-
- return (hpux_shmctl1(p, (struct hpux_sys_shmctl_args *)uap, retval, 1));
-}
-
-/*
- * Handle HP-UX specific commands.
- */
-int
-hpux_shmctl1(p, uap, retval, isnew)
- struct proc *p;
- struct hpux_sys_shmctl_args *uap;
- register_t *retval;
- int isnew;
-{
- struct shmid_ds *shp;
- struct ucred *cred = p->p_ucred;
- struct hpux_shmid_ds sbuf;
- int error;
- extern struct shmid_ds *shm_find_segment_by_shmid(int);
-
- if ((shp = shm_find_segment_by_shmid(SCARG(uap, shmid))) == NULL)
- return EINVAL;
-
- switch (SCARG(uap, cmd)) {
- case SHM_LOCK:
- case SHM_UNLOCK:
- /* don't really do anything, but make them think we did */
- if (cred->cr_uid && cred->cr_uid != shp->shm_perm.uid &&
- cred->cr_uid != shp->shm_perm.cuid)
- return (EPERM);
- return (0);
-
- case IPC_STAT:
- if (!isnew)
- break;
- error = ipcperm(cred, &shp->shm_perm, IPC_R);
- if (error == 0) {
- sbuf.shm_perm.uid = shp->shm_perm.uid;
- sbuf.shm_perm.gid = shp->shm_perm.gid;
- sbuf.shm_perm.cuid = shp->shm_perm.cuid;
- sbuf.shm_perm.cgid = shp->shm_perm.cgid;
- sbuf.shm_perm.mode = shp->shm_perm.mode;
- sbuf.shm_perm.seq = shp->shm_perm.seq;
- sbuf.shm_perm.key = shp->shm_perm.key;
- sbuf.shm_segsz = shp->shm_segsz;
- sbuf.shm_ptbl = shp->shm_internal; /* XXX */
- sbuf.shm_lpid = shp->shm_lpid;
- sbuf.shm_cpid = shp->shm_cpid;
- sbuf.shm_nattch = shp->shm_nattch;
- sbuf.shm_cnattch = shp->shm_nattch; /* XXX */
- sbuf.shm_atime = shp->shm_atime;
- sbuf.shm_dtime = shp->shm_dtime;
- sbuf.shm_ctime = shp->shm_ctime;
- error = copyout((caddr_t)&sbuf, SCARG(uap, buf),
- sizeof sbuf);
- }
- return (error);
-
- case IPC_SET:
- if (!isnew)
- break;
- if (cred->cr_uid && cred->cr_uid != shp->shm_perm.uid &&
- cred->cr_uid != shp->shm_perm.cuid) {
- return (EPERM);
- }
- error = copyin(SCARG(uap, buf), (caddr_t)&sbuf, sizeof sbuf);
- if (error == 0) {
- shp->shm_perm.uid = sbuf.shm_perm.uid;
- shp->shm_perm.gid = sbuf.shm_perm.gid;
- shp->shm_perm.mode = (shp->shm_perm.mode & ~0777)
- | (sbuf.shm_perm.mode & 0777);
- shp->shm_ctime = time_second;
- }
- return (error);
- }
- return (sys_shmctl(p, uap, retval));
-}
-#endif
-
-/*
- * HP-UX mmap() emulation (mainly for shared library support).
- */
-int
-hpux_sys_mmap(p, v, retval)
- struct proc *p;
- void *v;
- register_t *retval;
-{
- struct hpux_sys_mmap_args *uap = v;
- struct sys_mmap_args /* {
- syscallarg(caddr_t) addr;
- syscallarg(size_t) len;
- syscallarg(int) prot;
- syscallarg(int) flags;
- syscallarg(int) fd;
- syscallarg(long) pad;
- syscallarg(off_t) pos;
- } */ nargs;
-
- SCARG(&nargs, addr) = SCARG(uap, addr);
- SCARG(&nargs, len) = SCARG(uap, len);
- SCARG(&nargs, prot) = SCARG(uap, prot);
- SCARG(&nargs, flags) = SCARG(uap, flags) &
- ~(HPUXMAP_FIXED|HPUXMAP_REPLACE|HPUXMAP_ANON);
- if (SCARG(uap, flags) & HPUXMAP_FIXED)
- SCARG(&nargs, flags) |= MAP_FIXED;
- if (SCARG(uap, flags) & HPUXMAP_ANON)
- SCARG(&nargs, flags) |= MAP_ANON;
- SCARG(&nargs, fd) = (SCARG(&nargs, flags) & MAP_ANON) ? -1 : SCARG(uap, fd);
- SCARG(&nargs, pos) = SCARG(uap, pos);
-
- return (sys_mmap(p, &nargs, retval));
-}
-
-int
-hpuxtobsdioctl(com)
- u_long com;
-{
- switch (com) {
- case HPUXTIOCSLTC:
- com = TIOCSLTC; break;
- case HPUXTIOCGLTC:
- com = TIOCGLTC; break;
- case HPUXTIOCSPGRP:
- com = TIOCSPGRP; break;
- case HPUXTIOCGPGRP:
- com = TIOCGPGRP; break;
- case HPUXTIOCLBIS:
- com = TIOCLBIS; break;
- case HPUXTIOCLBIC:
- com = TIOCLBIC; break;
- case HPUXTIOCLSET:
- com = TIOCLSET; break;
- case HPUXTIOCLGET:
- com = TIOCLGET; break;
- case HPUXTIOCGWINSZ:
- com = TIOCGWINSZ; break;
- case HPUXTIOCSWINSZ:
- com = TIOCSWINSZ; break;
- }
- return(com);
-}
-
-/*
- * HP-UX ioctl system call. The differences here are:
- * IOC_IN also means IOC_VOID if the size portion is zero.
- * no FIOCLEX/FIONCLEX/FIOASYNC/FIOGETOWN/FIOSETOWN
- * the sgttyb struct is 2 bytes longer
- */
-int
-hpux_sys_ioctl(p, v, retval)
- struct proc *p;
- void *v;
- register_t *retval;
-{
- struct hpux_sys_ioctl_args /* {
- syscallarg(int) fd;
- syscallarg(int) com;
- syscallarg(caddr_t) data;
- } */ *uap = v;
- struct filedesc *fdp = p->p_fd;
- struct file *fp;
- int com, error = 0;
- u_int size;
- caddr_t memp = 0;
-#define STK_PARAMS 128
- char stkbuf[STK_PARAMS];
- caddr_t dt = stkbuf;
-
- com = SCARG(uap, com);
-
- /* XXX */
- if (com == HPUXTIOCGETP || com == HPUXTIOCSETP)
- return (getsettty(p, SCARG(uap, fd), com, SCARG(uap, data)));
-
- if ((fp = fd_getfile(fdp, SCARG(uap, fd))) == NULL)
- return (EBADF);
- if ((fp->f_flag & (FREAD|FWRITE)) == 0)
- return (EBADF);
-
- /*
- * Interpret high order word to find
- * amount of data to be copied to/from the
- * user's address space.
- */
- size = IOCPARM_LEN(com);
- if (size > IOCPARM_MAX)
- return (ENOTTY);
- FREF(fp);
- if (size > sizeof (stkbuf)) {
- memp = (caddr_t)malloc((u_long)size, M_IOCTLOPS, M_WAITOK);
- dt = memp;
- }
- if (com&IOC_IN) {
- if (size) {
- error = copyin(SCARG(uap, data), dt, (u_int)size);
- if (error) {
- goto out;
- }
- } else
- *(caddr_t *)dt = SCARG(uap, data);
- } else if ((com&IOC_OUT) && size)
- /*
- * Zero the buffer so the user always
- * gets back something deterministic.
- */
- bzero(dt, size);
- else if (com&IOC_VOID)
- *(caddr_t *)dt = SCARG(uap, data);
-
- switch (com) {
-
- case HPUXFIOSNBIO:
- {
- char *ofp = &fdp->fd_ofileflags[SCARG(uap, fd)];
- int tmp;
-
- if (*(int *)dt)
- *ofp |= HPUX_UF_FIONBIO_ON;
- else
- *ofp &= ~HPUX_UF_FIONBIO_ON;
- /*
- * Only set/clear if O_NONBLOCK/FNDELAY not in effect
- */
- if ((*ofp & (HPUX_UF_NONBLOCK_ON|HPUX_UF_FNDELAY_ON)) == 0) {
- tmp = *ofp & HPUX_UF_FIONBIO_ON;
- error = (*fp->f_ops->fo_ioctl)(fp, FIONBIO,
- (caddr_t)&tmp, p);
- }
- break;
- }
-
- case HPUXTIOCCONS:
- *(int *)dt = 1;
- error = (*fp->f_ops->fo_ioctl)(fp, TIOCCONS, dt, p);
- break;
-
- /* BSD-style job control ioctls */
- case HPUXTIOCLBIS:
- case HPUXTIOCLBIC:
- case HPUXTIOCLSET:
- *(int *)dt &= HPUXLTOSTOP;
- if (*(int *)dt & HPUXLTOSTOP)
- *(int *)dt = LTOSTOP;
- /* fall into */
-
- /* simple mapping cases */
- case HPUXTIOCLGET:
- case HPUXTIOCSLTC:
- case HPUXTIOCGLTC:
- case HPUXTIOCSPGRP:
- case HPUXTIOCGPGRP:
- case HPUXTIOCGWINSZ:
- case HPUXTIOCSWINSZ:
- error = (*fp->f_ops->fo_ioctl)
- (fp, hpuxtobsdioctl(com), dt, p);
- if (error == 0 && com == HPUXTIOCLGET) {
- *(int *)dt &= LTOSTOP;
- if (*(int *)dt & LTOSTOP)
- *(int *)dt = HPUXLTOSTOP;
- }
- break;
-
- /* SYS 5 termio and POSIX termios */
- case HPUXTCGETA:
- case HPUXTCSETA:
- case HPUXTCSETAW:
- case HPUXTCSETAF:
- case HPUXTCGETATTR:
- case HPUXTCSETATTR:
- case HPUXTCSETATTRD:
- case HPUXTCSETATTRF:
- error = hpux_termio(SCARG(uap, fd), com, dt, p);
- break;
-
- default:
- error = (*fp->f_ops->fo_ioctl)(fp, com, dt, p);
- break;
- }
- /*
- * Copy any data to user, size was
- * already set and checked above.
- */
- if (error == 0 && (com&IOC_OUT) && size)
- error = copyout(dt, SCARG(uap, data), (u_int)size);
-
-out:
- FRELE(fp);
- if (memp)
- free(memp, M_IOCTLOPS);
- return (error);
-}
-
-/* hpux_sys_getcontext() is found in hpux_machdep.c */
-
-/*
- * This is the equivalent of BSD setpgrp but with more restrictions.
- * Note we do not check the real uid or "saved" uid or pgrp.
- */
-int
-hpux_sys_setpgrp2(p, v, retval)
- struct proc *p;
- void *v;
- register_t *retval;
-{
- struct hpux_sys_setpgrp2_args *uap = v;
-
- /* empirically determined */
- if (SCARG(uap, pgid) < 0 || SCARG(uap, pgid) >= 30000)
- return (EINVAL);
- return (sys_setpgid(p, uap, retval));
-}
-
-int
-hpux_sys_getrlimit(p, v, retval)
- struct proc *p;
- void *v;
- register_t *retval;
-{
- struct hpux_sys_getrlimit_args *uap = v;
- struct compat_43_sys_getrlimit_args ap;
-
- if (SCARG(uap, which) > HPUXRLIMIT_NOFILE)
- return (EINVAL);
- if (SCARG(uap, which) == HPUXRLIMIT_NOFILE)
- SCARG(uap, which) = RLIMIT_NOFILE;
-
- SCARG(&ap, which) = SCARG(uap, which);
- SCARG(&ap, rlp) = SCARG(uap, rlp);
-
- return (compat_43_sys_getrlimit(p, uap, retval));
-}
-
-int
-hpux_sys_setrlimit(p, v, retval)
- struct proc *p;
- void *v;
- register_t *retval;
-{
- struct hpux_sys_setrlimit_args *uap = v;
- struct compat_43_sys_setrlimit_args ap;
-
- if (SCARG(uap, which) > HPUXRLIMIT_NOFILE)
- return (EINVAL);
- if (SCARG(uap, which) == HPUXRLIMIT_NOFILE)
- SCARG(uap, which) = RLIMIT_NOFILE;
-
- SCARG(&ap, which) = SCARG(uap, which);
- SCARG(&ap, rlp) = SCARG(uap, rlp);
-
- return (compat_43_sys_setrlimit(p, uap, retval));
-}
-
-/*
- * XXX: simple recognition hack to see if we can make grmd work.
- */
-int
-hpux_sys_lockf(p, v, retval)
- struct proc *p;
- void *v;
- register_t *retval;
-{
- /* struct hpux_sys_lockf_args *uap = v; */
-
- return (0);
-}
-
-
-#ifndef __hppa__
-int
-hpux_sys_getaccess(p, v, retval)
- struct proc *p;
- void *v;
- register_t *retval;
-{
- struct hpux_sys_getaccess_args *uap = v;
- int lgroups[NGROUPS];
- int error = 0;
- struct ucred *cred;
- struct vnode *vp;
- struct nameidata nd;
-
- /*
- * Build an appropriate credential structure
- */
- cred = crdup(p->p_ucred);
- switch (SCARG(uap, uid)) {
- case 65502: /* UID_EUID */
- break;
- case 65503: /* UID_RUID */
- cred->cr_uid = p->p_cred->p_ruid;
- break;
- case 65504: /* UID_SUID */
- error = EINVAL;
- break;
- default:
- if (SCARG(uap, uid) > 65504)
- error = EINVAL;
- cred->cr_uid = SCARG(uap, uid);
- break;
- }
- switch (SCARG(uap, ngroups)) {
- case -1: /* NGROUPS_EGID */
- cred->cr_ngroups = 1;
- break;
- case -5: /* NGROUPS_EGID_SUPP */
- break;
- case -2: /* NGROUPS_RGID */
- cred->cr_ngroups = 1;
- cred->cr_gid = p->p_cred->p_rgid;
- break;
- case -6: /* NGROUPS_RGID_SUPP */
- cred->cr_gid = p->p_cred->p_rgid;
- break;
- case -3: /* NGROUPS_SGID */
- case -7: /* NGROUPS_SGID_SUPP */
- error = EINVAL;
- break;
- case -4: /* NGROUPS_SUPP */
- if (cred->cr_ngroups > 1)
- cred->cr_gid = cred->cr_groups[1];
- else
- error = EINVAL;
- break;
- default:
- if (SCARG(uap, ngroups) > 0 && SCARG(uap, ngroups) <= NGROUPS)
- error = copyin((caddr_t)SCARG(uap, gidset),
- (caddr_t)&lgroups[0],
- SCARG(uap, ngroups) *
- sizeof(lgroups[0]));
- else
- error = EINVAL;
- if (error == 0) {
- int gid;
-
- for (gid = 0; gid < SCARG(uap, ngroups); gid++)
- cred->cr_groups[gid] = lgroups[gid];
- cred->cr_ngroups = SCARG(uap, ngroups);
- }
- break;
- }
- /*
- * Lookup file using caller's effective IDs.
- */
- if (error == 0) {
- NDINIT(&nd, LOOKUP, FOLLOW | LOCKLEAF, UIO_USERSPACE,
- SCARG(uap, path), p);
- error = namei(&nd);
- }
- if (error) {
- crfree(cred);
- return (error);
- }
- /*
- * Use the constructed credentials for access checks.
- */
- vp = nd.ni_vp;
- *retval = 0;
- if (VOP_ACCESS(vp, VREAD, cred, p) == 0)
- *retval |= R_OK;
- if (vn_writechk(vp) == 0 && VOP_ACCESS(vp, VWRITE, cred, p) == 0)
- *retval |= W_OK;
- if (VOP_ACCESS(vp, VEXEC, cred, p) == 0)
- *retval |= X_OK;
- vput(vp);
- crfree(cred);
- return (error);
-}
-#endif
-
-/*
- * Ancient HP-UX system calls. Some 9.x executables even use them!
- */
-#define HPUX_HZ 50
-
-#include <sys/times.h>
-
-
-/*
- * SYS V style setpgrp()
- */
-int
-hpux_sys_setpgrp_6x(p, v, retval)
- struct proc *p;
- void *v;
- register_t *retval;
-{
- struct pgrp *npgrp;
-
- npgrp = pool_get(&pgrp_pool, PR_WAITOK);
-
- if (p->p_pid != p->p_pgid)
- enterpgrp(p, p->p_pid, npgrp, NULL);
- *retval = p->p_pgid;
- return (0);
-}
-
-int
-hpux_sys_time_6x(p, v, retval)
- struct proc *p;
- void *v;
- register_t *retval;
-{
- struct hpux_sys_time_6x_args /* {
- syscallarg(time_t *) t;
- } */ *uap = v;
- int error = 0;
- struct timeval tv;
-
- microtime(&tv);
- if (SCARG(uap, t) != NULL)
- error = copyout(&tv.tv_sec, SCARG(uap, t), sizeof(time_t));
-
- *retval = (register_t)tv.tv_sec;
- return (error);
-}
-
-int
-hpux_sys_stime_6x(p, v, retval)
- struct proc *p;
- void *v;
- register_t *retval;
-{
- struct hpux_sys_stime_6x_args /* {
- syscallarg(int) time;
- } */ *uap = v;
- struct timespec ts;
- int error;
-
- ts.tv_sec = SCARG(uap, time);
- ts.tv_nsec = 0;
- if ((error = suser(p, 0)))
- return (error);
-
- settime(&ts);
-
- return (0);
-}
-
-int
-hpux_sys_ftime_6x(p, v, retval)
- struct proc *p;
- void *v;
- register_t *retval;
-{
- struct hpux_sys_ftime_6x_args /* {
- syscallarg(struct hpux_timeb *) tp;
- } */ *uap = v;
- struct hpux_otimeb tb;
- struct timeval tv;
-
- microtime(&tv);
- tb.time = tv.tv_sec;
- tb.millitm = tv.tv_usec / 1000;
- tb.timezone = tz.tz_minuteswest;
- tb.dstflag = tz.tz_dsttime;
- return (copyout((caddr_t)&tb, (caddr_t)SCARG(uap, tp), sizeof (tb)));
-}
-
-int
-hpux_sys_alarm_6x(p, v, retval)
- struct proc *p;
- void *v;
- register_t *retval;
-{
- struct hpux_sys_alarm_6x_args /* {
- syscallarg(int) deltat;
- } */ *uap = v;
- int timo;
- struct timeval tv, atv;
-
- timeout_del(&p->p_realit_to);
- timerclear(&p->p_realtimer.it_interval);
- *retval = 0;
- getmicrouptime(&tv);
- if (timerisset(&p->p_realtimer.it_value) &&
- timercmp(&p->p_realtimer.it_value, &tv, >))
- *retval = p->p_realtimer.it_value.tv_sec - tv.tv_sec;
- if (SCARG(uap, deltat) == 0) {
- timerclear(&p->p_realtimer.it_value);
- return (0);
- }
- atv.tv_sec = SCARG(uap, deltat);
- atv.tv_usec = 0;
- p->p_realtimer.it_value = tv;
- p->p_realtimer.it_value.tv_sec += SCARG(uap, deltat);
- timo = tvtohz(&atv);
- if (timo <= 0)
- timo = 1;
- timeout_add(&p->p_realit_to, timo);
- return (0);
-}
-
-int
-hpux_sys_nice_6x(p, v, retval)
- struct proc *p;
- void *v;
- register_t *retval;
-{
- struct hpux_sys_nice_6x_args /* {
- syscallarg(int) nval;
- } */ *uap = v;
- int error;
-
- error = donice(p, p, (p->p_nice-NZERO)+SCARG(uap, nval));
- if (error == 0)
- *retval = p->p_nice - NZERO;
- return (error);
-}
-
-int
-hpux_sys_times_6x(p, v, retval)
- struct proc *p;
- void *v;
- register_t *retval;
-{
- struct hpux_sys_times_6x_args /* {
- syscallarg(struct tms *) tms;
- } */ *uap = v;
- struct timeval ru, rs;
- struct tms atms;
- int error;
-
- calcru(p, &ru, &rs, NULL);
- atms.tms_utime = hpux_scale(&ru);
- atms.tms_stime = hpux_scale(&rs);
- atms.tms_cutime = hpux_scale(&p->p_stats->p_cru.ru_utime);
- atms.tms_cstime = hpux_scale(&p->p_stats->p_cru.ru_stime);
- error = copyout((caddr_t)&atms, (caddr_t)SCARG(uap, tms),
- sizeof (atms));
- if (error == 0) {
- struct timeval tv;
- getmicrouptime(&tv);
- *(time_t *)retval = hpux_scale(&tv);
- }
- return (error);
-}
-
-/*
- * Doesn't exactly do what the documentation says.
- * What we really do is return 1/HPUX_HZ-th of a second since that
- * is what HP-UX returns.
- */
-static int
-hpux_scale(tvp)
- struct timeval *tvp;
-{
- return (tvp->tv_sec * HPUX_HZ + tvp->tv_usec * HPUX_HZ / 1000000);
-}
-
-/*
- * Set IUPD and IACC times on file.
- * Can't set ICHG.
- */
-int
-hpux_sys_utime_6x(p, v, retval)
- struct proc *p;
- void *v;
- register_t *retval;
-{
- struct hpux_sys_utime_6x_args /* {
- syscallarg(char *) fname;
- syscallarg(time_t *) tptr;
- } */ *uap = v;
- struct vnode *vp;
- struct vattr vattr;
- time_t tv[2];
- int error;
- struct nameidata nd;
-
- if (SCARG(uap, tptr)) {
- error = copyin((caddr_t)SCARG(uap, tptr), (caddr_t)tv,
- sizeof (tv));
- if (error)
- return (error);
- } else
- tv[0] = tv[1] = time_second;
- vattr_null(&vattr);
- vattr.va_atime.tv_sec = tv[0];
- vattr.va_atime.tv_nsec = 0;
- vattr.va_mtime.tv_sec = tv[1];
- vattr.va_mtime.tv_nsec = 0;
- NDINIT(&nd, LOOKUP, FOLLOW | LOCKLEAF, UIO_USERSPACE,
- SCARG(uap, fname), p);
- if ((error = namei(&nd)))
- return (error);
- vp = nd.ni_vp;
- if (vp->v_mount->mnt_flag & MNT_RDONLY)
- error = EROFS;
- else
- error = VOP_SETATTR(vp, &vattr, nd.ni_cnd.cn_cred, p);
- vput(vp);
- return (error);
-}
-
-int
-hpux_sys_pause_6x(p, v, retval)
- struct proc *p;
- void *v;
- register_t *retval;
-{
- struct sys_sigsuspend_args bsa;
-
- SCARG(&bsa, mask) = p->p_sigmask;
- return (sys_sigsuspend(p, &bsa, retval));
-}
diff --git a/sys/compat/hpux/hpux_exec.h b/sys/compat/hpux/hpux_exec.h
deleted file mode 100644
index f40ae260c5c..00000000000
--- a/sys/compat/hpux/hpux_exec.h
+++ /dev/null
@@ -1,9 +0,0 @@
-/* $OpenBSD: hpux_exec.h,v 1.7 2004/07/09 21:33:44 mickey Exp $ */
-
-#if defined(__hppa__)
-#include <compat/hpux/hppa/hpux_exec.h>
-#elif defined(__m68k__)
-#include <compat/hpux/m68k/hpux_exec.h>
-#else
-#error COMPILING FOR UNSUPPORTED ARCHITECTURE
-#endif
diff --git a/sys/compat/hpux/hpux_file.c b/sys/compat/hpux/hpux_file.c
deleted file mode 100644
index 1f370a4a47b..00000000000
--- a/sys/compat/hpux/hpux_file.c
+++ /dev/null
@@ -1,874 +0,0 @@
-/* $OpenBSD: hpux_file.c,v 1.20 2010/06/26 23:24:44 guenther Exp $ */
-/* $NetBSD: hpux_file.c,v 1.5 1997/04/27 21:40:48 thorpej Exp $ */
-
-/*
- * Copyright (c) 1995, 1997 Jason R. Thorpe. All rights reserved.
- * Copyright (c) 1988 University of Utah.
- * Copyright (c) 1990, 1993
- * The Regents of the University of California. All rights reserved.
- *
- * This code is derived from software contributed to Berkeley by
- * the Systems Programming Group of the University of Utah Computer
- * Science Department.
- *
- * 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. Neither the name of the University nor the names of its contributors
- * may be used to endorse or promote products derived from this software
- * without specific prior written permission.
- *
- * THIS SOFTWARE IS PROVIDED BY THE REGENTS 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 REGENTS 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.
- *
- * from: Utah $Hdr: hpux_compat.c 1.64 93/08/05$
- *
- * @(#)hpux_compat.c 8.4 (Berkeley) 2/13/94
- */
-
-/*
- * File-related routines for HP-UX binary compatibility. Partially
- * modeled after sys/compat/linux/linux_file.c
- */
-
-#include <sys/param.h>
-#include <sys/systm.h>
-#include <sys/signalvar.h>
-#include <sys/kernel.h>
-#include <sys/filedesc.h>
-#include <sys/proc.h>
-#include <sys/buf.h>
-#include <sys/wait.h>
-#include <sys/file.h>
-#include <sys/namei.h>
-#include <sys/vnode.h>
-#include <sys/ioctl.h>
-#include <sys/ptrace.h>
-#include <sys/stat.h>
-#include <sys/syslog.h>
-#include <sys/malloc.h>
-#include <sys/mount.h>
-#include <sys/ipc.h>
-#include <sys/mman.h>
-
-#include <machine/cpu.h>
-#include <machine/reg.h>
-#include <machine/psl.h>
-#include <machine/vmparam.h>
-
-#include <sys/syscallargs.h>
-
-#include <compat/hpux/hpux.h>
-#include <compat/hpux/hpux_util.h>
-#include <compat/hpux/hpux_termio.h>
-#include <compat/hpux/hpux_syscall.h>
-#include <compat/hpux/hpux_syscallargs.h>
-
-#include <machine/hpux_machdep.h>
-
-int hpux_stat1(struct proc *, void *, register_t *, int);
-void bsd_to_hpux_stat(struct stat *, struct hpux_stat *);
-void bsd_to_hpux_ostat(struct stat *, struct hpux_ostat *);
-
-/*
- * HP-UX creat(2) system call.
- *
- * Just call open(2) with the TRUNC, CREAT and WRONLY flags.
- */
-int
-hpux_sys_creat(p, v, retval)
- struct proc *p;
- void *v;
- register_t *retval;
-{
- struct hpux_sys_creat_args /* {
- syscallarg(char *) path;
- syscallarg(int) mode;
- } */ *uap = v;
-
- struct sys_open_args oa;
- caddr_t sg;
-
- sg = stackgap_init(p->p_emul);
- HPUX_CHECK_ALT_CREAT(p, &sg, SCARG(uap, path));
-
- SCARG(&oa, path) = SCARG(uap, path);
- SCARG(&oa, flags) = O_CREAT | O_TRUNC | O_WRONLY;
- SCARG(&oa, mode) = SCARG(uap, mode);
-
- return sys_open(p, &oa, retval);
-}
-
-/*
- * HP-UX open(2) system call.
- *
- * We need to remap some of the bits in the mode mask:
- *
- * - O_CREAT, O_TRUNC, and O_EXCL must me remapped.
- * - O_NONBLOCK is remapped and remembered.
- * - O_FNDELAY is remembered.
- * - O_SYNCIO is removed entirely.
- */
-int
-hpux_sys_open(p, v, retval)
- struct proc *p;
- void *v;
- register_t *retval;
-{
- struct hpux_sys_open_args /* {
- syscallarg(char *) path;
- syscallarg(int) flags;
- syscallarg(int) mode;
- } */ *uap = v;
- struct sys_open_args oa;
- int flags, nflags, error;
- caddr_t sg;
-
- sg = stackgap_init(p->p_emul);
-
- /*
- * Deal with the mode flags first, since they will affect
- * how we check for the alternate path.
- */
- flags = SCARG(uap, flags);
- nflags =
- flags & ~(HPUXNONBLOCK|HPUXFSYNCIO|HPUXFEXCL|HPUXFTRUNC|HPUXFCREAT);
- if (flags & HPUXFCREAT) {
- /*
- * Simulate the pre-NFS behavior that opening a
- * file for READ+CREATE ignores the CREATE (unless
- * EXCL is set in which case we will return the
- * proper error).
- */
- if ((flags & HPUXFEXCL) || (FFLAGS(flags) & FWRITE))
- nflags |= O_CREAT;
- }
- if (flags & HPUXFTRUNC)
- nflags |= O_TRUNC;
- if (flags & HPUXFEXCL)
- nflags |= O_EXCL;
- if (flags & HPUXNONBLOCK)
- nflags |= O_NDELAY;
-
- /*
- * Do the alternate pathname check.
- */
- if (SCARG(&oa, flags) & O_CREAT)
- HPUX_CHECK_ALT_CREAT(p, &sg, SCARG(uap, path));
- else
- HPUX_CHECK_ALT_EXIST(p, &sg, SCARG(uap, path));
-
- /*
- * Fill in the new arguments and call the NetBSD open(2).
- */
- SCARG(&oa, path) = SCARG(uap, path);
- SCARG(&oa, flags) = nflags;
- SCARG(&oa, mode) = SCARG(uap, mode);
-
- error = sys_open(p, &oa, retval);
-
- /*
- * Record non-blocking mode for fcntl, read, write, etc.
- */
- if ((error == 0) && (nflags & O_NDELAY))
- p->p_fd->fd_ofileflags[*retval] |=
- (flags & HPUXNONBLOCK) ?
- HPUX_UF_NONBLOCK_ON : HPUX_UF_FNDELAY_ON;
-
- return (error);
-}
-
-/*
- * HP-UX fcntl(2) system call.
- */
-int
-hpux_sys_fcntl(p, v, retval)
- struct proc *p;
- void *v;
- register_t *retval;
-{
- struct hpux_sys_fcntl_args /* {
- syscallarg(int) fd;
- syscallarg(int) cmd;
- syscallarg(int) arg;
- } */ *uap = v;
- int arg, mode, error, flg = F_POSIX;
- struct file *fp;
- char *pop;
- struct hpux_flock hfl;
- struct flock fl;
- struct vnode *vp;
- struct sys_fcntl_args fa;
- struct filedesc *fdp = p->p_fd;
-
- if ((fp = fd_getfile(fdp, SCARG(uap, fd))) == NULL)
- return (EBADF);
- FREF(fp);
-
- pop = &p->p_fd->fd_ofileflags[SCARG(uap, fd)];
- arg = SCARG(uap, arg);
-
- switch (SCARG(uap, cmd)) {
- case F_SETFL:
- if (arg & HPUXNONBLOCK)
- *pop |= HPUX_UF_NONBLOCK_ON;
- else
- *pop &= ~HPUX_UF_NONBLOCK_ON;
-
- if (arg & HPUXNDELAY)
- *pop |= HPUX_UF_FNDELAY_ON;
- else
- *pop &= ~HPUX_UF_FNDELAY_ON;
-
- if (*pop & (HPUX_UF_NONBLOCK_ON|HPUX_UF_FNDELAY_ON|HPUX_UF_FIONBIO_ON))
- arg |= FNONBLOCK;
- else
- arg &= ~FNONBLOCK;
-
- arg &= ~(HPUXNONBLOCK|HPUXFSYNCIO|HPUXFREMOTE);
- break;
-
- case F_GETFL:
- case F_DUPFD:
- case F_GETFD:
- case F_SETFD:
- break;
-
- case HPUXF_SETLKW:
- flg |= F_WAIT;
- /* Fall into F_SETLK */
-
- case HPUXF_SETLK:
- if (fp->f_type != DTYPE_VNODE) {
- error = EBADF;
- goto out;
- }
-
- vp = (struct vnode *)fp->f_data;
-
- /* Copy in the lock structure */
- error = copyin((caddr_t)SCARG(uap, arg), (caddr_t)&hfl,
- sizeof (hfl));
- if (error)
- goto out;
-
- fl.l_start = hfl.hl_start;
- fl.l_len = hfl.hl_len;
- fl.l_pid = hfl.hl_pid;
- fl.l_type = hfl.hl_type;
- fl.l_whence = hfl.hl_whence;
- if (fl.l_whence == SEEK_CUR)
- fl.l_start += fp->f_offset;
-
- switch (fl.l_type) {
- case F_RDLCK:
- if ((fp->f_flag & FREAD) == 0) {
- error = EBADF;
- goto out;
- }
-
- atomic_setbits_int(&fdp->fd_flags, FD_ADVLOCK);
- error = VOP_ADVLOCK(vp, fdp, F_SETLK, &fl, flg);
- goto out;
-
- case F_WRLCK:
- if ((fp->f_flag & FWRITE) == 0) {
- error = EBADF;
- goto out;
- }
- atomic_setbits_int(&fdp->fd_flags, FD_ADVLOCK);
- error = VOP_ADVLOCK(vp, fdp, F_SETLK, &fl, flg);
- goto out;
-
- case F_UNLCK:
- error = VOP_ADVLOCK(vp, fdp, F_UNLCK, &fl, F_POSIX);
- goto out;
-
- default:
- error = EINVAL;
- goto out;
- }
- /* NOTREACHED */
-
- case F_GETLK:
- if (fp->f_type != DTYPE_VNODE) {
- error = EBADF;
- goto out;
- }
-
- vp = (struct vnode *)fp->f_data;
-
- /* Copy in the lock structure */
- error = copyin((caddr_t)SCARG(uap, arg), (caddr_t)&hfl,
- sizeof (hfl));
- if (error)
- goto out;
-
- fl.l_start = hfl.hl_start;
- fl.l_len = hfl.hl_len;
- fl.l_pid = hfl.hl_pid;
- fl.l_type = hfl.hl_type;
- fl.l_whence = hfl.hl_whence;
- if (fl.l_whence == SEEK_CUR)
- fl.l_start += fp->f_offset;
-
- if ((error = VOP_ADVLOCK(vp, fdp, F_GETLK, &fl, F_POSIX)))
- goto out;
-
- hfl.hl_start = fl.l_start;
- hfl.hl_len = fl.l_len;
- hfl.hl_pid = fl.l_pid;
- hfl.hl_type = fl.l_type;
- hfl.hl_whence = fl.l_whence;
- error = copyout((caddr_t)&hfl, (caddr_t)SCARG(uap, arg),
- sizeof (hfl));
- goto out;
-
- default:
- error = EINVAL;
- goto out;
- }
-
- /*
- * Pass whatever's left on to the NetBSD fcntl(2).
- */
- SCARG(&fa, fd) = SCARG(uap, fd);
- SCARG(&fa, cmd) = SCARG(uap, cmd);
- SCARG(&fa, arg) = (void *)arg;
-
- error = sys_fcntl(p, &fa, retval);
-
- if ((error == 0) && (SCARG(&fa, cmd) == F_GETFL)) {
- mode = *retval;
- *retval &= ~(O_CREAT|O_TRUNC|O_EXCL);
- if (mode & FNONBLOCK) {
- if (*pop & HPUX_UF_NONBLOCK_ON)
- *retval |= HPUXNONBLOCK;
-
- if ((*pop & HPUX_UF_FNDELAY_ON) == 0)
- *retval &= ~HPUXNDELAY;
- }
- if (mode & O_CREAT)
- *retval |= HPUXFCREAT;
-
- if (mode & O_TRUNC)
- *retval |= HPUXFTRUNC;
-
- if (mode & O_EXCL)
- *retval |= HPUXFEXCL;
- }
-out:
- FRELE(fp);
- return (error);
-}
-
-/*
- * HP-UX fstat(2) system call.
- */
-int
-hpux_sys_fstat(p, v, retval)
- struct proc *p;
- void *v;
- register_t *retval;
-{
- struct hpux_sys_fstat_args /* {
- syscallarg(int) fd;
- syscallarg(struct hpux_stat *) sb;
- } */ *uap = v;
- struct sys_fstat_args fsa;
- struct hpux_stat tmphst;
- struct stat *st, tmpst;
- caddr_t sg;
- int error;
-
- sg = stackgap_init(p->p_emul);
-
- st = stackgap_alloc(&sg, sizeof (struct stat));
-
- SCARG(&fsa, fd) = SCARG(uap, fd);
- SCARG(&fsa, sb) = st;
-
- if ((error = sys_fstat(p, &fsa, retval)))
- return (error);
-
- if ((error = copyin(st, &tmpst, sizeof(tmpst))))
- return (error);
-
- bsd_to_hpux_stat(&tmpst, &tmphst);
-
- return (copyout(&tmphst, SCARG(uap, sb), sizeof(struct hpux_stat)));
-}
-
-/*
- * HP-UX stat(2) system call.
- */
-int
-hpux_sys_stat(p, v, retval)
- struct proc *p;
- void *v;
- register_t *retval;
-{
-
- return (hpux_stat1(p, v, retval, 0));
-}
-
-/*
- * HP-UX lstat(2) system call.
- */
-int
-hpux_sys_lstat(p, v, retval)
- struct proc *p;
- void *v;
- register_t *retval;
-{
-
- return (hpux_stat1(p, v, retval, 1));
-}
-
-/*
- * Do the meat of stat(2) and lstat(2).
- */
-int
-hpux_stat1(p, v, retval, dolstat)
- struct proc *p;
- void *v;
- register_t *retval;
- int dolstat;
-{
- struct hpux_sys_stat_args /* {
- syscallarg(char *) path;
- syscallarg(struct hpux_stat *) sb;
- } */ *uap = v;
- struct sys_stat_args sa;
- struct hpux_stat tmphst;
- struct stat *st, tmpst;
- caddr_t sg;
- int error;
-
- sg = stackgap_init(p->p_emul);
-
- st = stackgap_alloc(&sg, sizeof (struct stat));
- HPUX_CHECK_ALT_EXIST(p, &sg, SCARG(uap, path));
-
- SCARG(&sa, ub) = st;
- SCARG(&sa, path) = SCARG(uap, path);
-
- if (dolstat)
- error = sys_lstat(p, &sa, retval);
- else
- error = sys_stat(p, &sa, retval);
-
- if (error)
- return (error);
-
- if ((error = copyin(st, &tmpst, sizeof(tmpst))))
- return (error);
-
- bsd_to_hpux_stat(&tmpst, &tmphst);
-
- return (copyout(&tmphst, SCARG(uap, sb), sizeof(struct hpux_stat)));
-}
-
-#ifndef __hppa__
-/*
- * The old HP-UX fstat(2) system call.
- */
-int
-hpux_sys_fstat_6x(p, v, retval)
- struct proc *p;
- void *v;
- register_t *retval;
-{
- struct hpux_sys_fstat_6x_args /* {
- syscallarg(int) fd;
- syscallarg(struct hpux_ostat *) sb;
- } */ *uap = v;
- struct sys_fstat_args fsa;
- struct hpux_ostat tmphst;
- struct stat *st, tmpst;
- caddr_t sg;
- int error;
-
- sg = stackgap_init(p->p_emul);
-
- st = stackgap_alloc(&sg, sizeof (struct stat));
-
- SCARG(&fsa, fd) = SCARG(uap, fd);
- SCARG(&fsa, sb) = st;
-
- if ((error = sys_fstat(p, &fsa, retval)))
- return (error);
-
- if ((error = copyin(st, &tmpst, sizeof(tmpst))))
- return (error);
-
- bsd_to_hpux_ostat(&tmpst, &tmphst);
-
- return (copyout(&tmphst, SCARG(uap, sb), sizeof(struct hpux_ostat)));
-}
-
-/*
- * The old HP-UX stat(2) system call.
- */
-int
-hpux_sys_stat_6x(p, v, retval)
- struct proc *p;
- void *v;
- register_t *retval;
-{
- struct hpux_sys_stat_6x_args /* {
- syscallarg(char *) path;
- syscallarg(struct hpux_ostat *) sb;
- } */ *uap = v;
- struct sys_stat_args sa;
- struct hpux_ostat tmphst;
- struct stat *st, tmpst;
- caddr_t sg;
- int error;
-
- sg = stackgap_init(p->p_emul);
-
- HPUX_CHECK_ALT_EXIST(p, &sg, SCARG(uap, path));
-
- st = stackgap_alloc(&sg, sizeof (struct stat));
- SCARG(&sa, ub) = st;
- SCARG(&sa, path) = SCARG(uap, path);
-
- if ((error = sys_stat(p, &sa, retval)))
- return (error);
-
- if ((error = copyin(st, &tmpst, sizeof(tmpst))))
- return (error);
-
- bsd_to_hpux_ostat(&tmpst, &tmphst);
-
- return (copyout(&tmphst, SCARG(uap, sb), sizeof(struct hpux_ostat)));
-}
-
-/*
- * Convert a NetBSD stat structure to an old-style HP-UX stat structure.
- */
-void
-bsd_to_hpux_ostat(sb, hsb)
- struct stat *sb;
- struct hpux_ostat *hsb;
-{
-
- bzero(hsb, sizeof(struct hpux_ostat));
- hsb->hst_dev = (u_short)sb->st_dev;
- hsb->hst_ino = (u_short)sb->st_ino;
- hsb->hst_mode = (u_short)sb->st_mode;
- hsb->hst_nlink = (u_short)sb->st_nlink;
- hsb->hst_uid = (u_short)sb->st_uid;
- hsb->hst_gid = (u_short)sb->st_gid;
- hsb->hst_rdev = (u_short)sb->st_rdev;
- if (sb->st_size < (off_t)(((off_t)1) << 32))
- hsb->hst_size = (int)sb->st_size;
- else
- hsb->hst_size = -2;
- hsb->hst_atime = (int)sb->st_atime;
- hsb->hst_mtime = (int)sb->st_mtime;
- hsb->hst_ctime = (int)sb->st_ctime;
-}
-#endif
-
-/*
- * Convert a NetBSD stat structure to an HP-UX stat structure.
- */
-void
-bsd_to_hpux_stat(sb, hsb)
- struct stat *sb;
- struct hpux_stat *hsb;
-{
-
- bzero((caddr_t)hsb, sizeof(struct hpux_stat));
- hsb->hst_dev = (long)sb->st_dev;
- hsb->hst_ino = (u_long)sb->st_ino;
- hsb->hst_mode = (u_short)sb->st_mode;
- hsb->hst_nlink = (u_short)sb->st_nlink;
- hsb->hst_uid = (u_long)sb->st_uid;
- hsb->hst_gid = (u_long)sb->st_gid;
- hsb->hst_rdev = (long)bsdtohpuxdev(sb->st_rdev);
- /*
- * XXX Let's just hope that the old binary doesn't lose.
- */
- hsb->hst_old_uid = (u_short)sb->st_uid;
- hsb->hst_old_gid = (u_short)sb->st_gid;
-
- if (sb->st_size < (off_t)(((off_t)1) << 32))
- hsb->hst_size = (long)sb->st_size;
- else
- hsb->hst_size = -2;
- hsb->hst_atime = (long)sb->st_atime;
- hsb->hst_mtime = (long)sb->st_mtime;
- hsb->hst_ctime = (long)sb->st_ctime;
- hsb->hst_blksize = (long)sb->st_blksize;
- hsb->hst_blocks = (long)sb->st_blocks;
-}
-
-/*
- * HP-UX access(2) system call.
- */
-int
-hpux_sys_access(p, v, retval)
- struct proc *p;
- void *v;
- register_t *retval;
-{
- struct hpux_sys_access_args /* {
- syscallarg(char *) path;
- syscallarg(int) flags;
- } */ *uap = v;
- caddr_t sg = stackgap_init(p->p_emul);
-
- HPUX_CHECK_ALT_EXIST(p, &sg, SCARG(uap, path));
-
- return (sys_access(p, uap, retval));
-}
-
-/*
- * HP-UX unlink(2) system call.
- */
-int
-hpux_sys_unlink(p, v, retval)
- struct proc *p;
- void *v;
- register_t *retval;
-{
- struct hpux_sys_unlink_args /* {
- syscallarg(char *) path;
- } */ *uap = v;
- caddr_t sg = stackgap_init(p->p_emul);
-
- HPUX_CHECK_ALT_EXIST(p, &sg, SCARG(uap, path));
-
- return (sys_unlink(p, uap, retval));
-}
-
-/*
- * HP-UX chdir(2) system call.
- */
-int
-hpux_sys_chdir(p, v, retval)
- struct proc *p;
- void *v;
- register_t *retval;
-{
- struct hpux_sys_chdir_args /* {
- syscallarg(char *) path;
- } */ *uap = v;
- caddr_t sg = stackgap_init(p->p_emul);
-
- HPUX_CHECK_ALT_EXIST(p, &sg, SCARG(uap, path));
-
- return (sys_chdir(p, uap, retval));
-}
-
-/*
- * HP-UX mknod(2) system call.
- */
-int
-hpux_sys_mknod(p, v, retval)
- struct proc *p;
- void *v;
- register_t *retval;
-{
- struct hpux_sys_mknod_args /* {
- syscallarg(char *) path;
- syscallarg(int) mode;
- syscallarf(int) dev;
- } */ *uap = v;
- caddr_t sg = stackgap_init(p->p_emul);
- struct sys_mkfifo_args bma;
-
- HPUX_CHECK_ALT_CREAT(p, &sg, SCARG(uap, path));
-
- /*
- * BSD handles FIFOs separately.
- */
- if (S_ISFIFO(SCARG(uap, mode))) {
- SCARG(&bma, path) = SCARG(uap, path);
- SCARG(&bma, mode) = SCARG(uap, mode);
- return (sys_mkfifo(p, uap, retval));
- } else
- return (sys_mknod(p, uap, retval));
-}
-
-/*
- * HP-UX chmod(2) system call.
- */
-int
-hpux_sys_chmod(p, v, retval)
- struct proc *p;
- void *v;
- register_t *retval;
-{
- struct hpux_sys_chmod_args /* {
- syscallarg(char *) path;
- syscallarg(int) mode;
- } */ *uap = v;
- caddr_t sg = stackgap_init(p->p_emul);
-
- HPUX_CHECK_ALT_EXIST(p, &sg, SCARG(uap, path));
-
- return (sys_chmod(p, uap, retval));
-}
-
-/*
- * HP-UX chown(2) system call.
- */
-int
-hpux_sys_chown(p, v, retval)
- struct proc *p;
- void *v;
- register_t *retval;
-{
- struct hpux_sys_chown_args /* {
- syscallarg(char *) path;
- syscallarg(int) uid;
- syscallarg(int) gid;
- } */ *uap = v;
- caddr_t sg = stackgap_init(p->p_emul);
-
- HPUX_CHECK_ALT_EXIST(p, &sg, SCARG(uap, path));
-
- /* XXX What about older HP-UX executables? */
-
- return (sys_lchown(p, uap, retval));
-}
-
-/*
- * HP-UX rename(2) system call.
- */
-int
-hpux_sys_rename(p, v, retval)
- struct proc *p;
- void *v;
- register_t *retval;
-{
- struct hpux_sys_rename_args /* {
- syscallarg(char *) from;
- syscallarg(char *) to;
- } */ *uap = v;
- caddr_t sg = stackgap_init(p->p_emul);
-
- HPUX_CHECK_ALT_EXIST(p, &sg, SCARG(uap, from));
- HPUX_CHECK_ALT_EXIST(p, &sg, SCARG(uap, to));
-
- return (sys_rename(p, uap, retval));
-}
-
-/*
- * HP-UX mkdir(2) system call.
- */
-int
-hpux_sys_mkdir(p, v, retval)
- struct proc *p;
- void *v;
- register_t *retval;
-{
- struct hpux_sys_mkdir_args /* {
- syscallarg(char *) path;
- syscallarg(int) mode;
- } */ *uap = v;
- caddr_t sg = stackgap_init(p->p_emul);
-
- HPUX_CHECK_ALT_CREAT(p, &sg, SCARG(uap, path));
-
- return (sys_mkdir(p, uap, retval));
-}
-
-/*
- * HP-UX rmdir(2) system call.
- */
-int
-hpux_sys_rmdir(p, v, retval)
- struct proc *p;
- void *v;
- register_t *retval;
-{
- struct hpux_sys_rmdir_args /* {
- syscallarg(char *) path;
- } */ *uap = v;
- caddr_t sg = stackgap_init(p->p_emul);
-
- HPUX_CHECK_ALT_EXIST(p, &sg, SCARG(uap, path));
-
- return (sys_rmdir(p, uap, retval));
-}
-
-/*
- * HP-UX symlink(2) system call.
- */
-int
-hpux_sys_symlink(p, v, retval)
- struct proc *p;
- void *v;
- register_t *retval;
-{
- struct hpux_sys_symlink_args /* {
- syscallarg(char *) path;
- syscallarg(char *) link;
- } */ *uap = v;
- caddr_t sg = stackgap_init(p->p_emul);
-
- HPUX_CHECK_ALT_EXIST(p, &sg, SCARG(uap, path));
- HPUX_CHECK_ALT_CREAT(p, &sg, SCARG(uap, link));
-
- return (sys_symlink(p, uap, retval));
-}
-
-/*
- * HP-UX readlink(2) system call.
- */
-int
-hpux_sys_readlink(p, v, retval)
- struct proc *p;
- void *v;
- register_t *retval;
-{
- struct hpux_sys_readlink_args /* {
- syscallarg(char *) path;
- syscallarg(char *) buf;
- syscallarg(int) count;
- } */ *uap = v;
- caddr_t sg = stackgap_init(p->p_emul);
-
- HPUX_CHECK_ALT_EXIST(p, &sg, SCARG(uap, path));
-
- return (sys_readlink(p, uap, retval));
-}
-
-/*
- * HP-UX truncate(2) system call.
- */
-int
-hpux_sys_truncate(p, v, retval)
- struct proc *p;
- void *v;
- register_t *retval;
-{
- struct hpux_sys_truncate_args /* {
- syscallarg(char *) path;
- syscallarg(long) length;
- } */ *uap = v;
- caddr_t sg = stackgap_init(p->p_emul);
-
- HPUX_CHECK_ALT_EXIST(p, &sg, SCARG(uap, path));
-
- return (compat_43_sys_truncate(p, uap, retval));
-}
diff --git a/sys/compat/hpux/hpux_sig.c b/sys/compat/hpux/hpux_sig.c
deleted file mode 100644
index a655f95b645..00000000000
--- a/sys/compat/hpux/hpux_sig.c
+++ /dev/null
@@ -1,408 +0,0 @@
-/* $OpenBSD: hpux_sig.c,v 1.12 2009/12/09 16:29:56 jsg Exp $ */
-/* $NetBSD: hpux_sig.c,v 1.16 1997/04/01 19:59:02 scottr Exp $ */
-
-/*
- * Copyright (c) 1988 University of Utah.
- * Copyright (c) 1990, 1993
- * The Regents of the University of California. All rights reserved.
- *
- * This code is derived from software contributed to Berkeley by
- * the Systems Programming Group of the University of Utah Computer
- * Science Department.
- *
- * 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. Neither the name of the University nor the names of its contributors
- * may be used to endorse or promote products derived from this software
- * without specific prior written permission.
- *
- * THIS SOFTWARE IS PROVIDED BY THE REGENTS 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 REGENTS 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.
- *
- * from: Utah $Hdr: hpux_sig.c 1.4 92/01/20$
- *
- * @(#)hpux_sig.c 8.2 (Berkeley) 9/23/93
- */
-
-/*
- * Signal related HPUX compatibility routines
- */
-
-#include <sys/param.h>
-#include <sys/systm.h>
-#include <sys/kernel.h>
-#include <sys/mount.h>
-#include <sys/proc.h>
-#include <sys/signalvar.h>
-#include <sys/syscallargs.h>
-
-#include <compat/hpux/hpux.h>
-#include <compat/hpux/hpux_sig.h>
-#include <compat/hpux/hpux_syscallargs.h>
-
-/* indexed by HPUX signal number - 1 */
-char hpuxtobsdsigmap[NSIG] = {
-/*01*/ SIGHUP, SIGINT, SIGQUIT, SIGILL, SIGTRAP, SIGIOT, SIGEMT, SIGFPE,
-/*09*/ SIGKILL, SIGBUS, SIGSEGV, SIGSYS, SIGPIPE, SIGALRM, SIGTERM, SIGUSR1,
-/*17*/ SIGUSR2, SIGCHLD, 0, SIGVTALRM,SIGPROF, SIGIO, SIGWINCH, SIGSTOP,
-/*25*/ SIGTSTP, SIGCONT,SIGTTIN, SIGTTOU, SIGURG, 0, 0, 0,
-/*33*/ 0
-};
-
-/* indexed by BSD signal number - 1 */
-char bsdtohpuxsigmap[NSIG] = {
-/*01*/ 1, 2, 3, 4, 5, 6, 7, 8,
-/*09*/ 9, 10, 11, 12, 13, 14, 15, 29,
-/*17*/ 24, 25, 26, 18, 27, 28, 22, 0,
-/*25*/ 0, 20, 21, 23, 0, 16, 17, 0,
-/*33*/ 0
-};
-
-/*
- * XXX: In addition to mapping the signal number we also have
- * to see if the "old" style signal mechinism is needed.
- * If so, we set the OUSIG flag. This is not really correct
- * as under HP-UX "old" style handling can be set on a per
- * signal basis and we are setting it for all signals in one
- * swell foop. I suspect we can get away with this since I
- * doubt any program of interest mixes the two semantics.
- */
-int
-hpux_sys_sigvec(p, v, retval)
- struct proc *p;
- void *v;
- register_t *retval;
-{
- struct hpux_sys_sigvec_args *uap = v;
- struct sigvec vec;
- struct sigacts *ps = p->p_sigacts;
- struct sigvec *sv;
- int sig;
- int bit, error;
-
- sig = hpuxtobsdsig(SCARG(uap, signo));
- if (sig <= 0 || sig >= NSIG || sig == SIGKILL || sig == SIGSTOP)
- return (EINVAL);
- sv = &vec;
- if (SCARG(uap, osv)) {
- sv->sv_handler = ps->ps_sigact[sig];
- sv->sv_mask = ps->ps_catchmask[sig];
- bit = sigmask(sig);
- sv->sv_flags = 0;
- if ((ps->ps_sigonstack & bit) != 0)
- sv->sv_flags |= SV_ONSTACK;
- if ((ps->ps_sigintr & bit) != 0)
- sv->sv_flags |= SV_INTERRUPT;
- if ((ps->ps_sigreset & bit) != 0)
- sv->sv_flags |= HPUXSV_RESET;
- sv->sv_mask &= ~bit;
- error = copyout((caddr_t)sv, (caddr_t)SCARG(uap, osv),
- sizeof (vec));
- if (error)
- return (error);
- }
- if (SCARG(uap, nsv)) {
- error = copyin((caddr_t)SCARG(uap, nsv), (caddr_t)sv,
- sizeof (vec));
- if (error)
- return (error);
- if (sig == SIGCONT && sv->sv_handler == SIG_IGN)
- return (EINVAL);
- sv->sv_flags ^= SA_RESTART;
- setsigvec(p, sig, (struct sigaction *)sv);
-#if 0
-/* XXX -- SOUSIG no longer exists, do something here */
- if (sv->sv_flags & HPUXSV_RESET)
- p->p_flag |= SOUSIG; /* XXX */
-#endif
- }
- return (0);
-}
-
-int
-hpux_sys_sigblock(p, v, retval)
- struct proc *p;
- void *v;
- register_t *retval;
-{
- struct hpux_sys_sigblock_args *uap = v;
- int s;
-
- s = splhigh();
- *retval = bsdtohpuxmask(p->p_sigmask);
- p->p_sigmask |= hpuxtobsdmask(SCARG(uap, mask)) &~ sigcantmask;
- splx(s);
- return (0);
-}
-
-int
-hpux_sys_sigsetmask(p, v, retval)
- struct proc *p;
- void *v;
- register_t *retval;
-{
- struct hpux_sys_sigsetmask_args *uap = v;
- int s;
-
- s = splhigh();
- *retval = bsdtohpuxmask(p->p_sigmask);
- p->p_sigmask = hpuxtobsdmask(SCARG(uap, mask)) &~ sigcantmask;
- splx(s);
- return (0);
-}
-
-int
-hpux_sys_sigpause(p, v, retval)
- struct proc *p;
- void *v;
- register_t *retval;
-{
- struct hpux_sys_sigpause_args *uap = v;
-
- SCARG(uap, mask) = hpuxtobsdmask(SCARG(uap, mask));
- return (sys_sigsuspend(p, uap, retval));
-}
-
-/* not totally correct, but close enough */
-int
-hpux_sys_kill(p, v, retval)
- struct proc *p;
- void *v;
- register_t *retval;
-{
- struct hpux_sys_kill_args *uap = v;
-
- if (SCARG(uap, signo)) {
- SCARG(uap, signo) = hpuxtobsdsig(SCARG(uap, signo));
- if (SCARG(uap, signo) == 0)
- SCARG(uap, signo) = NSIG;
- }
- return (sys_kill(p, uap, retval));
-}
-
-/*
- * The following (sigprocmask, sigpending, sigsuspend, sigaction are
- * POSIX calls. Under BSD, the library routine dereferences the sigset_t
- * pointers before traping. Not so under HP-UX.
- */
-
-/*
- * Manipulate signal mask.
- * Note that we receive new mask, not pointer,
- * and return old mask as return value;
- * the library stub does the rest.
- */
-int
-hpux_sys_sigprocmask(p, v, retval)
- struct proc *p;
- void *v;
- register_t *retval;
-{
- struct hpux_sys_sigprocmask_args *uap = v;
- int mask, error = 0;
- hpux_sigset_t sigset;
- int s;
-
- /*
- * Copy out old mask first to ensure no errors.
- * (proc sigmask should not be changed if call fails for any reason)
- */
- if (SCARG(uap, oset)) {
- bzero((caddr_t)&sigset, sizeof(sigset));
- sigset.sigset[0] = bsdtohpuxmask(p->p_sigmask);
- if (copyout((caddr_t)&sigset, (caddr_t)SCARG(uap, oset),
- sizeof(sigset)))
- return (EFAULT);
- }
- if (SCARG(uap, set)) {
- if (copyin((caddr_t)SCARG(uap, set), (caddr_t)&sigset,
- sizeof(sigset)))
- return (EFAULT);
- mask = hpuxtobsdmask(sigset.sigset[0]);
- s = splhigh();
- switch (SCARG(uap, how)) {
- case HPUXSIG_BLOCK:
- p->p_sigmask |= mask &~ sigcantmask;
- break;
- case HPUXSIG_UNBLOCK:
- p->p_sigmask &= ~mask;
- break;
- case HPUXSIG_SETMASK:
- p->p_sigmask = mask &~ sigcantmask;
- break;
- default:
- error = EINVAL;
- break;
- }
- splx(s);
- }
- return (error);
-}
-
-int
-hpux_sys_sigpending(p, v, retval)
- struct proc *p;
- void *v;
- register_t *retval;
-{
- struct hpux_sys_sigpending_args *uap = v;
- hpux_sigset_t sigset;
-
- sigset.sigset[0] = bsdtohpuxmask(p->p_siglist);
- return (copyout((caddr_t)&sigset, (caddr_t)SCARG(uap, set),
- sizeof(sigset)));
-}
-
-int
-hpux_sys_sigsuspend(p, v, retval)
- struct proc *p;
- void *v;
- register_t *retval;
-{
- struct hpux_sys_sigsuspend_args *uap = v;
- struct sigacts *ps = p->p_sigacts;
- hpux_sigset_t sigset;
- int mask;
-
- if (copyin((caddr_t)SCARG(uap, set), (caddr_t)&sigset, sizeof(sigset)))
- return (EFAULT);
- mask = hpuxtobsdmask(sigset.sigset[0]);
- ps->ps_oldmask = p->p_sigmask;
- ps->ps_flags |= SAS_OLDMASK;
- p->p_sigmask = mask &~ sigcantmask;
- (void) tsleep((caddr_t)ps, PPAUSE | PCATCH, "pause", 0);
- /* always return EINTR rather than ERESTART... */
- return (EINTR);
-}
-
-int
-hpux_sys_sigaction(p, v, retval)
- struct proc *p;
- void *v;
- register_t *retval;
-{
- struct hpux_sys_sigaction_args *uap = v;
- struct hpux_sigaction action;
- struct sigacts *ps = p->p_sigacts;
- struct hpux_sigaction *sa;
- int sig;
- int bit;
-
- sig = hpuxtobsdsig(SCARG(uap, signo));
- if (sig <= 0 || sig >= NSIG || sig == SIGKILL || sig == SIGSTOP)
- return (EINVAL);
-
- sa = &action;
- if (SCARG(uap, osa)) {
- sa->sa__handler = ps->ps_sigact[sig];
- bzero((caddr_t)&sa->sa_mask, sizeof(sa->sa_mask));
- sa->sa_mask.sigset[0] = bsdtohpuxmask(ps->ps_catchmask[sig]);
- bit = sigmask(sig);
- sa->sa_flags = 0;
- if ((ps->ps_sigonstack & bit) != 0)
- sa->sa_flags |= HPUXSA_ONSTACK;
- if ((ps->ps_sigreset & bit) != 0)
- sa->sa_flags |= HPUXSA_RESETHAND;
- if (p->p_flag & P_NOCLDSTOP)
- sa->sa_flags |= HPUXSA_NOCLDSTOP;
- if (p->p_flag & P_NOCLDWAIT)
- sa->sa_flags |= HPUXSA_NOCLDWAIT;
- if (copyout((caddr_t)sa, (caddr_t)SCARG(uap, osa),
- sizeof (action)))
- return (EFAULT);
- }
- if (SCARG(uap, nsa)) {
- struct sigaction act;
-
- if (copyin((caddr_t)SCARG(uap, nsa), (caddr_t)sa,
- sizeof (action)))
- return (EFAULT);
- if (sig == SIGCONT && sa->sa__handler == SIG_IGN)
- return (EINVAL);
- /*
- * Create a sigaction struct for setsigvec
- */
- act.sa_handler = sa->sa__handler;
- act.sa_mask = hpuxtobsdmask(sa->sa_mask.sigset[0]);
- act.sa_flags = SA_RESTART;
- if (sa->sa_flags & HPUXSA_ONSTACK)
- act.sa_flags |= SA_ONSTACK;
- if (sa->sa_flags & HPUXSA_NOCLDSTOP)
- act.sa_flags |= SA_NOCLDSTOP;
- if (sa->sa_flags & HPUXSA_NOCLDWAIT)
- act.sa_flags |= SA_NOCLDWAIT;
- setsigvec(p, sig, &act);
-#if 0
-/* XXX -- SOUSIG no longer exists, do something here */
- if (sa->sa_flags & HPUXSA_RESETHAND)
- p->p_flag |= SOUSIG; /* XXX */
-#endif
- }
- return (0);
-}
-
-/* signal numbers: convert from HPUX to BSD */
-int
-hpuxtobsdsig(sig)
- int sig;
-{
- if (--sig < 0 || sig >= NSIG)
- return(0);
- return((int)hpuxtobsdsigmap[sig]);
-}
-
-/* signal numbers: convert from BSD to HPUX */
-int
-bsdtohpuxsig(sig)
- int sig;
-{
- if (--sig < 0 || sig >= NSIG)
- return(0);
- return((int)bsdtohpuxsigmap[sig]);
-}
-
-/* signal masks: convert from HPUX to BSD (not pretty or fast) */
-int
-hpuxtobsdmask(mask)
- int mask;
-{
- int nmask, sig, nsig;
-
- if (mask == 0 || mask == -1)
- return(mask);
- nmask = 0;
- for (sig = 1; sig < NSIG; sig++)
- if ((mask & sigmask(sig)) && (nsig = hpuxtobsdsig(sig)))
- nmask |= sigmask(nsig);
- return(nmask);
-}
-
-int
-bsdtohpuxmask(mask)
- int mask;
-{
- int nmask, sig, nsig;
-
- if (mask == 0 || mask == -1)
- return(mask);
- nmask = 0;
- for (sig = 1; sig < NSIG; sig++)
- if ((mask & sigmask(sig)) && (nsig = bsdtohpuxsig(sig)))
- nmask |= sigmask(nsig);
- return(nmask);
-}
diff --git a/sys/compat/hpux/hpux_sig.h b/sys/compat/hpux/hpux_sig.h
deleted file mode 100644
index 620758f6eef..00000000000
--- a/sys/compat/hpux/hpux_sig.h
+++ /dev/null
@@ -1,60 +0,0 @@
-/* $OpenBSD: hpux_sig.h,v 1.5 2004/07/11 03:04:02 mickey Exp $ */
-/* $NetBSD: hpux_sig.h,v 1.1 1997/04/01 19:59:03 scottr Exp $ */
-
-/*
- * Copyright (c) 2004 Michael Shalayeff. All rights reserved.
- * Copyright (c) 1988 University of Utah.
- * Copyright (c) 1990, 1993
- * The Regents of the University of California. All rights reserved.
- *
- * This code is derived from software contributed to Berkeley by
- * the Systems Programming Group of the University of Utah Computer
- * Science Department.
- *
- * 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. Neither the name of the University nor the names of its contributors
- * may be used to endorse or promote products derived from this software
- * without specific prior written permission.
- *
- * THIS SOFTWARE IS PROVIDED BY THE REGENTS 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 REGENTS 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.
- *
- * Derived from: Utah $Hdr: hpux_sig.c 1.4 92/01/20$
- *
- * @(#)hpux_sig.c 8.2 (Berkeley) 9/23/93
- */
-
-/*
- * Signal-related HPUX compatibility routines and data types
- */
-
-typedef
-struct hpux_sigaltstack {
- void *ss_sp;
- int ss_flags;
- size_t ss_size;
-} hpux_stack_t;
-#define HPUX_SS_DISABLE 0x0002
-
-#ifdef _KERNEL
-int hpuxtobsdsig(int);
-int bsdtohpuxsig(int);
-int hpuxtobsdmask(int);
-int bsdtohpuxmask(int);
-#endif /* _KERNEL */
diff --git a/sys/compat/hpux/hpux_syscall.h b/sys/compat/hpux/hpux_syscall.h
deleted file mode 100644
index 54e2bfadf56..00000000000
--- a/sys/compat/hpux/hpux_syscall.h
+++ /dev/null
@@ -1,9 +0,0 @@
-/* $OpenBSD: hpux_syscall.h,v 1.12 2004/07/09 21:33:44 mickey Exp $ */
-
-#if defined(__hppa__)
-#include <compat/hpux/hppa/hpux_syscall.h>
-#elif defined(__m68k__)
-#include <compat/hpux/m68k/hpux_syscall.h>
-#else
-#error COMPILING FOR UNSUPPORTED ARCHITECTURE
-#endif
diff --git a/sys/compat/hpux/hpux_syscallargs.h b/sys/compat/hpux/hpux_syscallargs.h
deleted file mode 100644
index 4714c855140..00000000000
--- a/sys/compat/hpux/hpux_syscallargs.h
+++ /dev/null
@@ -1,7 +0,0 @@
-/* $OpenBSD: hpux_syscallargs.h,v 1.14 2004/07/09 21:33:44 mickey Exp $ */
-
-#if defined(__hppa__)
-#include <compat/hpux/hppa/hpux_syscallargs.h>
-#elif defined(__m68k__)
-#include <compat/hpux/m68k/hpux_syscallargs.h>
-#endif
diff --git a/sys/compat/hpux/hpux_syscalls.c b/sys/compat/hpux/hpux_syscalls.c
deleted file mode 100644
index eda6a38e3e5..00000000000
--- a/sys/compat/hpux/hpux_syscalls.c
+++ /dev/null
@@ -1,9 +0,0 @@
-/* $OpenBSD: hpux_syscalls.c,v 1.12 2004/07/09 21:33:44 mickey Exp $ */
-
-#if defined(__hppa__)
-#include <compat/hpux/hppa/hpux_syscalls.c>
-#elif defined(__m68k__)
-#include <compat/hpux/m68k/hpux_syscalls.c>
-#else
-#error COMPILING FOR UNSUPPORTED ARCHITECTURE
-#endif
diff --git a/sys/compat/hpux/hpux_termio.h b/sys/compat/hpux/hpux_termio.h
deleted file mode 100644
index b85c49aec94..00000000000
--- a/sys/compat/hpux/hpux_termio.h
+++ /dev/null
@@ -1,202 +0,0 @@
-/* $OpenBSD: hpux_termio.h,v 1.5 2003/06/02 23:28:00 millert Exp $ */
-/* $NetBSD: hpux_termio.h,v 1.7 1997/04/01 19:59:04 scottr Exp $ */
-
-/*
- * Copyright (c) 1988 University of Utah.
- * Copyright (c) 1990, 1993
- * The Regents of the University of California. All rights reserved.
- *
- * This code is derived from software contributed to Berkeley by
- * the Systems Programming Group of the University of Utah Computer
- * Science Department.
- *
- * 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. Neither the name of the University nor the names of its contributors
- * may be used to endorse or promote products derived from this software
- * without specific prior written permission.
- *
- * THIS SOFTWARE IS PROVIDED BY THE REGENTS 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 REGENTS 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.
- *
- * from: Utah $Hdr: hpux_termio.h 1.1 90/07/09$
- *
- * @(#)hpux_termio.h 8.1 (Berkeley) 6/10/93
- */
-
-/* HP-UX termio stuff */
-
-#define HPUXNCC 8
-
-/* control characters */
-#define HPUXVINTR 0
-#define HPUXVQUIT 1
-#define HPUXVERASE 2
-#define HPUXVKILL 3
-#define HPUXVEOF 4
-#define HPUXVEOL 5
-#define HPUXVMIN 4
-#define HPUXVTIME 5
-#define HPUXVEOL2 6
-#define HPUXVSWTCH 7
-
-/* input modes */
-#define TIO_IGNBRK 0x00000001 /* 0000001 */
-#define TIO_BRKINT 0x00000002 /* 0000002 */
-#define TIO_IGNPAR 0x00000004 /* 0000004 */
-#define TIO_PARMRK 0x00000008 /* 0000010 */
-#define TIO_INPCK 0x00000010 /* 0000020 */
-#define TIO_ISTRIP 0x00000020 /* 0000040 */
-#define TIO_INLCR 0x00000040 /* 0000100 */
-#define TIO_IGNCR 0x00000080 /* 0000200 */
-#define TIO_ICRNL 0x00000100 /* 0000400 */
-#define TIO_IUCLC 0x00000200 /* 0001000 */
-#define TIO_IXON 0x00000400 /* 0002000 */
-#define TIO_IXANY 0x00000800 /* 0004000 */
-#define TIO_IXOFF 0x00001000 /* 0010000 */
-#define TIO_IENQAK 0x00002000 /* 0020000 */
-
-/* output modes */
-#define TIO_OPOST 0x00000001 /* 0000001 */
-#define TIO_OLCUC 0x00000002 /* 0000002 */
-#define TIO_ONLCR 0x00000004 /* 0000004 */
-#define TIO_OCRNL 0x00000008 /* 0000010 */
-#define TIO_ONOCR 0x00000010 /* 0000020 */
-#define TIO_ONLRET 0x00000020 /* 0000040 */
-#define TIO_OFILL 0x00000040 /* 0000100 */
-#define TIO_OFDEL 0x00000080 /* 0000200 */
-#define TIO_NLDLY 0x00000100 /* 0000400 */
-#define TIO_NL0 0
-#define TIO_NL1 0x00000100 /* 0000400 */
-#define TIO_CRDLY 0x00000600 /* 0003000 */
-#define TIO_CR0 0
-#define TIO_CR1 0x00000200 /* 0001000 */
-#define TIO_CR2 0x00000400 /* 0002000 */
-#define TIO_CR3 0x00000600 /* 0003000 */
-#define TIO_TABDLY 0x00001800 /* 0014000 */
-#define TIO_TAB0 0
-#define TIO_TAB1 0x00000800 /* 0004000 */
-#define TIO_TAB2 0x00001000 /* 0010000 */
-#define TIO_TAB3 0x00001800 /* 0014000 */
-#define TIO_BSDLY 0x00002000 /* 0020000 */
-#define TIO_BS0 0
-#define TIO_BS1 0x00002000 /* 0020000 */
-#define TIO_VTDLY 0x00004000 /* 0040000 */
-#define TIO_VT0 0
-#define TIO_VT1 0x00004000 /* 0040000 */
-#define TIO_FFDLY 0x00008000 /* 0100000 */
-#define TIO_FF0 0
-#define TIO_FF1 0x00008000 /* 0100000 */
-
-/* control modes */
-#define TIO_CBAUD 0x0000001f /* 0000037 */
-#define TIO_B0 0
-#define TIO_B50 0x00000001 /* 0000001 */
-#define TIO_B75 0x00000002 /* 0000002 */
-#define TIO_B110 0x00000003 /* 0000003 */
-#define TIO_B134 0x00000004 /* 0000004 */
-#define TIO_B150 0x00000005 /* 0000005 */
-#define TIO_B200 0x00000006 /* 0000006 */
-#define TIO_B300 0x00000007 /* 0000007 */
-#define TIO_B600 0x00000008 /* 0000010 */
-#define TIO_B900 0x00000009 /* 0000011 */
-#define TIO_B1200 0x0000000a /* 0000012 */
-#define TIO_B1800 0x0000000b /* 0000013 */
-#define TIO_B2400 0x0000000c /* 0000014 */
-#define TIO_B3600 0x0000000d /* 0000015 */
-#define TIO_B4800 0x0000000e /* 0000016 */
-#define TIO_B7200 0x0000000f /* 0000017 */
-#define TIO_B9600 0x00000010 /* 0000020 */
-#define TIO_B19200 0x00000011 /* 0000021 */
-#define TIO_B38400 0x00000012 /* 0000022 */
-#define TIO_EXTA 0x0000001e /* 0000036 */
-#define TIO_EXTB 0x0000001f /* 0000037 */
-#define TIO_CSIZE 0x00000060 /* 0000140 */
-#define TIO_CS5 0
-#define TIO_CS6 0x00000020 /* 0000040 */
-#define TIO_CS7 0x00000040 /* 0000100 */
-#define TIO_CS8 0x00000060 /* 0000140 */
-#define TIO_CSTOPB 0x00000080 /* 0000200 */
-#define TIO_CREAD 0x00000100 /* 0000400 */
-#define TIO_PARENB 0x00000200 /* 0001000 */
-#define TIO_PARODD 0x00000400 /* 0002000 */
-#define TIO_HUPCL 0x00000800 /* 0004000 */
-#define TIO_CLOCAL 0x00001000 /* 0010000 */
-#define TIO_CRTS 0x00002000 /* 0020000 */ /* Obsolete */
-
-/* line discipline 0 modes */
-#define TIO_ISIG 0x00000001 /* 0000001 */
-#define TIO_ICANON 0x00000002 /* 0000002 */
-#define TIO_XCASE 0x00000004 /* 0000004 */
-#define TIO_ECHO 0x00000008 /* 0000010 */
-#define TIO_ECHOE 0x00000010 /* 0000020 */
-#define TIO_ECHOK 0x00000020 /* 0000040 */
-#define TIO_ECHONL 0x00000040 /* 0000100 */
-#define TIO_NOFLSH 0x00000080 /* 0000200 */
-
-struct hpux_termio {
- u_short c_iflag; /* input modes */
- u_short c_oflag; /* output modes */
- u_short c_cflag; /* control modes */
- u_short c_lflag; /* line discipline modes */
- char c_line; /* line discipline */
- u_char c_cc[HPUXNCC]; /* control chars */
-};
-
-#define HPUXTCGETA _IOR('T', 1, struct hpux_termio)
-#define HPUXTCSETA _IOW('T', 2, struct hpux_termio)
-#define HPUXTCSETAW _IOW('T', 3, struct hpux_termio)
-#define HPUXTCSETAF _IOW('T', 4, struct hpux_termio)
-
-/* HP-UX termios stuff */
-
-#define HPUXNCCS 16
-
-/* control characters */
-#define HPUXVMINS 11 /* different than termio */
-#define HPUXVTIMES 12 /* different than termio */
-#define HPUXVSUSP 13
-#define HPUXVSTART 14
-#define HPUXVSTOP 15
-
-struct hpux_termios {
- u_int c_iflag; /* input modes */
- u_int c_oflag; /* output modes */
- u_int c_cflag; /* control modes */
- u_int c_lflag; /* line discipline modes */
- u_int c_reserved; /* future use */
- u_char c_cc[HPUXNCCS]; /* control chars */
-};
-
-#define HPUXTCGETATTR _IOR('T', 16, struct hpux_termios)
-#define HPUXTCSETATTR _IOW('T', 17, struct hpux_termios)
-#define HPUXTCSETATTRD _IOW('T', 18, struct hpux_termios)
-#define HPUXTCSETATTRF _IOW('T', 19, struct hpux_termios)
-
-#ifdef _KERNEL
-struct termio;
-struct termios;
-
-int hpux_termio(int, int, caddr_t, struct proc *);
-void termiototermios(struct hpux_termio *, struct hpux_termios *,
- struct termios *);
-void termiostotermio(struct hpux_termios *, struct hpux_termio *);
-int bsdtohpuxbaud(long);
-int hpuxtobsdbaud(int);
-int getsettty(struct proc *, int, int, caddr_t);
-#endif /* _KERNEL */
diff --git a/sys/compat/hpux/hpux_tty.c b/sys/compat/hpux/hpux_tty.c
deleted file mode 100644
index c0274b6c954..00000000000
--- a/sys/compat/hpux/hpux_tty.c
+++ /dev/null
@@ -1,556 +0,0 @@
-/* $OpenBSD: hpux_tty.c,v 1.12 2004/09/19 21:58:41 mickey Exp $ */
-/* $NetBSD: hpux_tty.c,v 1.14 1997/04/01 19:59:05 scottr Exp $ */
-
-/*
- * Copyright (c) 1988 University of Utah.
- * Copyright (c) 1990, 1993
- * The Regents of the University of California. All rights reserved.
- *
- * This code is derived from software contributed to Berkeley by
- * the Systems Programming Group of the University of Utah Computer
- * Science Department.
- *
- * 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. Neither the name of the University nor the names of its contributors
- * may be used to endorse or promote products derived from this software
- * without specific prior written permission.
- *
- * THIS SOFTWARE IS PROVIDED BY THE REGENTS 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 REGENTS 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.
- *
- * from: Utah $Hdr: hpux_tty.c 1.14 93/08/05$
- *
- * @(#)hpux_tty.c 8.3 (Berkeley) 1/12/94
- */
-
-/*
- * stty/gtty/termio emulation stuff
- */
-
-#ifndef COMPAT_43
-#define COMPAT_43
-#endif
-
-#include <sys/param.h>
-#include <sys/systm.h>
-#include <sys/filedesc.h>
-#include <sys/ioctl.h>
-#include <sys/proc.h>
-#include <sys/tty.h>
-#include <sys/file.h>
-#include <sys/conf.h>
-#include <sys/buf.h>
-#include <sys/kernel.h>
-
-#include <compat/hpux/hpux.h>
-#include <compat/hpux/hpux_termio.h>
-#include <compat/hpux/hpux_syscallargs.h>
-
-/*
- * Map BSD/POSIX style termios info to and from SYS5 style termio stuff.
- */
-int
-hpux_termio(fd, com, data, p)
- int fd, com;
- caddr_t data;
- struct proc *p;
-{
- struct file *fp;
- struct termios tios;
- struct hpux_termios htios;
- int line, error;
- int newi = 0;
- int (*ioctlrout)(struct file *fp, u_long com,
- caddr_t data, struct proc *p);
-
- if ((fp = fd_getfile(p->p_fd, fd)) == NULL)
- return (EBADF);
- FREF(fp);
- ioctlrout = fp->f_ops->fo_ioctl;
- switch (com) {
- case HPUXTCGETATTR:
- newi = 1;
- /* fall into ... */
- case HPUXTCGETA:
- /*
- * Get BSD terminal state
- */
- if ((error = (*ioctlrout)(fp, TIOCGETA, (caddr_t)&tios, p)))
- break;
- bzero((char *)&htios, sizeof htios);
- /*
- * Set iflag.
- * Same through ICRNL, no BSD equivs for IUCLC, IENQAK
- */
- htios.c_iflag = tios.c_iflag & 0x1ff;
- if (tios.c_iflag & IXON)
- htios.c_iflag |= TIO_IXON;
- if (tios.c_iflag & IXOFF)
- htios.c_iflag |= TIO_IXOFF;
- if (tios.c_iflag & IXANY)
- htios.c_iflag |= TIO_IXANY;
- /*
- * Set oflag.
- * No BSD equivs for OLCUC/OCRNL/ONOCR/ONLRET/OFILL/OFDEL
- * or any of the delays.
- */
- if (tios.c_oflag & OPOST)
- htios.c_oflag |= TIO_OPOST;
- if (tios.c_oflag & ONLCR)
- htios.c_oflag |= TIO_ONLCR;
- if (tios.c_oflag & OXTABS)
- htios.c_oflag |= TIO_TAB3;
- /*
- * Set cflag.
- * Baud from ospeed, rest from cflag.
- */
- htios.c_cflag = bsdtohpuxbaud(tios.c_ospeed);
- switch (tios.c_cflag & CSIZE) {
- case CS5:
- htios.c_cflag |= TIO_CS5; break;
- case CS6:
- htios.c_cflag |= TIO_CS6; break;
- case CS7:
- htios.c_cflag |= TIO_CS7; break;
- case CS8:
- htios.c_cflag |= TIO_CS8; break;
- }
- if (tios.c_cflag & CSTOPB)
- htios.c_cflag |= TIO_CSTOPB;
- if (tios.c_cflag & CREAD)
- htios.c_cflag |= TIO_CREAD;
- if (tios.c_cflag & PARENB)
- htios.c_cflag |= TIO_PARENB;
- if (tios.c_cflag & PARODD)
- htios.c_cflag |= TIO_PARODD;
- if (tios.c_cflag & HUPCL)
- htios.c_cflag |= TIO_HUPCL;
- if (tios.c_cflag & CLOCAL)
- htios.c_cflag |= TIO_CLOCAL;
- /*
- * Set lflag.
- * No BSD equiv for XCASE.
- */
- if (tios.c_lflag & ECHOE)
- htios.c_lflag |= TIO_ECHOE;
- if (tios.c_lflag & ECHOK)
- htios.c_lflag |= TIO_ECHOK;
- if (tios.c_lflag & ECHO)
- htios.c_lflag |= TIO_ECHO;
- if (tios.c_lflag & ECHONL)
- htios.c_lflag |= TIO_ECHONL;
- if (tios.c_lflag & ISIG)
- htios.c_lflag |= TIO_ISIG;
- if (tios.c_lflag & ICANON)
- htios.c_lflag |= TIO_ICANON;
- if (tios.c_lflag & NOFLSH)
- htios.c_lflag |= TIO_NOFLSH;
- /*
- * Line discipline
- */
- if (!newi) {
- line = 0;
- (void) (*ioctlrout)(fp, TIOCGETD, (caddr_t)&line, p);
- htios.c_reserved = line;
- }
- /*
- * Set editing chars.
- * No BSD equiv for VSWTCH.
- */
- htios.c_cc[HPUXVINTR] = tios.c_cc[VINTR];
- htios.c_cc[HPUXVQUIT] = tios.c_cc[VQUIT];
- htios.c_cc[HPUXVERASE] = tios.c_cc[VERASE];
- htios.c_cc[HPUXVKILL] = tios.c_cc[VKILL];
- htios.c_cc[HPUXVEOF] = tios.c_cc[VEOF];
- htios.c_cc[HPUXVEOL] = tios.c_cc[VEOL];
- htios.c_cc[HPUXVEOL2] = tios.c_cc[VEOL2];
- htios.c_cc[HPUXVSWTCH] = 0;
-#if 1
- /*
- * XXX since VMIN and VTIME are not implemented,
- * we need to return something reasonable.
- * Otherwise a GETA/SETA combo would always put
- * the tty in non-blocking mode (since VMIN == VTIME == 0).
- */
- if (fp->f_flag & FNONBLOCK) {
- htios.c_cc[HPUXVMINS] = 0;
- htios.c_cc[HPUXVTIMES] = 0;
- } else {
- htios.c_cc[HPUXVMINS] = 6;
- htios.c_cc[HPUXVTIMES] = 1;
- }
-#else
- htios.c_cc[HPUXVMINS] = tios.c_cc[VMIN];
- htios.c_cc[HPUXVTIMES] = tios.c_cc[VTIME];
-#endif
- htios.c_cc[HPUXVSUSP] = tios.c_cc[VSUSP];
- htios.c_cc[HPUXVSTART] = tios.c_cc[VSTART];
- htios.c_cc[HPUXVSTOP] = tios.c_cc[VSTOP];
- if (newi)
- bcopy((char *)&htios, data, sizeof htios);
- else
- termiostotermio(&htios, (struct hpux_termio *)data);
- break;
-
- case HPUXTCSETATTR:
- case HPUXTCSETATTRD:
- case HPUXTCSETATTRF:
- newi = 1;
- /* fall into ... */
- case HPUXTCSETA:
- case HPUXTCSETAW:
- case HPUXTCSETAF:
- /*
- * Get old characteristics and determine if we are a tty.
- */
- if ((error = (*ioctlrout)(fp, TIOCGETA, (caddr_t)&tios, p)))
- break;
- if (newi)
- bcopy(data, (char *)&htios, sizeof htios);
- else
- termiototermios((struct hpux_termio *)data,
- &htios, &tios);
- /*
- * Set iflag.
- * Same through ICRNL, no HP-UX equiv for IMAXBEL
- */
- tios.c_iflag &= ~(IXON|IXOFF|IXANY|0x1ff);
- tios.c_iflag |= htios.c_iflag & 0x1ff;
- if (htios.c_iflag & TIO_IXON)
- tios.c_iflag |= IXON;
- if (htios.c_iflag & TIO_IXOFF)
- tios.c_iflag |= IXOFF;
- if (htios.c_iflag & TIO_IXANY)
- tios.c_iflag |= IXANY;
- /*
- * Set oflag.
- * No HP-UX equiv for ONOEOT
- */
- tios.c_oflag &= ~(OPOST|ONLCR|OXTABS);
- if (htios.c_oflag & TIO_OPOST)
- tios.c_oflag |= OPOST;
- if (htios.c_oflag & TIO_ONLCR)
- tios.c_oflag |= ONLCR;
- if (htios.c_oflag & TIO_TAB3)
- tios.c_oflag |= OXTABS;
- /*
- * Set cflag.
- * No HP-UX equiv for CCTS_OFLOW/CCTS_IFLOW/MDMBUF
- */
- tios.c_cflag &=
- ~(CSIZE|CSTOPB|CREAD|PARENB|PARODD|HUPCL|CLOCAL);
- switch (htios.c_cflag & TIO_CSIZE) {
- case TIO_CS5:
- tios.c_cflag |= CS5; break;
- case TIO_CS6:
- tios.c_cflag |= CS6; break;
- case TIO_CS7:
- tios.c_cflag |= CS7; break;
- case TIO_CS8:
- tios.c_cflag |= CS8; break;
- }
- if (htios.c_cflag & TIO_CSTOPB)
- tios.c_cflag |= CSTOPB;
- if (htios.c_cflag & TIO_CREAD)
- tios.c_cflag |= CREAD;
- if (htios.c_cflag & TIO_PARENB)
- tios.c_cflag |= PARENB;
- if (htios.c_cflag & TIO_PARODD)
- tios.c_cflag |= PARODD;
- if (htios.c_cflag & TIO_HUPCL)
- tios.c_cflag |= HUPCL;
- if (htios.c_cflag & TIO_CLOCAL)
- tios.c_cflag |= CLOCAL;
- /*
- * Set lflag.
- * No HP-UX equiv for ECHOKE/ECHOPRT/ECHOCTL
- * IEXTEN treated as part of ICANON
- */
- tios.c_lflag &= ~(ECHOE|ECHOK|ECHO|ISIG|ICANON|IEXTEN|NOFLSH);
- if (htios.c_lflag & TIO_ECHOE)
- tios.c_lflag |= ECHOE;
- if (htios.c_lflag & TIO_ECHOK)
- tios.c_lflag |= ECHOK;
- if (htios.c_lflag & TIO_ECHO)
- tios.c_lflag |= ECHO;
- if (htios.c_lflag & TIO_ECHONL)
- tios.c_lflag |= ECHONL;
- if (htios.c_lflag & TIO_ISIG)
- tios.c_lflag |= ISIG;
- if (htios.c_lflag & TIO_ICANON)
- tios.c_lflag |= (ICANON|IEXTEN);
- if (htios.c_lflag & TIO_NOFLSH)
- tios.c_lflag |= NOFLSH;
- /*
- * Set editing chars.
- * No HP-UX equivs of VWERASE/VREPRINT/VDSUSP/VLNEXT
- * /VDISCARD/VSTATUS/VERASE2
- */
- tios.c_cc[VINTR] = htios.c_cc[HPUXVINTR];
- tios.c_cc[VQUIT] = htios.c_cc[HPUXVQUIT];
- tios.c_cc[VERASE] = htios.c_cc[HPUXVERASE];
- tios.c_cc[VKILL] = htios.c_cc[HPUXVKILL];
- tios.c_cc[VEOF] = htios.c_cc[HPUXVEOF];
- tios.c_cc[VEOL] = htios.c_cc[HPUXVEOL];
- tios.c_cc[VEOL2] = htios.c_cc[HPUXVEOL2];
- tios.c_cc[VMIN] = htios.c_cc[HPUXVMINS];
- tios.c_cc[VTIME] = htios.c_cc[HPUXVTIMES];
- tios.c_cc[VSUSP] = htios.c_cc[HPUXVSUSP];
- tios.c_cc[VSTART] = htios.c_cc[HPUXVSTART];
- tios.c_cc[VSTOP] = htios.c_cc[HPUXVSTOP];
-
- /*
- * Set the new stuff
- */
- if (com == HPUXTCSETA || com == HPUXTCSETATTR)
- com = TIOCSETA;
- else if (com == HPUXTCSETAW || com == HPUXTCSETATTRD)
- com = TIOCSETAW;
- else
- com = TIOCSETAF;
- error = (*ioctlrout)(fp, com, (caddr_t)&tios, p);
- if (error == 0) {
- /*
- * Set line discipline
- */
- if (!newi) {
- line = htios.c_reserved;
- (void) (*ioctlrout)(fp, TIOCSETD,
- (caddr_t)&line, p);
- }
- /*
- * Set non-blocking IO if VMIN == VTIME == 0, clear
- * if not. Should handle the other cases as well.
- * Note it isn't correct to just turn NBIO off like
- * we do as it could be on as the result of a fcntl
- * operation.
- *
- * XXX - wouldn't need to do this at all if VMIN/VTIME
- * were implemented.
- */
- {
- struct hpux_sys_fcntl_args {
- int fdes, cmd, arg;
- } args;
- int flags, nbio;
-
- nbio = (htios.c_cc[HPUXVMINS] == 0 &&
- htios.c_cc[HPUXVTIMES] == 0);
- if ((nbio && (fp->f_flag & FNONBLOCK) == 0) ||
- (!nbio && (fp->f_flag & FNONBLOCK))) {
- args.fdes = fd;
- args.cmd = F_GETFL;
- args.arg = 0;
- (void) hpux_sys_fcntl(p, &args, &flags);
- if (nbio)
- flags |= HPUXNDELAY;
- else
- flags &= ~HPUXNDELAY;
- args.cmd = F_SETFL;
- args.arg = flags;
- (void) hpux_sys_fcntl(p, &args, &flags);
- }
- }
- }
- break;
-
- default:
- error = EINVAL;
- break;
- }
- FRELE(fp);
- return(error);
-}
-
-void
-termiototermios(tio, tios, bsdtios)
- struct hpux_termio *tio;
- struct hpux_termios *tios;
- struct termios *bsdtios;
-{
- int i;
-
- bzero((char *)tios, sizeof *tios);
- tios->c_iflag = tio->c_iflag;
- tios->c_oflag = tio->c_oflag;
- tios->c_cflag = tio->c_cflag;
- tios->c_lflag = tio->c_lflag;
- tios->c_reserved = tio->c_line;
- for (i = 0; i <= HPUXVSWTCH; i++)
- tios->c_cc[i] = tio->c_cc[i];
- if (tios->c_lflag & TIO_ICANON) {
- tios->c_cc[HPUXVEOF] = tio->c_cc[HPUXVEOF];
- tios->c_cc[HPUXVEOL] = tio->c_cc[HPUXVEOL];
- tios->c_cc[HPUXVMINS] = 0;
- tios->c_cc[HPUXVTIMES] = 0;
- } else {
- tios->c_cc[HPUXVEOF] = 0;
- tios->c_cc[HPUXVEOL] = 0;
- tios->c_cc[HPUXVMINS] = tio->c_cc[HPUXVMIN];
- tios->c_cc[HPUXVTIMES] = tio->c_cc[HPUXVTIME];
- }
- tios->c_cc[HPUXVSUSP] = bsdtios->c_cc[VSUSP];
- tios->c_cc[HPUXVSTART] = bsdtios->c_cc[VSTART];
- tios->c_cc[HPUXVSTOP] = bsdtios->c_cc[VSTOP];
-}
-
-void
-termiostotermio(tios, tio)
- struct hpux_termios *tios;
- struct hpux_termio *tio;
-{
- int i;
-
- tio->c_iflag = tios->c_iflag;
- tio->c_oflag = tios->c_oflag;
- tio->c_cflag = tios->c_cflag;
- tio->c_lflag = tios->c_lflag;
- tio->c_line = tios->c_reserved;
- for (i = 0; i <= HPUXVSWTCH; i++)
- tio->c_cc[i] = tios->c_cc[i];
- if (tios->c_lflag & TIO_ICANON) {
- tio->c_cc[HPUXVEOF] = tios->c_cc[HPUXVEOF];
- tio->c_cc[HPUXVEOL] = tios->c_cc[HPUXVEOL];
- } else {
- tio->c_cc[HPUXVMIN] = tios->c_cc[HPUXVMINS];
- tio->c_cc[HPUXVTIME] = tios->c_cc[HPUXVTIMES];
- }
-}
-
-int
-bsdtohpuxbaud(bsdspeed)
- long bsdspeed;
-{
- switch (bsdspeed) {
- case B0: return(TIO_B0);
- case B50: return(TIO_B50);
- case B75: return(TIO_B75);
- case B110: return(TIO_B110);
- case B134: return(TIO_B134);
- case B150: return(TIO_B150);
- case B200: return(TIO_B200);
- case B300: return(TIO_B300);
- case B600: return(TIO_B600);
- case B1200: return(TIO_B1200);
- case B1800: return(TIO_B1800);
- case B2400: return(TIO_B2400);
- case B4800: return(TIO_B4800);
- case B9600: return(TIO_B9600);
- case B19200: return(TIO_B19200);
- case B38400: return(TIO_B38400);
- default: return(TIO_B0);
- }
-}
-
-int
-hpuxtobsdbaud(hpux_speed)
- int hpux_speed;
-{
- static const int hpuxtobsdbaudtab[32] = {
- B0, B50, B75, B110, B134, B150, B200, B300,
- B600, B0, B1200, B1800, B2400, B0, B4800, B0,
- B9600, B19200, B38400, B0, B0, B0, B0, B0,
- B0, B0, B0, B0, B0, B0, EXTA, EXTB
- };
-
- return(hpuxtobsdbaudtab[hpux_speed & TIO_CBAUD]);
-}
-
-int
-hpux_sys_stty_6x(p, v, retval)
- struct proc *p;
- void *v;
- register_t *retval;
-{
- struct hpux_sys_stty_6x_args /* {
- syscallarg(int) fd;
- syscallarg(caddr_t) arg;
- } */ *uap = v;
-
- return (getsettty(p, SCARG(uap, fd), HPUXTIOCGETP, SCARG(uap, arg)));
-}
-
-int
-hpux_sys_gtty_6x(p, v, retval)
- struct proc *p;
- void *v;
- register_t *retval;
-{
- struct hpux_sys_gtty_6x_args /* {
- syscallarg(int) fd;
- syscallarg(caddr_t) arg;
- } */ *uap = v;
-
- return (getsettty(p, SCARG(uap, fd), HPUXTIOCSETP, SCARG(uap, arg)));
-}
-
-/*
- * Simplified version of ioctl() for use by
- * gtty/stty and TIOCGETP/TIOCSETP.
- */
-int
-getsettty(p, fdes, com, cmarg)
- struct proc *p;
- int fdes, com;
- caddr_t cmarg;
-{
- struct filedesc *fdp = p->p_fd;
- struct file *fp;
- struct hpux_sgttyb hsb;
- struct sgttyb sb;
- int error;
-
- if ((fp = fd_getfile(fdp, fdes)) == NULL)
- return (EBADF);
- if ((fp->f_flag & (FREAD|FWRITE)) == 0)
- return (EBADF);
- FREF(fp);
- if (com == HPUXTIOCSETP) {
- if ((error = copyin(cmarg, (caddr_t)&hsb, sizeof hsb)))
- goto bad;
- sb.sg_ispeed = hsb.sg_ispeed;
- sb.sg_ospeed = hsb.sg_ospeed;
- sb.sg_erase = hsb.sg_erase;
- sb.sg_kill = hsb.sg_kill;
- sb.sg_flags = hsb.sg_flags & ~(V7_HUPCL|V7_XTABS|V7_NOAL);
- if (hsb.sg_flags & V7_XTABS)
- sb.sg_flags |= XTABS;
- if (hsb.sg_flags & V7_HUPCL)
- (void)(*fp->f_ops->fo_ioctl)
- (fp, TIOCHPCL, (caddr_t)0, p);
- com = TIOCSETP;
- } else {
- bzero((caddr_t)&hsb, sizeof hsb);
- com = TIOCGETP;
- }
- error = (*fp->f_ops->fo_ioctl)(fp, com, (caddr_t)&sb, p);
- if (error == 0 && com == TIOCGETP) {
- hsb.sg_ispeed = sb.sg_ispeed;
- hsb.sg_ospeed = sb.sg_ospeed;
- hsb.sg_erase = sb.sg_erase;
- hsb.sg_kill = sb.sg_kill;
- hsb.sg_flags = sb.sg_flags & ~(V7_HUPCL|V7_XTABS|V7_NOAL);
- if (sb.sg_flags & XTABS)
- hsb.sg_flags |= V7_XTABS;
- error = copyout((caddr_t)&hsb, cmarg, sizeof hsb);
- }
-bad:
- FRELE(fp);
- return (error);
-}
diff --git a/sys/compat/hpux/hpux_util.h b/sys/compat/hpux/hpux_util.h
deleted file mode 100644
index 4cc6e2d0da0..00000000000
--- a/sys/compat/hpux/hpux_util.h
+++ /dev/null
@@ -1,50 +0,0 @@
-/* $OpenBSD: hpux_util.h,v 1.3 1996/08/02 20:35:00 niklas Exp $ */
-/* $NetBSD: hpux_util.h,v 1.3 1995/12/08 07:45:34 thorpej Exp $ */
-
-/*
- * Copyright (c) 1995 Christos Zoulas
- * 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 not 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.
- */
-
-#ifndef _HPUX_UTIL_H_
-#define _HPUX_UTIL_H_
-
-#include <compat/common/compat_util.h>
-
-extern const char hpux_emul_path[];
-
-#define HPUX_CHECK_ALT_EXIST(p, sgp, path) \
- CHECK_ALT_EXIST(p, sgp, hpux_emul_path, path)
-
-#define HPUX_CHECK_ALT_CREAT(p, sgp, path) \
- CHECK_ALT_CREAT(p, sgp, hpux_emul_path, path)
-
-#ifdef DEBUG_HPUX
-#define DPRINTF(a) printf a;
-#else
-#define DPRINTF(a)
-#endif
-
-#endif /* !_HPUX_UTIL_H_ */
diff --git a/sys/compat/hpux/m68k/Makefile b/sys/compat/hpux/m68k/Makefile
deleted file mode 100644
index 4510ddb0542..00000000000
--- a/sys/compat/hpux/m68k/Makefile
+++ /dev/null
@@ -1,7 +0,0 @@
-# $OpenBSD: Makefile,v 1.2 2004/07/09 21:34:57 mickey Exp $
-
-DEP= syscalls.conf syscalls.master ../../../kern/makesyscalls.sh
-OBJS= hpux_sysent.c hpux_syscalls.c hpux_syscall.h hpux_syscallargs.h
-
-${OBJS}: ${DEP}
- sh ../../../kern/makesyscalls.sh syscalls.conf syscalls.master
diff --git a/sys/compat/hpux/m68k/files.hpux b/sys/compat/hpux/m68k/files.hpux
deleted file mode 100644
index 65626203394..00000000000
--- a/sys/compat/hpux/m68k/files.hpux
+++ /dev/null
@@ -1,17 +0,0 @@
-# $OpenBSD: files.hpux,v 1.2 2004/09/19 21:56:18 mickey Exp $
-#
-# Config file description for machine-independent HPUX compat code.
-# Included by ports that need it.
-
-# ports should define any machine-specific files they need in their
-# own file lists.
-
-file compat/hpux/hpux_compat.c compat_hpux
-file compat/hpux/hpux_file.c compat_hpux
-file compat/hpux/hpux_tty.c compat_hpux
-file compat/hpux/hpux_sig.c compat_hpux
-file compat/hpux/m68k/hpux_sig2.c compat_hpux
-file compat/hpux/m68k/hpux_exec.c compat_hpux
-file compat/hpux/m68k/hpux_net.c compat_hpux
-file compat/hpux/m68k/hpux_syscalls.c compat_hpux & syscall_debug
-file compat/hpux/m68k/hpux_sysent.c compat_hpux
diff --git a/sys/compat/hpux/m68k/hpux_exec.c b/sys/compat/hpux/m68k/hpux_exec.c
deleted file mode 100644
index be7fdc5a305..00000000000
--- a/sys/compat/hpux/m68k/hpux_exec.c
+++ /dev/null
@@ -1,329 +0,0 @@
-/* $OpenBSD: hpux_exec.c,v 1.5 2010/06/26 23:24:44 guenther Exp $ */
-/* $NetBSD: hpux_exec.c,v 1.8 1997/03/16 10:14:44 thorpej Exp $ */
-
-/*
- * Copyright (c) 1995, 1997 Jason R. Thorpe. All rights reserved.
- * Copyright (c) 1993, 1994 Christopher G. Demetriou
- *
- * 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. All advertising materials mentioning features or use of this software
- * This product includes software developed by Christopher G. Demetriou.
- * 4. The name of the author may not 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.
- */
-
-/*
- * Glue for exec'ing HP-UX executables and the HP-UX execv() system call.
- * Based on sys/kern/exec_aout.c
- */
-
-#include <sys/param.h>
-#include <sys/systm.h>
-#include <sys/kernel.h>
-#include <sys/proc.h>
-#include <sys/malloc.h>
-#include <sys/mount.h>
-#include <sys/namei.h>
-#include <sys/vnode.h>
-#include <sys/mman.h>
-#include <sys/stat.h>
-#include <sys/core.h>
-
-#include <uvm/uvm_extern.h>
-
-#include <machine/cpu.h>
-#include <machine/reg.h>
-
-#include <sys/syscallargs.h>
-
-#include <compat/hpux/hpux.h>
-#include <compat/hpux/hpux_util.h>
-#include <compat/hpux/m68k/hpux_syscall.h>
-#include <compat/hpux/m68k/hpux_syscallargs.h>
-
-#include <machine/hpux_machdep.h>
-
-const char hpux_emul_path[] = "/emul/hpux";
-extern char sigcode[], esigcode[];
-extern struct sysent hpux_sysent[];
-#ifdef SYSCALL_DEBUG
-extern char *hpux_syscallnames[];
-#endif
-extern int bsdtohpuxerrnomap[];
-
-static int exec_hpux_prep_nmagic(struct proc *, struct exec_package *);
-static int exec_hpux_prep_zmagic(struct proc *, struct exec_package *);
-static int exec_hpux_prep_omagic(struct proc *, struct exec_package *);
-
-struct emul emul_hpux = {
- "hpux",
- bsdtohpuxerrnomap,
- hpux_sendsig,
- HPUX_SYS_syscall,
- HPUX_SYS_MAXSYSCALL,
- hpux_sysent,
-#ifdef SYSCALL_DEBUG
- hpux_syscallnames,
-#else
- NULL,
-#endif
- 0,
- copyargs,
- hpux_setregs,
- NULL,
- coredump_trad,
- sigcode,
- esigcode,
-};
-
-int
-exec_hpux_makecmds(p, epp)
- struct proc *p;
- struct exec_package *epp;
-{
- struct hpux_exec *hpux_ep = epp->ep_hdr;
- short sysid, magic;
- int error = ENOEXEC;
-
- if (epp->ep_hdrvalid < sizeof(struct hpux_exec))
- return (ENOEXEC);
-
- magic = HPUX_MAGIC(hpux_ep);
- sysid = HPUX_SYSID(hpux_ep);
-
- if (sysid != MID_HPUX)
- return (ENOEXEC);
-
- /*
- * HP-UX is a 4k page size system, and executables assume
- * this.
- */
- if (PAGE_SIZE != HPUX_LDPGSZ)
- return (ENOEXEC);
-
- switch (magic) {
- case OMAGIC:
- error = exec_hpux_prep_omagic(p, epp);
- break;
-
- case NMAGIC:
- error = exec_hpux_prep_nmagic(p, epp);
- break;
-
- case ZMAGIC:
- error = exec_hpux_prep_zmagic(p, epp);
- break;
- }
-
- if (error == 0) {
- /* set up our emulation information */
- epp->ep_emul = &emul_hpux;
- } else
- kill_vmcmds(&epp->ep_vmcmds);
-
- return (error);
-}
-
-static int
-exec_hpux_prep_nmagic(p, epp)
- struct proc *p;
- struct exec_package *epp;
-{
- struct hpux_exec *execp = epp->ep_hdr;
- long bsize, baddr;
-
- epp->ep_taddr = 0;
- epp->ep_tsize = execp->ha_text;
- epp->ep_daddr = epp->ep_taddr + roundup(execp->ha_text, HPUX_LDPGSZ);
- epp->ep_dsize = execp->ha_data + execp->ha_bss;
- epp->ep_entry = execp->ha_entry;
-
- /* set up command for text segment */
- NEW_VMCMD(&epp->ep_vmcmds, vmcmd_map_readvn, execp->ha_text,
- epp->ep_taddr, epp->ep_vp, HPUX_TXTOFF(*execp, NMAGIC),
- VM_PROT_READ|VM_PROT_EXECUTE);
-
- /* set up command for data segment */
- NEW_VMCMD(&epp->ep_vmcmds, vmcmd_map_readvn, execp->ha_data,
- epp->ep_daddr, epp->ep_vp, HPUX_DATAOFF(*execp, NMAGIC),
- VM_PROT_READ|VM_PROT_WRITE|VM_PROT_EXECUTE);
-
- /* set up command for bss segment */
- baddr = round_page(epp->ep_daddr + execp->ha_data);
- bsize = epp->ep_daddr + epp->ep_dsize - baddr;
- if (bsize > 0)
- NEW_VMCMD(&epp->ep_vmcmds, vmcmd_map_zero, bsize, baddr,
- NULLVP, 0, VM_PROT_READ|VM_PROT_WRITE|VM_PROT_EXECUTE);
-
- return (exec_setup_stack(p, epp));
-}
-
-static int
-exec_hpux_prep_zmagic(p, epp)
- struct proc *p;
- struct exec_package *epp;
-{
- struct hpux_exec *execp = epp->ep_hdr;
- long bsize, baddr;
- long nontext;
-
- /*
- * Check if vnode is in open for writing, because we want to
- * demand-page out of it. If it is, don't do it, for various
- * reasons.
- */
- if ((execp->ha_text != 0 || execp->ha_data != 0) &&
- epp->ep_vp->v_writecount != 0)
- return (ETXTBSY);
- vn_marktext(epp->ep_vp);
-
- /*
- * HP-UX ZMAGIC executables need to have their segment
- * sizes frobbed.
- */
- nontext = execp->ha_data + execp->ha_bss;
- execp->ha_text = round_page(execp->ha_text);
- execp->ha_data = round_page(execp->ha_data);
- execp->ha_bss = nontext - execp->ha_data;
- if (execp->ha_bss < 0)
- execp->ha_bss = 0;
-
- epp->ep_taddr = 0;
- epp->ep_tsize = execp->ha_text;
- epp->ep_daddr = epp->ep_taddr + roundup(execp->ha_text, HPUX_LDPGSZ);
- epp->ep_dsize = execp->ha_data + execp->ha_bss;
- epp->ep_entry = execp->ha_entry;
-
- /* set up command for text segment */
- NEW_VMCMD(&epp->ep_vmcmds, vmcmd_map_pagedvn, execp->ha_text,
- epp->ep_taddr, epp->ep_vp, HPUX_TXTOFF(*execp, ZMAGIC),
- VM_PROT_READ|VM_PROT_EXECUTE);
-
- /* set up command for data segment */
- NEW_VMCMD(&epp->ep_vmcmds, vmcmd_map_pagedvn, execp->ha_data,
- epp->ep_daddr, epp->ep_vp, HPUX_DATAOFF(*execp, ZMAGIC),
- VM_PROT_READ|VM_PROT_WRITE|VM_PROT_EXECUTE);
-
- /* set up command for bss segment */
- baddr = round_page(epp->ep_daddr + execp->ha_data);
- bsize = epp->ep_daddr + epp->ep_dsize - baddr;
- if (bsize > 0)
- NEW_VMCMD(&epp->ep_vmcmds, vmcmd_map_zero, bsize, baddr,
- NULLVP, 0, VM_PROT_READ|VM_PROT_WRITE|VM_PROT_EXECUTE);
-
- return (exec_setup_stack(p, epp));
-}
-
-/*
- * HP-UX's version of OMAGIC.
- */
-static int
-exec_hpux_prep_omagic(p, epp)
- struct proc *p;
- struct exec_package *epp;
-{
- struct hpux_exec *execp = epp->ep_hdr;
- long dsize, bsize, baddr;
-
- epp->ep_taddr = 0;
- epp->ep_tsize = execp->ha_text;
- epp->ep_daddr = epp->ep_taddr + roundup(execp->ha_text, HPUX_LDPGSZ);
- epp->ep_dsize = execp->ha_data + execp->ha_bss;
- epp->ep_entry = execp->ha_entry;
-
- /* set up command for text and data segments */
- NEW_VMCMD(&epp->ep_vmcmds, vmcmd_map_readvn,
- execp->ha_text + execp->ha_data, epp->ep_taddr, epp->ep_vp,
- HPUX_TXTOFF(*execp, OMAGIC),
- VM_PROT_READ|VM_PROT_WRITE|VM_PROT_EXECUTE);
-
- /* set up command for bss segment */
- baddr = round_page(epp->ep_daddr + execp->ha_data);
- bsize = epp->ep_daddr + epp->ep_dsize - baddr;
- if (bsize > 0)
- NEW_VMCMD(&epp->ep_vmcmds, vmcmd_map_zero, bsize, baddr,
- NULLVP, 0, VM_PROT_READ|VM_PROT_WRITE|VM_PROT_EXECUTE);
-
- /*
- * Make sure (# of pages) mapped above equals (vm_tsize + vm_dsize);
- * obreak(2) relies on this fact. Both `vm_tsize' and `vm_dsize' are
- * computed (in execve(2)) by rounding *up* `ep_tsize' and `ep_dsize'
- * respectively to page boundaries.
- * Compensate `ep_dsize' for the amount of data covered by the last
- * text page.
- */
- dsize = epp->ep_dsize + execp->ha_text - round_page(execp->ha_text);
- epp->ep_dsize = (dsize > 0) ? dsize : 0;
- return (exec_setup_stack(p, epp));
-}
-
-/*
- * The HP-UX execv(2) system call.
- *
- * Just check the alternate emulation path, and pass it on to the NetBSD
- * execve().
- */
-int
-hpux_sys_execv(p, v, retval)
- struct proc *p;
- void *v;
- register_t *retval;
-{
- struct hpux_sys_execv_args /* {
- syscallarg(char *) path;
- syscallarg(char **) argv;
- } */ *uap = v;
- struct sys_execve_args ap;
- caddr_t sg;
-
- sg = stackgap_init(p->p_emul);
- HPUX_CHECK_ALT_EXIST(p, &sg, SCARG(uap, path));
-
- SCARG(&ap, path) = SCARG(uap, path);
- SCARG(&ap, argp) = SCARG(uap, argp);
- SCARG(&ap, envp) = NULL;
-
- return sys_execve(p, &ap, retval);
-}
-
-int
-hpux_sys_execve(p, v, retval)
- struct proc *p;
- void *v;
- register_t *retval;
-{
- struct hpux_sys_execve_args /* {
- syscallarg(char *) path;
- syscallarg(char **) argv;
- syscallarg(char **) envp;
- } */ *uap = v;
- struct sys_execve_args ap;
- caddr_t sg;
-
- sg = stackgap_init(p->p_emul);
- HPUX_CHECK_ALT_EXIST(p, &sg, SCARG(uap, path));
-
- SCARG(&ap, path) = SCARG(uap, path);
- SCARG(&ap, argp) = SCARG(uap, argp);
- SCARG(&ap, envp) = SCARG(uap, envp);
-
- return (sys_execve(p, &ap, retval));
-}
diff --git a/sys/compat/hpux/m68k/hpux_exec.h b/sys/compat/hpux/m68k/hpux_exec.h
deleted file mode 100644
index ded9d211a9b..00000000000
--- a/sys/compat/hpux/m68k/hpux_exec.h
+++ /dev/null
@@ -1,120 +0,0 @@
-/* $OpenBSD: hpux_exec.h,v 1.1 2004/07/09 21:33:45 mickey Exp $ */
-/* $NetBSD: hpux_exec.h,v 1.7 1997/03/16 10:16:02 thorpej Exp $ */
-
-/*
- * Copyright (c) 1995 Jason R. Thorpe. All rights reserved.
- * Copyright (c) 1988 University of Utah.
- * Copyright (c) 1990, 1993
- * The Regents of the University of California. All rights reserved.
- *
- * This code is derived from software contributed to Berkeley by
- * the Systems Programming Group of the University of Utah Computer
- * Science Department.
- *
- * 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. Neither the name of the University nor the names of its contributors
- * may be used to endorse or promote products derived from this software
- * without specific prior written permission.
- *
- * THIS SOFTWARE IS PROVIDED BY THE REGENTS 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 REGENTS 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.
- *
- * from: Utah $Hdr: hpux_exec.h 1.6 92/01/20$
- *
- * @(#)hpux_exec.h 8.1 (Berkeley) 6/10/93
- */
-
-#ifndef _HPUX_EXEC_H_
-#define _HPUX_EXEC_H_
-
-/*
- * HPUX a.out header format
- */
-struct hpux_exec {
- long ha_magic; /* magic number */
- short ha_version; /* version ID */
- short ha_shlhw; /* shared lib "highwater" mark */
- long ha_misc; /* misc. info */
- long ha_text; /* size of text segment */
- long ha_data; /* size of initialized data */
- long ha_bss; /* size of uninitialized data */
- long ha_trsize; /* size of text relocation */
- long ha_drsize; /* size of data relocation */
- long ha_pascal; /* pascal section size */
- long ha_symbols; /* symbol table size */
- long ha_pad0;
- long ha_entry; /* entry point */
- long ha_pad1;
- long ha_supsyms; /* supplementary symbol table */
- long ha_drelocs; /* non-PIC relocation info */
- long ha_extentions; /* file offset of special extensions */
-};
-
-#define HPUX_EXEC_HDR_SIZE (sizeof(struct hpux_exec))
-
-#define HPUX_MAGIC(ha) ((ha)->ha_magic & 0xffff)
-#define HPUX_SYSID(ha) (((ha)->ha_magic >> 16) & 0xffff)
-
-/*
- * Additional values for HPUX_MAGIC()
- */
-#define HPUX_MAGIC_RELOC 0x0106 /* relocatable object */
-#define HPUX_MAGIC_DL 0x010d /* dynamic load library */
-#define HPUX_MAGIC_SHL 0x010e /* shared library */
-
-#define HPUX_LDPGSZ 4096 /* align to this */
-#define HPUX_LDPGSHIFT 12 /* log2(HPUX_LDPGSZ) */
-
-#define HPUX_SEGMENT_ROUND(x) \
- (((x) + HPUX_LDPGSZ - 1) & ~(HPUX_LDPGSZ - 1))
-
-#define HPUX_TXTOFF(x, m) \
- ((((m) == ZMAGIC) || \
- ((m) == HPUX_MAGIC_SHL) || \
- ((m) == HPUX_MAGIC_DL)) ? \
- HPUX_LDPGSZ : HPUX_EXEC_HDR_SIZE)
-
-#define HPUX_DATAOFF(x, m) \
- ((((m) == ZMAGIC) || \
- ((m) == HPUX_MAGIC_SHL) || \
- ((m) == HPUX_MAGIC_DL)) ? \
- (HPUX_LDPGSZ + HPUX_SEGMENT_ROUND((x).ha_text)) : \
- (HPUX_EXEC_HDR_SIZE + (x).ha_text))
-
-#define HPUX_PASOFF(x, m) \
- ((((m) == ZMAGIC) || \
- ((m) == HPUX_MAGIC_SHL) || \
- ((m) == HPUX_MAGIC_DL)) ? \
- (HPUX_LDPGSZ + HPUX_SEGMENT_ROUND((x).ha_text) + \
- HPUX_SEGMENT_ROUND((x).ha_data)) : \
- (HPUX_EXEC_HDR_SIZE + (x).ha_text + (x).ha_data))
-
-#define HPUX_SYMOFF(x, m) (HPUX_PASOFF((x), (m)) + (x).ha_pascal)
-#define HPUX_SUPSYMOFF(x, m) (HPUX_SYMOFF((x), (m)) + (x).ha_symbols)
-#define HPUX_RTEXTOFF(x, m) (HPUX_SUPSYMOFF((x), (m)) + (x).ha_supsyms)
-#define HPUX_RDATAOFF(x, m) (HPUX_RTEXTOFF((x), (m)) + (x).ha_trsize)
-#define HPUX_EXTOFF(x, m) ((x).ha_extentions)
-
-#define HPUXM_VALID 0x00000001
-#define HPUXM_STKWT 0x02000000
-#define HPUXM_DATAWT 0x04000000
-
-int exec_hpux_makecmds(struct proc *, struct exec_package *);
-
-#endif /* _HPUX_EXEC_H_ */
diff --git a/sys/compat/hpux/m68k/hpux_net.c b/sys/compat/hpux/m68k/hpux_net.c
deleted file mode 100644
index b84d9c4f5c5..00000000000
--- a/sys/compat/hpux/m68k/hpux_net.c
+++ /dev/null
@@ -1,314 +0,0 @@
-/* $OpenBSD: hpux_net.c,v 1.1 2004/07/09 21:33:45 mickey Exp $ */
-/* $NetBSD: hpux_net.c,v 1.14 1997/04/01 19:59:02 scottr Exp $ */
-
-/*
- * Copyright (c) 1988 University of Utah.
- * Copyright (c) 1990, 1993
- * The Regents of the University of California. All rights reserved.
- *
- * This code is derived from software contributed to Berkeley by
- * the Systems Programming Group of the University of Utah Computer
- * Science Department.
- *
- * 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. Neither the name of the University nor the names of its contributors
- * may be used to endorse or promote products derived from this software
- * without specific prior written permission.
- *
- * THIS SOFTWARE IS PROVIDED BY THE REGENTS 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 REGENTS 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.
- *
- * from: Utah $Hdr: hpux_net.c 1.8 93/08/02$
- *
- * @(#)hpux_net.c 8.2 (Berkeley) 9/9/93
- */
-
-/*
- * Network related HP-UX compatibility routines
- */
-
-#include <sys/param.h>
-#include <sys/systm.h>
-#include <sys/kernel.h>
-#include <sys/time.h>
-#include <sys/errno.h>
-#include <sys/proc.h>
-#include <sys/file.h>
-#include <sys/filedesc.h>
-#include <sys/mbuf.h>
-#include <sys/mount.h>
-#include <sys/socket.h>
-#include <sys/socketvar.h>
-#include <sys/uio.h>
-#include <sys/ktrace.h>
-#include <sys/syscallargs.h>
-
-#include <compat/hpux/hpux.h>
-#include <compat/hpux/hpux_util.h>
-#include <compat/hpux/m68k/hpux_syscallargs.h>
-
-struct hpux_sys_getsockopt_args {
- syscallarg(int) s;
- syscallarg(int) level;
- syscallarg(int) name;
- syscallarg(caddr_t) val;
- syscallarg(int *) avalsize;
-};
-
-int hpux_sys_setsockopt2(struct proc *, void *, register_t *);
-int hpux_sys_getsockopt(struct proc *, void *, register_t *);
-
-void socksetsize(int, struct mbuf *);
-
-
-#define MINBSDIPCCODE 0x3EE
-#define NUMBSDIPC 32
-
-/*
- * HPUX netioctl() to BSD syscall map.
- * Indexed by callno - MINBSDIPCCODE
- */
-
-struct hpuxtobsdipc {
- int (*rout)(struct proc *, void *, register_t *);
- int nargs;
-} hpuxtobsdipc[NUMBSDIPC] = {
- { sys_socket, 3 }, /* 3ee */
- { sys_listen, 2 }, /* 3ef */
- { sys_bind, 3 }, /* 3f0 */
- { compat_43_sys_accept, 3 }, /* 3f1 */
- { sys_connect, 3 }, /* 3f2 */
- { compat_43_sys_recv, 4 }, /* 3f3 */
- { compat_43_sys_send, 4 }, /* 3f4 */
- { sys_shutdown, 2 }, /* 3f5 */
- { compat_43_sys_getsockname, 3 }, /* 3f6 */
- { hpux_sys_setsockopt2, 5 }, /* 3f7 */
- { sys_sendto, 6 }, /* 3f8 */
- { compat_43_sys_recvfrom, 6 }, /* 3f9 */
- { compat_43_sys_getpeername, 3 }, /* 3fa */
- { NULL, 0 }, /* 3fb */
- { NULL, 0 }, /* 3fc */
- { NULL, 0 }, /* 3fd */
- { NULL, 0 }, /* 3fe */
- { NULL, 0 }, /* 3ff */
- { NULL, 0 }, /* 400 */
- { NULL, 0 }, /* 401 */
- { NULL, 0 }, /* 402 */
- { NULL, 0 }, /* 403 */
- { NULL, 0 }, /* 404 */
- { NULL, 0 }, /* 405 */
- { NULL, 0 }, /* 406 */
- { NULL, 0 }, /* 407 */
- { NULL, 0 }, /* 408 */
- { NULL, 0 }, /* 409 */
- { NULL, 0 }, /* 40a */
- { hpux_sys_getsockopt, 5 }, /* 40b */
- { NULL, 0 }, /* 40c */
- { NULL, 0 }, /* 40d */
-};
-
-/*
- * Single system call entry to BSD style IPC.
- * Gleened from disassembled libbsdipc.a syscall entries.
- */
-int
-hpux_sys_netioctl(p, v, retval)
- struct proc *p;
- void *v;
- register_t *retval;
-{
- struct hpux_sys_netioctl_args *uap = v;
- int *args, i;
- int code;
- int error;
-
- args = SCARG(uap, args);
- code = SCARG(uap, call) - MINBSDIPCCODE;
- if (code < 0 || code >= NUMBSDIPC || hpuxtobsdipc[code].rout == NULL)
- return (EINVAL);
- if ((i = hpuxtobsdipc[code].nargs * sizeof (int)) &&
- (error = copyin((caddr_t)args, (caddr_t)uap, (u_int)i))) {
-#ifdef KTRACE
- if (KTRPOINT(p, KTR_SYSCALL))
- ktrsyscall(p, code + MINBSDIPCCODE,
- hpuxtobsdipc[code].nargs,
- (register_t *)uap);
-#endif
- return (error);
- }
-#ifdef KTRACE
- if (KTRPOINT(p, KTR_SYSCALL))
- ktrsyscall(p, code + MINBSDIPCCODE,
- hpuxtobsdipc[code].nargs,
- (register_t *)uap);
-#endif
- return ((*hpuxtobsdipc[code].rout)(p, uap, retval));
-}
-
-void
-socksetsize(size, m)
- int size;
- struct mbuf *m;
-{
- int tmp;
-
- if (size < sizeof(int)) {
- switch(size) {
- case 1:
- tmp = (int) *mtod(m, char *);
- break;
- case 2:
- tmp = (int) *mtod(m, short *);
- break;
- case 3:
- default: /* XXX uh, what if sizeof(int) > 4? */
- tmp = (((int) *mtod(m, int *)) >> 8) & 0xffffff;
- break;
- }
- *mtod(m, int *) = tmp;
- m->m_len = sizeof(int);
- } else {
- m->m_len = size;
- }
-}
-
-/* ARGSUSED */
-int
-hpux_sys_setsockopt2(p, v, retval)
- struct proc *p;
- void *v;
- register_t *retval;
-{
- struct hpux_sys_setsockopt_args *uap = v;
- struct file *fp;
- struct mbuf *m = NULL;
- int tmp, error;
-
- if ((error = getsock(p->p_fd, SCARG(uap, s), &fp)))
- return (error);
- if (SCARG(uap, valsize) > MLEN) {
- error = EINVAL;
- goto bad;
- }
- if (SCARG(uap, val)) {
- m = m_get(M_WAIT, MT_SOOPTS);
- if ((error = copyin(SCARG(uap, val), mtod(m, caddr_t),
- (u_int)SCARG(uap, valsize)))) {
- (void) m_free(m);
- goto bad;
- }
- if (SCARG(uap, name) == SO_LINGER) {
- tmp = *mtod(m, int *);
- mtod(m, struct linger *)->l_onoff = 1;
- mtod(m, struct linger *)->l_linger = tmp;
- m->m_len = sizeof(struct linger);
- } else
- socksetsize(SCARG(uap, valsize), m);
- } else if (SCARG(uap, name) == ~SO_LINGER) {
- m = m_get(M_WAIT, MT_SOOPTS);
- SCARG(uap, name) = SO_LINGER;
- mtod(m, struct linger *)->l_onoff = 0;
- m->m_len = sizeof(struct linger);
- }
- error = sosetopt((struct socket *)fp->f_data, SCARG(uap, level),
- SCARG(uap, name), m);
-bad:
- FRELE(fp);
- return (error);
-}
-
-/* ARGSUSED */
-int
-hpux_sys_setsockopt(p, v, retval)
- struct proc *p;
- void *v;
- register_t *retval;
-{
- struct hpux_sys_setsockopt_args *uap = v;
- struct file *fp;
- struct mbuf *m = NULL;
- int error;
-
- if ((error = getsock(p->p_fd, SCARG(uap, s), &fp)))
- return (error);
- if (SCARG(uap, valsize) > MLEN) {
- error = EINVAL;
- goto bad;
- }
- if (SCARG(uap, val)) {
- m = m_get(M_WAIT, MT_SOOPTS);
- if ((error = copyin(SCARG(uap, val), mtod(m, caddr_t),
- (u_int)SCARG(uap, valsize)))) {
- m_free(m);
- goto bad;
- }
- socksetsize(SCARG(uap, valsize), m);
- }
- error = sosetopt((struct socket *)fp->f_data, SCARG(uap, level),
- SCARG(uap, name), m);
-bad:
- FRELE(fp);
- return (error);
-}
-
-int
-hpux_sys_getsockopt(p, v, retval)
- struct proc *p;
- void *v;
- register_t *retval;
-{
- struct hpux_sys_getsockopt_args *uap = v;
- struct file *fp;
- struct mbuf *m = NULL;
- int valsize, error;
-
- if ((error = getsock(p->p_fd, SCARG(uap, s), &fp)))
- return (error);
- if (SCARG(uap, val)) {
- if ((error = copyin((caddr_t)SCARG(uap, avalsize),
- (caddr_t)&valsize, sizeof (valsize)))) {
- goto bad;
- }
- } else
- valsize = 0;
- if ((error = sogetopt((struct socket *)fp->f_data, SCARG(uap, level),
- SCARG(uap, name), &m)))
- goto bad;
- if (SCARG(uap, val) && valsize && m != NULL) {
- if (SCARG(uap, name) == SO_LINGER) {
- if (mtod(m, struct linger *)->l_onoff)
- *mtod(m, int *) = mtod(m, struct linger *)->l_linger;
- else
- *mtod(m, int *) = 0;
- m->m_len = sizeof(int);
- }
- if (valsize > m->m_len)
- valsize = m->m_len;
- error = copyout(mtod(m, caddr_t), SCARG(uap, val),
- (u_int)valsize);
- if (error == 0)
- error = copyout((caddr_t)&valsize,
- (caddr_t)SCARG(uap, avalsize), sizeof (valsize));
- }
-bad:
- FRELE(fp);
- if (m != NULL)
- m_free(m);
- return (error);
-}
diff --git a/sys/compat/hpux/m68k/hpux_sig2.c b/sys/compat/hpux/m68k/hpux_sig2.c
deleted file mode 100644
index 62f5c4006f8..00000000000
--- a/sys/compat/hpux/m68k/hpux_sig2.c
+++ /dev/null
@@ -1,95 +0,0 @@
-/* $OpenBSD: hpux_sig2.c,v 1.2 2004/09/28 11:00:22 miod Exp $ */
-/* $NetBSD: hpux_sig.c,v 1.16 1997/04/01 19:59:02 scottr Exp $ */
-
-/*
- * Copyright (c) 1988 University of Utah.
- * Copyright (c) 1990, 1993
- * The Regents of the University of California. All rights reserved.
- *
- * This code is derived from software contributed to Berkeley by
- * the Systems Programming Group of the University of Utah Computer
- * Science Department.
- *
- * 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. Neither the name of the University nor the names of its contributors
- * may be used to endorse or promote products derived from this software
- * without specific prior written permission.
- *
- * THIS SOFTWARE IS PROVIDED BY THE REGENTS 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 REGENTS 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.
- *
- * from: Utah $Hdr: hpux_sig.c 1.4 92/01/20$
- *
- * @(#)hpux_sig.c 8.2 (Berkeley) 9/23/93
- */
-
-/*
- * Signal related HPUX compatibility routines
- */
-
-#include <sys/param.h>
-#include <sys/systm.h>
-#include <sys/kernel.h>
-#include <sys/mount.h>
-#include <sys/proc.h>
-#include <sys/signalvar.h>
-#include <sys/syscallargs.h>
-
-#include <compat/hpux/hpux.h>
-#include <compat/hpux/hpux_sig.h>
-#include <compat/hpux/m68k/hpux_syscallargs.h>
-
-int
-hpux_sys_ssig_6x(p, v, retval)
- struct proc *p;
- void *v;
- register_t *retval;
-{
- struct hpux_sys_ssig_6x_args /* {
- syscallarg(int) signo;
- syscallarg(sig_t) fun;
- } */ *uap = v;
- int a;
- struct sigaction vec;
- struct sigaction *sa = &vec;
-
- a = hpuxtobsdsig(SCARG(uap, signo));
- sa->sa_handler = SCARG(uap, fun);
- /*
- * Kill processes trying to use job control facilities
- * (this'll help us find any vestiges of the old stuff).
- */
- if ((a &~ 0377) ||
- (sa->sa_handler != SIG_DFL && sa->sa_handler != SIG_IGN &&
- ((int)sa->sa_handler) & 1)) {
- psignal(p, SIGSYS);
- return (0);
- }
- if (a <= 0 || a >= NSIG || a == SIGKILL || a == SIGSTOP ||
- (a == SIGCONT && sa->sa_handler == SIG_IGN))
- return (EINVAL);
- sa->sa_mask = 0;
- sa->sa_flags = 0;
- *retval = (int)p->p_sigacts->ps_sigact[a];
- setsigvec(p, a, sa);
-#if 0
- p->p_flag |= SOUSIG; /* mark as simulating old stuff */
-#endif
- return (0);
-}
diff --git a/sys/compat/hpux/m68k/hpux_syscall.h b/sys/compat/hpux/m68k/hpux_syscall.h
deleted file mode 100644
index 74b1943d3fe..00000000000
--- a/sys/compat/hpux/m68k/hpux_syscall.h
+++ /dev/null
@@ -1,442 +0,0 @@
-/* $OpenBSD: hpux_syscall.h,v 1.3 2010/01/28 19:59:35 miod Exp $ */
-
-/*
- * System call numbers.
- *
- * DO NOT EDIT-- this file is automatically generated.
- * created from OpenBSD: syscalls.master,v 1.2 2010/01/28 19:59:11 miod Exp
- */
-
-/* syscall: "syscall" ret: "int" args: */
-#define HPUX_SYS_syscall 0
-
-/* syscall: "exit" ret: "int" args: "int" */
-#define HPUX_SYS_exit 1
-
-/* syscall: "fork" ret: "int" args: */
-#define HPUX_SYS_fork 2
-
-/* syscall: "read" ret: "int" args: "int" "char *" "u_int" */
-#define HPUX_SYS_read 3
-
-/* syscall: "write" ret: "int" args: "int" "char *" "u_int" */
-#define HPUX_SYS_write 4
-
-/* syscall: "open" ret: "int" args: "char *" "int" "int" */
-#define HPUX_SYS_open 5
-
-/* syscall: "close" ret: "int" args: "int" */
-#define HPUX_SYS_close 6
-
-/* syscall: "wait" ret: "int" args: "int *" */
-#define HPUX_SYS_wait 7
-
-/* syscall: "creat" ret: "int" args: "char *" "int" */
-#define HPUX_SYS_creat 8
-
-/* syscall: "link" ret: "int" args: "char *" "char *" */
-#define HPUX_SYS_link 9
-
-/* syscall: "unlink" ret: "int" args: "char *" */
-#define HPUX_SYS_unlink 10
-
-/* syscall: "execv" ret: "int" args: "char *" "char **" */
-#define HPUX_SYS_execv 11
-
-/* syscall: "chdir" ret: "int" args: "char *" */
-#define HPUX_SYS_chdir 12
-
-/* syscall: "time_6x" ret: "int" args: "time_t *" */
-#define HPUX_SYS_time_6x 13
-
-/* syscall: "mknod" ret: "int" args: "char *" "int" "int" */
-#define HPUX_SYS_mknod 14
-
-/* syscall: "chmod" ret: "int" args: "char *" "int" */
-#define HPUX_SYS_chmod 15
-
-/* syscall: "chown" ret: "int" args: "char *" "int" "int" */
-#define HPUX_SYS_chown 16
-
-/* syscall: "obreak" ret: "int" args: "char *" */
-#define HPUX_SYS_obreak 17
-
-/* syscall: "stat_6x" ret: "int" args: "char *" "struct hpux_ostat *" */
-#define HPUX_SYS_stat_6x 18
-
-/* syscall: "lseek" ret: "long" args: "int" "long" "int" */
-#define HPUX_SYS_lseek 19
-
-/* syscall: "getpid" ret: "pid_t" args: */
-#define HPUX_SYS_getpid 20
-
-/* syscall: "setuid" ret: "int" args: "uid_t" */
-#define HPUX_SYS_setuid 23
-
-/* syscall: "getuid" ret: "uid_t" args: */
-#define HPUX_SYS_getuid 24
-
-/* syscall: "stime_6x" ret: "int" args: "int" */
-#define HPUX_SYS_stime_6x 25
-
-/* syscall: "ptrace" ret: "int" args: "int" "int" "int *" "int" */
-#define HPUX_SYS_ptrace 26
-
-/* syscall: "alarm_6x" ret: "int" args: "int" */
-#define HPUX_SYS_alarm_6x 27
-
-/* syscall: "fstat_6x" ret: "int" args: "int" "struct hpux_ostat *" */
-#define HPUX_SYS_fstat_6x 28
-
-/* syscall: "pause_6x" ret: "int" args: */
-#define HPUX_SYS_pause_6x 29
-
-/* syscall: "utime_6x" ret: "int" args: "char *" "time_t *" */
-#define HPUX_SYS_utime_6x 30
-
-/* syscall: "stty_6x" ret: "int" args: "int" "caddr_t" */
-#define HPUX_SYS_stty_6x 31
-
-/* syscall: "gtty_6x" ret: "int" args: "int" "caddr_t" */
-#define HPUX_SYS_gtty_6x 32
-
-/* syscall: "access" ret: "int" args: "char *" "int" */
-#define HPUX_SYS_access 33
-
-/* syscall: "nice_6x" ret: "int" args: "int" */
-#define HPUX_SYS_nice_6x 34
-
-/* syscall: "ftime_6x" ret: "int" args: "struct hpux_timeb *" */
-#define HPUX_SYS_ftime_6x 35
-
-/* syscall: "sync" ret: "int" args: */
-#define HPUX_SYS_sync 36
-
-/* syscall: "kill" ret: "int" args: "pid_t" "int" */
-#define HPUX_SYS_kill 37
-
-/* syscall: "stat" ret: "int" args: "char *" "struct hpux_stat *" */
-#define HPUX_SYS_stat 38
-
-/* syscall: "setpgrp_6x" ret: "int" args: */
-#define HPUX_SYS_setpgrp_6x 39
-
-/* syscall: "lstat" ret: "int" args: "char *" "struct hpux_stat *" */
-#define HPUX_SYS_lstat 40
-
-/* syscall: "dup" ret: "int" args: "int" */
-#define HPUX_SYS_dup 41
-
-/* syscall: "opipe" ret: "int" args: */
-#define HPUX_SYS_opipe 42
-
-/* syscall: "times_6x" ret: "int" args: "struct tms *" */
-#define HPUX_SYS_times_6x 43
-
-/* syscall: "profil" ret: "int" args: "caddr_t" "u_int" "u_int" "u_int" */
-#define HPUX_SYS_profil 44
-
-/* syscall: "setgid" ret: "int" args: "gid_t" */
-#define HPUX_SYS_setgid 46
-
-/* syscall: "getgid" ret: "gid_t" args: */
-#define HPUX_SYS_getgid 47
-
-/* syscall: "ssig_6x" ret: "int" args: "int" "sig_t" */
-#define HPUX_SYS_ssig_6x 48
-
-/* syscall: "ioctl" ret: "int" args: "int" "int" "caddr_t" */
-#define HPUX_SYS_ioctl 54
-
-/* syscall: "symlink" ret: "int" args: "char *" "char *" */
-#define HPUX_SYS_symlink 56
-
-/* syscall: "utssys" ret: "int" args: "struct hpux_utsname *" "int" "int" */
-#define HPUX_SYS_utssys 57
-
-/* syscall: "readlink" ret: "int" args: "char *" "char *" "int" */
-#define HPUX_SYS_readlink 58
-
-/* syscall: "execve" ret: "int" args: "char *" "char **" "char **" */
-#define HPUX_SYS_execve 59
-
-/* syscall: "umask" ret: "int" args: "int" */
-#define HPUX_SYS_umask 60
-
-/* syscall: "chroot" ret: "int" args: "char *" */
-#define HPUX_SYS_chroot 61
-
-/* syscall: "fcntl" ret: "int" args: "int" "int" "int" */
-#define HPUX_SYS_fcntl 62
-
-/* syscall: "ulimit" ret: "int" args: "int" "int" */
-#define HPUX_SYS_ulimit 63
-
-/* syscall: "vfork" ret: "int" args: */
-#define HPUX_SYS_vfork 66
-
-/* syscall: "vread" ret: "int" args: "int" "char *" "u_int" */
-#define HPUX_SYS_vread 67
-
-/* syscall: "vwrite" ret: "int" args: "int" "char *" "u_int" */
-#define HPUX_SYS_vwrite 68
-
-/* syscall: "mmap" ret: "int" args: "caddr_t" "size_t" "int" "int" "int" "long" */
-#define HPUX_SYS_mmap 71
-
-/* syscall: "munmap" ret: "int" args: "caddr_t" "size_t" */
-#define HPUX_SYS_munmap 73
-
-/* syscall: "mprotect" ret: "int" args: "caddr_t" "size_t" "int" */
-#define HPUX_SYS_mprotect 74
-
-/* syscall: "getgroups" ret: "int" args: "u_int" "gid_t *" */
-#define HPUX_SYS_getgroups 79
-
-/* syscall: "setgroups" ret: "int" args: "u_int" "gid_t *" */
-#define HPUX_SYS_setgroups 80
-
-/* syscall: "getpgid" ret: "pid_t" args: "pid_t" */
-#define HPUX_SYS_getpgid 81
-
-/* syscall: "setpgrp2" ret: "int" args: "pid_t" "pid_t" */
-#define HPUX_SYS_setpgrp2 82
-
-/* syscall: "setitimer" ret: "int" args: "u_int" "struct itimerval *" "struct itimerval *" */
-#define HPUX_SYS_setitimer 83
-
-/* syscall: "wait3" ret: "int" args: "int *" "int" "int" */
-#define HPUX_SYS_wait3 84
-
-/* syscall: "getitimer" ret: "int" args: "u_int" "struct itimerval *" */
-#define HPUX_SYS_getitimer 86
-
-/* syscall: "dup2" ret: "int" args: "u_int" "u_int" */
-#define HPUX_SYS_dup2 90
-
-/* syscall: "fstat" ret: "int" args: "int" "struct hpux_stat *" */
-#define HPUX_SYS_fstat 92
-
-/* syscall: "select" ret: "int" args: "u_int" "fd_set *" "fd_set *" "fd_set *" "struct timeval *" */
-#define HPUX_SYS_select 93
-
-/* syscall: "fsync" ret: "int" args: "int" */
-#define HPUX_SYS_fsync 95
-
-/* syscall: "sigreturn" ret: "int" args: "struct hpuxsigcontext *" */
-#define HPUX_SYS_sigreturn 103
-
-/* syscall: "sigvec" ret: "int" args: "int" "struct sigvec *" "struct sigvec *" */
-#define HPUX_SYS_sigvec 108
-
-/* syscall: "sigblock" ret: "int" args: "int" */
-#define HPUX_SYS_sigblock 109
-
-/* syscall: "sigsetmask" ret: "int" args: "int" */
-#define HPUX_SYS_sigsetmask 110
-
-/* syscall: "sigpause" ret: "int" args: "int" */
-#define HPUX_SYS_sigpause 111
-
-/* syscall: "sigstack" ret: "int" args: "struct sigstack *" "struct sigstack *" */
-#define HPUX_SYS_sigstack 112
-
-/* syscall: "gettimeofday" ret: "int" args: "struct timeval *" */
-#define HPUX_SYS_gettimeofday 116
-
-/* syscall: "readv" ret: "int" args: "int" "struct iovec *" "u_int" */
-#define HPUX_SYS_readv 120
-
-/* syscall: "writev" ret: "int" args: "int" "struct iovec *" "u_int" */
-#define HPUX_SYS_writev 121
-
-/* syscall: "settimeofday" ret: "int" args: "struct timeval *" "struct timezone *" */
-#define HPUX_SYS_settimeofday 122
-
-/* syscall: "fchown" ret: "int" args: "int" "int" "int" */
-#define HPUX_SYS_fchown 123
-
-/* syscall: "fchmod" ret: "int" args: "int" "int" */
-#define HPUX_SYS_fchmod 124
-
-/* syscall: "setresuid" ret: "int" args: "uid_t" "uid_t" "uid_t" */
-#define HPUX_SYS_setresuid 126
-
-/* syscall: "setresgid" ret: "int" args: "gid_t" "gid_t" "gid_t" */
-#define HPUX_SYS_setresgid 127
-
-/* syscall: "rename" ret: "int" args: "char *" "char *" */
-#define HPUX_SYS_rename 128
-
-/* syscall: "truncate" ret: "int" args: "char *" "long" */
-#define HPUX_SYS_truncate 129
-
-/* syscall: "ftruncate" ret: "int" args: "int" "long" */
-#define HPUX_SYS_ftruncate 130
-
-/* syscall: "sysconf" ret: "int" args: "int" */
-#define HPUX_SYS_sysconf 132
-
-/* syscall: "mkdir" ret: "int" args: "char *" "int" */
-#define HPUX_SYS_mkdir 136
-
-/* syscall: "rmdir" ret: "int" args: "char *" */
-#define HPUX_SYS_rmdir 137
-
-/* syscall: "getrlimit" ret: "int" args: "u_int" "struct ogetrlimit *" */
-#define HPUX_SYS_getrlimit 144
-
-/* syscall: "setrlimit" ret: "int" args: "u_int" "struct ogetrlimit *" */
-#define HPUX_SYS_setrlimit 145
-
-/* syscall: "rtprio" ret: "int" args: "pid_t" "int" */
-#define HPUX_SYS_rtprio 152
-
-/* syscall: "netioctl" ret: "int" args: "int" "int *" */
-#define HPUX_SYS_netioctl 154
-
-/* syscall: "lockf" ret: "int" args: "int" "int" "long" */
-#define HPUX_SYS_lockf 155
-
-/* syscall: "semget" ret: "int" args: "key_t" "int" "int" */
-#define HPUX_SYS_semget 156
-
-/* syscall: "__semctl" ret: "int" args: "int" "int" "int" "union semun *" */
-#define HPUX_SYS___semctl 157
-
-/* syscall: "semop" ret: "int" args: "int" "struct sembuf *" "u_int" */
-#define HPUX_SYS_semop 158
-
-/* syscall: "msgget" ret: "int" args: "key_t" "int" */
-#define HPUX_SYS_msgget 159
-
-/* syscall: "msgctl" ret: "int" args: "int" "int" "struct msqid_ds *" */
-#define HPUX_SYS_msgctl 160
-
-/* syscall: "msgsnd" ret: "int" args: "int" "void *" "size_t" "int" */
-#define HPUX_SYS_msgsnd 161
-
-/* syscall: "msgrcv" ret: "int" args: "int" "void *" "size_t" "long" "int" */
-#define HPUX_SYS_msgrcv 162
-
-/* syscall: "shmget" ret: "int" args: "key_t" "int" "int" */
-#define HPUX_SYS_shmget 163
-
-/* syscall: "shmctl" ret: "int" args: "int" "int" "caddr_t" */
-#define HPUX_SYS_shmctl 164
-
-/* syscall: "shmat" ret: "int" args: "int" "void *" "int" */
-#define HPUX_SYS_shmat 165
-
-/* syscall: "shmdt" ret: "int" args: "void *" */
-#define HPUX_SYS_shmdt 166
-
-/* syscall: "advise" ret: "int" args: "int" */
-#define HPUX_SYS_advise 167
-
-/* syscall: "getcontext" ret: "int" args: "char *" "int" */
-#define HPUX_SYS_getcontext 174
-
-/* syscall: "getaccess" ret: "int" args: "char *" "uid_t" "int" "gid_t *" "void *" "void *" */
-#define HPUX_SYS_getaccess 190
-
-/* syscall: "waitpid" ret: "int" args: "pid_t" "int *" "int" "struct rusage *" */
-#define HPUX_SYS_waitpid 200
-
-/* syscall: "pathconf" ret: "int" args: "char *" "int" */
-#define HPUX_SYS_pathconf 225
-
-/* syscall: "fpathconf" ret: "int" args: "int" "int" */
-#define HPUX_SYS_fpathconf 226
-
-/* syscall: "getdirentries" ret: "int" args: "int" "char *" "u_int" "long *" */
-#define HPUX_SYS_getdirentries 231
-
-/* syscall: "getdomainname" ret: "int" args: "char *" "int" */
-#define HPUX_SYS_getdomainname 232
-
-/* syscall: "setdomainname" ret: "int" args: "char *" "int" */
-#define HPUX_SYS_setdomainname 236
-
-/* syscall: "sigaction" ret: "int" args: "int" "struct hpux_sigaction *" "struct hpux_sigaction *" */
-#define HPUX_SYS_sigaction 239
-
-/* syscall: "sigprocmask" ret: "int" args: "int" "hpux_sigset_t *" "hpux_sigset_t *" */
-#define HPUX_SYS_sigprocmask 240
-
-/* syscall: "sigpending" ret: "int" args: "hpux_sigset_t *" */
-#define HPUX_SYS_sigpending 241
-
-/* syscall: "sigsuspend" ret: "int" args: "hpux_sigset_t *" */
-#define HPUX_SYS_sigsuspend 242
-
-/* syscall: "getdtablesize" ret: "int" args: */
-#define HPUX_SYS_getdtablesize 268
-
-/* syscall: "poll" ret: "int" args: "struct pollfd *" "u_int" "int" */
-#define HPUX_SYS_poll 269
-
-/* syscall: "fchdir" ret: "int" args: "int" */
-#define HPUX_SYS_fchdir 272
-
-/* syscall: "accept" ret: "int" args: "int" "caddr_t" "int *" */
-#define HPUX_SYS_accept 275
-
-/* syscall: "bind" ret: "int" args: "int" "caddr_t" "int" */
-#define HPUX_SYS_bind 276
-
-/* syscall: "connect" ret: "int" args: "int" "caddr_t" "int" */
-#define HPUX_SYS_connect 277
-
-/* syscall: "getpeername" ret: "int" args: "int" "caddr_t" "int *" */
-#define HPUX_SYS_getpeername 278
-
-/* syscall: "getsockname" ret: "int" args: "int" "caddr_t" "int *" */
-#define HPUX_SYS_getsockname 279
-
-/* syscall: "getsockopt" ret: "int" args: "int" "int" "int" "caddr_t" "int *" */
-#define HPUX_SYS_getsockopt 280
-
-/* syscall: "listen" ret: "int" args: "int" "int" */
-#define HPUX_SYS_listen 281
-
-/* syscall: "recv" ret: "int" args: "int" "caddr_t" "int" "int" */
-#define HPUX_SYS_recv 282
-
-/* syscall: "recvfrom" ret: "int" args: "int" "caddr_t" "size_t" "int" "caddr_t" "int *" */
-#define HPUX_SYS_recvfrom 283
-
-/* syscall: "recvmsg" ret: "int" args: "int" "struct omsghdr *" "int" */
-#define HPUX_SYS_recvmsg 284
-
-/* syscall: "send" ret: "int" args: "int" "caddr_t" "int" "int" */
-#define HPUX_SYS_send 285
-
-/* syscall: "sendmsg" ret: "int" args: "int" "caddr_t" "int" */
-#define HPUX_SYS_sendmsg 286
-
-/* syscall: "sendto" ret: "int" args: "int" "caddr_t" "size_t" "int" "caddr_t" "int" */
-#define HPUX_SYS_sendto 287
-
-/* syscall: "setsockopt" ret: "int" args: "int" "int" "int" "caddr_t" "int" */
-#define HPUX_SYS_setsockopt 288
-
-/* syscall: "shutdown" ret: "int" args: "int" "int" */
-#define HPUX_SYS_shutdown 289
-
-/* syscall: "socket" ret: "int" args: "int" "int" "int" */
-#define HPUX_SYS_socket 290
-
-/* syscall: "socketpair" ret: "int" args: "int" "int" "int" "int *" */
-#define HPUX_SYS_socketpair 291
-
-/* syscall: "nsemctl" ret: "int" args: "int" "int" "int" "union semun *" */
-#define HPUX_SYS_nsemctl 312
-
-/* syscall: "nmsgctl" ret: "int" args: "int" "int" "struct msqid_ds *" */
-#define HPUX_SYS_nmsgctl 313
-
-/* syscall: "nshmctl" ret: "int" args: "int" "int" "caddr_t" */
-#define HPUX_SYS_nshmctl 314
-
-#define HPUX_SYS_MAXSYSCALL 325
diff --git a/sys/compat/hpux/m68k/hpux_syscallargs.h b/sys/compat/hpux/m68k/hpux_syscallargs.h
deleted file mode 100644
index a51597d6e6b..00000000000
--- a/sys/compat/hpux/m68k/hpux_syscallargs.h
+++ /dev/null
@@ -1,545 +0,0 @@
-/* $OpenBSD: hpux_syscallargs.h,v 1.3 2010/01/28 19:59:35 miod Exp $ */
-
-/*
- * System call argument lists.
- *
- * DO NOT EDIT-- this file is automatically generated.
- * created from OpenBSD: syscalls.master,v 1.2 2010/01/28 19:59:11 miod Exp
- */
-
-#ifdef syscallarg
-#undef syscallarg
-#endif
-
-#define syscallarg(x) \
- union { \
- register_t pad; \
- struct { x datum; } le; \
- struct { \
- int8_t pad[ (sizeof (register_t) < sizeof (x)) \
- ? 0 \
- : sizeof (register_t) - sizeof (x)]; \
- x datum; \
- } be; \
- }
-
-struct hpux_sys_read_args {
- syscallarg(int) fd;
- syscallarg(char *) buf;
- syscallarg(u_int) nbyte;
-};
-
-struct hpux_sys_write_args {
- syscallarg(int) fd;
- syscallarg(char *) buf;
- syscallarg(u_int) nbyte;
-};
-
-struct hpux_sys_open_args {
- syscallarg(char *) path;
- syscallarg(int) flags;
- syscallarg(int) mode;
-};
-
-struct hpux_sys_wait_args {
- syscallarg(int *) status;
-};
-
-struct hpux_sys_creat_args {
- syscallarg(char *) path;
- syscallarg(int) mode;
-};
-
-struct hpux_sys_unlink_args {
- syscallarg(char *) path;
-};
-
-struct hpux_sys_execv_args {
- syscallarg(char *) path;
- syscallarg(char **) argp;
-};
-
-struct hpux_sys_chdir_args {
- syscallarg(char *) path;
-};
-
-struct hpux_sys_time_6x_args {
- syscallarg(time_t *) t;
-};
-
-struct hpux_sys_mknod_args {
- syscallarg(char *) path;
- syscallarg(int) mode;
- syscallarg(int) dev;
-};
-
-struct hpux_sys_chmod_args {
- syscallarg(char *) path;
- syscallarg(int) mode;
-};
-
-struct hpux_sys_chown_args {
- syscallarg(char *) path;
- syscallarg(int) uid;
- syscallarg(int) gid;
-};
-
-struct hpux_sys_stat_6x_args {
- syscallarg(char *) path;
- syscallarg(struct hpux_ostat *) sb;
-};
-
-struct hpux_sys_stime_6x_args {
- syscallarg(int) time;
-};
-
-struct hpux_sys_ptrace_args {
- syscallarg(int) req;
- syscallarg(int) pid;
- syscallarg(int *) addr;
- syscallarg(int) data;
-};
-
-struct hpux_sys_alarm_6x_args {
- syscallarg(int) deltat;
-};
-
-struct hpux_sys_fstat_6x_args {
- syscallarg(int) fd;
- syscallarg(struct hpux_ostat *) sb;
-};
-
-struct hpux_sys_utime_6x_args {
- syscallarg(char *) fname;
- syscallarg(time_t *) tptr;
-};
-
-struct hpux_sys_stty_6x_args {
- syscallarg(int) fd;
- syscallarg(caddr_t) arg;
-};
-
-struct hpux_sys_gtty_6x_args {
- syscallarg(int) fd;
- syscallarg(caddr_t) arg;
-};
-
-struct hpux_sys_access_args {
- syscallarg(char *) path;
- syscallarg(int) flags;
-};
-
-struct hpux_sys_nice_6x_args {
- syscallarg(int) nval;
-};
-
-struct hpux_sys_ftime_6x_args {
- syscallarg(struct hpux_timeb *) tp;
-};
-
-struct hpux_sys_kill_args {
- syscallarg(pid_t) pid;
- syscallarg(int) signo;
-};
-
-struct hpux_sys_stat_args {
- syscallarg(char *) path;
- syscallarg(struct hpux_stat *) sb;
-};
-
-struct hpux_sys_lstat_args {
- syscallarg(char *) path;
- syscallarg(struct hpux_stat *) sb;
-};
-
-struct hpux_sys_times_6x_args {
- syscallarg(struct tms *) tms;
-};
-
-struct hpux_sys_ssig_6x_args {
- syscallarg(int) signo;
- syscallarg(sig_t) fun;
-};
-
-struct hpux_sys_ioctl_args {
- syscallarg(int) fd;
- syscallarg(int) com;
- syscallarg(caddr_t) data;
-};
-
-struct hpux_sys_symlink_args {
- syscallarg(char *) path;
- syscallarg(char *) link;
-};
-
-struct hpux_sys_utssys_args {
- syscallarg(struct hpux_utsname *) uts;
- syscallarg(int) dev;
- syscallarg(int) request;
-};
-
-struct hpux_sys_readlink_args {
- syscallarg(char *) path;
- syscallarg(char *) buf;
- syscallarg(int) count;
-};
-
-struct hpux_sys_execve_args {
- syscallarg(char *) path;
- syscallarg(char **) argp;
- syscallarg(char **) envp;
-};
-
-struct hpux_sys_fcntl_args {
- syscallarg(int) fd;
- syscallarg(int) cmd;
- syscallarg(int) arg;
-};
-
-struct hpux_sys_ulimit_args {
- syscallarg(int) cmd;
- syscallarg(int) newlimit;
-};
-
-struct hpux_sys_mmap_args {
- syscallarg(caddr_t) addr;
- syscallarg(size_t) len;
- syscallarg(int) prot;
- syscallarg(int) flags;
- syscallarg(int) fd;
- syscallarg(long) pos;
-};
-
-struct hpux_sys_setpgrp2_args {
- syscallarg(pid_t) pid;
- syscallarg(pid_t) pgid;
-};
-
-struct hpux_sys_wait3_args {
- syscallarg(int *) status;
- syscallarg(int) options;
- syscallarg(int) rusage;
-};
-
-struct hpux_sys_fstat_args {
- syscallarg(int) fd;
- syscallarg(struct hpux_stat *) sb;
-};
-
-struct hpux_sys_sigreturn_args {
- syscallarg(struct hpuxsigcontext *) sigcntxp;
-};
-
-struct hpux_sys_sigvec_args {
- syscallarg(int) signo;
- syscallarg(struct sigvec *) nsv;
- syscallarg(struct sigvec *) osv;
-};
-
-struct hpux_sys_sigblock_args {
- syscallarg(int) mask;
-};
-
-struct hpux_sys_sigsetmask_args {
- syscallarg(int) mask;
-};
-
-struct hpux_sys_sigpause_args {
- syscallarg(int) mask;
-};
-
-struct hpux_sys_readv_args {
- syscallarg(int) fd;
- syscallarg(struct iovec *) iovp;
- syscallarg(u_int) iovcnt;
-};
-
-struct hpux_sys_writev_args {
- syscallarg(int) fd;
- syscallarg(struct iovec *) iovp;
- syscallarg(u_int) iovcnt;
-};
-
-struct hpux_sys_rename_args {
- syscallarg(char *) from;
- syscallarg(char *) to;
-};
-
-struct hpux_sys_truncate_args {
- syscallarg(char *) path;
- syscallarg(long) length;
-};
-
-struct hpux_sys_sysconf_args {
- syscallarg(int) name;
-};
-
-struct hpux_sys_mkdir_args {
- syscallarg(char *) path;
- syscallarg(int) mode;
-};
-
-struct hpux_sys_rmdir_args {
- syscallarg(char *) path;
-};
-
-struct hpux_sys_getrlimit_args {
- syscallarg(u_int) which;
- syscallarg(struct ogetrlimit *) rlp;
-};
-
-struct hpux_sys_setrlimit_args {
- syscallarg(u_int) which;
- syscallarg(struct ogetrlimit *) rlp;
-};
-
-struct hpux_sys_rtprio_args {
- syscallarg(pid_t) pid;
- syscallarg(int) prio;
-};
-
-struct hpux_sys_netioctl_args {
- syscallarg(int) call;
- syscallarg(int *) args;
-};
-
-struct hpux_sys_lockf_args {
- syscallarg(int) fd;
- syscallarg(int) func;
- syscallarg(long) size;
-};
-
-struct hpux_sys_shmctl_args {
- syscallarg(int) shmid;
- syscallarg(int) cmd;
- syscallarg(caddr_t) buf;
-};
-
-struct hpux_sys_advise_args {
- syscallarg(int) arg;
-};
-
-struct hpux_sys_getcontext_args {
- syscallarg(char *) buf;
- syscallarg(int) len;
-};
-
-struct hpux_sys_getaccess_args {
- syscallarg(char *) path;
- syscallarg(uid_t) uid;
- syscallarg(int) ngroups;
- syscallarg(gid_t *) gidset;
- syscallarg(void *) label;
- syscallarg(void *) privs;
-};
-
-struct hpux_sys_waitpid_args {
- syscallarg(pid_t) pid;
- syscallarg(int *) status;
- syscallarg(int) options;
- syscallarg(struct rusage *) rusage;
-};
-
-struct hpux_sys_sigaction_args {
- syscallarg(int) signo;
- syscallarg(struct hpux_sigaction *) nsa;
- syscallarg(struct hpux_sigaction *) osa;
-};
-
-struct hpux_sys_sigprocmask_args {
- syscallarg(int) how;
- syscallarg(hpux_sigset_t *) set;
- syscallarg(hpux_sigset_t *) oset;
-};
-
-struct hpux_sys_sigpending_args {
- syscallarg(hpux_sigset_t *) set;
-};
-
-struct hpux_sys_sigsuspend_args {
- syscallarg(hpux_sigset_t *) set;
-};
-
-struct hpux_sys_setsockopt_args {
- syscallarg(int) s;
- syscallarg(int) level;
- syscallarg(int) name;
- syscallarg(caddr_t) val;
- syscallarg(int) valsize;
-};
-
-struct hpux_sys_nshmctl_args {
- syscallarg(int) shmid;
- syscallarg(int) cmd;
- syscallarg(caddr_t) buf;
-};
-
-/*
- * System call prototypes.
- */
-
-int sys_nosys(struct proc *, void *, register_t *);
-int sys_exit(struct proc *, void *, register_t *);
-int hpux_sys_fork(struct proc *, void *, register_t *);
-int hpux_sys_read(struct proc *, void *, register_t *);
-int hpux_sys_write(struct proc *, void *, register_t *);
-int hpux_sys_open(struct proc *, void *, register_t *);
-int sys_close(struct proc *, void *, register_t *);
-int hpux_sys_wait(struct proc *, void *, register_t *);
-int hpux_sys_creat(struct proc *, void *, register_t *);
-int sys_link(struct proc *, void *, register_t *);
-int hpux_sys_unlink(struct proc *, void *, register_t *);
-int hpux_sys_execv(struct proc *, void *, register_t *);
-int hpux_sys_chdir(struct proc *, void *, register_t *);
-int hpux_sys_time_6x(struct proc *, void *, register_t *);
-int hpux_sys_mknod(struct proc *, void *, register_t *);
-int hpux_sys_chmod(struct proc *, void *, register_t *);
-int hpux_sys_chown(struct proc *, void *, register_t *);
-int sys_obreak(struct proc *, void *, register_t *);
-int hpux_sys_stat_6x(struct proc *, void *, register_t *);
-int compat_43_sys_lseek(struct proc *, void *, register_t *);
-int sys_getpid(struct proc *, void *, register_t *);
-int sys_setuid(struct proc *, void *, register_t *);
-int sys_getuid(struct proc *, void *, register_t *);
-int hpux_sys_stime_6x(struct proc *, void *, register_t *);
-#ifdef PTRACE
-int hpux_sys_ptrace(struct proc *, void *, register_t *);
-#else
-#endif
-int hpux_sys_alarm_6x(struct proc *, void *, register_t *);
-int hpux_sys_fstat_6x(struct proc *, void *, register_t *);
-int hpux_sys_pause_6x(struct proc *, void *, register_t *);
-int hpux_sys_utime_6x(struct proc *, void *, register_t *);
-int hpux_sys_stty_6x(struct proc *, void *, register_t *);
-int hpux_sys_gtty_6x(struct proc *, void *, register_t *);
-int hpux_sys_access(struct proc *, void *, register_t *);
-int hpux_sys_nice_6x(struct proc *, void *, register_t *);
-int hpux_sys_ftime_6x(struct proc *, void *, register_t *);
-int sys_sync(struct proc *, void *, register_t *);
-int hpux_sys_kill(struct proc *, void *, register_t *);
-int hpux_sys_stat(struct proc *, void *, register_t *);
-int hpux_sys_setpgrp_6x(struct proc *, void *, register_t *);
-int hpux_sys_lstat(struct proc *, void *, register_t *);
-int sys_dup(struct proc *, void *, register_t *);
-int sys_opipe(struct proc *, void *, register_t *);
-int hpux_sys_times_6x(struct proc *, void *, register_t *);
-int sys_profil(struct proc *, void *, register_t *);
-int sys_setgid(struct proc *, void *, register_t *);
-int sys_getgid(struct proc *, void *, register_t *);
-int hpux_sys_ssig_6x(struct proc *, void *, register_t *);
-int hpux_sys_ioctl(struct proc *, void *, register_t *);
-int hpux_sys_symlink(struct proc *, void *, register_t *);
-int hpux_sys_utssys(struct proc *, void *, register_t *);
-int hpux_sys_readlink(struct proc *, void *, register_t *);
-int hpux_sys_execve(struct proc *, void *, register_t *);
-int sys_umask(struct proc *, void *, register_t *);
-int sys_chroot(struct proc *, void *, register_t *);
-int hpux_sys_fcntl(struct proc *, void *, register_t *);
-int hpux_sys_ulimit(struct proc *, void *, register_t *);
-int hpux_sys_vfork(struct proc *, void *, register_t *);
-int hpux_sys_read(struct proc *, void *, register_t *);
-int hpux_sys_write(struct proc *, void *, register_t *);
-int hpux_sys_mmap(struct proc *, void *, register_t *);
-int sys_munmap(struct proc *, void *, register_t *);
-int sys_mprotect(struct proc *, void *, register_t *);
-int sys_getgroups(struct proc *, void *, register_t *);
-int sys_setgroups(struct proc *, void *, register_t *);
-int sys_getpgid(struct proc *, void *, register_t *);
-int hpux_sys_setpgrp2(struct proc *, void *, register_t *);
-int sys_setitimer(struct proc *, void *, register_t *);
-int hpux_sys_wait3(struct proc *, void *, register_t *);
-int sys_getitimer(struct proc *, void *, register_t *);
-int sys_dup2(struct proc *, void *, register_t *);
-int hpux_sys_fstat(struct proc *, void *, register_t *);
-int sys_select(struct proc *, void *, register_t *);
-int sys_fsync(struct proc *, void *, register_t *);
-int hpux_sys_sigreturn(struct proc *, void *, register_t *);
-int hpux_sys_sigvec(struct proc *, void *, register_t *);
-int hpux_sys_sigblock(struct proc *, void *, register_t *);
-int hpux_sys_sigsetmask(struct proc *, void *, register_t *);
-int hpux_sys_sigpause(struct proc *, void *, register_t *);
-int compat_43_sys_sigstack(struct proc *, void *, register_t *);
-int sys_gettimeofday(struct proc *, void *, register_t *);
-int hpux_sys_readv(struct proc *, void *, register_t *);
-int hpux_sys_writev(struct proc *, void *, register_t *);
-int sys_settimeofday(struct proc *, void *, register_t *);
-int sys_fchown(struct proc *, void *, register_t *);
-int sys_fchmod(struct proc *, void *, register_t *);
-int sys_setresuid(struct proc *, void *, register_t *);
-int sys_setresgid(struct proc *, void *, register_t *);
-int hpux_sys_rename(struct proc *, void *, register_t *);
-int hpux_sys_truncate(struct proc *, void *, register_t *);
-int compat_43_sys_ftruncate(struct proc *, void *, register_t *);
-int hpux_sys_sysconf(struct proc *, void *, register_t *);
-int hpux_sys_mkdir(struct proc *, void *, register_t *);
-int hpux_sys_rmdir(struct proc *, void *, register_t *);
-int hpux_sys_getrlimit(struct proc *, void *, register_t *);
-int hpux_sys_setrlimit(struct proc *, void *, register_t *);
-int hpux_sys_rtprio(struct proc *, void *, register_t *);
-int hpux_sys_netioctl(struct proc *, void *, register_t *);
-int hpux_sys_lockf(struct proc *, void *, register_t *);
-#ifdef SYSVSEM
-int sys_semget(struct proc *, void *, register_t *);
-int sys___semctl(struct proc *, void *, register_t *);
-int sys_semop(struct proc *, void *, register_t *);
-#else
-#endif
-#ifdef SYSVMSG
-int sys_msgget(struct proc *, void *, register_t *);
-int sys_msgctl(struct proc *, void *, register_t *);
-int sys_msgsnd(struct proc *, void *, register_t *);
-int sys_msgrcv(struct proc *, void *, register_t *);
-#else
-#endif
-#ifdef SYSVSHM
-int sys_shmget(struct proc *, void *, register_t *);
-int hpux_sys_shmctl(struct proc *, void *, register_t *);
-int sys_shmat(struct proc *, void *, register_t *);
-int sys_shmdt(struct proc *, void *, register_t *);
-#else
-#endif
-int hpux_sys_advise(struct proc *, void *, register_t *);
-int hpux_sys_getcontext(struct proc *, void *, register_t *);
-int hpux_sys_getaccess(struct proc *, void *, register_t *);
-int hpux_sys_waitpid(struct proc *, void *, register_t *);
-int sys_pathconf(struct proc *, void *, register_t *);
-int sys_fpathconf(struct proc *, void *, register_t *);
-int compat_43_sys_getdirentries(struct proc *, void *, register_t *);
-int compat_09_sys_getdomainname(struct proc *, void *, register_t *);
-int compat_09_sys_setdomainname(struct proc *, void *, register_t *);
-int hpux_sys_sigaction(struct proc *, void *, register_t *);
-int hpux_sys_sigprocmask(struct proc *, void *, register_t *);
-int hpux_sys_sigpending(struct proc *, void *, register_t *);
-int hpux_sys_sigsuspend(struct proc *, void *, register_t *);
-int compat_43_sys_getdtablesize(struct proc *, void *, register_t *);
-int sys_poll(struct proc *, void *, register_t *);
-int sys_fchdir(struct proc *, void *, register_t *);
-int compat_43_sys_accept(struct proc *, void *, register_t *);
-int sys_bind(struct proc *, void *, register_t *);
-int sys_connect(struct proc *, void *, register_t *);
-int compat_43_sys_getpeername(struct proc *, void *, register_t *);
-int compat_43_sys_getsockname(struct proc *, void *, register_t *);
-int sys_getsockopt(struct proc *, void *, register_t *);
-int sys_listen(struct proc *, void *, register_t *);
-int compat_43_sys_recv(struct proc *, void *, register_t *);
-int compat_43_sys_recvfrom(struct proc *, void *, register_t *);
-int compat_43_sys_recvmsg(struct proc *, void *, register_t *);
-int compat_43_sys_send(struct proc *, void *, register_t *);
-int compat_43_sys_sendmsg(struct proc *, void *, register_t *);
-int sys_sendto(struct proc *, void *, register_t *);
-int hpux_sys_setsockopt(struct proc *, void *, register_t *);
-int sys_shutdown(struct proc *, void *, register_t *);
-int sys_socket(struct proc *, void *, register_t *);
-int sys_socketpair(struct proc *, void *, register_t *);
-#ifdef SYSVSEM
-int sys___semctl(struct proc *, void *, register_t *);
-#else
-#endif
-#ifdef SYSVMSG
-int sys_msgctl(struct proc *, void *, register_t *);
-#else
-#endif
-#ifdef SYSVSHM
-int hpux_sys_nshmctl(struct proc *, void *, register_t *);
-#else
-#endif
diff --git a/sys/compat/hpux/m68k/hpux_syscalls.c b/sys/compat/hpux/m68k/hpux_syscalls.c
deleted file mode 100644
index 7d29bd510f4..00000000000
--- a/sys/compat/hpux/m68k/hpux_syscalls.c
+++ /dev/null
@@ -1,372 +0,0 @@
-/* $OpenBSD: hpux_syscalls.c,v 1.3 2010/01/28 19:59:35 miod Exp $ */
-
-/*
- * System call names.
- *
- * DO NOT EDIT-- this file is automatically generated.
- * created from OpenBSD: syscalls.master,v 1.2 2010/01/28 19:59:11 miod Exp
- */
-
-char *hpux_syscallnames[] = {
- "syscall", /* 0 = syscall */
- "exit", /* 1 = exit */
- "fork", /* 2 = fork */
- "read", /* 3 = read */
- "write", /* 4 = write */
- "open", /* 5 = open */
- "close", /* 6 = close */
- "wait", /* 7 = wait */
- "creat", /* 8 = creat */
- "link", /* 9 = link */
- "unlink", /* 10 = unlink */
- "execv", /* 11 = execv */
- "chdir", /* 12 = chdir */
- "time_6x", /* 13 = time_6x */
- "mknod", /* 14 = mknod */
- "chmod", /* 15 = chmod */
- "chown", /* 16 = chown */
- "obreak", /* 17 = obreak */
- "stat_6x", /* 18 = stat_6x */
- "lseek", /* 19 = lseek */
- "getpid", /* 20 = getpid */
- "#21 (unimplemented mount)", /* 21 = unimplemented mount */
- "#22 (unimplemented umount)", /* 22 = unimplemented umount */
- "setuid", /* 23 = setuid */
- "getuid", /* 24 = getuid */
- "stime_6x", /* 25 = stime_6x */
-#ifdef PTRACE
- "ptrace", /* 26 = ptrace */
-#else
- "#26 (unimplemented ptrace)", /* 26 = unimplemented ptrace */
-#endif
- "alarm_6x", /* 27 = alarm_6x */
- "fstat_6x", /* 28 = fstat_6x */
- "pause_6x", /* 29 = pause_6x */
- "utime_6x", /* 30 = utime_6x */
- "stty_6x", /* 31 = stty_6x */
- "gtty_6x", /* 32 = gtty_6x */
- "access", /* 33 = access */
- "nice_6x", /* 34 = nice_6x */
- "ftime_6x", /* 35 = ftime_6x */
- "sync", /* 36 = sync */
- "kill", /* 37 = kill */
- "stat", /* 38 = stat */
- "setpgrp_6x", /* 39 = setpgrp_6x */
- "lstat", /* 40 = lstat */
- "dup", /* 41 = dup */
- "opipe", /* 42 = opipe */
- "times_6x", /* 43 = times_6x */
- "profil", /* 44 = profil */
- "#45 (unimplemented ki_syscall)", /* 45 = unimplemented ki_syscall */
- "setgid", /* 46 = setgid */
- "getgid", /* 47 = getgid */
- "ssig_6x", /* 48 = ssig_6x */
- "#49 (unimplemented reserved for USG)", /* 49 = unimplemented reserved for USG */
- "#50 (unimplemented reserved for USG)", /* 50 = unimplemented reserved for USG */
- "#51 (unimplemented acct)", /* 51 = unimplemented acct */
- "#52 (unimplemented)", /* 52 = unimplemented */
- "#53 (unimplemented)", /* 53 = unimplemented */
- "ioctl", /* 54 = ioctl */
- "#55 (unimplemented reboot)", /* 55 = unimplemented reboot */
- "symlink", /* 56 = symlink */
- "utssys", /* 57 = utssys */
- "readlink", /* 58 = readlink */
- "execve", /* 59 = execve */
- "umask", /* 60 = umask */
- "chroot", /* 61 = chroot */
- "fcntl", /* 62 = fcntl */
- "ulimit", /* 63 = ulimit */
- "#64 (unimplemented)", /* 64 = unimplemented */
- "#65 (unimplemented)", /* 65 = unimplemented */
- "vfork", /* 66 = vfork */
- "vread", /* 67 = vread */
- "vwrite", /* 68 = vwrite */
- "#69 (unimplemented)", /* 69 = unimplemented */
- "#70 (unimplemented)", /* 70 = unimplemented */
- "mmap", /* 71 = mmap */
- "#72 (unimplemented)", /* 72 = unimplemented */
- "munmap", /* 73 = munmap */
- "mprotect", /* 74 = mprotect */
- "#75 (unimplemented)", /* 75 = unimplemented */
- "#76 (unimplemented)", /* 76 = unimplemented */
- "#77 (unimplemented)", /* 77 = unimplemented */
- "#78 (unimplemented)", /* 78 = unimplemented */
- "getgroups", /* 79 = getgroups */
- "setgroups", /* 80 = setgroups */
- "getpgid", /* 81 = getpgid */
- "setpgrp2", /* 82 = setpgrp2 */
- "setitimer", /* 83 = setitimer */
- "wait3", /* 84 = wait3 */
- "#85 (unimplemented swapon)", /* 85 = unimplemented swapon */
- "getitimer", /* 86 = getitimer */
- "#87 (unimplemented)", /* 87 = unimplemented */
- "#88 (unimplemented)", /* 88 = unimplemented */
- "#89 (unimplemented)", /* 89 = unimplemented */
- "dup2", /* 90 = dup2 */
- "#91 (unimplemented)", /* 91 = unimplemented */
- "fstat", /* 92 = fstat */
- "select", /* 93 = select */
- "#94 (unimplemented)", /* 94 = unimplemented */
- "fsync", /* 95 = fsync */
- "#96 (unimplemented)", /* 96 = unimplemented */
- "#97 (unimplemented)", /* 97 = unimplemented */
- "#98 (unimplemented)", /* 98 = unimplemented */
- "#99 (unimplemented)", /* 99 = unimplemented */
- "#100 (unimplemented)", /* 100 = unimplemented */
- "#101 (unimplemented)", /* 101 = unimplemented */
- "#102 (unimplemented)", /* 102 = unimplemented */
- "sigreturn", /* 103 = sigreturn */
- "#104 (unimplemented)", /* 104 = unimplemented */
- "#105 (unimplemented)", /* 105 = unimplemented */
- "#106 (unimplemented)", /* 106 = unimplemented */
- "#107 (unimplemented)", /* 107 = unimplemented */
- "sigvec", /* 108 = sigvec */
- "sigblock", /* 109 = sigblock */
- "sigsetmask", /* 110 = sigsetmask */
- "sigpause", /* 111 = sigpause */
- "sigstack", /* 112 = sigstack */
- "#113 (unimplemented)", /* 113 = unimplemented */
- "#114 (unimplemented)", /* 114 = unimplemented */
- "#115 (unimplemented)", /* 115 = unimplemented */
- "gettimeofday", /* 116 = gettimeofday */
- "#117 (unimplemented)", /* 117 = unimplemented */
- "#118 (unimplemented)", /* 118 = unimplemented */
- "#119 (unimplemented io_stub)", /* 119 = unimplemented io_stub */
- "readv", /* 120 = readv */
- "writev", /* 121 = writev */
- "settimeofday", /* 122 = settimeofday */
- "fchown", /* 123 = fchown */
- "fchmod", /* 124 = fchmod */
- "#125 (unimplemented)", /* 125 = unimplemented */
- "setresuid", /* 126 = setresuid */
- "setresgid", /* 127 = setresgid */
- "rename", /* 128 = rename */
- "truncate", /* 129 = truncate */
- "ftruncate", /* 130 = ftruncate */
- "#131 (unimplemented)", /* 131 = unimplemented */
- "sysconf", /* 132 = sysconf */
- "#133 (unimplemented)", /* 133 = unimplemented */
- "#134 (unimplemented)", /* 134 = unimplemented */
- "#135 (unimplemented)", /* 135 = unimplemented */
- "mkdir", /* 136 = mkdir */
- "rmdir", /* 137 = rmdir */
- "#138 (unimplemented)", /* 138 = unimplemented */
- "#139 (unimplemented)", /* 139 = unimplemented */
- "#140 (unimplemented)", /* 140 = unimplemented */
- "#141 (unimplemented)", /* 141 = unimplemented */
- "#142 (unimplemented)", /* 142 = unimplemented */
- "#143 (unimplemented)", /* 143 = unimplemented */
- "getrlimit", /* 144 = getrlimit */
- "setrlimit", /* 145 = setrlimit */
- "#146 (unimplemented)", /* 146 = unimplemented */
- "#147 (unimplemented)", /* 147 = unimplemented */
- "#148 (unimplemented)", /* 148 = unimplemented */
- "#149 (unimplemented)", /* 149 = unimplemented */
- "#150 (unimplemented)", /* 150 = unimplemented */
- "#151 (unimplemented privgrp)", /* 151 = unimplemented privgrp */
- "rtprio", /* 152 = rtprio */
- "#153 (unimplemented plock)", /* 153 = unimplemented plock */
- "netioctl", /* 154 = netioctl */
- "lockf", /* 155 = lockf */
-#ifdef SYSVSEM
- "semget", /* 156 = semget */
- "__semctl", /* 157 = __semctl */
- "semop", /* 158 = semop */
-#else
- "#156 (unimplemented semget)", /* 156 = unimplemented semget */
- "#157 (unimplemented semctl)", /* 157 = unimplemented semctl */
- "#158 (unimplemented semop)", /* 158 = unimplemented semop */
-#endif
-#ifdef SYSVMSG
- "msgget", /* 159 = msgget */
- "msgctl", /* 160 = msgctl */
- "msgsnd", /* 161 = msgsnd */
- "msgrcv", /* 162 = msgrcv */
-#else
- "#159 (unimplemented msgget)", /* 159 = unimplemented msgget */
- "#160 (unimplemented msgctl)", /* 160 = unimplemented msgctl */
- "#161 (unimplemented msgsnd)", /* 161 = unimplemented msgsnd */
- "#162 (unimplemented msgrcv)", /* 162 = unimplemented msgrcv */
-#endif
-#ifdef SYSVSHM
- "shmget", /* 163 = shmget */
- "shmctl", /* 164 = shmctl */
- "shmat", /* 165 = shmat */
- "shmdt", /* 166 = shmdt */
-#else
- "#163 (unimplemented shmget)", /* 163 = unimplemented shmget */
- "#164 (unimplemented shmctl)", /* 164 = unimplemented shmctl */
- "#165 (unimplemented shmat)", /* 165 = unimplemented shmat */
- "#166 (unimplemented shmdt)", /* 166 = unimplemented shmdt */
-#endif
- "advise", /* 167 = advise */
- "#168 (unimplemented nsp_init)", /* 168 = unimplemented nsp_init */
- "#169 (unimplemented cluster)", /* 169 = unimplemented cluster */
- "#170 (unimplemented mkrnod)", /* 170 = unimplemented mkrnod */
- "#171 (unimplemented)", /* 171 = unimplemented */
- "#172 (unimplemented unsp_open)", /* 172 = unimplemented unsp_open */
- "#173 (unimplemented)", /* 173 = unimplemented */
- "getcontext", /* 174 = getcontext */
- "#175 (unimplemented setcontext)", /* 175 = unimplemented setcontext */
- "#176 (unimplemented bigio)", /* 176 = unimplemented bigio */
- "#177 (unimplemented pipenode)", /* 177 = unimplemented pipenode */
- "#178 (unimplemented lsync)", /* 178 = unimplemented lsync */
- "#179 (unimplemented getmachineid)", /* 179 = unimplemented getmachineid */
- "#180 (unimplemented mysite)", /* 180 = unimplemented mysite */
- "#181 (unimplemented sitels)", /* 181 = unimplemented sitels */
- "#182 (unimplemented swapclients)", /* 182 = unimplemented swapclients */
- "#183 (unimplemented rmtprocess)", /* 183 = unimplemented rmtprocess */
- "#184 (unimplemented dskless_stats)", /* 184 = unimplemented dskless_stats */
- "#185 (unimplemented)", /* 185 = unimplemented */
- "#186 (unimplemented setacl)", /* 186 = unimplemented setacl */
- "#187 (unimplemented fsetacl)", /* 187 = unimplemented fsetacl */
- "#188 (unimplemented getacl)", /* 188 = unimplemented getacl */
- "#189 (unimplemented fgetacl)", /* 189 = unimplemented fgetacl */
- "getaccess", /* 190 = getaccess */
- "#191 (unimplemented getaudid)", /* 191 = unimplemented getaudid */
- "#192 (unimplemented setaudid)", /* 192 = unimplemented setaudid */
- "#193 (unimplemented getaudproc)", /* 193 = unimplemented getaudproc */
- "#194 (unimplemented setaudproc)", /* 194 = unimplemented setaudproc */
- "#195 (unimplemented getevent)", /* 195 = unimplemented getevent */
- "#196 (unimplemented setevent)", /* 196 = unimplemented setevent */
- "#197 (unimplemented audwrite)", /* 197 = unimplemented audwrite */
- "#198 (unimplemented audswitch)", /* 198 = unimplemented audswitch */
- "#199 (unimplemented audctl)", /* 199 = unimplemented audctl */
- "waitpid", /* 200 = waitpid */
- "#201 (unimplemented)", /* 201 = unimplemented */
- "#202 (unimplemented)", /* 202 = unimplemented */
- "#203 (unimplemented)", /* 203 = unimplemented */
- "#204 (unimplemented)", /* 204 = unimplemented */
- "#205 (unimplemented)", /* 205 = unimplemented */
- "#206 (unimplemented)", /* 206 = unimplemented */
- "#207 (unimplemented)", /* 207 = unimplemented */
- "#208 (unimplemented)", /* 208 = unimplemented */
- "#209 (unimplemented)", /* 209 = unimplemented */
- "#210 (unimplemented)", /* 210 = unimplemented */
- "#211 (unimplemented)", /* 211 = unimplemented */
- "#212 (unimplemented)", /* 212 = unimplemented */
- "#213 (unimplemented)", /* 213 = unimplemented */
- "#214 (unimplemented)", /* 214 = unimplemented */
- "#215 (unimplemented)", /* 215 = unimplemented */
- "#216 (unimplemented)", /* 216 = unimplemented */
- "#217 (unimplemented)", /* 217 = unimplemented */
- "#218 (unimplemented)", /* 218 = unimplemented */
- "#219 (unimplemented)", /* 219 = unimplemented */
- "#220 (unimplemented)", /* 220 = unimplemented */
- "#221 (unimplemented)", /* 221 = unimplemented */
- "#222 (unimplemented)", /* 222 = unimplemented */
- "#223 (unimplemented)", /* 223 = unimplemented */
- "#224 (unimplemented set_no_trunc)", /* 224 = unimplemented set_no_trunc */
- "pathconf", /* 225 = pathconf */
- "fpathconf", /* 226 = fpathconf */
- "#227 (unimplemented)", /* 227 = unimplemented */
- "#228 (unimplemented)", /* 228 = unimplemented */
- "#229 (unimplemented async_daemon)", /* 229 = unimplemented async_daemon */
- "#230 (unimplemented nfs_fcntl)", /* 230 = unimplemented nfs_fcntl */
- "getdirentries", /* 231 = getdirentries */
- "getdomainname", /* 232 = getdomainname */
- "#233 (unimplemented nfs_getfh)", /* 233 = unimplemented nfs_getfh */
- "#234 (unimplemented vfsmount)", /* 234 = unimplemented vfsmount */
- "#235 (unimplemented nfs_svc)", /* 235 = unimplemented nfs_svc */
- "setdomainname", /* 236 = setdomainname */
- "#237 (unimplemented statfs)", /* 237 = unimplemented statfs */
- "#238 (unimplemented fstatfs)", /* 238 = unimplemented fstatfs */
- "sigaction", /* 239 = sigaction */
- "sigprocmask", /* 240 = sigprocmask */
- "sigpending", /* 241 = sigpending */
- "sigsuspend", /* 242 = sigsuspend */
- "#243 (unimplemented fsctl)", /* 243 = unimplemented fsctl */
- "#244 (unimplemented)", /* 244 = unimplemented */
- "#245 (unimplemented pstat)", /* 245 = unimplemented pstat */
- "#246 (unimplemented)", /* 246 = unimplemented */
- "#247 (unimplemented)", /* 247 = unimplemented */
- "#248 (unimplemented)", /* 248 = unimplemented */
- "#249 (unimplemented)", /* 249 = unimplemented */
- "#250 (unimplemented)", /* 250 = unimplemented */
- "#251 (unimplemented ulconnect)", /* 251 = unimplemented ulconnect */
- "#252 (unimplemented ulcontrol)", /* 252 = unimplemented ulcontrol */
- "#253 (unimplemented ulcreate)", /* 253 = unimplemented ulcreate */
- "#254 (unimplemented uldest)", /* 254 = unimplemented uldest */
- "#255 (unimplemented ulrecv)", /* 255 = unimplemented ulrecv */
- "#256 (unimplemented ulrecvcn)", /* 256 = unimplemented ulrecvcn */
- "#257 (unimplemented ulsend)", /* 257 = unimplemented ulsend */
- "#258 (unimplemented ulshutdown)", /* 258 = unimplemented ulshutdown */
- "#259 (unimplemented swapfs)", /* 259 = unimplemented swapfs */
- "#260 (unimplemented)", /* 260 = unimplemented */
- "#261 (unimplemented)", /* 261 = unimplemented */
- "#262 (unimplemented)", /* 262 = unimplemented */
- "#263 (unimplemented)", /* 263 = unimplemented */
- "#264 (unimplemented)", /* 264 = unimplemented */
- "#265 (unimplemented)", /* 265 = unimplemented */
- "#266 (unimplemented)", /* 266 = unimplemented */
- "#267 (unimplemented tsync)", /* 267 = unimplemented tsync */
- "getdtablesize", /* 268 = getdtablesize */
- "poll", /* 269 = poll */
- "#270 (unimplemented getmsg)", /* 270 = unimplemented getmsg */
- "#271 (unimplemented putmsg)", /* 271 = unimplemented putmsg */
- "fchdir", /* 272 = fchdir */
- "#273 (unimplemented getmount_cnt)", /* 273 = unimplemented getmount_cnt */
- "#274 (unimplemented getmount_entry)", /* 274 = unimplemented getmount_entry */
- "accept", /* 275 = accept */
- "bind", /* 276 = bind */
- "connect", /* 277 = connect */
- "getpeername", /* 278 = getpeername */
- "getsockname", /* 279 = getsockname */
- "getsockopt", /* 280 = getsockopt */
- "listen", /* 281 = listen */
- "recv", /* 282 = recv */
- "recvfrom", /* 283 = recvfrom */
- "recvmsg", /* 284 = recvmsg */
- "send", /* 285 = send */
- "sendmsg", /* 286 = sendmsg */
- "sendto", /* 287 = sendto */
- "setsockopt", /* 288 = setsockopt */
- "shutdown", /* 289 = shutdown */
- "socket", /* 290 = socket */
- "socketpair", /* 291 = socketpair */
- "#292 (unimplemented)", /* 292 = unimplemented */
- "#293 (unimplemented)", /* 293 = unimplemented */
- "#294 (unimplemented)", /* 294 = unimplemented */
- "#295 (unimplemented)", /* 295 = unimplemented */
- "#296 (unimplemented)", /* 296 = unimplemented */
- "#297 (unimplemented)", /* 297 = unimplemented */
- "#298 (unimplemented ipccreate)", /* 298 = unimplemented ipccreate */
- "#299 (unimplemented ipcname)", /* 299 = unimplemented ipcname */
- "#300 (unimplemented ipcnamerase)", /* 300 = unimplemented ipcnamerase */
- "#301 (unimplemented ipclookup)", /* 301 = unimplemented ipclookup */
- "#302 (unimplemented ipcselect)", /* 302 = unimplemented ipcselect */
- "#303 (unimplemented ipcconnect)", /* 303 = unimplemented ipcconnect */
- "#304 (unimplemented ipcrecvcn)", /* 304 = unimplemented ipcrecvcn */
- "#305 (unimplemented ipcsend)", /* 305 = unimplemented ipcsend */
- "#306 (unimplemented ipcrecv)", /* 306 = unimplemented ipcrecv */
- "#307 (unimplemented ipcgetnodename)", /* 307 = unimplemented ipcgetnodename */
- "#308 (unimplemented ipcsetnodename)", /* 308 = unimplemented ipcsetnodename */
- "#309 (unimplemented ipcontrol)", /* 309 = unimplemented ipcontrol */
- "#310 (unimplemented ipcshutdown)", /* 310 = unimplemented ipcshutdown */
- "#311 (unimplemented ipcdest)", /* 311 = unimplemented ipcdest */
-#ifdef SYSVSEM
- "nsemctl", /* 312 = nsemctl */
-#else
- "#312 (unimplemented semctl)", /* 312 = unimplemented semctl */
-#endif
-#ifdef SYSVMSG
- "nmsgctl", /* 313 = nmsgctl */
-#else
- "#313 (unimplemented msgctl)", /* 313 = unimplemented msgctl */
-#endif
-#ifdef SYSVSHM
- "nshmctl", /* 314 = nshmctl */
-#else
- "#314 (unimplemented shmctl)", /* 314 = unimplemented shmctl */
-#endif
- "#315 (unimplemented mpctl)", /* 315 = unimplemented mpctl */
- "#316 (unimplemented exportfs)", /* 316 = unimplemented exportfs */
- "#317 (unimplemented getpmsg)", /* 317 = unimplemented getpmsg */
- "#318 (unimplemented putpmsg)", /* 318 = unimplemented putpmsg */
- "#319 (unimplemented strioctl)", /* 319 = unimplemented strioctl */
- "#320 (unimplemented msync)", /* 320 = unimplemented msync */
- "#321 (unimplemented msleep)", /* 321 = unimplemented msleep */
- "#322 (unimplemented mwakeup)", /* 322 = unimplemented mwakeup */
- "#323 (unimplemented msem_init)", /* 323 = unimplemented msem_init */
- "#324 (unimplemented msem_remove)", /* 324 = unimplemented msem_remove */
-};
diff --git a/sys/compat/hpux/m68k/hpux_sysent.c b/sys/compat/hpux/m68k/hpux_sysent.c
deleted file mode 100644
index 54fd3c01891..00000000000
--- a/sys/compat/hpux/m68k/hpux_sysent.c
+++ /dev/null
@@ -1,725 +0,0 @@
-/* $OpenBSD: hpux_sysent.c,v 1.3 2010/01/28 19:59:35 miod Exp $ */
-
-/*
- * System call switch table.
- *
- * DO NOT EDIT-- this file is automatically generated.
- * created from OpenBSD: syscalls.master,v 1.2 2010/01/28 19:59:11 miod Exp
- */
-
-#include <sys/param.h>
-#include <sys/systm.h>
-#include <sys/signal.h>
-#include <sys/mount.h>
-#include <sys/exec.h>
-#include <sys/syscallargs.h>
-#include <compat/hpux/hpux.h>
-#include <compat/hpux/m68k/hpux_syscallargs.h>
-#include <machine/hpux_machdep.h>
-
-#define s(type) sizeof(type)
-
-struct sysent hpux_sysent[] = {
- { 0, 0, 0,
- sys_nosys }, /* 0 = syscall */
- { 1, s(struct sys_exit_args), 0,
- sys_exit }, /* 1 = exit */
- { 0, 0, 0,
- hpux_sys_fork }, /* 2 = fork */
- { 3, s(struct hpux_sys_read_args), 0,
- hpux_sys_read }, /* 3 = read */
- { 3, s(struct hpux_sys_write_args), 0,
- hpux_sys_write }, /* 4 = write */
- { 3, s(struct hpux_sys_open_args), 0,
- hpux_sys_open }, /* 5 = open */
- { 1, s(struct sys_close_args), 0,
- sys_close }, /* 6 = close */
- { 1, s(struct hpux_sys_wait_args), 0,
- hpux_sys_wait }, /* 7 = wait */
- { 2, s(struct hpux_sys_creat_args), 0,
- hpux_sys_creat }, /* 8 = creat */
- { 2, s(struct sys_link_args), 0,
- sys_link }, /* 9 = link */
- { 1, s(struct hpux_sys_unlink_args), 0,
- hpux_sys_unlink }, /* 10 = unlink */
- { 2, s(struct hpux_sys_execv_args), 0,
- hpux_sys_execv }, /* 11 = execv */
- { 1, s(struct hpux_sys_chdir_args), 0,
- hpux_sys_chdir }, /* 12 = chdir */
- { 1, s(struct hpux_sys_time_6x_args), 0,
- hpux_sys_time_6x }, /* 13 = time_6x */
- { 3, s(struct hpux_sys_mknod_args), 0,
- hpux_sys_mknod }, /* 14 = mknod */
- { 2, s(struct hpux_sys_chmod_args), 0,
- hpux_sys_chmod }, /* 15 = chmod */
- { 3, s(struct hpux_sys_chown_args), 0,
- hpux_sys_chown }, /* 16 = chown */
- { 1, s(struct sys_obreak_args), 0,
- sys_obreak }, /* 17 = obreak */
- { 2, s(struct hpux_sys_stat_6x_args), 0,
- hpux_sys_stat_6x }, /* 18 = stat_6x */
- { 3, s(struct compat_43_sys_lseek_args), 0,
- compat_43_sys_lseek }, /* 19 = lseek */
- { 0, 0, 0,
- sys_getpid }, /* 20 = getpid */
- { 0, 0, 0,
- sys_nosys }, /* 21 = unimplemented mount */
- { 0, 0, 0,
- sys_nosys }, /* 22 = unimplemented umount */
- { 1, s(struct sys_setuid_args), 0,
- sys_setuid }, /* 23 = setuid */
- { 0, 0, 0,
- sys_getuid }, /* 24 = getuid */
- { 1, s(struct hpux_sys_stime_6x_args), 0,
- hpux_sys_stime_6x }, /* 25 = stime_6x */
-#ifdef PTRACE
- { 4, s(struct hpux_sys_ptrace_args), 0,
- hpux_sys_ptrace }, /* 26 = ptrace */
-#else
- { 0, 0, 0,
- sys_nosys }, /* 26 = unimplemented ptrace */
-#endif
- { 1, s(struct hpux_sys_alarm_6x_args), 0,
- hpux_sys_alarm_6x }, /* 27 = alarm_6x */
- { 2, s(struct hpux_sys_fstat_6x_args), 0,
- hpux_sys_fstat_6x }, /* 28 = fstat_6x */
- { 0, 0, 0,
- hpux_sys_pause_6x }, /* 29 = pause_6x */
- { 2, s(struct hpux_sys_utime_6x_args), 0,
- hpux_sys_utime_6x }, /* 30 = utime_6x */
- { 2, s(struct hpux_sys_stty_6x_args), 0,
- hpux_sys_stty_6x }, /* 31 = stty_6x */
- { 2, s(struct hpux_sys_gtty_6x_args), 0,
- hpux_sys_gtty_6x }, /* 32 = gtty_6x */
- { 2, s(struct hpux_sys_access_args), 0,
- hpux_sys_access }, /* 33 = access */
- { 1, s(struct hpux_sys_nice_6x_args), 0,
- hpux_sys_nice_6x }, /* 34 = nice_6x */
- { 1, s(struct hpux_sys_ftime_6x_args), 0,
- hpux_sys_ftime_6x }, /* 35 = ftime_6x */
- { 0, 0, 0,
- sys_sync }, /* 36 = sync */
- { 2, s(struct hpux_sys_kill_args), 0,
- hpux_sys_kill }, /* 37 = kill */
- { 2, s(struct hpux_sys_stat_args), 0,
- hpux_sys_stat }, /* 38 = stat */
- { 0, 0, 0,
- hpux_sys_setpgrp_6x }, /* 39 = setpgrp_6x */
- { 2, s(struct hpux_sys_lstat_args), 0,
- hpux_sys_lstat }, /* 40 = lstat */
- { 1, s(struct sys_dup_args), 0,
- sys_dup }, /* 41 = dup */
- { 0, 0, 0,
- sys_opipe }, /* 42 = opipe */
- { 1, s(struct hpux_sys_times_6x_args), 0,
- hpux_sys_times_6x }, /* 43 = times_6x */
- { 4, s(struct sys_profil_args), 0,
- sys_profil }, /* 44 = profil */
- { 0, 0, 0,
- sys_nosys }, /* 45 = unimplemented ki_syscall */
- { 1, s(struct sys_setgid_args), 0,
- sys_setgid }, /* 46 = setgid */
- { 0, 0, 0,
- sys_getgid }, /* 47 = getgid */
- { 2, s(struct hpux_sys_ssig_6x_args), 0,
- hpux_sys_ssig_6x }, /* 48 = ssig_6x */
- { 0, 0, 0,
- sys_nosys }, /* 49 = unimplemented reserved for USG */
- { 0, 0, 0,
- sys_nosys }, /* 50 = unimplemented reserved for USG */
- { 0, 0, 0,
- sys_nosys }, /* 51 = unimplemented acct */
- { 0, 0, 0,
- sys_nosys }, /* 52 = unimplemented */
- { 0, 0, 0,
- sys_nosys }, /* 53 = unimplemented */
- { 3, s(struct hpux_sys_ioctl_args), 0,
- hpux_sys_ioctl }, /* 54 = ioctl */
- { 0, 0, 0,
- sys_nosys }, /* 55 = unimplemented reboot */
- { 2, s(struct hpux_sys_symlink_args), 0,
- hpux_sys_symlink }, /* 56 = symlink */
- { 3, s(struct hpux_sys_utssys_args), 0,
- hpux_sys_utssys }, /* 57 = utssys */
- { 3, s(struct hpux_sys_readlink_args), 0,
- hpux_sys_readlink }, /* 58 = readlink */
- { 3, s(struct hpux_sys_execve_args), 0,
- hpux_sys_execve }, /* 59 = execve */
- { 1, s(struct sys_umask_args), 0,
- sys_umask }, /* 60 = umask */
- { 1, s(struct sys_chroot_args), 0,
- sys_chroot }, /* 61 = chroot */
- { 3, s(struct hpux_sys_fcntl_args), 0,
- hpux_sys_fcntl }, /* 62 = fcntl */
- { 2, s(struct hpux_sys_ulimit_args), 0,
- hpux_sys_ulimit }, /* 63 = ulimit */
- { 0, 0, 0,
- sys_nosys }, /* 64 = unimplemented */
- { 0, 0, 0,
- sys_nosys }, /* 65 = unimplemented */
- { 0, 0, 0,
- hpux_sys_vfork }, /* 66 = vfork */
- { 3, s(struct hpux_sys_read_args), 0,
- hpux_sys_read }, /* 67 = vread */
- { 3, s(struct hpux_sys_write_args), 0,
- hpux_sys_write }, /* 68 = vwrite */
- { 0, 0, 0,
- sys_nosys }, /* 69 = unimplemented */
- { 0, 0, 0,
- sys_nosys }, /* 70 = unimplemented */
- { 6, s(struct hpux_sys_mmap_args), 0,
- hpux_sys_mmap }, /* 71 = mmap */
- { 0, 0, 0,
- sys_nosys }, /* 72 = unimplemented */
- { 2, s(struct sys_munmap_args), 0,
- sys_munmap }, /* 73 = munmap */
- { 3, s(struct sys_mprotect_args), 0,
- sys_mprotect }, /* 74 = mprotect */
- { 0, 0, 0,
- sys_nosys }, /* 75 = unimplemented */
- { 0, 0, 0,
- sys_nosys }, /* 76 = unimplemented */
- { 0, 0, 0,
- sys_nosys }, /* 77 = unimplemented */
- { 0, 0, 0,
- sys_nosys }, /* 78 = unimplemented */
- { 2, s(struct sys_getgroups_args), 0,
- sys_getgroups }, /* 79 = getgroups */
- { 2, s(struct sys_setgroups_args), 0,
- sys_setgroups }, /* 80 = setgroups */
- { 1, s(struct sys_getpgid_args), 0,
- sys_getpgid }, /* 81 = getpgid */
- { 2, s(struct hpux_sys_setpgrp2_args), 0,
- hpux_sys_setpgrp2 }, /* 82 = setpgrp2 */
- { 3, s(struct sys_setitimer_args), 0,
- sys_setitimer }, /* 83 = setitimer */
- { 3, s(struct hpux_sys_wait3_args), 0,
- hpux_sys_wait3 }, /* 84 = wait3 */
- { 0, 0, 0,
- sys_nosys }, /* 85 = unimplemented swapon */
- { 2, s(struct sys_getitimer_args), 0,
- sys_getitimer }, /* 86 = getitimer */
- { 0, 0, 0,
- sys_nosys }, /* 87 = unimplemented */
- { 0, 0, 0,
- sys_nosys }, /* 88 = unimplemented */
- { 0, 0, 0,
- sys_nosys }, /* 89 = unimplemented */
- { 2, s(struct sys_dup2_args), 0,
- sys_dup2 }, /* 90 = dup2 */
- { 0, 0, 0,
- sys_nosys }, /* 91 = unimplemented */
- { 2, s(struct hpux_sys_fstat_args), 0,
- hpux_sys_fstat }, /* 92 = fstat */
- { 5, s(struct sys_select_args), 0,
- sys_select }, /* 93 = select */
- { 0, 0, 0,
- sys_nosys }, /* 94 = unimplemented */
- { 1, s(struct sys_fsync_args), 0,
- sys_fsync }, /* 95 = fsync */
- { 0, 0, 0,
- sys_nosys }, /* 96 = unimplemented */
- { 0, 0, 0,
- sys_nosys }, /* 97 = unimplemented */
- { 0, 0, 0,
- sys_nosys }, /* 98 = unimplemented */
- { 0, 0, 0,
- sys_nosys }, /* 99 = unimplemented */
- { 0, 0, 0,
- sys_nosys }, /* 100 = unimplemented */
- { 0, 0, 0,
- sys_nosys }, /* 101 = unimplemented */
- { 0, 0, 0,
- sys_nosys }, /* 102 = unimplemented */
- { 1, s(struct hpux_sys_sigreturn_args), 0,
- hpux_sys_sigreturn }, /* 103 = sigreturn */
- { 0, 0, 0,
- sys_nosys }, /* 104 = unimplemented */
- { 0, 0, 0,
- sys_nosys }, /* 105 = unimplemented */
- { 0, 0, 0,
- sys_nosys }, /* 106 = unimplemented */
- { 0, 0, 0,
- sys_nosys }, /* 107 = unimplemented */
- { 3, s(struct hpux_sys_sigvec_args), 0,
- hpux_sys_sigvec }, /* 108 = sigvec */
- { 1, s(struct hpux_sys_sigblock_args), 0,
- hpux_sys_sigblock }, /* 109 = sigblock */
- { 1, s(struct hpux_sys_sigsetmask_args), 0,
- hpux_sys_sigsetmask }, /* 110 = sigsetmask */
- { 1, s(struct hpux_sys_sigpause_args), 0,
- hpux_sys_sigpause }, /* 111 = sigpause */
- { 2, s(struct compat_43_sys_sigstack_args), 0,
- compat_43_sys_sigstack }, /* 112 = sigstack */
- { 0, 0, 0,
- sys_nosys }, /* 113 = unimplemented */
- { 0, 0, 0,
- sys_nosys }, /* 114 = unimplemented */
- { 0, 0, 0,
- sys_nosys }, /* 115 = unimplemented */
- { 1, s(struct sys_gettimeofday_args), 0,
- sys_gettimeofday }, /* 116 = gettimeofday */
- { 0, 0, 0,
- sys_nosys }, /* 117 = unimplemented */
- { 0, 0, 0,
- sys_nosys }, /* 118 = unimplemented */
- { 0, 0, 0,
- sys_nosys }, /* 119 = unimplemented io_stub */
- { 3, s(struct hpux_sys_readv_args), 0,
- hpux_sys_readv }, /* 120 = readv */
- { 3, s(struct hpux_sys_writev_args), 0,
- hpux_sys_writev }, /* 121 = writev */
- { 2, s(struct sys_settimeofday_args), 0,
- sys_settimeofday }, /* 122 = settimeofday */
- { 3, s(struct sys_fchown_args), 0,
- sys_fchown }, /* 123 = fchown */
- { 2, s(struct sys_fchmod_args), 0,
- sys_fchmod }, /* 124 = fchmod */
- { 0, 0, 0,
- sys_nosys }, /* 125 = unimplemented */
- { 3, s(struct sys_setresuid_args), 0,
- sys_setresuid }, /* 126 = setresuid */
- { 3, s(struct sys_setresgid_args), 0,
- sys_setresgid }, /* 127 = setresgid */
- { 2, s(struct hpux_sys_rename_args), 0,
- hpux_sys_rename }, /* 128 = rename */
- { 2, s(struct hpux_sys_truncate_args), 0,
- hpux_sys_truncate }, /* 129 = truncate */
- { 2, s(struct compat_43_sys_ftruncate_args), 0,
- compat_43_sys_ftruncate }, /* 130 = ftruncate */
- { 0, 0, 0,
- sys_nosys }, /* 131 = unimplemented */
- { 1, s(struct hpux_sys_sysconf_args), 0,
- hpux_sys_sysconf }, /* 132 = sysconf */
- { 0, 0, 0,
- sys_nosys }, /* 133 = unimplemented */
- { 0, 0, 0,
- sys_nosys }, /* 134 = unimplemented */
- { 0, 0, 0,
- sys_nosys }, /* 135 = unimplemented */
- { 2, s(struct hpux_sys_mkdir_args), 0,
- hpux_sys_mkdir }, /* 136 = mkdir */
- { 1, s(struct hpux_sys_rmdir_args), 0,
- hpux_sys_rmdir }, /* 137 = rmdir */
- { 0, 0, 0,
- sys_nosys }, /* 138 = unimplemented */
- { 0, 0, 0,
- sys_nosys }, /* 139 = unimplemented */
- { 0, 0, 0,
- sys_nosys }, /* 140 = unimplemented */
- { 0, 0, 0,
- sys_nosys }, /* 141 = unimplemented */
- { 0, 0, 0,
- sys_nosys }, /* 142 = unimplemented */
- { 0, 0, 0,
- sys_nosys }, /* 143 = unimplemented */
- { 2, s(struct hpux_sys_getrlimit_args), 0,
- hpux_sys_getrlimit }, /* 144 = getrlimit */
- { 2, s(struct hpux_sys_setrlimit_args), 0,
- hpux_sys_setrlimit }, /* 145 = setrlimit */
- { 0, 0, 0,
- sys_nosys }, /* 146 = unimplemented */
- { 0, 0, 0,
- sys_nosys }, /* 147 = unimplemented */
- { 0, 0, 0,
- sys_nosys }, /* 148 = unimplemented */
- { 0, 0, 0,
- sys_nosys }, /* 149 = unimplemented */
- { 0, 0, 0,
- sys_nosys }, /* 150 = unimplemented */
- { 0, 0, 0,
- sys_nosys }, /* 151 = unimplemented privgrp */
- { 2, s(struct hpux_sys_rtprio_args), 0,
- hpux_sys_rtprio }, /* 152 = rtprio */
- { 0, 0, 0,
- sys_nosys }, /* 153 = unimplemented plock */
- { 2, s(struct hpux_sys_netioctl_args), 0,
- hpux_sys_netioctl }, /* 154 = netioctl */
- { 3, s(struct hpux_sys_lockf_args), 0,
- hpux_sys_lockf }, /* 155 = lockf */
-#ifdef SYSVSEM
- { 3, s(struct sys_semget_args), 0,
- sys_semget }, /* 156 = semget */
- { 4, s(struct sys___semctl_args), 0,
- sys___semctl }, /* 157 = __semctl */
- { 3, s(struct sys_semop_args), 0,
- sys_semop }, /* 158 = semop */
-#else
- { 0, 0, 0,
- sys_nosys }, /* 156 = unimplemented semget */
- { 0, 0, 0,
- sys_nosys }, /* 157 = unimplemented semctl */
- { 0, 0, 0,
- sys_nosys }, /* 158 = unimplemented semop */
-#endif
-#ifdef SYSVMSG
- { 2, s(struct sys_msgget_args), 0,
- sys_msgget }, /* 159 = msgget */
- { 3, s(struct sys_msgctl_args), 0,
- sys_msgctl }, /* 160 = msgctl */
- { 4, s(struct sys_msgsnd_args), 0,
- sys_msgsnd }, /* 161 = msgsnd */
- { 5, s(struct sys_msgrcv_args), 0,
- sys_msgrcv }, /* 162 = msgrcv */
-#else
- { 0, 0, 0,
- sys_nosys }, /* 159 = unimplemented msgget */
- { 0, 0, 0,
- sys_nosys }, /* 160 = unimplemented msgctl */
- { 0, 0, 0,
- sys_nosys }, /* 161 = unimplemented msgsnd */
- { 0, 0, 0,
- sys_nosys }, /* 162 = unimplemented msgrcv */
-#endif
-#ifdef SYSVSHM
- { 3, s(struct sys_shmget_args), 0,
- sys_shmget }, /* 163 = shmget */
- { 3, s(struct hpux_sys_shmctl_args), 0,
- hpux_sys_shmctl }, /* 164 = shmctl */
- { 3, s(struct sys_shmat_args), 0,
- sys_shmat }, /* 165 = shmat */
- { 1, s(struct sys_shmdt_args), 0,
- sys_shmdt }, /* 166 = shmdt */
-#else
- { 0, 0, 0,
- sys_nosys }, /* 163 = unimplemented shmget */
- { 0, 0, 0,
- sys_nosys }, /* 164 = unimplemented shmctl */
- { 0, 0, 0,
- sys_nosys }, /* 165 = unimplemented shmat */
- { 0, 0, 0,
- sys_nosys }, /* 166 = unimplemented shmdt */
-#endif
- { 1, s(struct hpux_sys_advise_args), 0,
- hpux_sys_advise }, /* 167 = advise */
- { 0, 0, 0,
- sys_nosys }, /* 168 = unimplemented nsp_init */
- { 0, 0, 0,
- sys_nosys }, /* 169 = unimplemented cluster */
- { 0, 0, 0,
- sys_nosys }, /* 170 = unimplemented mkrnod */
- { 0, 0, 0,
- sys_nosys }, /* 171 = unimplemented */
- { 0, 0, 0,
- sys_nosys }, /* 172 = unimplemented unsp_open */
- { 0, 0, 0,
- sys_nosys }, /* 173 = unimplemented */
- { 2, s(struct hpux_sys_getcontext_args), 0,
- hpux_sys_getcontext }, /* 174 = getcontext */
- { 0, 0, 0,
- sys_nosys }, /* 175 = unimplemented setcontext */
- { 0, 0, 0,
- sys_nosys }, /* 176 = unimplemented bigio */
- { 0, 0, 0,
- sys_nosys }, /* 177 = unimplemented pipenode */
- { 0, 0, 0,
- sys_nosys }, /* 178 = unimplemented lsync */
- { 0, 0, 0,
- sys_nosys }, /* 179 = unimplemented getmachineid */
- { 0, 0, 0,
- sys_nosys }, /* 180 = unimplemented mysite */
- { 0, 0, 0,
- sys_nosys }, /* 181 = unimplemented sitels */
- { 0, 0, 0,
- sys_nosys }, /* 182 = unimplemented swapclients */
- { 0, 0, 0,
- sys_nosys }, /* 183 = unimplemented rmtprocess */
- { 0, 0, 0,
- sys_nosys }, /* 184 = unimplemented dskless_stats */
- { 0, 0, 0,
- sys_nosys }, /* 185 = unimplemented */
- { 0, 0, 0,
- sys_nosys }, /* 186 = unimplemented setacl */
- { 0, 0, 0,
- sys_nosys }, /* 187 = unimplemented fsetacl */
- { 0, 0, 0,
- sys_nosys }, /* 188 = unimplemented getacl */
- { 0, 0, 0,
- sys_nosys }, /* 189 = unimplemented fgetacl */
- { 6, s(struct hpux_sys_getaccess_args), 0,
- hpux_sys_getaccess }, /* 190 = getaccess */
- { 0, 0, 0,
- sys_nosys }, /* 191 = unimplemented getaudid */
- { 0, 0, 0,
- sys_nosys }, /* 192 = unimplemented setaudid */
- { 0, 0, 0,
- sys_nosys }, /* 193 = unimplemented getaudproc */
- { 0, 0, 0,
- sys_nosys }, /* 194 = unimplemented setaudproc */
- { 0, 0, 0,
- sys_nosys }, /* 195 = unimplemented getevent */
- { 0, 0, 0,
- sys_nosys }, /* 196 = unimplemented setevent */
- { 0, 0, 0,
- sys_nosys }, /* 197 = unimplemented audwrite */
- { 0, 0, 0,
- sys_nosys }, /* 198 = unimplemented audswitch */
- { 0, 0, 0,
- sys_nosys }, /* 199 = unimplemented audctl */
- { 4, s(struct hpux_sys_waitpid_args), 0,
- hpux_sys_waitpid }, /* 200 = waitpid */
- { 0, 0, 0,
- sys_nosys }, /* 201 = unimplemented */
- { 0, 0, 0,
- sys_nosys }, /* 202 = unimplemented */
- { 0, 0, 0,
- sys_nosys }, /* 203 = unimplemented */
- { 0, 0, 0,
- sys_nosys }, /* 204 = unimplemented */
- { 0, 0, 0,
- sys_nosys }, /* 205 = unimplemented */
- { 0, 0, 0,
- sys_nosys }, /* 206 = unimplemented */
- { 0, 0, 0,
- sys_nosys }, /* 207 = unimplemented */
- { 0, 0, 0,
- sys_nosys }, /* 208 = unimplemented */
- { 0, 0, 0,
- sys_nosys }, /* 209 = unimplemented */
- { 0, 0, 0,
- sys_nosys }, /* 210 = unimplemented */
- { 0, 0, 0,
- sys_nosys }, /* 211 = unimplemented */
- { 0, 0, 0,
- sys_nosys }, /* 212 = unimplemented */
- { 0, 0, 0,
- sys_nosys }, /* 213 = unimplemented */
- { 0, 0, 0,
- sys_nosys }, /* 214 = unimplemented */
- { 0, 0, 0,
- sys_nosys }, /* 215 = unimplemented */
- { 0, 0, 0,
- sys_nosys }, /* 216 = unimplemented */
- { 0, 0, 0,
- sys_nosys }, /* 217 = unimplemented */
- { 0, 0, 0,
- sys_nosys }, /* 218 = unimplemented */
- { 0, 0, 0,
- sys_nosys }, /* 219 = unimplemented */
- { 0, 0, 0,
- sys_nosys }, /* 220 = unimplemented */
- { 0, 0, 0,
- sys_nosys }, /* 221 = unimplemented */
- { 0, 0, 0,
- sys_nosys }, /* 222 = unimplemented */
- { 0, 0, 0,
- sys_nosys }, /* 223 = unimplemented */
- { 0, 0, 0,
- sys_nosys }, /* 224 = unimplemented set_no_trunc */
- { 2, s(struct sys_pathconf_args), 0,
- sys_pathconf }, /* 225 = pathconf */
- { 2, s(struct sys_fpathconf_args), 0,
- sys_fpathconf }, /* 226 = fpathconf */
- { 0, 0, 0,
- sys_nosys }, /* 227 = unimplemented */
- { 0, 0, 0,
- sys_nosys }, /* 228 = unimplemented */
- { 0, 0, 0,
- sys_nosys }, /* 229 = unimplemented async_daemon */
- { 0, 0, 0,
- sys_nosys }, /* 230 = unimplemented nfs_fcntl */
- { 4, s(struct compat_43_sys_getdirentries_args), 0,
- compat_43_sys_getdirentries }, /* 231 = getdirentries */
- { 2, s(struct compat_09_sys_getdomainname_args), 0,
- compat_09_sys_getdomainname }, /* 232 = getdomainname */
- { 0, 0, 0,
- sys_nosys }, /* 233 = unimplemented nfs_getfh */
- { 0, 0, 0,
- sys_nosys }, /* 234 = unimplemented vfsmount */
- { 0, 0, 0,
- sys_nosys }, /* 235 = unimplemented nfs_svc */
- { 2, s(struct compat_09_sys_setdomainname_args), 0,
- compat_09_sys_setdomainname }, /* 236 = setdomainname */
- { 0, 0, 0,
- sys_nosys }, /* 237 = unimplemented statfs */
- { 0, 0, 0,
- sys_nosys }, /* 238 = unimplemented fstatfs */
- { 3, s(struct hpux_sys_sigaction_args), 0,
- hpux_sys_sigaction }, /* 239 = sigaction */
- { 3, s(struct hpux_sys_sigprocmask_args), 0,
- hpux_sys_sigprocmask }, /* 240 = sigprocmask */
- { 1, s(struct hpux_sys_sigpending_args), 0,
- hpux_sys_sigpending }, /* 241 = sigpending */
- { 1, s(struct hpux_sys_sigsuspend_args), 0,
- hpux_sys_sigsuspend }, /* 242 = sigsuspend */
- { 0, 0, 0,
- sys_nosys }, /* 243 = unimplemented fsctl */
- { 0, 0, 0,
- sys_nosys }, /* 244 = unimplemented */
- { 0, 0, 0,
- sys_nosys }, /* 245 = unimplemented pstat */
- { 0, 0, 0,
- sys_nosys }, /* 246 = unimplemented */
- { 0, 0, 0,
- sys_nosys }, /* 247 = unimplemented */
- { 0, 0, 0,
- sys_nosys }, /* 248 = unimplemented */
- { 0, 0, 0,
- sys_nosys }, /* 249 = unimplemented */
- { 0, 0, 0,
- sys_nosys }, /* 250 = unimplemented */
- { 0, 0, 0,
- sys_nosys }, /* 251 = unimplemented ulconnect */
- { 0, 0, 0,
- sys_nosys }, /* 252 = unimplemented ulcontrol */
- { 0, 0, 0,
- sys_nosys }, /* 253 = unimplemented ulcreate */
- { 0, 0, 0,
- sys_nosys }, /* 254 = unimplemented uldest */
- { 0, 0, 0,
- sys_nosys }, /* 255 = unimplemented ulrecv */
- { 0, 0, 0,
- sys_nosys }, /* 256 = unimplemented ulrecvcn */
- { 0, 0, 0,
- sys_nosys }, /* 257 = unimplemented ulsend */
- { 0, 0, 0,
- sys_nosys }, /* 258 = unimplemented ulshutdown */
- { 0, 0, 0,
- sys_nosys }, /* 259 = unimplemented swapfs */
- { 0, 0, 0,
- sys_nosys }, /* 260 = unimplemented */
- { 0, 0, 0,
- sys_nosys }, /* 261 = unimplemented */
- { 0, 0, 0,
- sys_nosys }, /* 262 = unimplemented */
- { 0, 0, 0,
- sys_nosys }, /* 263 = unimplemented */
- { 0, 0, 0,
- sys_nosys }, /* 264 = unimplemented */
- { 0, 0, 0,
- sys_nosys }, /* 265 = unimplemented */
- { 0, 0, 0,
- sys_nosys }, /* 266 = unimplemented */
- { 0, 0, 0,
- sys_nosys }, /* 267 = unimplemented tsync */
- { 0, 0, 0,
- compat_43_sys_getdtablesize }, /* 268 = getdtablesize */
- { 3, s(struct sys_poll_args), 0,
- sys_poll }, /* 269 = poll */
- { 0, 0, 0,
- sys_nosys }, /* 270 = unimplemented getmsg */
- { 0, 0, 0,
- sys_nosys }, /* 271 = unimplemented putmsg */
- { 1, s(struct sys_fchdir_args), 0,
- sys_fchdir }, /* 272 = fchdir */
- { 0, 0, 0,
- sys_nosys }, /* 273 = unimplemented getmount_cnt */
- { 0, 0, 0,
- sys_nosys }, /* 274 = unimplemented getmount_entry */
- { 3, s(struct compat_43_sys_accept_args), 0,
- compat_43_sys_accept }, /* 275 = accept */
- { 3, s(struct sys_bind_args), 0,
- sys_bind }, /* 276 = bind */
- { 3, s(struct sys_connect_args), 0,
- sys_connect }, /* 277 = connect */
- { 3, s(struct compat_43_sys_getpeername_args), 0,
- compat_43_sys_getpeername }, /* 278 = getpeername */
- { 3, s(struct compat_43_sys_getsockname_args), 0,
- compat_43_sys_getsockname }, /* 279 = getsockname */
- { 5, s(struct sys_getsockopt_args), 0,
- sys_getsockopt }, /* 280 = getsockopt */
- { 2, s(struct sys_listen_args), 0,
- sys_listen }, /* 281 = listen */
- { 4, s(struct compat_43_sys_recv_args), 0,
- compat_43_sys_recv }, /* 282 = recv */
- { 6, s(struct compat_43_sys_recvfrom_args), 0,
- compat_43_sys_recvfrom }, /* 283 = recvfrom */
- { 3, s(struct compat_43_sys_recvmsg_args), 0,
- compat_43_sys_recvmsg }, /* 284 = recvmsg */
- { 4, s(struct compat_43_sys_send_args), 0,
- compat_43_sys_send }, /* 285 = send */
- { 3, s(struct compat_43_sys_sendmsg_args), 0,
- compat_43_sys_sendmsg }, /* 286 = sendmsg */
- { 6, s(struct sys_sendto_args), 0,
- sys_sendto }, /* 287 = sendto */
- { 5, s(struct hpux_sys_setsockopt_args), 0,
- hpux_sys_setsockopt }, /* 288 = setsockopt */
- { 2, s(struct sys_shutdown_args), 0,
- sys_shutdown }, /* 289 = shutdown */
- { 3, s(struct sys_socket_args), 0,
- sys_socket }, /* 290 = socket */
- { 4, s(struct sys_socketpair_args), 0,
- sys_socketpair }, /* 291 = socketpair */
- { 0, 0, 0,
- sys_nosys }, /* 292 = unimplemented */
- { 0, 0, 0,
- sys_nosys }, /* 293 = unimplemented */
- { 0, 0, 0,
- sys_nosys }, /* 294 = unimplemented */
- { 0, 0, 0,
- sys_nosys }, /* 295 = unimplemented */
- { 0, 0, 0,
- sys_nosys }, /* 296 = unimplemented */
- { 0, 0, 0,
- sys_nosys }, /* 297 = unimplemented */
- { 0, 0, 0,
- sys_nosys }, /* 298 = unimplemented ipccreate */
- { 0, 0, 0,
- sys_nosys }, /* 299 = unimplemented ipcname */
- { 0, 0, 0,
- sys_nosys }, /* 300 = unimplemented ipcnamerase */
- { 0, 0, 0,
- sys_nosys }, /* 301 = unimplemented ipclookup */
- { 0, 0, 0,
- sys_nosys }, /* 302 = unimplemented ipcselect */
- { 0, 0, 0,
- sys_nosys }, /* 303 = unimplemented ipcconnect */
- { 0, 0, 0,
- sys_nosys }, /* 304 = unimplemented ipcrecvcn */
- { 0, 0, 0,
- sys_nosys }, /* 305 = unimplemented ipcsend */
- { 0, 0, 0,
- sys_nosys }, /* 306 = unimplemented ipcrecv */
- { 0, 0, 0,
- sys_nosys }, /* 307 = unimplemented ipcgetnodename */
- { 0, 0, 0,
- sys_nosys }, /* 308 = unimplemented ipcsetnodename */
- { 0, 0, 0,
- sys_nosys }, /* 309 = unimplemented ipcontrol */
- { 0, 0, 0,
- sys_nosys }, /* 310 = unimplemented ipcshutdown */
- { 0, 0, 0,
- sys_nosys }, /* 311 = unimplemented ipcdest */
-#ifdef SYSVSEM
- { 4, s(struct sys___semctl_args), 0,
- sys___semctl }, /* 312 = nsemctl */
-#else
- { 0, 0, 0,
- sys_nosys }, /* 312 = unimplemented semctl */
-#endif
-#ifdef SYSVMSG
- { 3, s(struct sys_msgctl_args), 0,
- sys_msgctl }, /* 313 = nmsgctl */
-#else
- { 0, 0, 0,
- sys_nosys }, /* 313 = unimplemented msgctl */
-#endif
-#ifdef SYSVSHM
- { 3, s(struct hpux_sys_nshmctl_args), 0,
- hpux_sys_nshmctl }, /* 314 = nshmctl */
-#else
- { 0, 0, 0,
- sys_nosys }, /* 314 = unimplemented shmctl */
-#endif
- { 0, 0, 0,
- sys_nosys }, /* 315 = unimplemented mpctl */
- { 0, 0, 0,
- sys_nosys }, /* 316 = unimplemented exportfs */
- { 0, 0, 0,
- sys_nosys }, /* 317 = unimplemented getpmsg */
- { 0, 0, 0,
- sys_nosys }, /* 318 = unimplemented putpmsg */
- { 0, 0, 0,
- sys_nosys }, /* 319 = unimplemented strioctl */
- { 0, 0, 0,
- sys_nosys }, /* 320 = unimplemented msync */
- { 0, 0, 0,
- sys_nosys }, /* 321 = unimplemented msleep */
- { 0, 0, 0,
- sys_nosys }, /* 322 = unimplemented mwakeup */
- { 0, 0, 0,
- sys_nosys }, /* 323 = unimplemented msem_init */
- { 0, 0, 0,
- sys_nosys }, /* 324 = unimplemented msem_remove */
-};
-
diff --git a/sys/compat/hpux/m68k/syscalls.conf b/sys/compat/hpux/m68k/syscalls.conf
deleted file mode 100644
index 73a5090d7d6..00000000000
--- a/sys/compat/hpux/m68k/syscalls.conf
+++ /dev/null
@@ -1,13 +0,0 @@
-# $OpenBSD: syscalls.conf,v 1.1 2004/07/09 21:33:45 mickey Exp $
-# $NetBSD: syscalls.conf,v 1.2 1995/11/28 08:39:54 thorpej Exp $
-
-sysnames="hpux_syscalls.c"
-sysnumhdr="hpux_syscall.h"
-syssw="hpux_sysent.c"
-sysarghdr="hpux_syscallargs.h"
-compatopts=""
-libcompatopts=""
-
-switchname="hpux_sysent"
-namesname="hpux_syscallnames"
-constprefix="HPUX_SYS_"
diff --git a/sys/compat/hpux/m68k/syscalls.master b/sys/compat/hpux/m68k/syscalls.master
deleted file mode 100644
index 6f3fbf9cc96..00000000000
--- a/sys/compat/hpux/m68k/syscalls.master
+++ /dev/null
@@ -1,464 +0,0 @@
- $OpenBSD: syscalls.master,v 1.2 2010/01/28 19:59:11 miod Exp $
-; $NetBSD: syscalls.master,v 1.13 1997/03/16 03:48:04 thorpej Exp $
-
-; @(#)syscalls.master 8.1 (Berkeley) 7/19/93
-
-; OpenBSD COMPAT_HPUX system call name/number "master" file.
-; (See syscalls.conf to see what it is processed into.)
-;
-; Fields: number type [type-dependent ...]
-; number system call number, must be in order
-; type one of STD, OBSOL, UNIMPL, NODEF, NOARGS, or one of
-; the compatibility options defined in syscalls.conf.
-;
-; types:
-; STD always included
-; OBSOL obsolete, not included in system
-; UNIMPL unimplemented, not included in system
-; NODEF included, but don't define the syscall number
-; NOARGS included, but don't define the syscall args structure
-;
-; The compat options are defined in the syscalls.conf file, and the
-; compat option name is prefixed to the syscall name. Other than
-; that, they're like NODEF (for 'compat' options), or STD (for
-; 'libcompat' options).
-;
-; The type-dependent arguments are as follows:
-; For STD, NODEF, NOARGS, and compat syscalls:
-; { pseudo-proto } [alias]
-; For other syscalls:
-; [comment]
-;
-; #ifdef's, etc. may be included, and are copied to the output files.
-; #include's are copied to the syscall switch definition file only.
-
-#include <sys/param.h>
-#include <sys/systm.h>
-#include <sys/signal.h>
-#include <sys/mount.h>
-#include <sys/exec.h>
-#include <sys/syscallargs.h>
-
-#include <compat/hpux/hpux.h>
-#include <compat/hpux/m68k/hpux_syscallargs.h>
-
-#include <machine/hpux_machdep.h>
-
-0 NOARGS { int sys_nosys(void); } syscall
-1 NOARGS { int sys_exit(int rval); }
-2 STD { int hpux_sys_fork(void); }
-3 STD { int hpux_sys_read(int fd, char *buf, u_int nbyte); }
-4 STD { int hpux_sys_write(int fd, char *buf, u_int nbyte); }
-5 STD { int hpux_sys_open(char *path, int flags, int mode); }
-6 NOARGS { int sys_close(int fd); }
-7 STD { int hpux_sys_wait(int *status); }
-8 STD { int hpux_sys_creat(char *path, int mode); }
-9 NOARGS { int sys_link(char *path, char *link); }
-10 STD { int hpux_sys_unlink(char *path); }
-11 STD { int hpux_sys_execv(char * path, char * * argp); }
-12 STD { int hpux_sys_chdir(char *path); }
-13 STD { int hpux_sys_time_6x(time_t *t); }
-14 STD { int hpux_sys_mknod(char *path, int mode, int dev); }
-15 STD { int hpux_sys_chmod(char *path, int mode); }
-16 STD { int hpux_sys_chown(char *path, int uid, int gid); }
-17 NOARGS { int sys_obreak(char *nsize); }
-18 STD { int hpux_sys_stat_6x(char *path, \
- struct hpux_ostat *sb); }
-19 NOARGS { long compat_43_sys_lseek(int fd, long offset, \
- int whence); }
-20 NOARGS { pid_t sys_getpid(void); }
-21 UNIMPL mount
-22 UNIMPL umount
-23 NOARGS { int sys_setuid(uid_t uid); }
-24 NOARGS { uid_t sys_getuid(void); }
-25 STD { int hpux_sys_stime_6x(int time); }
-#ifdef PTRACE
-26 STD { int hpux_sys_ptrace(int req, int pid, int *addr, \
- int data); }
-#else
-26 UNIMPL ptrace
-#endif
-27 STD { int hpux_sys_alarm_6x(int deltat); }
-28 STD { int hpux_sys_fstat_6x(int fd, \
- struct hpux_ostat *sb); }
-29 STD { int hpux_sys_pause_6x(void); }
-30 STD { int hpux_sys_utime_6x(char *fname, time_t *tptr); }
-31 STD { int hpux_sys_stty_6x(int fd, caddr_t arg); }
-32 STD { int hpux_sys_gtty_6x(int fd, caddr_t arg); }
-33 STD { int hpux_sys_access(char *path, int flags); }
-34 STD { int hpux_sys_nice_6x(int nval); }
-35 STD { int hpux_sys_ftime_6x(struct hpux_timeb *tp); }
-36 NOARGS { int sys_sync(void); }
-37 STD { int hpux_sys_kill(pid_t pid, int signo); }
-38 STD { int hpux_sys_stat(char *path, struct hpux_stat *sb); }
-39 STD { int hpux_sys_setpgrp_6x(void); }
-40 STD { int hpux_sys_lstat(char *path, struct hpux_stat *sb); }
-41 NOARGS { int sys_dup(int fd); }
-42 NOARGS { int sys_opipe(void); }
-43 STD { int hpux_sys_times_6x(struct tms *tms); }
-44 NOARGS { int sys_profil(caddr_t samples, u_int size, \
- u_int offset, u_int scale); }
-
-45 UNIMPL ki_syscall
-46 NOARGS { int sys_setgid(gid_t gid); }
-47 NOARGS { gid_t sys_getgid(void); }
-48 STD { int hpux_sys_ssig_6x(int signo, sig_t fun); }
-49 UNIMPL reserved for USG
-50 UNIMPL reserved for USG
-51 UNIMPL acct
-52 UNIMPL
-53 UNIMPL
-54 STD { int hpux_sys_ioctl(int fd, int com, caddr_t data); }
-55 UNIMPL reboot
-56 STD { int hpux_sys_symlink(char *path, char *link); }
-57 STD { int hpux_sys_utssys(struct hpux_utsname *uts, \
- int dev, int request); }
-58 STD { int hpux_sys_readlink(char *path, char *buf, \
- int count); }
-59 STD { int hpux_sys_execve(char *path, char **argp, \
- char **envp); }
-60 NOARGS { int sys_umask(int newmask); }
-61 NOARGS { int sys_chroot(char *path); }
-62 STD { int hpux_sys_fcntl(int fd, int cmd, int arg); }
-63 STD { int hpux_sys_ulimit(int cmd, int newlimit); }
-64 UNIMPL
-65 UNIMPL
-66 STD { int hpux_sys_vfork(void); }
-67 NOARGS { int hpux_sys_read(int fd, char *buf, u_int nbyte); } vread
-68 NOARGS { int hpux_sys_write(int fd, char *buf, u_int nbyte); } vwrite
-69 UNIMPL
-70 UNIMPL
-71 STD { int hpux_sys_mmap(caddr_t addr, size_t len, \
- int prot, int flags, int fd, long pos); }
-72 UNIMPL
-73 NOARGS { int sys_munmap(caddr_t addr, size_t len); }
-74 NOARGS { int sys_mprotect(caddr_t addr, size_t len, \
- int prot); }
-75 UNIMPL
-76 UNIMPL
-77 UNIMPL
-78 UNIMPL
-79 NOARGS { int sys_getgroups(u_int gidsetsize, gid_t *gidset); }
-80 NOARGS { int sys_setgroups(u_int gidsetsize, gid_t *gidset); }
-81 NOARGS { pid_t sys_getpgid(pid_t pid); }
-82 STD { int hpux_sys_setpgrp2(pid_t pid, pid_t pgid); }
-83 NOARGS { int sys_setitimer(u_int which, \
- struct itimerval *itv, struct itimerval *oitv); }
-84 STD { int hpux_sys_wait3(int *status, int options, \
- int rusage); }
-85 UNIMPL swapon
-86 NOARGS { int sys_getitimer(u_int which, \
- struct itimerval *itv); }
-87 UNIMPL
-88 UNIMPL
-89 UNIMPL
-90 NOARGS { int sys_dup2(u_int from, u_int to); }
-91 UNIMPL
-92 STD { int hpux_sys_fstat(int fd, struct hpux_stat *sb); }
-93 NOARGS { int sys_select(u_int nd, fd_set *in, fd_set *ou, \
- fd_set *ex, struct timeval *tv); }
-94 UNIMPL
-95 NOARGS { int sys_fsync(int fd); }
-96 UNIMPL
-97 UNIMPL
-98 UNIMPL
-99 UNIMPL
-100 UNIMPL
-101 UNIMPL
-102 UNIMPL
-103 STD { int hpux_sys_sigreturn(struct hpuxsigcontext \
- *sigcntxp); }
-104 UNIMPL
-105 UNIMPL
-106 UNIMPL
-107 UNIMPL
-108 STD { int hpux_sys_sigvec(int signo, struct sigvec *nsv, \
- struct sigvec *osv); }
-109 STD { int hpux_sys_sigblock(int mask); }
-110 STD { int hpux_sys_sigsetmask(int mask); }
-111 STD { int hpux_sys_sigpause(int mask); }
-112 NOARGS { int compat_43_sys_sigstack(struct sigstack *nss, \
- struct sigstack *oss); }
-113 UNIMPL
-114 UNIMPL
-115 UNIMPL
-116 NOARGS { int sys_gettimeofday(struct timeval *tp); }
-117 UNIMPL
-118 UNIMPL
-119 UNIMPL io_stub
-120 STD { int hpux_sys_readv(int fd, struct iovec *iovp, \
- u_int iovcnt); }
-121 STD { int hpux_sys_writev(int fd, struct iovec *iovp, \
- u_int iovcnt); }
-122 NOARGS { int sys_settimeofday(struct timeval *tv, \
- struct timezone *tzp); }
-123 NOARGS { int sys_fchown(int fd, int uid, int gid); }
-124 NOARGS { int sys_fchmod(int fd, int mode); }
-125 UNIMPL
-126 NOARGS { int sys_setresuid(uid_t ruid, uid_t uide, \
- uid_t suid); }
-127 NOARGS { int sys_setresgid(gid_t rgid, gid_t egid, \
- gid_t sgid); }
-128 STD { int hpux_sys_rename(char *from, char *to); }
-129 STD { int hpux_sys_truncate(char *path, long length); }
-130 NOARGS { int compat_43_sys_ftruncate(int fd, long length); }
-131 UNIMPL
-132 STD { int hpux_sys_sysconf(int name); }
-133 UNIMPL
-134 UNIMPL
-135 UNIMPL
-136 STD { int hpux_sys_mkdir(char *path, int mode); }
-137 STD { int hpux_sys_rmdir(char *path); }
-138 UNIMPL
-139 UNIMPL
-140 UNIMPL
-141 UNIMPL
-142 UNIMPL
-143 UNIMPL
-144 STD { int hpux_sys_getrlimit(u_int which, \
- struct ogetrlimit *rlp); }
-145 STD { int hpux_sys_setrlimit(u_int which, \
- struct ogetrlimit *rlp); }
-146 UNIMPL
-147 UNIMPL
-148 UNIMPL
-149 UNIMPL
-150 UNIMPL
-151 UNIMPL privgrp
-152 STD { int hpux_sys_rtprio(pid_t pid, int prio); }
-153 UNIMPL plock
-154 STD { int hpux_sys_netioctl(int call, int *args); }
-155 STD { int hpux_sys_lockf(int fd, int func, long size); }
-#ifdef SYSVSEM
-156 NOARGS { int sys_semget(key_t key, int nsems, int semflg); }
-157 NOARGS { int sys___semctl(int semid, int semnum, int cmd, \
- union semun *arg); }
-158 NOARGS { int sys_semop(int semid, struct sembuf *sops, \
- u_int nsops); }
-#else
-156 UNIMPL semget
-157 UNIMPL semctl
-158 UNIMPL semop
-#endif
-#ifdef SYSVMSG
-159 NOARGS { int sys_msgget(key_t key, int msgflg); }
-160 NOARGS { int sys_msgctl(int msqid, int cmd, \
- struct msqid_ds *buf); }
-161 NOARGS { int sys_msgsnd(int msqid, void *msgp, size_t msgsz, \
- int msgflg); }
-162 NOARGS { int sys_msgrcv(int msqid, void *msgp, size_t msgsz, \
- long msgtyp, int msgflg); }
-#else
-159 UNIMPL msgget
-160 UNIMPL msgctl
-161 UNIMPL msgsnd
-162 UNIMPL msgrcv
-#endif
-#ifdef SYSVSHM
-163 NOARGS { int sys_shmget(key_t key, int size, int shmflg); }
-164 STD { int hpux_sys_shmctl(int shmid, int cmd, \
- caddr_t buf); }
-165 NOARGS { int sys_shmat(int shmid, void *shmaddr, int shmflg); }
-166 NOARGS { int sys_shmdt(void *shmaddr); }
-#else
-163 UNIMPL shmget
-164 UNIMPL shmctl
-165 UNIMPL shmat
-166 UNIMPL shmdt
-#endif
-167 STD { int hpux_sys_advise(int arg); }
-168 UNIMPL nsp_init
-169 UNIMPL cluster
-170 UNIMPL mkrnod
-171 UNIMPL
-172 UNIMPL unsp_open
-173 UNIMPL
-174 STD { int hpux_sys_getcontext(char *buf, int len); }
-175 UNIMPL setcontext
-176 UNIMPL bigio
-177 UNIMPL pipenode
-178 UNIMPL lsync
-179 UNIMPL getmachineid
-180 UNIMPL mysite
-181 UNIMPL sitels
-182 UNIMPL swapclients
-183 UNIMPL rmtprocess
-184 UNIMPL dskless_stats
-185 UNIMPL
-186 UNIMPL setacl
-187 UNIMPL fsetacl
-188 UNIMPL getacl
-189 UNIMPL fgetacl
-190 STD { int hpux_sys_getaccess(char *path, uid_t uid, \
- int ngroups, gid_t *gidset, void *label, \
- void *privs); }
-191 UNIMPL getaudid
-192 UNIMPL setaudid
-193 UNIMPL getaudproc
-194 UNIMPL setaudproc
-195 UNIMPL getevent
-196 UNIMPL setevent
-197 UNIMPL audwrite
-198 UNIMPL audswitch
-199 UNIMPL audctl
-200 STD { int hpux_sys_waitpid(pid_t pid, int *status, \
- int options, struct rusage *rusage); }
-201 UNIMPL
-202 UNIMPL
-203 UNIMPL
-204 UNIMPL
-205 UNIMPL
-206 UNIMPL
-207 UNIMPL
-208 UNIMPL
-209 UNIMPL
-210 UNIMPL
-211 UNIMPL
-212 UNIMPL
-213 UNIMPL
-214 UNIMPL
-215 UNIMPL
-216 UNIMPL
-217 UNIMPL
-218 UNIMPL
-219 UNIMPL
-220 UNIMPL
-221 UNIMPL
-222 UNIMPL
-223 UNIMPL
-224 UNIMPL set_no_trunc
-225 NOARGS { int sys_pathconf(char *path, int name); }
-226 NOARGS { int sys_fpathconf(int fd, int name); }
-227 UNIMPL
-228 UNIMPL
-229 UNIMPL async_daemon
-230 UNIMPL nfs_fcntl
-231 NOARGS { int compat_43_sys_getdirentries(int fd, char *buf, \
- u_int count, long *basep); }
-232 NOARGS { int compat_09_sys_getdomainname(char *domainname, \
- int len); }
-233 UNIMPL nfs_getfh
-234 UNIMPL vfsmount
-235 UNIMPL nfs_svc
-236 NOARGS { int compat_09_sys_setdomainname(char *domainname, \
- int len); }
-237 UNIMPL statfs
-238 UNIMPL fstatfs
-239 STD { int hpux_sys_sigaction(int signo, \
- struct hpux_sigaction *nsa, \
- struct hpux_sigaction *osa); }
-240 STD { int hpux_sys_sigprocmask(int how, \
- hpux_sigset_t *set, hpux_sigset_t *oset); }
-241 STD { int hpux_sys_sigpending(hpux_sigset_t *set); }
-242 STD { int hpux_sys_sigsuspend(hpux_sigset_t *set); }
-243 UNIMPL fsctl
-244 UNIMPL
-245 UNIMPL pstat
-246 UNIMPL
-247 UNIMPL
-248 UNIMPL
-249 UNIMPL
-250 UNIMPL
-251 UNIMPL ulconnect
-252 UNIMPL ulcontrol
-253 UNIMPL ulcreate
-254 UNIMPL uldest
-255 UNIMPL ulrecv
-256 UNIMPL ulrecvcn
-257 UNIMPL ulsend
-258 UNIMPL ulshutdown
-259 UNIMPL swapfs
-260 UNIMPL
-261 UNIMPL
-262 UNIMPL
-263 UNIMPL
-264 UNIMPL
-265 UNIMPL
-266 UNIMPL
-267 UNIMPL tsync
-268 NOARGS { int compat_43_sys_getdtablesize(void); }
-269 NOARGS { int sys_poll(struct pollfd *fds, u_int nfds, \
- int timeout); }
-270 UNIMPL getmsg
-271 UNIMPL putmsg
-272 NOARGS { int sys_fchdir(int fd); }
-273 UNIMPL getmount_cnt
-274 UNIMPL getmount_entry
-275 NOARGS { int compat_43_sys_accept(int s, caddr_t name, \
- int *anamelen); }
-276 NOARGS { int sys_bind(int s, caddr_t name, int namelen); }
-277 NOARGS { int sys_connect(int s, caddr_t name, int namelen); }
-278 NOARGS { int compat_43_sys_getpeername(int fdes, caddr_t asa, \
- int *alen); }
-279 NOARGS { int compat_43_sys_getsockname(int fdec, caddr_t asa, \
- int *alen); }
-280 NOARGS { int sys_getsockopt(int s, int level, int name, \
- caddr_t val, int *avalsize); }
-281 NOARGS { int sys_listen(int s, int backlog); }
-282 NOARGS { int compat_43_sys_recv(int s, caddr_t buf, int len, \
- int flags); }
-283 NOARGS { int compat_43_sys_recvfrom(int s, caddr_t buf, \
- size_t len, int flags, caddr_t from, \
- int *fromlenaddr); }
-284 NOARGS { int compat_43_sys_recvmsg(int s, \
- struct omsghdr *msg, int flags); }
-285 NOARGS { int compat_43_sys_send(int s, caddr_t buf, int len, \
- int flags); }
-286 NOARGS { int compat_43_sys_sendmsg(int s, caddr_t msg, \
- int flags); }
-287 NOARGS { int sys_sendto(int s, caddr_t buf, size_t len, \
- int flags, caddr_t to, int tolen); }
-288 STD { int hpux_sys_setsockopt(int s, int level, int name, \
- caddr_t val, int valsize); }
-289 NOARGS { int sys_shutdown(int s, int how); }
-290 NOARGS { int sys_socket(int domain, int type, int protocol); }
-291 NOARGS { int sys_socketpair(int domain, int type, \
- int protocol, int *rsv); }
-292 UNIMPL
-293 UNIMPL
-294 UNIMPL
-295 UNIMPL
-296 UNIMPL
-297 UNIMPL
-298 UNIMPL ipccreate
-299 UNIMPL ipcname
-300 UNIMPL ipcnamerase
-301 UNIMPL ipclookup
-302 UNIMPL ipcselect
-303 UNIMPL ipcconnect
-304 UNIMPL ipcrecvcn
-305 UNIMPL ipcsend
-306 UNIMPL ipcrecv
-307 UNIMPL ipcgetnodename
-308 UNIMPL ipcsetnodename
-309 UNIMPL ipcontrol
-310 UNIMPL ipcshutdown
-311 UNIMPL ipcdest
-#ifdef SYSVSEM
-312 NOARGS { int sys___semctl(int semid, int semnum, int cmd, \
- union semun *arg); } nsemctl
-#else
-312 UNIMPL semctl
-#endif
-#ifdef SYSVMSG
-313 NOARGS { int sys_msgctl(int msqid, int cmd, \
- struct msqid_ds *buf); } nmsgctl
-#else
-313 UNIMPL msgctl
-#endif
-#ifdef SYSVSHM
-314 STD { int hpux_sys_nshmctl(int shmid, int cmd, \
- caddr_t buf); }
-#else
-314 UNIMPL shmctl
-#endif
-315 UNIMPL mpctl
-316 UNIMPL exportfs
-317 UNIMPL getpmsg
-318 UNIMPL putpmsg
-319 UNIMPL strioctl
-320 UNIMPL msync
-321 UNIMPL msleep
-322 UNIMPL mwakeup
-323 UNIMPL msem_init
-324 UNIMPL msem_remove
diff --git a/sys/conf/files b/sys/conf/files
index 463a1ee17a7..36525bf5138 100644
--- a/sys/conf/files
+++ b/sys/conf/files
@@ -1,4 +1,4 @@
-# $OpenBSD: files,v 1.492 2010/06/08 12:46:49 jsing Exp $
+# $OpenBSD: files,v 1.493 2010/06/29 20:30:33 guenther Exp $
# $NetBSD: files,v 1.87 1996/05/19 17:17:50 jonathan Exp $
# @(#)files.newconf 7.5 (Berkeley) 5/10/93
@@ -1063,16 +1063,16 @@ file compat/common/compat_exec.c !small_kernel
file compat/common/compat_util.c !small_kernel
file compat/common/compat_dir.c !small_kernel
file compat/common/compat_vm.c !small_kernel &
- (compat_freebsd | compat_bsdos | compat_sunos | compat_hpux | compat_linux)
+ (compat_freebsd | compat_bsdos | compat_sunos | compat_linux)
file compat/common/kern_info_09.c !small_kernel &
- (compat_freebsd | compat_ibcs2 | compat_sunos | compat_hpux |
+ (compat_freebsd | compat_ibcs2 | compat_sunos |
compat_osf1 | compat_linux)
file compat/common/kern_ipc_10.c !small_kernel &
- (compat_freebsd | compat_ibcs2 | compat_sunos | compat_hpux | compat_bsdos)
+ (compat_freebsd | compat_ibcs2 | compat_sunos | compat_bsdos)
file compat/common/vfs_syscalls_25.c !small_kernel &
- (compat_freebsd | compat_bsdos | compat_sunos | compat_hpux)
+ (compat_freebsd | compat_bsdos | compat_sunos)
file compat/common/vfs_syscalls_35.c !small_kernel & (compat_35 |
- compat_freebsd | compat_bsdos | compat_sunos | compat_hpux)
+ compat_freebsd | compat_bsdos | compat_sunos)
file compat/common/vfs_syscalls_o43.c !small_kernel & compat_o43
file compat/common/kern_ipc_35.c !small_kernel & compat_35
file compat/common/kern_ipc_23.c !small_kernel & compat_23
diff --git a/sys/kern/Makefile b/sys/kern/Makefile
index 822297a0120..6a180271f08 100644
--- a/sys/kern/Makefile
+++ b/sys/kern/Makefile
@@ -1,4 +1,4 @@
-# $OpenBSD: Makefile,v 1.21 2010/06/29 18:46:34 tedu Exp $
+# $OpenBSD: Makefile,v 1.22 2010/06/29 20:30:33 guenther Exp $
# Makefile for kernel tags files, init_sysent, etc.
@@ -30,7 +30,7 @@ SYSTAGS=/var/db/sys_tags
SYSDIR=/sys
# Directories in which to place tags links (other than machine-dependent)
-DGEN= compat compat/common compat/freebsd compat/hpux compat/ibcs2 \
+DGEN= compat compat/common compat/freebsd compat/ibcs2 \
compat/linux compat/osf1 compat/sunos compat/svr4 \
conf \
ddb \
diff --git a/sys/kern/exec_conf.c b/sys/kern/exec_conf.c
index b883b6d5028..2c17a7a4b3f 100644
--- a/sys/kern/exec_conf.c
+++ b/sys/kern/exec_conf.c
@@ -1,4 +1,4 @@
-/* $OpenBSD: exec_conf.c,v 1.20 2010/06/29 18:46:34 tedu Exp $ */
+/* $OpenBSD: exec_conf.c,v 1.21 2010/06/29 20:30:33 guenther Exp $ */
/* $NetBSD: exec_conf.c,v 1.16 1995/12/09 05:34:47 cgd Exp $ */
/*
@@ -63,10 +63,6 @@
#include <compat/freebsd/freebsd_exec.h>
#endif
-#ifdef COMPAT_HPUX
-#include <compat/hpux/hpux_exec.h>
-#endif
-
#ifdef COMPAT_M68K4K
#include <compat/m68k4k/m68k4k_exec.h>
#endif
@@ -76,7 +72,7 @@
#endif
extern struct emul emul_native, emul_elf32, emul_elf64, emul_aout,
- emul_bsdos, emul_freebsd_aout, emul_freebsd_elf, emul_hpux,
+ emul_bsdos, emul_freebsd_aout, emul_freebsd_elf,
emul_ibcs2, emul_linux_elf, emul_linux_aout, emul_netbsd_elf64,
emul_osf1, emul_sunos, emul_svr4;
@@ -116,9 +112,6 @@ struct execsw execsw[] = {
{ FREEBSD_AOUT_HDR_SIZE, exec_freebsd_aout_makecmds, &emul_freebsd_aout }, /* freebsd */
{ sizeof(Elf32_Ehdr), exec_freebsd_elf32_makecmds, &emul_freebsd_elf },
#endif
-#ifdef COMPAT_HPUX
- { HPUX_EXEC_HDR_SIZE, exec_hpux_makecmds, &emul_hpux }, /* HP-UX a.out */
-#endif
#ifdef COMPAT_M68K4K
{ sizeof(struct exec), exec_m68k4k_makecmds, &emul_native }, /* m68k4k a.out */
#endif
diff --git a/sys/sys/socket.h b/sys/sys/socket.h
index 559766890af..fccb66b235e 100644
--- a/sys/sys/socket.h
+++ b/sys/sys/socket.h
@@ -1,4 +1,4 @@
-/* $OpenBSD: socket.h,v 1.63 2010/04/21 11:52:46 claudio Exp $ */
+/* $OpenBSD: socket.h,v 1.64 2010/06/29 20:30:33 guenther Exp $ */
/* $NetBSD: socket.h,v 1.14 1996/02/09 18:25:36 christos Exp $ */
/*
@@ -493,8 +493,7 @@ int setrdomain(int);
__END_DECLS
#else
# if defined(COMPAT_43) || defined(COMPAT_SUNOS) || defined(COMPAT_LINUX) || \
- defined(COMPAT_HPUX) || defined(COMPAT_FREEBSD) || defined(COMPAT_BSDOS) \
- || defined(COMPAT_OSF1)
+ defined(COMPAT_FREEBSD) || defined(COMPAT_BSDOS) || defined(COMPAT_OSF1)
# define COMPAT_OLDSOCK
# define MSG_COMPAT 0x8000
# endif
diff --git a/usr.bin/kdump/kdump.c b/usr.bin/kdump/kdump.c
index 6b96df9d80b..1b90a9cef42 100644
--- a/usr.bin/kdump/kdump.c
+++ b/usr.bin/kdump/kdump.c
@@ -1,4 +1,4 @@
-/* $OpenBSD: kdump.c,v 1.42 2010/06/29 17:35:15 tedu Exp $ */
+/* $OpenBSD: kdump.c,v 1.43 2010/06/29 20:30:33 guenther Exp $ */
/*-
* Copyright (c) 1988, 1993
@@ -64,9 +64,6 @@ pid_t pid = -1;
#include <compat/bsdos/bsdos_syscall.h>
#include <compat/freebsd/freebsd_syscall.h>
-#if defined(__hppa__) || defined(__m68k__)
-#include <compat/hpux/hpux_syscall.h>
-#endif
#include <compat/ibcs2/ibcs2_syscall.h>
#include <compat/linux/linux_syscall.h>
#include <compat/osf1/osf1_syscall.h>
@@ -86,9 +83,6 @@ pid_t pid = -1;
#include <compat/bsdos/bsdos_syscalls.c>
#include <compat/freebsd/freebsd_syscalls.c>
-#if defined(__hppa__) || defined(__m68k__)
-#include <compat/hpux/hpux_syscalls.c>
-#endif
#include <compat/ibcs2/ibcs2_syscalls.c>
#include <compat/linux/linux_syscalls.c>
#include <compat/osf1/osf1_syscalls.c>
@@ -112,9 +106,6 @@ struct emulation {
static struct emulation emulations[] = {
{ "native", syscallnames, SYS_MAXSYSCALL },
-#if defined(__hppa__) || defined(__m68k__)
- { "hpux", hpux_syscallnames, HPUX_SYS_MAXSYSCALL },
-#endif
{ "ibcs2", ibcs2_syscallnames, IBCS2_SYS_MAXSYSCALL },
{ "linux", linux_syscallnames, LINUX_SYS_MAXSYSCALL },
{ "osf1", osf1_syscallnames, OSF1_SYS_MAXSYSCALL },