summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorNiklas Hallqvist <niklas@cvs.openbsd.org>1996-10-17 19:15:51 +0000
committerNiklas Hallqvist <niklas@cvs.openbsd.org>1996-10-17 19:15:51 +0000
commita486302e8679649c276cc04201bddb3ac26cb87b (patch)
tree0b16dcf7de6f61ac72b1a931e53f50b8572a1b92
parentf1737f18e9baa0780862ec2b54e52ce1546208bf (diff)
Contextual goo for -Wall, and remove some stasic specifiers
-rw-r--r--sys/compat/ibcs2/ibcs2_ipc.c46
-rw-r--r--sys/compat/linux/linux_ipc.c107
-rw-r--r--sys/compat/osf1/osf1_misc.c4
-rw-r--r--sys/compat/svr4/svr4_ncr.c13
4 files changed, 88 insertions, 82 deletions
diff --git a/sys/compat/ibcs2/ibcs2_ipc.c b/sys/compat/ibcs2/ibcs2_ipc.c
index 5b07fa40f3c..bacbe15e34a 100644
--- a/sys/compat/ibcs2/ibcs2_ipc.c
+++ b/sys/compat/ibcs2/ibcs2_ipc.c
@@ -1,4 +1,4 @@
-/* $OpenBSD: ibcs2_ipc.c,v 1.3 1996/08/02 20:35:07 niklas Exp $ */
+/* $OpenBSD: ibcs2_ipc.c,v 1.4 1996/10/17 19:15:47 niklas Exp $ */
/* $NetBSD: ibcs2_ipc.c,v 1.6 1996/05/03 17:05:23 christos Exp $ */
/*
@@ -67,6 +67,7 @@
#define IBCS2_IPC_SET 1
#define IBCS2_IPC_STAT 2
+#ifdef SYSVMSG
/*
* iBCS2 msgsys call
*/
@@ -85,10 +86,10 @@ struct ibcs2_msqid_ds {
ibcs2_time_t msg_ctime;
};
-static void cvt_msqid2imsqid __P((struct msqid_ds *, struct ibcs2_msqid_ds *));
-static void cvt_imsqid2msqid __P((struct ibcs2_msqid_ds *, struct msqid_ds *));
+void cvt_msqid2imsqid __P((struct msqid_ds *, struct ibcs2_msqid_ds *));
+void cvt_imsqid2msqid __P((struct ibcs2_msqid_ds *, struct msqid_ds *));
-static void
+void
cvt_msqid2imsqid(bp, ibp)
struct msqid_ds *bp;
struct ibcs2_msqid_ds *ibp;
@@ -107,7 +108,7 @@ cvt_msqid2imsqid(bp, ibp)
return;
}
-static void
+void
cvt_imsqid2msqid(ibp, bp)
struct ibcs2_msqid_ds *ibp;
struct msqid_ds *bp;
@@ -142,7 +143,6 @@ ibcs2_sys_msgsys(p, v, retval)
} */ *uap = v;
switch (SCARG(uap, which)) {
-#ifdef SYSVMSG
case 0: /* msgget */
SCARG(uap, which) = 1;
return compat_10_sys_msgsys(p, uap, retval);
@@ -180,13 +180,14 @@ ibcs2_sys_msgsys(p, v, retval)
case 3: /* msgsnd */
SCARG(uap, which) = 2;
return compat_10_sys_msgsys(p, uap, retval);
-#endif
default:
return EINVAL;
}
}
+#endif
+#ifdef SYSVSEM
/*
* iBCS2 semsys call
*/
@@ -207,13 +208,13 @@ struct ibcs2_sem {
u_short semzcnt;
};
-static void cvt_semid2isemid __P((struct semid_ds *, struct ibcs2_semid_ds *));
-static void cvt_isemid2semid __P((struct ibcs2_semid_ds *, struct semid_ds *));
+void cvt_semid2isemid __P((struct semid_ds *, struct ibcs2_semid_ds *));
+void cvt_isemid2semid __P((struct ibcs2_semid_ds *, struct semid_ds *));
#ifdef notdef
-static void cvt_sem2isem __P((struct sem *, struct ibcs2_sem *));
-static void cvt_isem2sem __P((struct ibcs2_sem *, struct sem *));
+void cvt_sem2isem __P((struct sem *, struct ibcs2_sem *));
+void cvt_isem2sem __P((struct ibcs2_sem *, struct sem *));
-static void
+void
cvt_sem2isem(bp, ibp)
struct sem *bp;
struct ibcs2_sem *ibp;
@@ -225,7 +226,7 @@ cvt_sem2isem(bp, ibp)
return;
}
-static void
+void
cvt_isem2sem(ibp, bp)
struct ibcs2_sem *ibp;
struct sem *bp;
@@ -238,7 +239,7 @@ cvt_isem2sem(ibp, bp)
}
#endif
-static void
+void
cvt_semid2isemid(bp, ibp)
struct semid_ds *bp;
struct ibcs2_semid_ds *ibp;
@@ -251,7 +252,7 @@ cvt_semid2isemid(bp, ibp)
return;
}
-static void
+void
cvt_isemid2semid(ibp, bp)
struct ibcs2_semid_ds *ibp;
struct semid_ds *bp;
@@ -279,7 +280,6 @@ ibcs2_sys_semsys(p, v, retval)
} */ *uap = v;
int error;
-#ifdef SYSVSEM
switch (SCARG(uap, which)) {
case 0: /* semctl */
switch(SCARG(uap, a4)) {
@@ -328,11 +328,12 @@ ibcs2_sys_semsys(p, v, retval)
case 2: /* semop */
return compat_10_sys_semsys(p, uap, retval);
}
-#endif
return EINVAL;
}
+#endif
+#ifdef SYSVSHM
/*
* iBCS2 shmsys call
*/
@@ -351,10 +352,10 @@ struct ibcs2_shmid_ds {
ibcs2_time_t shm_ctime;
};
-static void cvt_shmid2ishmid __P((struct shmid_ds *, struct ibcs2_shmid_ds *));
-static void cvt_ishmid2shmid __P((struct ibcs2_shmid_ds *, struct shmid_ds *));
+void cvt_shmid2ishmid __P((struct shmid_ds *, struct ibcs2_shmid_ds *));
+void cvt_ishmid2shmid __P((struct ibcs2_shmid_ds *, struct shmid_ds *));
-static void
+void
cvt_shmid2ishmid(bp, ibp)
struct shmid_ds *bp;
struct ibcs2_shmid_ds *ibp;
@@ -371,7 +372,7 @@ cvt_shmid2ishmid(bp, ibp)
return;
}
-static void
+void
cvt_ishmid2shmid(ibp, bp)
struct ibcs2_shmid_ds *ibp;
struct shmid_ds *bp;
@@ -402,7 +403,6 @@ ibcs2_sys_shmsys(p, v, retval)
} */ *uap = v;
int error;
-#ifdef SYSVSHM
switch (SCARG(uap, which)) {
case 0: /* shmat */
return compat_10_sys_shmsys(p, uap, retval);
@@ -454,6 +454,6 @@ ibcs2_sys_shmsys(p, v, retval)
case 3: /* shmget */
return compat_10_sys_shmsys(p, uap, retval);
}
-#endif
return EINVAL;
}
+#endif
diff --git a/sys/compat/linux/linux_ipc.c b/sys/compat/linux/linux_ipc.c
index 1212be8410b..c3de05c1ddc 100644
--- a/sys/compat/linux/linux_ipc.c
+++ b/sys/compat/linux/linux_ipc.c
@@ -1,4 +1,4 @@
-/* $OpenBSD: linux_ipc.c,v 1.2 1996/04/17 05:23:52 mickey Exp $ */
+/* $OpenBSD: linux_ipc.c,v 1.3 1996/10/17 19:15:48 niklas Exp $ */
/* $NetBSD: linux_ipc.c,v 1.10 1996/04/05 00:01:44 christos Exp $ */
/*
@@ -70,53 +70,46 @@
*/
#ifdef SYSVSEM
-static int linux_semop __P((struct proc *, struct linux_sys_ipc_args *,
- register_t *));
-static int linux_semget __P((struct proc *, struct linux_sys_ipc_args *,
- register_t *));
-static int linux_semctl __P((struct proc *, struct linux_sys_ipc_args *,
- register_t *));
-static void bsd_to_linux_semid_ds __P((struct semid_ds *,
- struct linux_semid_ds *));
-static void linux_to_bsd_semid_ds __P((struct linux_semid_ds *,
- struct semid_ds *));
+int linux_semop __P((struct proc *, struct linux_sys_ipc_args *,
+ register_t *));
+int linux_semget __P((struct proc *, struct linux_sys_ipc_args *,
+ register_t *));
+int linux_semctl __P((struct proc *, struct linux_sys_ipc_args *,
+ register_t *));
+void bsd_to_linux_semid_ds __P((struct semid_ds *, struct linux_semid_ds *));
+void linux_to_bsd_semid_ds __P((struct linux_semid_ds *, struct semid_ds *));
#endif
#ifdef SYSVMSG
-static int linux_msgsnd __P((struct proc *, struct linux_sys_ipc_args *,
- register_t *));
-static int linux_msgrcv __P((struct proc *, struct linux_sys_ipc_args *,
- register_t *));
-static int linux_msgget __P((struct proc *, struct linux_sys_ipc_args *,
- register_t *));
-static int linux_msgctl __P((struct proc *, struct linux_sys_ipc_args *,
- register_t *));
-static void linux_to_bsd_msqid_ds __P((struct linux_msqid_ds *,
- struct msqid_ds *));
-static void bsd_to_linux_msqid_ds __P((struct msqid_ds *,
- struct linux_msqid_ds *));
+int linux_msgsnd __P((struct proc *, struct linux_sys_ipc_args *,
+ register_t *));
+int linux_msgrcv __P((struct proc *, struct linux_sys_ipc_args *,
+ register_t *));
+int linux_msgget __P((struct proc *, struct linux_sys_ipc_args *,
+ register_t *));
+int linux_msgctl __P((struct proc *, struct linux_sys_ipc_args *,
+ register_t *));
+void linux_to_bsd_msqid_ds __P((struct linux_msqid_ds *, struct msqid_ds *));
+void bsd_to_linux_msqid_ds __P((struct msqid_ds *, struct linux_msqid_ds *));
#endif
#ifdef SYSVSHM
-static int linux_shmat __P((struct proc *, struct linux_sys_ipc_args *,
- register_t *));
-static int linux_shmdt __P((struct proc *, struct linux_sys_ipc_args *,
- register_t *));
-static int linux_shmget __P((struct proc *, struct linux_sys_ipc_args *,
- register_t *));
-static int linux_shmctl __P((struct proc *, struct linux_sys_ipc_args *,
- register_t *));
-static void linux_to_bsd_shmid_ds __P((struct linux_shmid_ds *,
- struct shmid_ds *));
-static void bsd_to_linux_shmid_ds __P((struct shmid_ds *,
- struct linux_shmid_ds *));
+int linux_shmat __P((struct proc *, struct linux_sys_ipc_args *,
+ register_t *));
+int linux_shmdt __P((struct proc *, struct linux_sys_ipc_args *,
+ register_t *));
+int linux_shmget __P((struct proc *, struct linux_sys_ipc_args *,
+ register_t *));
+int linux_shmctl __P((struct proc *, struct linux_sys_ipc_args *,
+ register_t *));
+void linux_to_bsd_shmid_ds __P((struct linux_shmid_ds *, struct shmid_ds *));
+void bsd_to_linux_shmid_ds __P((struct shmid_ds *, struct linux_shmid_ds *));
#endif
-
-static void linux_to_bsd_ipc_perm __P((struct linux_ipc_perm *,
- struct ipc_perm *));
-static void bsd_to_linux_ipc_perm __P((struct ipc_perm *,
- struct linux_ipc_perm *));
+#if defined(SYSVMSG) || defined(SYSVSEM) || defined(SYSVSHM)
+void linux_to_bsd_ipc_perm __P((struct linux_ipc_perm *, struct ipc_perm *));
+void bsd_to_linux_ipc_perm __P((struct ipc_perm *, struct linux_ipc_perm *));
+#endif
int
linux_sys_ipc(p, v, retval)
@@ -166,11 +159,12 @@ linux_sys_ipc(p, v, retval)
}
}
+#if defined(SYSVMSG) || defined(SYSVSEM) || defined(SYSVSHM)
/*
* Convert between Linux and NetBSD ipc_perm structures. Only the
* order of the fields is different.
*/
-static void
+void
linux_to_bsd_ipc_perm(lpp, bpp)
struct linux_ipc_perm *lpp;
struct ipc_perm *bpp;
@@ -185,7 +179,7 @@ linux_to_bsd_ipc_perm(lpp, bpp)
bpp->seq = lpp->l_seq;
}
-static void
+void
bsd_to_linux_ipc_perm(bpp, lpp)
struct ipc_perm *bpp;
struct linux_ipc_perm *lpp;
@@ -199,6 +193,7 @@ bsd_to_linux_ipc_perm(bpp, lpp)
lpp->l_mode = bpp->mode;
lpp->l_seq = bpp->seq;
}
+#endif
#ifdef SYSVSEM
/*
@@ -209,7 +204,7 @@ bsd_to_linux_ipc_perm(bpp, lpp)
/*
* Convert between Linux and NetBSD semid_ds structures.
*/
-static void
+void
bsd_to_linux_semid_ds(bs, ls)
struct semid_ds *bs;
struct linux_semid_ds *ls;
@@ -222,7 +217,7 @@ bsd_to_linux_semid_ds(bs, ls)
ls->l_sem_base = bs->sem_base;
}
-static void
+void
linux_to_bsd_semid_ds(ls, bs)
struct linux_semid_ds *ls;
struct semid_ds *bs;
@@ -365,7 +360,7 @@ linux_semctl(p, uap, retval)
#ifdef SYSVMSG
-static void
+void
linux_to_bsd_msqid_ds(lmp, bmp)
struct linux_msqid_ds *lmp;
struct msqid_ds *bmp;
@@ -384,7 +379,7 @@ linux_to_bsd_msqid_ds(lmp, bmp)
bmp->msg_ctime = lmp->l_msg_ctime;
}
-static void
+void
bsd_to_linux_msqid_ds(bmp, lmp)
struct msqid_ds *bmp;
struct linux_msqid_ds *lmp;
@@ -403,7 +398,7 @@ bsd_to_linux_msqid_ds(bmp, lmp)
lmp->l_msg_ctime = bmp->msg_ctime;
}
-static int
+int
linux_msgsnd(p, uap, retval)
struct proc *p;
struct linux_sys_ipc_args /* {
@@ -425,7 +420,7 @@ linux_msgsnd(p, uap, retval)
return sys_msgsnd(p, &bma, retval);
}
-static int
+int
linux_msgrcv(p, uap, retval)
struct proc *p;
struct linux_sys_ipc_args /* {
@@ -453,7 +448,7 @@ linux_msgrcv(p, uap, retval)
return sys_msgrcv(p, &bma, retval);
}
-static int
+int
linux_msgget(p, uap, retval)
struct proc *p;
struct linux_sys_ipc_args /* {
@@ -473,7 +468,7 @@ linux_msgget(p, uap, retval)
return sys_msgget(p, &bma, retval);
}
-static int
+int
linux_msgctl(p, uap, retval)
struct proc *p;
struct linux_sys_ipc_args /* {
@@ -527,7 +522,7 @@ linux_msgctl(p, uap, retval)
* in which the return value is to be passed. This is subsequently
* handled by libc, apparently.
*/
-static int
+int
linux_shmat(p, uap, retval)
struct proc *p;
struct linux_sys_ipc_args /* {
@@ -561,7 +556,7 @@ linux_shmat(p, uap, retval)
* shmdt(): this could have been mapped directly, if it wasn't for
* the extra indirection by the linux_ipc system call.
*/
-static int
+int
linux_shmdt(p, uap, retval)
struct proc *p;
struct linux_sys_ipc_args /* {
@@ -583,7 +578,7 @@ linux_shmdt(p, uap, retval)
/*
* Same story as shmdt.
*/
-static int
+int
linux_shmget(p, uap, retval)
struct proc *p;
struct linux_sys_ipc_args /* {
@@ -612,7 +607,7 @@ linux_shmget(p, uap, retval)
*
* We abuse a Linux internal field for that.
*/
-static void
+void
linux_to_bsd_shmid_ds(lsp, bsp)
struct linux_shmid_ds *lsp;
struct shmid_ds *bsp;
@@ -629,7 +624,7 @@ linux_to_bsd_shmid_ds(lsp, bsp)
bsp->shm_internal = lsp->l_private2; /* XXX Oh well. */
}
-static void
+void
bsd_to_linux_shmid_ds(bsp, lsp)
struct shmid_ds *bsp;
struct linux_shmid_ds *lsp;
@@ -653,7 +648,7 @@ bsd_to_linux_shmid_ds(bsp, lsp)
*
* The usual structure conversion and massaging is done.
*/
-static int
+int
linux_shmctl(p, uap, retval)
struct proc *p;
struct linux_sys_ipc_args /* {
diff --git a/sys/compat/osf1/osf1_misc.c b/sys/compat/osf1/osf1_misc.c
index ea6d647eecd..bd611b4407c 100644
--- a/sys/compat/osf1/osf1_misc.c
+++ b/sys/compat/osf1/osf1_misc.c
@@ -1,4 +1,4 @@
-/* $OpenBSD: osf1_misc.c,v 1.6 1996/10/12 15:45:03 niklas Exp $ */
+/* $OpenBSD: osf1_misc.c,v 1.7 1996/10/17 19:15:49 niklas Exp $ */
/* $NetBSD: osf1_misc.c,v 1.7 1995/10/07 06:53:04 mycroft Exp $ */
/*
@@ -967,7 +967,9 @@ osf1_sys_execve(p, v, retval)
struct osf1_sys_execve_args *uap = v;
caddr_t sg = stackgap_init(p->p_emul);
+#if 0
OSF1_CHECK_ALT_EXIST(p, &sg, SCARG(uap, path));
+#endif
return (sys_execve(p, (struct sys_execve_args *)&uap, retval));
}
diff --git a/sys/compat/svr4/svr4_ncr.c b/sys/compat/svr4/svr4_ncr.c
index 253739192c3..a3c252d8393 100644
--- a/sys/compat/svr4/svr4_ncr.c
+++ b/sys/compat/svr4/svr4_ncr.c
@@ -1,4 +1,4 @@
-/* $OpenBSD: svr4_ncr.c,v 1.1 1996/04/25 10:20:18 niklas Exp $ */
+/* $OpenBSD: svr4_ncr.c,v 1.2 1996/10/17 19:15:50 niklas Exp $ */
/*
* Copyright (c) 1995, 1996 Niklas Hallqvist
@@ -33,10 +33,19 @@
#ifdef COMPAT_SVR4_NCR
+#include <sys/types.h>
#include <sys/errno.h>
+#include <sys/signal.h>
+
+#include <compat/svr4/svr4_types.h>
+#include <compat/svr4/svr4_signal.h>
+#include <compat/svr4/svr4_syscallargs.h>
int
-svr4_ncr_sys_rdebug()
+svr4_ncr_sys_rdebug(p, v, retval)
+ struct proc *p;
+ void *v;
+ register_t *retval;
{
return ENXIO;
}