summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorMichael Shalayeff <mickey@cvs.openbsd.org>2004-07-09 21:33:46 +0000
committerMichael Shalayeff <mickey@cvs.openbsd.org>2004-07-09 21:33:46 +0000
commitc6c0af96adffb0022f3a8ab8ac0343f2fcbcad17 (patch)
tree3a795b54f75d953f1fbc901389a3af4ec31a3d66
parent336d2bbe3d5efc5270e9d8d1bb7774ff2f7c598a (diff)
split off the m68k-specific parts
-rw-r--r--sys/compat/hpux/files.hpux17
-rw-r--r--sys/compat/hpux/hpux.h47
-rw-r--r--sys/compat/hpux/hpux_compat.c7
-rw-r--r--sys/compat/hpux/hpux_exec.h129
-rw-r--r--sys/compat/hpux/hpux_file.c66
-rw-r--r--sys/compat/hpux/hpux_syscall.h451
-rw-r--r--sys/compat/hpux/hpux_syscallargs.h552
-rw-r--r--sys/compat/hpux/hpux_syscalls.c375
-rw-r--r--sys/compat/hpux/hpux_sysent.c725
-rw-r--r--sys/compat/hpux/hpux_tty.c4
-rw-r--r--sys/compat/hpux/m68k/Makefile (renamed from sys/compat/hpux/Makefile)2
-rw-r--r--sys/compat/hpux/m68k/files.hpux17
-rw-r--r--sys/compat/hpux/m68k/hpux_exec.c (renamed from sys/compat/hpux/hpux_exec.c)9
-rw-r--r--sys/compat/hpux/m68k/hpux_exec.h120
-rw-r--r--sys/compat/hpux/m68k/hpux_net.c (renamed from sys/compat/hpux/hpux_net.c)22
-rw-r--r--sys/compat/hpux/m68k/hpux_sig.c (renamed from sys/compat/hpux/hpux_sig.c)4
-rw-r--r--sys/compat/hpux/m68k/syscalls.conf (renamed from sys/compat/hpux/syscalls.conf)2
-rw-r--r--sys/compat/hpux/m68k/syscalls.master (renamed from sys/compat/hpux/syscalls.master)6
18 files changed, 225 insertions, 2330 deletions
diff --git a/sys/compat/hpux/files.hpux b/sys/compat/hpux/files.hpux
deleted file mode 100644
index 7d6cd71639e..00000000000
--- a/sys/compat/hpux/files.hpux
+++ /dev/null
@@ -1,17 +0,0 @@
-# $OpenBSD: files.hpux,v 1.5 2002/12/10 23:47:53 miod Exp $
-# $NetBSD: files.hpux,v 1.2 1995/11/28 08:39:52 thorpej 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_exec.c compat_hpux
-file compat/hpux/hpux_net.c compat_hpux
-file compat/hpux/hpux_sig.c compat_hpux
-file compat/hpux/hpux_syscalls.c compat_hpux & syscall_debug
-file compat/hpux/hpux_sysent.c compat_hpux
-file compat/hpux/hpux_tty.c compat_hpux
diff --git a/sys/compat/hpux/hpux.h b/sys/compat/hpux/hpux.h
index df91477a0cc..fab8a4a5873 100644
--- a/sys/compat/hpux/hpux.h
+++ b/sys/compat/hpux/hpux.h
@@ -1,4 +1,4 @@
-/* $OpenBSD: hpux.h,v 1.10 2004/07/01 20:35:35 mickey Exp $ */
+/* $OpenBSD: hpux.h,v 1.11 2004/07/09 21:33:44 mickey Exp $ */
/* $NetBSD: hpux.h,v 1.11 1997/04/01 19:58:58 scottr Exp $ */
/*
@@ -149,51 +149,6 @@ struct hpux_ostat {
int hst_mtime;
int hst_ctime;
};
-/*
- * 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 */
-};
/* HP-UX compat file flags */
#define HPUXNDELAY 00000004
diff --git a/sys/compat/hpux/hpux_compat.c b/sys/compat/hpux/hpux_compat.c
index 9cc7033665d..e08f25d2911 100644
--- a/sys/compat/hpux/hpux_compat.c
+++ b/sys/compat/hpux/hpux_compat.c
@@ -1,4 +1,4 @@
-/* $OpenBSD: hpux_compat.c,v 1.27 2004/06/24 19:35:23 tholo Exp $ */
+/* $OpenBSD: hpux_compat.c,v 1.28 2004/07/09 21:33:44 mickey Exp $ */
/* $NetBSD: hpux_compat.c,v 1.35 1997/05/08 16:19:48 mycroft Exp $ */
/*
@@ -1043,6 +1043,8 @@ hpux_sys_lockf(p, v, retval)
return (0);
}
+
+#ifndef __hppa__
int
hpux_sys_getaccess(p, v, retval)
struct proc *p;
@@ -1142,8 +1144,7 @@ hpux_sys_getaccess(p, v, retval)
crfree(cred);
return (error);
}
-
-/* hpux_to_bsd_uoff() is found in hpux_machdep.c */
+#endif
/*
* Ancient HP-UX system calls. Some 9.x executables even use them!
diff --git a/sys/compat/hpux/hpux_exec.h b/sys/compat/hpux/hpux_exec.h
index 30f85e43094..f40ae260c5c 100644
--- a/sys/compat/hpux/hpux_exec.h
+++ b/sys/compat/hpux/hpux_exec.h
@@ -1,120 +1,9 @@
-/* $OpenBSD: hpux_exec.h,v 1.6 2003/06/02 23:28:00 millert 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_ */
+/* $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
index e55cdc97b9d..6ee19e08b7f 100644
--- a/sys/compat/hpux/hpux_file.c
+++ b/sys/compat/hpux/hpux_file.c
@@ -1,4 +1,4 @@
-/* $OpenBSD: hpux_file.c,v 1.14 2003/12/19 23:53:12 miod Exp $ */
+/* $OpenBSD: hpux_file.c,v 1.15 2004/07/09 21:33:44 mickey Exp $ */
/* $NetBSD: hpux_file.c,v 1.5 1997/04/27 21:40:48 thorpej Exp $ */
/*
@@ -81,9 +81,9 @@
#include <machine/hpux_machdep.h>
-static int hpux_stat1(struct proc *, void *, register_t *, int);
-static void bsd_to_hpux_stat(struct stat *, struct hpux_stat *);
-static void bsd_to_hpux_ostat(struct stat *, struct hpux_ostat *);
+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.
@@ -444,7 +444,7 @@ hpux_sys_lstat(p, v, retval)
/*
* Do the meat of stat(2) and lstat(2).
*/
-static int
+int
hpux_stat1(p, v, retval, dolstat)
struct proc *p;
void *v;
@@ -485,6 +485,7 @@ hpux_stat1(p, v, retval, dolstat)
return (copyout(&tmphst, SCARG(uap, sb), sizeof(struct hpux_stat)));
}
+#ifndef __hppa__
/*
* The old HP-UX fstat(2) system call.
*/
@@ -561,9 +562,36 @@ hpux_sys_stat_6x(p, v, retval)
}
/*
+ * 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.
*/
-static void
+void
bsd_to_hpux_stat(sb, hsb)
struct stat *sb;
struct hpux_stat *hsb;
@@ -595,32 +623,6 @@ bsd_to_hpux_stat(sb, hsb)
}
/*
- * Convert a NetBSD stat structure to an old-style HP-UX stat structure.
- */
-static 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;
-}
-
-/*
* HP-UX access(2) system call.
*/
int
diff --git a/sys/compat/hpux/hpux_syscall.h b/sys/compat/hpux/hpux_syscall.h
index 302be029345..54e2bfadf56 100644
--- a/sys/compat/hpux/hpux_syscall.h
+++ b/sys/compat/hpux/hpux_syscall.h
@@ -1,442 +1,9 @@
-/* $OpenBSD: hpux_syscall.h,v 1.11 2004/06/30 20:40:26 mickey Exp $ */
-
-/*
- * System call numbers.
- *
- * DO NOT EDIT-- this file is automatically generated.
- * created from OpenBSD: syscalls.master,v 1.10 2004/06/30 20:40:05 mickey 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: "getpgrp2" ret: "int" args: "pid_t" */
-#define HPUX_SYS_getpgrp2 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: "setsockopt2" ret: "int" args: "int" "int" "int" "caddr_t" "int" */
-#define HPUX_SYS_setsockopt2 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
+/* $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
index 1fbadcfa939..4714c855140 100644
--- a/sys/compat/hpux/hpux_syscallargs.h
+++ b/sys/compat/hpux/hpux_syscallargs.h
@@ -1,549 +1,7 @@
-/* $OpenBSD: hpux_syscallargs.h,v 1.13 2004/06/30 20:40:26 mickey Exp $ */
+/* $OpenBSD: hpux_syscallargs.h,v 1.14 2004/07/09 21:33:44 mickey Exp $ */
-/*
- * System call argument lists.
- *
- * DO NOT EDIT-- this file is automatically generated.
- * created from OpenBSD: syscalls.master,v 1.10 2004/06/30 20:40:05 mickey 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_getpgrp2_args {
- syscallarg(pid_t) pid;
-};
-
-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_setsockopt2_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 hpux_sys_getpgrp2(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_setsockopt2(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
+#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
index 14975674120..eda6a38e3e5 100644
--- a/sys/compat/hpux/hpux_syscalls.c
+++ b/sys/compat/hpux/hpux_syscalls.c
@@ -1,372 +1,9 @@
-/* $OpenBSD: hpux_syscalls.c,v 1.11 2004/06/30 20:40:26 mickey Exp $ */
+/* $OpenBSD: hpux_syscalls.c,v 1.12 2004/07/09 21:33:44 mickey Exp $ */
-/*
- * System call names.
- *
- * DO NOT EDIT-- this file is automatically generated.
- * created from OpenBSD: syscalls.master,v 1.10 2004/06/30 20:40:05 mickey 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 */
- "getpgrp2", /* 81 = getpgrp2 */
- "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 */
- "setsockopt2", /* 288 = setsockopt2 */
- "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 */
+#if defined(__hppa__)
+#include <compat/hpux/hppa/hpux_syscalls.c>
+#elif defined(__m68k__)
+#include <compat/hpux/m68k/hpux_syscalls.c>
#else
- "#314 (unimplemented shmctl)", /* 314 = unimplemented shmctl */
+#error COMPILING FOR UNSUPPORTED ARCHITECTURE
#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/hpux_sysent.c b/sys/compat/hpux/hpux_sysent.c
deleted file mode 100644
index 9df78edf09e..00000000000
--- a/sys/compat/hpux/hpux_sysent.c
+++ /dev/null
@@ -1,725 +0,0 @@
-/* $OpenBSD: hpux_sysent.c,v 1.12 2004/06/30 20:40:26 mickey Exp $ */
-
-/*
- * System call switch table.
- *
- * DO NOT EDIT-- this file is automatically generated.
- * created from OpenBSD: syscalls.master,v 1.10 2004/06/30 20:40:05 mickey 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/hpux_syscallargs.h>
-#include <machine/hpux_machdep.h>
-
-#define s(type) sizeof(type)
-
-struct sysent hpux_sysent[] = {
- { 0, 0,
- sys_nosys }, /* 0 = syscall */
- { 1, s(struct sys_exit_args),
- sys_exit }, /* 1 = exit */
- { 0, 0,
- hpux_sys_fork }, /* 2 = fork */
- { 3, s(struct hpux_sys_read_args),
- hpux_sys_read }, /* 3 = read */
- { 3, s(struct hpux_sys_write_args),
- hpux_sys_write }, /* 4 = write */
- { 3, s(struct hpux_sys_open_args),
- hpux_sys_open }, /* 5 = open */
- { 1, s(struct sys_close_args),
- sys_close }, /* 6 = close */
- { 1, s(struct hpux_sys_wait_args),
- hpux_sys_wait }, /* 7 = wait */
- { 2, s(struct hpux_sys_creat_args),
- hpux_sys_creat }, /* 8 = creat */
- { 2, s(struct sys_link_args),
- sys_link }, /* 9 = link */
- { 1, s(struct hpux_sys_unlink_args),
- hpux_sys_unlink }, /* 10 = unlink */
- { 2, s(struct hpux_sys_execv_args),
- hpux_sys_execv }, /* 11 = execv */
- { 1, s(struct hpux_sys_chdir_args),
- hpux_sys_chdir }, /* 12 = chdir */
- { 1, s(struct hpux_sys_time_6x_args),
- hpux_sys_time_6x }, /* 13 = time_6x */
- { 3, s(struct hpux_sys_mknod_args),
- hpux_sys_mknod }, /* 14 = mknod */
- { 2, s(struct hpux_sys_chmod_args),
- hpux_sys_chmod }, /* 15 = chmod */
- { 3, s(struct hpux_sys_chown_args),
- hpux_sys_chown }, /* 16 = chown */
- { 1, s(struct sys_obreak_args),
- sys_obreak }, /* 17 = obreak */
- { 2, s(struct hpux_sys_stat_6x_args),
- hpux_sys_stat_6x }, /* 18 = stat_6x */
- { 3, s(struct compat_43_sys_lseek_args),
- compat_43_sys_lseek }, /* 19 = lseek */
- { 0, 0,
- sys_getpid }, /* 20 = getpid */
- { 0, 0,
- sys_nosys }, /* 21 = unimplemented mount */
- { 0, 0,
- sys_nosys }, /* 22 = unimplemented umount */
- { 1, s(struct sys_setuid_args),
- sys_setuid }, /* 23 = setuid */
- { 0, 0,
- sys_getuid }, /* 24 = getuid */
- { 1, s(struct hpux_sys_stime_6x_args),
- hpux_sys_stime_6x }, /* 25 = stime_6x */
-#ifdef PTRACE
- { 4, s(struct hpux_sys_ptrace_args),
- hpux_sys_ptrace }, /* 26 = ptrace */
-#else
- { 0, 0,
- sys_nosys }, /* 26 = unimplemented ptrace */
-#endif
- { 1, s(struct hpux_sys_alarm_6x_args),
- hpux_sys_alarm_6x }, /* 27 = alarm_6x */
- { 2, s(struct hpux_sys_fstat_6x_args),
- hpux_sys_fstat_6x }, /* 28 = fstat_6x */
- { 0, 0,
- hpux_sys_pause_6x }, /* 29 = pause_6x */
- { 2, s(struct hpux_sys_utime_6x_args),
- hpux_sys_utime_6x }, /* 30 = utime_6x */
- { 2, s(struct hpux_sys_stty_6x_args),
- hpux_sys_stty_6x }, /* 31 = stty_6x */
- { 2, s(struct hpux_sys_gtty_6x_args),
- hpux_sys_gtty_6x }, /* 32 = gtty_6x */
- { 2, s(struct hpux_sys_access_args),
- hpux_sys_access }, /* 33 = access */
- { 1, s(struct hpux_sys_nice_6x_args),
- hpux_sys_nice_6x }, /* 34 = nice_6x */
- { 1, s(struct hpux_sys_ftime_6x_args),
- hpux_sys_ftime_6x }, /* 35 = ftime_6x */
- { 0, 0,
- sys_sync }, /* 36 = sync */
- { 2, s(struct hpux_sys_kill_args),
- hpux_sys_kill }, /* 37 = kill */
- { 2, s(struct hpux_sys_stat_args),
- hpux_sys_stat }, /* 38 = stat */
- { 0, 0,
- hpux_sys_setpgrp_6x }, /* 39 = setpgrp_6x */
- { 2, s(struct hpux_sys_lstat_args),
- hpux_sys_lstat }, /* 40 = lstat */
- { 1, s(struct sys_dup_args),
- sys_dup }, /* 41 = dup */
- { 0, 0,
- sys_opipe }, /* 42 = opipe */
- { 1, s(struct hpux_sys_times_6x_args),
- hpux_sys_times_6x }, /* 43 = times_6x */
- { 4, s(struct sys_profil_args),
- sys_profil }, /* 44 = profil */
- { 0, 0,
- sys_nosys }, /* 45 = unimplemented ki_syscall */
- { 1, s(struct sys_setgid_args),
- sys_setgid }, /* 46 = setgid */
- { 0, 0,
- sys_getgid }, /* 47 = getgid */
- { 2, s(struct hpux_sys_ssig_6x_args),
- hpux_sys_ssig_6x }, /* 48 = ssig_6x */
- { 0, 0,
- sys_nosys }, /* 49 = unimplemented reserved for USG */
- { 0, 0,
- sys_nosys }, /* 50 = unimplemented reserved for USG */
- { 0, 0,
- sys_nosys }, /* 51 = unimplemented acct */
- { 0, 0,
- sys_nosys }, /* 52 = unimplemented */
- { 0, 0,
- sys_nosys }, /* 53 = unimplemented */
- { 3, s(struct hpux_sys_ioctl_args),
- hpux_sys_ioctl }, /* 54 = ioctl */
- { 0, 0,
- sys_nosys }, /* 55 = unimplemented reboot */
- { 2, s(struct hpux_sys_symlink_args),
- hpux_sys_symlink }, /* 56 = symlink */
- { 3, s(struct hpux_sys_utssys_args),
- hpux_sys_utssys }, /* 57 = utssys */
- { 3, s(struct hpux_sys_readlink_args),
- hpux_sys_readlink }, /* 58 = readlink */
- { 3, s(struct hpux_sys_execve_args),
- hpux_sys_execve }, /* 59 = execve */
- { 1, s(struct sys_umask_args),
- sys_umask }, /* 60 = umask */
- { 1, s(struct sys_chroot_args),
- sys_chroot }, /* 61 = chroot */
- { 3, s(struct hpux_sys_fcntl_args),
- hpux_sys_fcntl }, /* 62 = fcntl */
- { 2, s(struct hpux_sys_ulimit_args),
- hpux_sys_ulimit }, /* 63 = ulimit */
- { 0, 0,
- sys_nosys }, /* 64 = unimplemented */
- { 0, 0,
- sys_nosys }, /* 65 = unimplemented */
- { 0, 0,
- hpux_sys_vfork }, /* 66 = vfork */
- { 3, s(struct hpux_sys_read_args),
- hpux_sys_read }, /* 67 = vread */
- { 3, s(struct hpux_sys_write_args),
- hpux_sys_write }, /* 68 = vwrite */
- { 0, 0,
- sys_nosys }, /* 69 = unimplemented */
- { 0, 0,
- sys_nosys }, /* 70 = unimplemented */
- { 6, s(struct hpux_sys_mmap_args),
- hpux_sys_mmap }, /* 71 = mmap */
- { 0, 0,
- sys_nosys }, /* 72 = unimplemented */
- { 2, s(struct sys_munmap_args),
- sys_munmap }, /* 73 = munmap */
- { 3, s(struct sys_mprotect_args),
- sys_mprotect }, /* 74 = mprotect */
- { 0, 0,
- sys_nosys }, /* 75 = unimplemented */
- { 0, 0,
- sys_nosys }, /* 76 = unimplemented */
- { 0, 0,
- sys_nosys }, /* 77 = unimplemented */
- { 0, 0,
- sys_nosys }, /* 78 = unimplemented */
- { 2, s(struct sys_getgroups_args),
- sys_getgroups }, /* 79 = getgroups */
- { 2, s(struct sys_setgroups_args),
- sys_setgroups }, /* 80 = setgroups */
- { 1, s(struct hpux_sys_getpgrp2_args),
- hpux_sys_getpgrp2 }, /* 81 = getpgrp2 */
- { 2, s(struct hpux_sys_setpgrp2_args),
- hpux_sys_setpgrp2 }, /* 82 = setpgrp2 */
- { 3, s(struct sys_setitimer_args),
- sys_setitimer }, /* 83 = setitimer */
- { 3, s(struct hpux_sys_wait3_args),
- hpux_sys_wait3 }, /* 84 = wait3 */
- { 0, 0,
- sys_nosys }, /* 85 = unimplemented swapon */
- { 2, s(struct sys_getitimer_args),
- sys_getitimer }, /* 86 = getitimer */
- { 0, 0,
- sys_nosys }, /* 87 = unimplemented */
- { 0, 0,
- sys_nosys }, /* 88 = unimplemented */
- { 0, 0,
- sys_nosys }, /* 89 = unimplemented */
- { 2, s(struct sys_dup2_args),
- sys_dup2 }, /* 90 = dup2 */
- { 0, 0,
- sys_nosys }, /* 91 = unimplemented */
- { 2, s(struct hpux_sys_fstat_args),
- hpux_sys_fstat }, /* 92 = fstat */
- { 5, s(struct sys_select_args),
- sys_select }, /* 93 = select */
- { 0, 0,
- sys_nosys }, /* 94 = unimplemented */
- { 1, s(struct sys_fsync_args),
- sys_fsync }, /* 95 = fsync */
- { 0, 0,
- sys_nosys }, /* 96 = unimplemented */
- { 0, 0,
- sys_nosys }, /* 97 = unimplemented */
- { 0, 0,
- sys_nosys }, /* 98 = unimplemented */
- { 0, 0,
- sys_nosys }, /* 99 = unimplemented */
- { 0, 0,
- sys_nosys }, /* 100 = unimplemented */
- { 0, 0,
- sys_nosys }, /* 101 = unimplemented */
- { 0, 0,
- sys_nosys }, /* 102 = unimplemented */
- { 1, s(struct hpux_sys_sigreturn_args),
- hpux_sys_sigreturn }, /* 103 = sigreturn */
- { 0, 0,
- sys_nosys }, /* 104 = unimplemented */
- { 0, 0,
- sys_nosys }, /* 105 = unimplemented */
- { 0, 0,
- sys_nosys }, /* 106 = unimplemented */
- { 0, 0,
- sys_nosys }, /* 107 = unimplemented */
- { 3, s(struct hpux_sys_sigvec_args),
- hpux_sys_sigvec }, /* 108 = sigvec */
- { 1, s(struct hpux_sys_sigblock_args),
- hpux_sys_sigblock }, /* 109 = sigblock */
- { 1, s(struct hpux_sys_sigsetmask_args),
- hpux_sys_sigsetmask }, /* 110 = sigsetmask */
- { 1, s(struct hpux_sys_sigpause_args),
- hpux_sys_sigpause }, /* 111 = sigpause */
- { 2, s(struct compat_43_sys_sigstack_args),
- compat_43_sys_sigstack }, /* 112 = sigstack */
- { 0, 0,
- sys_nosys }, /* 113 = unimplemented */
- { 0, 0,
- sys_nosys }, /* 114 = unimplemented */
- { 0, 0,
- sys_nosys }, /* 115 = unimplemented */
- { 1, s(struct sys_gettimeofday_args),
- sys_gettimeofday }, /* 116 = gettimeofday */
- { 0, 0,
- sys_nosys }, /* 117 = unimplemented */
- { 0, 0,
- sys_nosys }, /* 118 = unimplemented */
- { 0, 0,
- sys_nosys }, /* 119 = unimplemented io_stub */
- { 3, s(struct hpux_sys_readv_args),
- hpux_sys_readv }, /* 120 = readv */
- { 3, s(struct hpux_sys_writev_args),
- hpux_sys_writev }, /* 121 = writev */
- { 2, s(struct sys_settimeofday_args),
- sys_settimeofday }, /* 122 = settimeofday */
- { 3, s(struct sys_fchown_args),
- sys_fchown }, /* 123 = fchown */
- { 2, s(struct sys_fchmod_args),
- sys_fchmod }, /* 124 = fchmod */
- { 0, 0,
- sys_nosys }, /* 125 = unimplemented */
- { 3, s(struct sys_setresuid_args),
- sys_setresuid }, /* 126 = setresuid */
- { 3, s(struct sys_setresgid_args),
- sys_setresgid }, /* 127 = setresgid */
- { 2, s(struct hpux_sys_rename_args),
- hpux_sys_rename }, /* 128 = rename */
- { 2, s(struct hpux_sys_truncate_args),
- hpux_sys_truncate }, /* 129 = truncate */
- { 2, s(struct compat_43_sys_ftruncate_args),
- compat_43_sys_ftruncate }, /* 130 = ftruncate */
- { 0, 0,
- sys_nosys }, /* 131 = unimplemented */
- { 1, s(struct hpux_sys_sysconf_args),
- hpux_sys_sysconf }, /* 132 = sysconf */
- { 0, 0,
- sys_nosys }, /* 133 = unimplemented */
- { 0, 0,
- sys_nosys }, /* 134 = unimplemented */
- { 0, 0,
- sys_nosys }, /* 135 = unimplemented */
- { 2, s(struct hpux_sys_mkdir_args),
- hpux_sys_mkdir }, /* 136 = mkdir */
- { 1, s(struct hpux_sys_rmdir_args),
- hpux_sys_rmdir }, /* 137 = rmdir */
- { 0, 0,
- sys_nosys }, /* 138 = unimplemented */
- { 0, 0,
- sys_nosys }, /* 139 = unimplemented */
- { 0, 0,
- sys_nosys }, /* 140 = unimplemented */
- { 0, 0,
- sys_nosys }, /* 141 = unimplemented */
- { 0, 0,
- sys_nosys }, /* 142 = unimplemented */
- { 0, 0,
- sys_nosys }, /* 143 = unimplemented */
- { 2, s(struct hpux_sys_getrlimit_args),
- hpux_sys_getrlimit }, /* 144 = getrlimit */
- { 2, s(struct hpux_sys_setrlimit_args),
- hpux_sys_setrlimit }, /* 145 = setrlimit */
- { 0, 0,
- sys_nosys }, /* 146 = unimplemented */
- { 0, 0,
- sys_nosys }, /* 147 = unimplemented */
- { 0, 0,
- sys_nosys }, /* 148 = unimplemented */
- { 0, 0,
- sys_nosys }, /* 149 = unimplemented */
- { 0, 0,
- sys_nosys }, /* 150 = unimplemented */
- { 0, 0,
- sys_nosys }, /* 151 = unimplemented privgrp */
- { 2, s(struct hpux_sys_rtprio_args),
- hpux_sys_rtprio }, /* 152 = rtprio */
- { 0, 0,
- sys_nosys }, /* 153 = unimplemented plock */
- { 2, s(struct hpux_sys_netioctl_args),
- hpux_sys_netioctl }, /* 154 = netioctl */
- { 3, s(struct hpux_sys_lockf_args),
- hpux_sys_lockf }, /* 155 = lockf */
-#ifdef SYSVSEM
- { 3, s(struct sys_semget_args),
- sys_semget }, /* 156 = semget */
- { 4, s(struct sys___semctl_args),
- sys___semctl }, /* 157 = __semctl */
- { 3, s(struct sys_semop_args),
- sys_semop }, /* 158 = semop */
-#else
- { 0, 0,
- sys_nosys }, /* 156 = unimplemented semget */
- { 0, 0,
- sys_nosys }, /* 157 = unimplemented semctl */
- { 0, 0,
- sys_nosys }, /* 158 = unimplemented semop */
-#endif
-#ifdef SYSVMSG
- { 2, s(struct sys_msgget_args),
- sys_msgget }, /* 159 = msgget */
- { 3, s(struct sys_msgctl_args),
- sys_msgctl }, /* 160 = msgctl */
- { 4, s(struct sys_msgsnd_args),
- sys_msgsnd }, /* 161 = msgsnd */
- { 5, s(struct sys_msgrcv_args),
- sys_msgrcv }, /* 162 = msgrcv */
-#else
- { 0, 0,
- sys_nosys }, /* 159 = unimplemented msgget */
- { 0, 0,
- sys_nosys }, /* 160 = unimplemented msgctl */
- { 0, 0,
- sys_nosys }, /* 161 = unimplemented msgsnd */
- { 0, 0,
- sys_nosys }, /* 162 = unimplemented msgrcv */
-#endif
-#ifdef SYSVSHM
- { 3, s(struct sys_shmget_args),
- sys_shmget }, /* 163 = shmget */
- { 3, s(struct hpux_sys_shmctl_args),
- hpux_sys_shmctl }, /* 164 = shmctl */
- { 3, s(struct sys_shmat_args),
- sys_shmat }, /* 165 = shmat */
- { 1, s(struct sys_shmdt_args),
- sys_shmdt }, /* 166 = shmdt */
-#else
- { 0, 0,
- sys_nosys }, /* 163 = unimplemented shmget */
- { 0, 0,
- sys_nosys }, /* 164 = unimplemented shmctl */
- { 0, 0,
- sys_nosys }, /* 165 = unimplemented shmat */
- { 0, 0,
- sys_nosys }, /* 166 = unimplemented shmdt */
-#endif
- { 1, s(struct hpux_sys_advise_args),
- hpux_sys_advise }, /* 167 = advise */
- { 0, 0,
- sys_nosys }, /* 168 = unimplemented nsp_init */
- { 0, 0,
- sys_nosys }, /* 169 = unimplemented cluster */
- { 0, 0,
- sys_nosys }, /* 170 = unimplemented mkrnod */
- { 0, 0,
- sys_nosys }, /* 171 = unimplemented */
- { 0, 0,
- sys_nosys }, /* 172 = unimplemented unsp_open */
- { 0, 0,
- sys_nosys }, /* 173 = unimplemented */
- { 2, s(struct hpux_sys_getcontext_args),
- hpux_sys_getcontext }, /* 174 = getcontext */
- { 0, 0,
- sys_nosys }, /* 175 = unimplemented setcontext */
- { 0, 0,
- sys_nosys }, /* 176 = unimplemented bigio */
- { 0, 0,
- sys_nosys }, /* 177 = unimplemented pipenode */
- { 0, 0,
- sys_nosys }, /* 178 = unimplemented lsync */
- { 0, 0,
- sys_nosys }, /* 179 = unimplemented getmachineid */
- { 0, 0,
- sys_nosys }, /* 180 = unimplemented mysite */
- { 0, 0,
- sys_nosys }, /* 181 = unimplemented sitels */
- { 0, 0,
- sys_nosys }, /* 182 = unimplemented swapclients */
- { 0, 0,
- sys_nosys }, /* 183 = unimplemented rmtprocess */
- { 0, 0,
- sys_nosys }, /* 184 = unimplemented dskless_stats */
- { 0, 0,
- sys_nosys }, /* 185 = unimplemented */
- { 0, 0,
- sys_nosys }, /* 186 = unimplemented setacl */
- { 0, 0,
- sys_nosys }, /* 187 = unimplemented fsetacl */
- { 0, 0,
- sys_nosys }, /* 188 = unimplemented getacl */
- { 0, 0,
- sys_nosys }, /* 189 = unimplemented fgetacl */
- { 6, s(struct hpux_sys_getaccess_args),
- hpux_sys_getaccess }, /* 190 = getaccess */
- { 0, 0,
- sys_nosys }, /* 191 = unimplemented getaudid */
- { 0, 0,
- sys_nosys }, /* 192 = unimplemented setaudid */
- { 0, 0,
- sys_nosys }, /* 193 = unimplemented getaudproc */
- { 0, 0,
- sys_nosys }, /* 194 = unimplemented setaudproc */
- { 0, 0,
- sys_nosys }, /* 195 = unimplemented getevent */
- { 0, 0,
- sys_nosys }, /* 196 = unimplemented setevent */
- { 0, 0,
- sys_nosys }, /* 197 = unimplemented audwrite */
- { 0, 0,
- sys_nosys }, /* 198 = unimplemented audswitch */
- { 0, 0,
- sys_nosys }, /* 199 = unimplemented audctl */
- { 4, s(struct hpux_sys_waitpid_args),
- hpux_sys_waitpid }, /* 200 = waitpid */
- { 0, 0,
- sys_nosys }, /* 201 = unimplemented */
- { 0, 0,
- sys_nosys }, /* 202 = unimplemented */
- { 0, 0,
- sys_nosys }, /* 203 = unimplemented */
- { 0, 0,
- sys_nosys }, /* 204 = unimplemented */
- { 0, 0,
- sys_nosys }, /* 205 = unimplemented */
- { 0, 0,
- sys_nosys }, /* 206 = unimplemented */
- { 0, 0,
- sys_nosys }, /* 207 = unimplemented */
- { 0, 0,
- sys_nosys }, /* 208 = unimplemented */
- { 0, 0,
- sys_nosys }, /* 209 = unimplemented */
- { 0, 0,
- sys_nosys }, /* 210 = unimplemented */
- { 0, 0,
- sys_nosys }, /* 211 = unimplemented */
- { 0, 0,
- sys_nosys }, /* 212 = unimplemented */
- { 0, 0,
- sys_nosys }, /* 213 = unimplemented */
- { 0, 0,
- sys_nosys }, /* 214 = unimplemented */
- { 0, 0,
- sys_nosys }, /* 215 = unimplemented */
- { 0, 0,
- sys_nosys }, /* 216 = unimplemented */
- { 0, 0,
- sys_nosys }, /* 217 = unimplemented */
- { 0, 0,
- sys_nosys }, /* 218 = unimplemented */
- { 0, 0,
- sys_nosys }, /* 219 = unimplemented */
- { 0, 0,
- sys_nosys }, /* 220 = unimplemented */
- { 0, 0,
- sys_nosys }, /* 221 = unimplemented */
- { 0, 0,
- sys_nosys }, /* 222 = unimplemented */
- { 0, 0,
- sys_nosys }, /* 223 = unimplemented */
- { 0, 0,
- sys_nosys }, /* 224 = unimplemented set_no_trunc */
- { 2, s(struct sys_pathconf_args),
- sys_pathconf }, /* 225 = pathconf */
- { 2, s(struct sys_fpathconf_args),
- sys_fpathconf }, /* 226 = fpathconf */
- { 0, 0,
- sys_nosys }, /* 227 = unimplemented */
- { 0, 0,
- sys_nosys }, /* 228 = unimplemented */
- { 0, 0,
- sys_nosys }, /* 229 = unimplemented async_daemon */
- { 0, 0,
- sys_nosys }, /* 230 = unimplemented nfs_fcntl */
- { 4, s(struct compat_43_sys_getdirentries_args),
- compat_43_sys_getdirentries }, /* 231 = getdirentries */
- { 2, s(struct compat_09_sys_getdomainname_args),
- compat_09_sys_getdomainname }, /* 232 = getdomainname */
- { 0, 0,
- sys_nosys }, /* 233 = unimplemented nfs_getfh */
- { 0, 0,
- sys_nosys }, /* 234 = unimplemented vfsmount */
- { 0, 0,
- sys_nosys }, /* 235 = unimplemented nfs_svc */
- { 2, s(struct compat_09_sys_setdomainname_args),
- compat_09_sys_setdomainname }, /* 236 = setdomainname */
- { 0, 0,
- sys_nosys }, /* 237 = unimplemented statfs */
- { 0, 0,
- sys_nosys }, /* 238 = unimplemented fstatfs */
- { 3, s(struct hpux_sys_sigaction_args),
- hpux_sys_sigaction }, /* 239 = sigaction */
- { 3, s(struct hpux_sys_sigprocmask_args),
- hpux_sys_sigprocmask }, /* 240 = sigprocmask */
- { 1, s(struct hpux_sys_sigpending_args),
- hpux_sys_sigpending }, /* 241 = sigpending */
- { 1, s(struct hpux_sys_sigsuspend_args),
- hpux_sys_sigsuspend }, /* 242 = sigsuspend */
- { 0, 0,
- sys_nosys }, /* 243 = unimplemented fsctl */
- { 0, 0,
- sys_nosys }, /* 244 = unimplemented */
- { 0, 0,
- sys_nosys }, /* 245 = unimplemented pstat */
- { 0, 0,
- sys_nosys }, /* 246 = unimplemented */
- { 0, 0,
- sys_nosys }, /* 247 = unimplemented */
- { 0, 0,
- sys_nosys }, /* 248 = unimplemented */
- { 0, 0,
- sys_nosys }, /* 249 = unimplemented */
- { 0, 0,
- sys_nosys }, /* 250 = unimplemented */
- { 0, 0,
- sys_nosys }, /* 251 = unimplemented ulconnect */
- { 0, 0,
- sys_nosys }, /* 252 = unimplemented ulcontrol */
- { 0, 0,
- sys_nosys }, /* 253 = unimplemented ulcreate */
- { 0, 0,
- sys_nosys }, /* 254 = unimplemented uldest */
- { 0, 0,
- sys_nosys }, /* 255 = unimplemented ulrecv */
- { 0, 0,
- sys_nosys }, /* 256 = unimplemented ulrecvcn */
- { 0, 0,
- sys_nosys }, /* 257 = unimplemented ulsend */
- { 0, 0,
- sys_nosys }, /* 258 = unimplemented ulshutdown */
- { 0, 0,
- sys_nosys }, /* 259 = unimplemented swapfs */
- { 0, 0,
- sys_nosys }, /* 260 = unimplemented */
- { 0, 0,
- sys_nosys }, /* 261 = unimplemented */
- { 0, 0,
- sys_nosys }, /* 262 = unimplemented */
- { 0, 0,
- sys_nosys }, /* 263 = unimplemented */
- { 0, 0,
- sys_nosys }, /* 264 = unimplemented */
- { 0, 0,
- sys_nosys }, /* 265 = unimplemented */
- { 0, 0,
- sys_nosys }, /* 266 = unimplemented */
- { 0, 0,
- sys_nosys }, /* 267 = unimplemented tsync */
- { 0, 0,
- compat_43_sys_getdtablesize }, /* 268 = getdtablesize */
- { 3, s(struct sys_poll_args),
- sys_poll }, /* 269 = poll */
- { 0, 0,
- sys_nosys }, /* 270 = unimplemented getmsg */
- { 0, 0,
- sys_nosys }, /* 271 = unimplemented putmsg */
- { 1, s(struct sys_fchdir_args),
- sys_fchdir }, /* 272 = fchdir */
- { 0, 0,
- sys_nosys }, /* 273 = unimplemented getmount_cnt */
- { 0, 0,
- sys_nosys }, /* 274 = unimplemented getmount_entry */
- { 3, s(struct compat_43_sys_accept_args),
- compat_43_sys_accept }, /* 275 = accept */
- { 3, s(struct sys_bind_args),
- sys_bind }, /* 276 = bind */
- { 3, s(struct sys_connect_args),
- sys_connect }, /* 277 = connect */
- { 3, s(struct compat_43_sys_getpeername_args),
- compat_43_sys_getpeername }, /* 278 = getpeername */
- { 3, s(struct compat_43_sys_getsockname_args),
- compat_43_sys_getsockname }, /* 279 = getsockname */
- { 5, s(struct sys_getsockopt_args),
- sys_getsockopt }, /* 280 = getsockopt */
- { 2, s(struct sys_listen_args),
- sys_listen }, /* 281 = listen */
- { 4, s(struct compat_43_sys_recv_args),
- compat_43_sys_recv }, /* 282 = recv */
- { 6, s(struct compat_43_sys_recvfrom_args),
- compat_43_sys_recvfrom }, /* 283 = recvfrom */
- { 3, s(struct compat_43_sys_recvmsg_args),
- compat_43_sys_recvmsg }, /* 284 = recvmsg */
- { 4, s(struct compat_43_sys_send_args),
- compat_43_sys_send }, /* 285 = send */
- { 3, s(struct compat_43_sys_sendmsg_args),
- compat_43_sys_sendmsg }, /* 286 = sendmsg */
- { 6, s(struct sys_sendto_args),
- sys_sendto }, /* 287 = sendto */
- { 5, s(struct hpux_sys_setsockopt2_args),
- hpux_sys_setsockopt2 }, /* 288 = setsockopt2 */
- { 2, s(struct sys_shutdown_args),
- sys_shutdown }, /* 289 = shutdown */
- { 3, s(struct sys_socket_args),
- sys_socket }, /* 290 = socket */
- { 4, s(struct sys_socketpair_args),
- sys_socketpair }, /* 291 = socketpair */
- { 0, 0,
- sys_nosys }, /* 292 = unimplemented */
- { 0, 0,
- sys_nosys }, /* 293 = unimplemented */
- { 0, 0,
- sys_nosys }, /* 294 = unimplemented */
- { 0, 0,
- sys_nosys }, /* 295 = unimplemented */
- { 0, 0,
- sys_nosys }, /* 296 = unimplemented */
- { 0, 0,
- sys_nosys }, /* 297 = unimplemented */
- { 0, 0,
- sys_nosys }, /* 298 = unimplemented ipccreate */
- { 0, 0,
- sys_nosys }, /* 299 = unimplemented ipcname */
- { 0, 0,
- sys_nosys }, /* 300 = unimplemented ipcnamerase */
- { 0, 0,
- sys_nosys }, /* 301 = unimplemented ipclookup */
- { 0, 0,
- sys_nosys }, /* 302 = unimplemented ipcselect */
- { 0, 0,
- sys_nosys }, /* 303 = unimplemented ipcconnect */
- { 0, 0,
- sys_nosys }, /* 304 = unimplemented ipcrecvcn */
- { 0, 0,
- sys_nosys }, /* 305 = unimplemented ipcsend */
- { 0, 0,
- sys_nosys }, /* 306 = unimplemented ipcrecv */
- { 0, 0,
- sys_nosys }, /* 307 = unimplemented ipcgetnodename */
- { 0, 0,
- sys_nosys }, /* 308 = unimplemented ipcsetnodename */
- { 0, 0,
- sys_nosys }, /* 309 = unimplemented ipcontrol */
- { 0, 0,
- sys_nosys }, /* 310 = unimplemented ipcshutdown */
- { 0, 0,
- sys_nosys }, /* 311 = unimplemented ipcdest */
-#ifdef SYSVSEM
- { 4, s(struct sys___semctl_args),
- sys___semctl }, /* 312 = nsemctl */
-#else
- { 0, 0,
- sys_nosys }, /* 312 = unimplemented semctl */
-#endif
-#ifdef SYSVMSG
- { 3, s(struct sys_msgctl_args),
- sys_msgctl }, /* 313 = nmsgctl */
-#else
- { 0, 0,
- sys_nosys }, /* 313 = unimplemented msgctl */
-#endif
-#ifdef SYSVSHM
- { 3, s(struct hpux_sys_nshmctl_args),
- hpux_sys_nshmctl }, /* 314 = nshmctl */
-#else
- { 0, 0,
- sys_nosys }, /* 314 = unimplemented shmctl */
-#endif
- { 0, 0,
- sys_nosys }, /* 315 = unimplemented mpctl */
- { 0, 0,
- sys_nosys }, /* 316 = unimplemented exportfs */
- { 0, 0,
- sys_nosys }, /* 317 = unimplemented getpmsg */
- { 0, 0,
- sys_nosys }, /* 318 = unimplemented putpmsg */
- { 0, 0,
- sys_nosys }, /* 319 = unimplemented strioctl */
- { 0, 0,
- sys_nosys }, /* 320 = unimplemented msync */
- { 0, 0,
- sys_nosys }, /* 321 = unimplemented msleep */
- { 0, 0,
- sys_nosys }, /* 322 = unimplemented mwakeup */
- { 0, 0,
- sys_nosys }, /* 323 = unimplemented msem_init */
- { 0, 0,
- sys_nosys }, /* 324 = unimplemented msem_remove */
-};
-
diff --git a/sys/compat/hpux/hpux_tty.c b/sys/compat/hpux/hpux_tty.c
index a39fbe1cca5..60547a2e474 100644
--- a/sys/compat/hpux/hpux_tty.c
+++ b/sys/compat/hpux/hpux_tty.c
@@ -1,4 +1,4 @@
-/* $OpenBSD: hpux_tty.c,v 1.9 2003/06/02 23:28:00 millert Exp $ */
+/* $OpenBSD: hpux_tty.c,v 1.10 2004/07/09 21:33:45 mickey Exp $ */
/* $NetBSD: hpux_tty.c,v 1.14 1997/04/01 19:59:05 scottr Exp $ */
/*
@@ -472,6 +472,7 @@ hpuxtobsdbaud(hpux_speed)
return(hpuxtobsdbaudtab[hpux_speed & TIO_CBAUD]);
}
+#ifndef __hppa__
int
hpux_sys_stty_6x(p, v, retval)
struct proc *p;
@@ -499,6 +500,7 @@ hpux_sys_gtty_6x(p, v, retval)
return (getsettty(p, SCARG(uap, fd), HPUXTIOCSETP, SCARG(uap, arg)));
}
+#endif
/*
* Simplified version of ioctl() for use by
diff --git a/sys/compat/hpux/Makefile b/sys/compat/hpux/m68k/Makefile
index 65abc6a3170..90b5162664d 100644
--- a/sys/compat/hpux/Makefile
+++ b/sys/compat/hpux/m68k/Makefile
@@ -1,4 +1,4 @@
-# $OpenBSD: Makefile,v 1.2 2001/08/26 03:23:44 deraadt Exp $
+# $OpenBSD: Makefile,v 1.1 2004/07/09 21:33:45 mickey Exp $
DEP= syscalls.conf syscalls.master ../../kern/makesyscalls.sh
OBJS= hpux_sysent.c hpux_syscalls.c hpux_syscall.h hpux_syscallargs.h
diff --git a/sys/compat/hpux/m68k/files.hpux b/sys/compat/hpux/m68k/files.hpux
new file mode 100644
index 00000000000..4d154ecfe96
--- /dev/null
+++ b/sys/compat/hpux/m68k/files.hpux
@@ -0,0 +1,17 @@
+# $OpenBSD: files.hpux,v 1.1 2004/07/09 21:33:45 mickey Exp $
+# $NetBSD: files.hpux,v 1.2 1995/11/28 08:39:52 thorpej 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/m68k/hpux_exec.c compat_hpux
+file compat/hpux/m68k/hpux_net.c compat_hpux
+file compat/hpux/m68k/hpux_sig.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/hpux_exec.c b/sys/compat/hpux/m68k/hpux_exec.c
index b667fb570de..1bad2ef2894 100644
--- a/sys/compat/hpux/hpux_exec.c
+++ b/sys/compat/hpux/m68k/hpux_exec.c
@@ -1,4 +1,4 @@
-/* $OpenBSD: hpux_exec.c,v 1.15 2002/03/14 01:26:49 millert Exp $ */
+/* $OpenBSD: hpux_exec.c,v 1.1 2004/07/09 21:33:45 mickey Exp $ */
/* $NetBSD: hpux_exec.c,v 1.8 1997/03/16 10:14:44 thorpej Exp $ */
/*
@@ -56,8 +56,8 @@
#include <compat/hpux/hpux.h>
#include <compat/hpux/hpux_util.h>
-#include <compat/hpux/hpux_syscall.h>
-#include <compat/hpux/hpux_syscallargs.h>
+#include <compat/hpux/m68k/hpux_syscall.h>
+#include <compat/hpux/m68k/hpux_syscallargs.h>
#include <machine/hpux_machdep.h>
@@ -105,9 +105,6 @@ exec_hpux_makecmds(p, epp)
magic = HPUX_MAGIC(hpux_ep);
sysid = HPUX_SYSID(hpux_ep);
- /*
- * XXX This will lose if there's ever an hp700 port.
- */
if (sysid != MID_HPUX)
return (ENOEXEC);
diff --git a/sys/compat/hpux/m68k/hpux_exec.h b/sys/compat/hpux/m68k/hpux_exec.h
new file mode 100644
index 00000000000..ded9d211a9b
--- /dev/null
+++ b/sys/compat/hpux/m68k/hpux_exec.h
@@ -0,0 +1,120 @@
+/* $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/hpux_net.c b/sys/compat/hpux/m68k/hpux_net.c
index c29702d8e02..b84d9c4f5c5 100644
--- a/sys/compat/hpux/hpux_net.c
+++ b/sys/compat/hpux/m68k/hpux_net.c
@@ -1,4 +1,4 @@
-/* $OpenBSD: hpux_net.c,v 1.10 2003/06/02 23:28:00 millert Exp $ */
+/* $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 $ */
/*
@@ -60,16 +60,8 @@
#include <sys/syscallargs.h>
#include <compat/hpux/hpux.h>
-#include <compat/hpux/hpux_syscallargs.h>
#include <compat/hpux/hpux_util.h>
-
-struct hpux_sys_setsockopt_args {
- syscallarg(int) s;
- syscallarg(int) level;
- syscallarg(int) name;
- syscallarg(caddr_t) val;
- syscallarg(int) valsize;
-};
+#include <compat/hpux/m68k/hpux_syscallargs.h>
struct hpux_sys_getsockopt_args {
syscallarg(int) s;
@@ -79,7 +71,7 @@ struct hpux_sys_getsockopt_args {
syscallarg(int *) avalsize;
};
-int hpux_sys_setsockopt(struct proc *, void *, register_t *);
+int hpux_sys_setsockopt2(struct proc *, void *, register_t *);
int hpux_sys_getsockopt(struct proc *, void *, register_t *);
void socksetsize(int, struct mbuf *);
@@ -106,7 +98,7 @@ struct hpuxtobsdipc {
{ compat_43_sys_send, 4 }, /* 3f4 */
{ sys_shutdown, 2 }, /* 3f5 */
{ compat_43_sys_getsockname, 3 }, /* 3f6 */
- { hpux_sys_setsockopt, 5 }, /* 3f7 */
+ { hpux_sys_setsockopt2, 5 }, /* 3f7 */
{ sys_sendto, 6 }, /* 3f8 */
{ compat_43_sys_recvfrom, 6 }, /* 3f9 */
{ compat_43_sys_getpeername, 3 }, /* 3fa */
@@ -198,7 +190,7 @@ socksetsize(size, m)
/* ARGSUSED */
int
-hpux_sys_setsockopt(p, v, retval)
+hpux_sys_setsockopt2(p, v, retval)
struct proc *p;
void *v;
register_t *retval;
@@ -243,12 +235,12 @@ bad:
/* ARGSUSED */
int
-hpux_sys_setsockopt2(p, v, retval)
+hpux_sys_setsockopt(p, v, retval)
struct proc *p;
void *v;
register_t *retval;
{
- struct hpux_sys_setsockopt2_args *uap = v;
+ struct hpux_sys_setsockopt_args *uap = v;
struct file *fp;
struct mbuf *m = NULL;
int error;
diff --git a/sys/compat/hpux/hpux_sig.c b/sys/compat/hpux/m68k/hpux_sig.c
index b4d5bf4eb06..1cce337a533 100644
--- a/sys/compat/hpux/hpux_sig.c
+++ b/sys/compat/hpux/m68k/hpux_sig.c
@@ -1,4 +1,4 @@
-/* $OpenBSD: hpux_sig.c,v 1.7 2003/06/02 23:28:00 millert Exp $ */
+/* $OpenBSD: hpux_sig.c,v 1.1 2004/07/09 21:33:45 mickey Exp $ */
/* $NetBSD: hpux_sig.c,v 1.16 1997/04/01 19:59:02 scottr Exp $ */
/*
@@ -53,7 +53,7 @@
#include <compat/hpux/hpux.h>
#include <compat/hpux/hpux_sig.h>
-#include <compat/hpux/hpux_syscallargs.h>
+#include <compat/hpux/m68k/hpux_syscallargs.h>
/* indexed by HPUX signal number - 1 */
char hpuxtobsdsigmap[NSIG] = {
diff --git a/sys/compat/hpux/syscalls.conf b/sys/compat/hpux/m68k/syscalls.conf
index 22e0841d1a3..73a5090d7d6 100644
--- a/sys/compat/hpux/syscalls.conf
+++ b/sys/compat/hpux/m68k/syscalls.conf
@@ -1,4 +1,4 @@
-# $OpenBSD: syscalls.conf,v 1.3 1996/08/02 20:35:00 niklas Exp $
+# $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"
diff --git a/sys/compat/hpux/syscalls.master b/sys/compat/hpux/m68k/syscalls.master
index 0ca6054f130..dc576ad1bbe 100644
--- a/sys/compat/hpux/syscalls.master
+++ b/sys/compat/hpux/m68k/syscalls.master
@@ -1,4 +1,4 @@
- $OpenBSD: syscalls.master,v 1.10 2004/06/30 20:40:05 mickey Exp $
+ $OpenBSD: syscalls.master,v 1.1 2004/07/09 21:33:45 mickey Exp $
; $NetBSD: syscalls.master,v 1.13 1997/03/16 03:48:04 thorpej Exp $
; @(#)syscalls.master 8.1 (Berkeley) 7/19/93
@@ -40,7 +40,7 @@
#include <sys/syscallargs.h>
#include <compat/hpux/hpux.h>
-#include <compat/hpux/hpux_syscallargs.h>
+#include <compat/hpux/m68k/hpux_syscallargs.h>
#include <machine/hpux_machdep.h>
@@ -408,7 +408,7 @@
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_setsockopt2(int s, int level, int name, \
+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); }