prototyping problems, PR#71, felix@mamba.pond.sub.org
authorderaadt <deraadt@openbsd.org>
Mon, 27 Jan 1997 20:34:10 +0000 (20:34 +0000)
committerderaadt <deraadt@openbsd.org>
Mon, 27 Jan 1997 20:34:10 +0000 (20:34 +0000)
sys/arch/arm32/include/profile.h
sys/arch/i386/include/profile.h
sys/arch/m68k/include/profile.h
sys/arch/mvme88k/include/profile.h
sys/arch/pc532/include/profile.h
sys/lib/libkern/mcount.c

index 9d6a132..3070ff6 100644 (file)
  * 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.                  \
index f7035d6..c758c98 100644 (file)
@@ -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()                                                               \
 {                                                                      \
index 043fb67..9b463a1 100644 (file)
@@ -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)); \
index c6203ab..095919c 100644 (file)
  * 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()                                                               \
 {                                                                      \
index 046cade..1e1a51f 100644 (file)
@@ -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()                                                               \
 {                                                                      \
index acdde38..bfc9f2a 100644 (file)
@@ -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;
 {