aboutsummaryrefslogtreecommitdiff
path: root/gdb/mcheck.c
diff options
context:
space:
mode:
Diffstat (limited to 'gdb/mcheck.c')
-rwxr-xr-xgdb/mcheck.c13
1 files changed, 9 insertions, 4 deletions
diff --git a/gdb/mcheck.c b/gdb/mcheck.c
index 309fcfd..68424cd 100755
--- a/gdb/mcheck.c
+++ b/gdb/mcheck.c
@@ -27,10 +27,15 @@ static void EXFUN((*old_free_hook), (PTR ptr));
static PTR EXFUN((*old_malloc_hook), (size_t size));
static PTR EXFUN((*old_realloc_hook), (PTR ptr, size_t size));
+#ifdef sgi
+#define ABORT_RETURNS int
+#else
+#define ABORT_RETURNS void
+#endif
/* Function to call when something awful happens. */
-extern void abort();
-static void EXFUN((*abortfunc), (void)) = (void (*)()) abort;
+extern ABORT_RETURNS abort();
+static ABORT_RETURNS EXFUN((*abortfunc), (void)) = abort;
/* Arbitrary magical numbers. */
#define MAGICWORD 0xfedabeeb
@@ -42,7 +47,7 @@ struct hdr
unsigned int magic; /* Magic number to check header integrity. */
};
-static void
+static ABORT_RETURNS
DEFUN(checkhdr, (hdr), CONST struct hdr *hdr)
{
if (hdr->magic != MAGICWORD || ((char *) &hdr[1])[hdr->size] != MAGICBYTE)
@@ -99,7 +104,7 @@ DEFUN(reallochook, (ptr, size), PTR ptr AND size_t size)
}
void
-DEFUN(mcheck, (func), void EXFUN((*func), (void)))
+DEFUN(mcheck, (func), ABORT_RETURNS EXFUN((*func), (void)))
{
static int mcheck_used = 0;