summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorTheo de Raadt <deraadt@cvs.openbsd.org>1997-01-27 20:34:23 +0000
committerTheo de Raadt <deraadt@cvs.openbsd.org>1997-01-27 20:34:23 +0000
commit4877d47f7b5b3a6500cb143ee6a3910545d4b596 (patch)
tree9c076d0fd47425ecae2311e683a72eb3efa84460
parent487b3e927ace5b154e5bf007759bb82afc1e0463 (diff)
prototyping problems, PR#71, felix@mamba.pond.sub.org
-rw-r--r--sys/arch/arm32/include/profile.h4
-rw-r--r--sys/arch/i386/include/profile.h2
-rw-r--r--sys/arch/m68k/include/profile.h4
-rw-r--r--sys/arch/mvme88k/include/profile.h4
-rw-r--r--sys/arch/pc532/include/profile.h2
-rw-r--r--sys/lib/libkern/mcount.c1
6 files changed, 9 insertions, 8 deletions
diff --git a/sys/arch/arm32/include/profile.h b/sys/arch/arm32/include/profile.h
index 9d6a1327d26..3070ff6f8b2 100644
--- a/sys/arch/arm32/include/profile.h
+++ b/sys/arch/arm32/include/profile.h
@@ -36,11 +36,11 @@
* at the beginning of any C function.
*/
#define MCOUNT \
-extern void mcount() asm("mcount"); \
+extern void mcount __P((void)) asm("mcount"); \
void \
mcount() \
{ \
- register int selfpc, frompcindex; \
+ register int selfpc, frompcindex; \
/* \
* find the return address for mcount, \
* and the return address for mcount's caller. \
diff --git a/sys/arch/i386/include/profile.h b/sys/arch/i386/include/profile.h
index f7035d6ae99..c758c9871d8 100644
--- a/sys/arch/i386/include/profile.h
+++ b/sys/arch/i386/include/profile.h
@@ -38,7 +38,7 @@
#define _MCOUNT_DECL static __inline void _mcount
#define MCOUNT \
-extern void mcount() __asm("mcount"); \
+extern void mcount __P((void)) __asm("mcount"); \
void \
mcount() \
{ \
diff --git a/sys/arch/m68k/include/profile.h b/sys/arch/m68k/include/profile.h
index 043fb6774c3..9b463a1a33d 100644
--- a/sys/arch/m68k/include/profile.h
+++ b/sys/arch/m68k/include/profile.h
@@ -1,4 +1,4 @@
-/* $OpenBSD: profile.h,v 1.3 1996/05/29 18:38:33 niklas Exp $ */
+/* $OpenBSD: profile.h,v 1.4 1997/01/27 20:34:15 deraadt Exp $ */
/* $NetBSD: profile.h,v 1.3 1995/03/26 17:08:37 briggs Exp $ */
/*
@@ -39,7 +39,7 @@
#define _MCOUNT_DECL static __inline void _mcount
#define MCOUNT \
-extern void mcount() __asm("mcount"); void mcount() { \
+extern void mcount __P((void)) __asm("mcount"); void mcount() { \
int selfpc, frompcindex; \
__asm("movl a6@(4),%0" : "=r" (selfpc)); \
__asm("movl a6@(0)@(4),%0" : "=r" (frompcindex)); \
diff --git a/sys/arch/mvme88k/include/profile.h b/sys/arch/mvme88k/include/profile.h
index c6203ab7424..095919c1ed7 100644
--- a/sys/arch/mvme88k/include/profile.h
+++ b/sys/arch/mvme88k/include/profile.h
@@ -31,13 +31,13 @@
* SUCH DAMAGE.
*
* from: @(#)profile.h 8.1 (Berkeley) 6/11/93
- * $Id: profile.h,v 1.2 1996/03/24 16:52:34 tholo Exp $
+ * $Id: profile.h,v 1.3 1997/01/27 20:34:17 deraadt Exp $
*/
#define _MCOUNT_DECL static inline void _mcount
#define MCOUNT \
-extern void mcount() __asm("mcount"); \
+extern void mcount __P((void)) __asm("mcount"); \
void \
mcount() \
{ \
diff --git a/sys/arch/pc532/include/profile.h b/sys/arch/pc532/include/profile.h
index 046cadee104..1e1a51f222e 100644
--- a/sys/arch/pc532/include/profile.h
+++ b/sys/arch/pc532/include/profile.h
@@ -41,7 +41,7 @@
#define _MCOUNT_DECL static __inline void _mcount
#define MCOUNT \
-extern void mcount() __asm("mcount"); \
+extern void mcount __P((void)) __asm("mcount"); \
void \
mcount() \
{ \
diff --git a/sys/lib/libkern/mcount.c b/sys/lib/libkern/mcount.c
index acdde38523d..bfc9f2a481a 100644
--- a/sys/lib/libkern/mcount.c
+++ b/sys/lib/libkern/mcount.c
@@ -59,6 +59,7 @@ static char rcsid[] = "$NetBSD: mcount.c,v 1.3.6.1 1996/06/12 04:23:01 cgd Exp $
* both frompcindex and frompc. Any reasonable, modern compiler will
* perform this optimization.
*/
+_MCOUNT_DECL(u_long frompc, u_long selfpc);
_MCOUNT_DECL(frompc, selfpc) /* _mcount; may be static, inline, etc */
register u_long frompc, selfpc;
{